In my config, install through CPG PluginsManager do not work,
i need to create SQL table by hand !
like that :
CREATE TABLE IF NOT EXISTS `cpg143_notes` (
`nid` smallint(5) unsigned NOT NULL auto_increment,
`pid` mediumint(8) unsigned NOT NULL,
`posx` smallint(5) unsigned NOT NULL,
`posy` smallint(5) unsigned NOT NULL,
`width` smallint(5) unsigned NOT NULL,
`height` smallint(5) unsigned NOT NULL,
`note` text NOT NULL,
`user_id` smallint(5) unsigned NOT NULL,
PRIMARY KEY (`nid`),
KEY `pid` (`pid`)
) TYPE=MyISAM ;
Where
cpg143_ is my SQL config. Change with your personal SQL setup.
After this mySQL manual install, i need to remove at the end
CODEBASE.PHP this function :
function annotate_install() {
global $thisplugin, $CONFIG;
$sql = "DROP TABLE IF EXISTS `{$CONFIG['TABLE_PREFIX']}notes`";
cpg_db_query($sql);
$sql = <<< EOT
CREATE TABLE IF NOT EXISTS `{$CONFIG['TABLE_PREFIX']}notes` (
`nid` smallint(5) unsigned NOT NULL auto_increment,
`pid` mediumint(8) unsigned NOT NULL,
`posx` smallint(5) unsigned NOT NULL,
`posy` smallint(5) unsigned NOT NULL,
`width` smallint(5) unsigned NOT NULL,
`height` smallint(5) unsigned NOT NULL,
`note` text NOT NULL,
`user_id` smallint(5) unsigned NOT NULL,
PRIMARY KEY (`nid`),
KEY `pid` (`pid`)
) TYPE=MyISAM ;
EOT;
return cpg_db_query($sql);
}
Plus some cosmetics adjustments in /lib/
Photonotes.cssAnd this plugin work very well. Very usefull.
PREVIEW in my personnal Gallery).. Some issues with accentuated characters("à", "é", "ç" and " ' " ), not an UTF-8 compatible !
PYAP