Support > cpg1.5 plugins

Plugin hook suggestions for cpg1.5.x

<< < (6/7) > >>

Αndré:
Access the file via index.php?file=your_plugin_folder/file_name_without_extension. That way it runs in Coppermine's scope and you don't need to include init.inc.php.

Veronica:
Thanks works OK now

Veronica:

--- Quote from: Αndré on September 27, 2012, 04:45:25 pm ---Access the file via index.php?file=your_plugin_folder/file_name_without_extension. That way it runs in Coppermine's scope and you don't need to include init.inc.php.

--- End quote ---

Disadvantage with this method is that language file setup is according to index.php requirements and not as db_input.php
which will not give me standard phrases for define('DB_INPUT_PHP', true); like error messages
I can add these texts used in the plugin to my plugin language file but it's not a good solution with duplicates so my hook request is still best solution for me.

gmc:
Email on comments:
Building on thread http://forum.coppermine-gallery.net/index.php/topic,71072.0.html which sends email when a comment is posted.
I adapted a variation on this for a customer - looking at implementing a plugin to handle this function, but lacking appropriate hookpoints from what I can see.

The related thread updates db_input.php, but this only addresses comment submission, and not approval (if approval is required...)

Looking for hookpoints in db_input.php and reviewcom.php...
A zip of patch file based on SVN 8668 is attached to detail my thoughts.  All 'action' plugins with no data returned.
Addition of 5 hookpoints:

* 'comment_updated' in db_input.php
* 'comment_posted_anonymous' in db_input.php
* 'comment_posted_registered' in db_input.php
* 'comment_approval_processed' in reviewcom.php
* 'comment_multiple_approvals' in reviewcom.php
If this looks acceptable, I'll work on the plugin code to exploit... Obviously will have a min version at whatever level the hookpoints get included.  I haven't done any testing with this in plugin form yet - wanted to see if I was approaching this correctly, and if additional plugin points like this would be considered.

Thanks!

Αndré:
Without reviewing the core code parts or your patch file yet, some hook names should be replaced in my opinion:


* Replace comment_posted_anonymous and comment_posted_registered with comment_posted, or is there a good reason to use 2 different hook names?

* Replace comment_approval_processed and comment_multiple_approvals with comment_approved, or is there a good reason to use 2 different hook names?

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version