Textpattern Plugin : ajw_public_notepad
27 March 2005 @ really damn late | Comments (7)
Plugin Details
- Download:
- ajw_notepad_public
- Version:
- 0.1
- Forum:
- Read discussion
- Status on this site:
- Active
Please use forum for all bug reports and questions
Summary
*This plugin requires 1.0RC3 (_rev198+_)*
This is the first admin-plugin incarnation of the former notepad hack. Because admin plugins currently lack the ability to allow for adding custom top-level tabs (_like the ‘extensions’ tab_), I have opted to simply drop the ‘private’ notepad for now and stick with the ‘public’ notepad only. In the future, if top-level tab creation becomes possible for textpattern admin plugins, this will likely move toward the former hack’s structure: a notepad top-level tab and public/private subtabs.
Additionally, I have omitted a multi-note feature because I personally feel that if you’re going to be relying on textpattern as a full-featured task manager then you’re probably an organizational mess. This notepad is mainly meant for simple communication between authors, jotting down one-line ideas without having to create a new article, or perhaps an introductory blurb relating to naming conventions and site structure.

The basics
The public notepad is viewable to all users who share privileges with its top level tab. By default, this plugin creates the notepad subtab under ‘content’ so that it will be viewable to all users.
You may decide that you’d like to have the tab display under a different top-level tab, such as Extensions or Admin. This is easily accomplished: after installation, simply edit the word ‘content‘ to read ‘admin‘ or ‘extensions‘ in the line:
register_tab("content", "notepublic", "notepad");
Keep in mind that it will inherit any privileges assigned to its parent tab from within /lib/admin_config.php, so you may have to adjust privileges.
Installation
Aside from installing the plugin itself, you will need to create the necessary mysql table in order to store your notes. If you’ve already got the table in your database from hacking an earlier version of textpattern, the existing table in your mysql database should still work fine. If not, please download the associated sql dump that can be installed via phpmyadmin, or you can opt to run the installer script I’ve whipped up (_visit the url associated with this plugin to download_).
You may choose one of two database table installation methods:
- Save file to disk
- Rename file extension to .sql
- Import file into phpmyadmin or via mysql command line
OR
- Save file to disk
- Rename file extension to .php
- Upload to your
/textpattern/directory - Load file in your browser
Miscellaneous
If you’d like to restyle or change the size/font/etc of the notepad textarea, you may edit /textpattern/textpattern.css and redefine styles for the element textarea#notepublic.
7 comments