You are not logged in.
Summary
adi_notes – leave notes for Textpattern users.
Once installed and activated, you’ll get:
See the help supplied with the plugin, or have a look online. The adi_notes admin tab also has some tooltips (hover over anything that has a dashed underline).
Why another notepad?
I wanted a way to record useful information so that it was available in the Textpattern Admin interface.
For example, notes for myself:
But more importantly I wanted to leave instructions for clients. For example:
As always, my first port of call was the excellent Textpattern Resources. This led me to Andrew Waer’s ajw_public_notepad. It provides some of my required functionality but it wasn’t quite what I was looking for.
ajw_public_notepad seems to provide a simple messaging or bulletin board functionality. I wanted a more dictatorial approach – “Listen to what I have to say and don’t answer back”. I also wanted to have Textile capability.
For those of you using ajw_public_notepad, here’s a comparison:
ajw_public_notepad
adi_notes
Out of the box functionality
Once the adi_notes plugin has been installed and activated, a new tab appears under Extensions. Here you can perform the installation.
By selecting different visibility options you can have note tabs under Presentation and Admin as well.
Footnotes are added/edited by clicking on the links that will appear at the bottom of every page.
Admin tab features
Users with sufficient privileges will see the adi_notes admin tab, under Extensions. This provides functionality to:
Version History
Requirements
Tested in:
Download & Installation
Download adi_notes and install the plugin in the usual way. If you are upgrading from a previous version make an independent copy of your notes – see instructions below.
Go to the adi_notes tab under Extensions, select “Install” and click the “Do admin” button.
By default you’ll get a note tab under Content but you can change the visibility to get notes under all or some of: Content, Presentation, Admin.
Add footnotes by clicking the “add note” link that appears at the bottom of each page.
Upgrading from a pre-1.0 version of adi_notes
Due to a change in the adi_notes database table structure, when you upgrade from an early version of adi_notes you will be prompted to perform an “Upgrade” in the adi_notes admin tab.
Although a backup of your notes will be made during the upgrade process it is recommended that you make an independent copy.
Once you are happy with the new version of adi_notes, you can delete the backup by selecting the “Cleanup” option in the adi_notes admin tab.
Bugs
Let me know if you find any problems.
Feedback
Comments are most welcome.
Credits
Much of the code has been lifted from ajw_public_notepad, thanks Andrew.
Last edited by gomedia (2009-05-11 23:50:19)
Offline
Few minutes ago, I was thinking (and groaning a little) that I have to install ajw_public_notepad on a site once again, and start writing some help docs for users.
But then, I clicked on the “Show new posts” link on this forum… and you came with this little new toy to play with :D
Many thanks, Adi!
Haven’t tested it yet, but I already have some feature requests ;)
Well, I should test it now and come back with some feedback.
Thanks again.
Offline
Kaboom!
Warning: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'FALSE, last_mod DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00', last_mod_ID' at line 3 CREATE TABLE IF NOT EXISTS adi_notes ( name VARCHAR(64) NOT NULL DEFAULT '', visible BOOLEAN NOT NULL DEFAULT FALSE, last_mod DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00', last_mod_ID VARCHAR(64) DEFAULT NULL, restricted_privs VARCHAR(64) NOT NULL DEFAULT '1,2,3,4,5,6', restricted_ID VARCHAR(64) DEFAULT NULL, note TEXT NOT NULL DEFAULT '', PRIMARY KEY (name) ); in /nfs/xxxxxx/html/textpattern/lib/txplib_db.php on line 81
I’m on:
TxP 4.0.6
PHP version: 5.2.6
MySQL: 4.1.11-Debian_4sarge7
Server: Apache/2.0.54
I’ve read you tested it on MySQL > 5. That could be the problem, right?
Any chance to make it work on MySQL > 4 (I think it’s a more common version across many hostings)?
Thanks.
Last edited by maniqui (2008-08-06 05:05:57)
Offline
Julián,
Kaboom indeed! Thanks for your messages and apologies for it not working for you.
I’ll look into the problem immediately. I didn’t think I was doing anything remotely advanced for there to be a problem but you’re right, it smells of something that MySQL 4 doesn’t support.
I’ll have a think about your feature requests as well.
Regards,
Adi
Offline
Julián, that is possible cause that query is just – invalid for your install. First of all, the field names should be surrounded, also there is missing NOT NULL/NULL and also a invalid default value – actually two for mysql 4, me thinks.
Not tested, written on fly but something like this should work instead:
CREATE TABLE IF NOT EXISTS adi_notes(
`name` VARCHAR(64) NOT NULL DEFAULT '',
`visible` INT(1) NOT NULL DEFAULT '0',
`last_mod` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00',
`last_mod_ID` VARCHAR(64) NOT NULL DEFAULT '',
`restricted_privs` VARCHAR(22) NOT NULL DEFAULT '1,2,3,4,5,6',
`restricted_ID` VARCHAR(22) NULL DEFAULT '',
`note` TEXT NOT NULL DEFAULT '',
PRIMARY KEY(name)
);
Only fixed the query, with out looking the plugin, so hard to know are those nulls bugs or features. :) PS. also made privs field from 64 to 22 – should be enough.
Last edited by Gocom (2008-08-06 05:45:19)
Rah-plugins | What? I’m a little confused… again :-) <txp:is_god />
Offline
Thanks Jukka. My lack of MySQL knowledge has been exposed for all to see.
The datatype of BOOLEAN was a blind guess but it worked for me. I’ve just noticed that it doesn’t exist according to the MySQL online documentation. Easily changed to INT.
I must admit, ajw_public_notepad had `quotes` around the column names & I took them out to see what would happen – nothing went bang so left them out. Moral: don’t fiddle, it might break!
Columns restricted_privs and restricted_ID aren’t used elsewhere – they’re reserved for future use.
The missing NOT NULLs problem was compounded when I copied what went before.
Offline
Adi – you only need the backticks if you’re using a reserved word.
Offline
jm wrote:
Adi – you only need the backticks if you’re using a reserved word.
Thanks, Jon-Michael, much obliged.
Offline
While waiting for “official” fix, I just wanted to say that Gocom’s fix worked perfectly for me :D
Offline
I’ve implemented the CREATE TABLE fix. Download version 0.2 and give it a go.
Gocom, thanks for your expertise.
maniqui, thanks for your patience. Let me know how you get on with using adi_notes.
Offline