This is the cpg1.6.x and PHP7 compatible version of the Picture Annotation plugin.
Quote from: Αndré on July 15, 2009, 03:05:42 PM
Add text annotations to your images like on Flickr. Pretty cool.
This plugin is a port from the cpg1.4.x plugin 'Flickr style image annotations (http://forum.coppermine-gallery.net/index.php/topic,41715.0.html)' created by Nibbler.
Whenever I install this plugin, I get a "Critical Error" on the Plugin Manager page.
Upon enabling debug mode, I find:
QuoteWhile executing query 'SELECT COUNT(*) FROM cpg_notes' in plugins/annotate/configuration.php on line 45
database error: 1146 : Table 'coppermine_db.cpg_notes' doesn't exist
Source: coppermine/include/functions.inc.php - Line: 250
I have to manually remove the plugin via FTP to get the Plugin Manager back.
In schema.sql, I see the database "CPG_plugin_annotate" called out, and there definitely isn't a "cpg_notes" table in my db.
Any advice?
I really loved this plugin in the past.
I'm using Coppermine Photo Gallery 1.6.06 (stable)
Thanks!
Actually, I removed the SQL queries from the update.sql schema:
QuoteALTER TABLE `CPG_plugin_annotate` ADD user_time int(9) default NULL;
DELETE FROM `CPG_config` WHERE name LIKE 'plugin_annotate_permissions_guest';
DELETE FROM `CPG_config` WHERE name LIKE 'plugin_annotate_permissions_registered';
INSERT INTO `CPG_config` (name, value) VALUES ('plugin_annotate_type', '1');
INSERT INTO `CPG_config` (name, value) VALUES ('plugin_annotate_disable_mobile', '0');
This successfully allowed the plugin to install, and apparently it works.
Not sure I'm comfortable with this though. Can you explain what's going on here?
Thanks,
-Gor
OK so, that doesn't enable the saving of annotations.
So, I'm still no further forward.
Help! :)
It seems I currently broke my testbed. Please try if the following fixes the issue. Open configuration.php, find
if ($CONFIG['plugin_annotate_import'] != "1" && cpg_db_result(cpg_db_query("SELECT COUNT(*) FROM {$CONFIG['TABLE_PREFIX']}notes"), 0) > 0) {
and replace with
if ($CONFIG['plugin_annotate_import'] != "1" && cpg_db_num_rows(cpg_db_query("SELECT table_name FROM information_schema.tables WHERE table_schema = '{$CONFIG['dbname']}' AND table_name = '{$CONFIG['TABLE_PREFIX']}notes'")) && cpg_db_result(cpg_db_query("SELECT COUNT(*) FROM {$CONFIG['TABLE_PREFIX']}notes"), 0) > 0) {
Hi Andre!
Thanks, that fixed the install.
Once on the configuration page though, I get the following when saving the configuration:
QuoteCritical error
There was an error while processing a database query.
While executing query '
ALTER TABLE `cpg_plugin_annotate` ADD user_time int(9) default NULL' in plugins/annotate/codebase.php on line 325
database error: 1060 : Duplicate column name 'user_time'
That was on:
File: coppermine/include/functions.inc.php - Line: 250
Also, the plugin didn't install all the way, and upon trying to install again, I get:
QuoteWhile executing query '
ALTER TABLE `cpg_plugin_annotate` ADD user_time int(9) default NULL' in plugins/annotate/codebase.php on line 325
database error: 1060 : Duplicate column name 'user_time'
File: coppermine/include/functions.inc.php - Line: 250
I deleted the column name "user_time" and now it's giving this error:
QuoteWhile executing query '
INSERT INTO cpg_config (name, value) VALUES ('plugin_annotate_type', '1')' in plugins/annotate/codebase.php on line 325
database error: 1062 : Duplicate entry 'plugin_annotate_type' for key 'PRIMARY'
FYI....
That's the same I got. I need to check the installation process in detail. I'll let you know as soon as possible.
Thanks Andre,
I really appreciate the support. :)
Please try version 3.2 (attached to initial post).
Looks like you've fixed the issue!
Installs, configures, and saves annotations!
Thank you so much!
-Gor
I tried placing annotations with an unregistered account (not logged in) and I can place an annotation, but it's not saved.
That's fair enough. I don't need that functionality.
Quote from: gor on April 03, 2019, 09:59:58 PM
I tried placing annotations with an unregistered account (not logged in) and I can place an annotation, but it's not saved.
Thanks for the report. Actually it is saved, but "just" not displayed. Seems I need to have another closer look at the plugin.
Please check if it works as expected with that fix: https://github.com/coppermine-gallery/cpg1.6.x-plugins/commit/3e436d9b3bc196ccf13aa93dd24edd31dbde3826
Hi Andre,
Updated codebase.php, and the language files, and all seems to be working great!!
Thanks again!
-Gor
Version 3.3 includes that fix and has been added to the initial post.
Debug \plugins\annotate\codebase.php
Warning line 36: Use of undefined constant panorama_viewer_is_360_degree_panorama - assumed 'panorama_viewer_is_360_degree_panorama' (this will throw an Error in a future version of PHP)
Warning line 92: Use of undefined constant panorama_viewer_is_360_degree_panorama - assumed 'panorama_viewer_is_360_degree_panorama' (this will throw an Error in a future version of PHP)
Warning line 202: Use of undefined constant panorama_viewer_image - assumed 'panorama_viewer_image' (this will throw an Error in a future version of PHP)
Warning line 219: Use of undefined constant panorama_viewer_image - assumed 'panorama_viewer_image' (this will throw an Error in a future version of PHP)