Support > cpg1.5 plugins

Plugin hook suggestions for cpg1.5.x

(1/7) > >>

Joachim Müller:
Although cpg1.5.x is in the feature freeze stage, which means that no more features can/will be added before the release, the dev team has decided that there will be an exception to this rule: plugin hooks can still be added.
We want to encourage plugin authors to request additional plugin hooks at this stage, with an alpha release being available to test things with.
So if you want to start porting a plugin written for cpg1.4.x to cpg1.5.x or if you have an idea for a new plugin for cpg1.5.x that you want to write, please go ahead and let us know in this thread what plugin hook you need.

@newbies/non-coders: this thread does not deal with plugin requests, so please do not ask for plugins to be written or ported for you here. This thread is for coders who already know what a plugin hook is. This thread only exists for coders to request additional plugin hooks.

If you actually want to request a new hook, just roughly explain what your plugin is suppossed to do and where exactly you want your hook to reside at (between line X and line Y in file Z). Please also state what the expected return value will be (if any).


P.S. All unrelated replies to this thread will be deleted without further notice

May I add this plugin hook to include/

--- Code: ---    $sender_email = CPGPluginAPI::filter('cpg_mail_sender_email', $sender_email);
--- End code ---

Explanation: I use a free hoster for my CPG. I figured out, that emails from the sender '' will not be sent but a message is displayed, that the email has been sent successfully. If I change the sender address to '' everything works fine.

Maybe there are some limitations on other free hosters and someone else can use this hook.

I just remembered, that it's also not possible to sent emails with more than one recipient on my webhost. So I'd need another hook to sent multiple emails with only 1 recipient or to sent emails sent to 'admin' only to 'gallery_admin_email'.

Additional plugin hooks can't hurt, right? 8)

Joe Carver:
Plugin hook requests. Pages with user (guest level) input. Purpose - spam control, adding captcha or other methods to user's form submissions.

This is for three pages now not protected by captcha: Ecard + Report to Moderator + Login.
Example used here is ecard. I am not sure if I have the right line numbers or if the concept/request
is being communicated properly. In any case I didn't want to write a long post and will be happy to reply if needed.

Ecard example hook 1 validate submission - somewhere between lines 149 - 156 and similar to:

--- Code: ---$error = CPGPluginAPI::filter('captcha_ecard_validate', $error);
--- End code ---

Ecard example 2 display a captcha or alternative - at or below line 425 and similar to:

--- Code: ---$subecard_print = CPGPluginAPI::filter('ecard_submit_print',$subecard_print);
--- End code ---

The same concepts also for Report and Login: A hook to show a captcha on the form at or near the Submit button and a hook prior to where the submission is processed and data is written to db, etc..

This is not a direct request for the exact same Captcha hooks to be placed into Ecard, Report and Login as the ones now being used. However if that would be more compatible/consistent with the overall way 1.5 is to run then please consider it as a suggestion only.


--- Quote from: Αndré on August 18, 2009, 01:43:03 pm ---May I add this plugin hook to include/

--- End quote ---
Added plugin hooks 'cpg_mail_to_email' & 'cpg_mail_sender_email' in r6545.

Joe Carver:
Please, if it is possible and not too much trouble, could this hook be added?

File: index.php

Location: Directly below this: (around line 1122)

--- Code: --- $elements = explode('/', $CONFIG['main_page_layout']);
--- End code ---

Similar to:

--- Code: --- $elements = CPGPluginAPI::filter('alt_page_layout', $elements);
--- End code ---

Purpose: Plugin to allow differences in page layout (from home page) when visitor clicks on "Album list"

I hope that it is not too late for requests here. At the moment I have a rough working version of a plugin using that hook. It seems to function OK without interference elsewhere.



[0] Message Index

[#] Next page

Go to full version