Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2008-08-06 04:04:42

gomedia
Plugin Author
Registered: 2008-06-01
Posts: 1,167
Website

adi_notes - leave notes for Textpattern users

Summary

adi_notes – leave notes for Textpattern users.

Once installed and activated, you’ll get:

  • new tabs under Home, Content, Presentation and Admin to present your pearls of wisdom
  • public & private notes embedded in all Textpattern admin pages
  • a tab under Extensions, to set up adi_notes

See the help supplied with the plugin, or have a look online.

Notes about notes

Notes can either be in tabs of they’re own or they can be embedded in Textpattern admin side tabs.

Notes tabs can appear under Home, Content, Presentation or Admin and are public. They’re visible to all users but can only be edited by admin users.

Embedded tabs can appear either at the top or the bottom of the page – depending on the option chosen in adi_notes admin. Admin users can add/edit public embedded notes and which are visible by everyone. All users can add their own private embedded notes, but they can only be seen by individuals.

Admin users are Publishers & Managing Editors by default but this can be changed in adi_notes admin.

Admin tab

Users with sufficient privileges will see the adi_notes admin tab, under Extensions. This provides functionality to:

  • toggle note tab visibility on/off
  • set privilege levels of who can edit public notes
  • change position of embedded notes
  • change note styles
  • choose between Textile or TinyMCE

Version History

  • 1.3.1
    • fixes for MySQL running in strict mode (thanks Gallex)
  • 1.3
    • edit link fixes for 4.6 (thanks jpdupont)
    • tag parsing (for jpdupont)
    • style fixes & improvements (thanks Bloke)
    • inline style fix (thanks uli)
    • fix for Hive theme header (thanks MarcoK)
    • fix for preference save issue in <= 4.5.5
    • admin tab layout & styling improvements
    • now TXP 4.5+ only
  • 1.2
    • TXP 4.5-ified
    • code tidy up
    • changed: admin tab name/title now “Notes Admin”
    • now uses lifecycle events
    • changed the default width (thanks RedFox)
  • 1.1.1
    • fixed: get_off_my_lawn error in new article tab in TXP 4.4.1
    • admin: style improvements for theme compatibility
  • 1.1
    • moved install/uninstall etc to plugin options
    • enhancement: embedded notes at top or bottom of page
    • enhancement: embedded notes now available on all TXP admin pages
    • enhancement: note tab for Home/Start tab
    • enhancement: Textpack
    • enhancement: TinyMCE support
    • new options: custom note style, note width, note edit privs
    • change: default note width now 900px (was 90%)
  • 1.0.2
    • fix: no more error messages in server log
    • enhancement: footnotes for adi_variables, adi_menu & adi_prefs tabs
  • 1.0
    • enhancement: footnotes
    • enhancement: public/private notes
    • enhancement: in situ editing
  • 0.3
    • added links between notes tabs & admin tab
  • 0.2
    • implemented fix for create table error, thanks gocom
  • 0.1
    • initial release

Requirements

Textpattern 4.5 or later. Tested with TinyMCE version 3.4.2 & hak_tinymce version 1.0.

Download & Installation

Download adi_notes and install the plugin in the usual way. Lifecycle events will take care of the database set up.

UPGRADES: although a backup of your notes will be made during the upgrade process it is recommended that you make an independent copy of your notes as well. And if you’re using custom style and upgrading to v1.3, take a copy of your style rules beforehand.

Textpack

There is a mechanism to install a Textpack in the adi_notes options page under the Plugins tab.

Corrections or additional language translations are most welcome and can be submitted here.

Currently the Textpack contains:

  • French (thanks Pat64)
  • Italian (thanks Marcok)
  • Czech (thanks mikulas)

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.

Spread the love

If you find this plugin useful and would like a warm and fuzzy feeling to go with it, please consider donating to the Textpattern development team.

Last edited by gomedia (2015-06-07 12:22:33)

Offline

#2 2008-08-06 04:53:20

maniqui
Moderator
From: Buenos Aires, Argentina
Registered: 2004-10-10
Posts: 3,068
Website

Re: adi_notes - leave notes for Textpattern users

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 ;)

  • MLP compatible? So you can create notes in different (installed) languages (may be overkilling, but you should expect someone will need it and then he/she will come to ask, so better to be prepared).
  • maybe a way to import/export notes on base64 strings so TxP community can share help snippets. Again, may be too much.

Well, I should test it now and come back with some feedback.
Thanks again.


La música ideas portará y siempre continuará

TXP Builders – finely-crafted code, design and txp

Offline

#3 2008-08-06 05:05:01

maniqui
Moderator
From: Buenos Aires, Argentina
Registered: 2004-10-10
Posts: 3,068
Website

Re: adi_notes - leave notes for Textpattern users

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)


La música ideas portará y siempre continuará

TXP Builders – finely-crafted code, design and txp

Offline

#4 2008-08-06 05:28:54

gomedia
Plugin Author
Registered: 2008-06-01
Posts: 1,167
Website

Re: adi_notes - leave notes for Textpattern users

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

#5 2008-08-06 05:38:57

Gocom
Plugin Author
Registered: 2006-07-14
Posts: 4,524
Website

Re: adi_notes - leave notes for Textpattern users

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)

Offline

#6 2008-08-06 06:03:45

gomedia
Plugin Author
Registered: 2008-06-01
Posts: 1,167
Website

Re: adi_notes - leave notes for Textpattern users

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

#7 2008-08-06 06:09:57

jm
Plugin Author
From: Missoula, MT
Registered: 2005-11-27
Posts: 1,746
Website

Re: adi_notes - leave notes for Textpattern users

Adi – you only need the backticks if you’re using a reserved word.

Offline

#8 2008-08-06 07:11:55

gomedia
Plugin Author
Registered: 2008-06-01
Posts: 1,167
Website

Re: adi_notes - leave notes for Textpattern users

jm wrote:

Adi – you only need the backticks if you’re using a reserved word.

Thanks, Jon-Michael, much obliged.

Offline

#9 2008-08-06 12:10:10

maniqui
Moderator
From: Buenos Aires, Argentina
Registered: 2004-10-10
Posts: 3,068
Website

Re: adi_notes - leave notes for Textpattern users

While waiting for “official” fix, I just wanted to say that Gocom’s fix worked perfectly for me :D


La música ideas portará y siempre continuará

TXP Builders – finely-crafted code, design and txp

Offline

#10 2008-08-06 22:13:33

gomedia
Plugin Author
Registered: 2008-06-01
Posts: 1,167
Website

Re: adi_notes - leave notes for Textpattern users

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

Board footer

Powered by FluxBB