Tutorial for plugin ?

By Djulia - February 3, 2010

Hi,

I would like to create a simple function that I would like to activate or deactivate in the section plugins ?

There would be a tutorial to explain how to create (to activate) a plugin?

Thanks for the feedback!

Djulia

Re: [Dave] Tutorial for plugin ?

By Djulia - February 4, 2010

Hi Dave,

I wrote my plugin!

But, I did not really understand the use of addFilter.
That seems to be an important parameter.
It is the insertion point ?

Thanks to risk you in the explanations!

Djulia

Below my plugin, it will be perhaps useful for other users!
He alerts by email the admin if a user connects himself.

Attachments:

alertadminlogin.php 2K

Re: [Djulia] Tutorial for plugin ?

By Dave - February 4, 2010

Hi Djulia,

Looks good. I added this semicolon to make it work for me:
. "http://{$_SERVER['HTTP_HOST']}{$_SERVER['REQUEST_URI']}\n";

addFilter() and addAction() are almost the same but addFilter() must always return something. It's used to modify a value (such as the footer text), where-as addAction() just runs some code.

Let me know if you have any other questions about how everything works! :)
Dave Edis - Senior Developer
interactivetools.com

Re: [Djulia] Tutorial for plugin ?

By Dave - February 6, 2010

Also, for v2.03 (in development) I've updated it to call session_destroy() on logout. That should allow you to make you code simpler for future plugins (since the counter will automatically get reset when a new session is created).
Dave Edis - Senior Developer
interactivetools.com

Re: [Dave] Tutorial for plugin ?

By Djulia - February 11, 2010 - edited: February 11, 2010

Thanks Dave for the update! :)

That functions perfectly with version 2.03.

Djulia

Attachments:

alertadminlogin_001.php 2K

Re: [Djulia] Tutorial for plugin ?

By Dave - February 15, 2010

Nice! :)
Dave Edis - Senior Developer
interactivetools.com

Re: [Dave] Tutorial for plugin ?

By Djulia - April 2, 2010

Hi Dave,

The post of Terry motivated me to improve a plugin that I had written.
It sends an email notification when a record is added or modified ...

CMSB impresses me each day by its flexibility!

But, I still block with the use of css.

Djulia

Attachments:

alertsavedrecord_001.php 3K

Re: [Djulia] Tutorial for plugin ?

By flamerz - April 2, 2010

wow.. this one is a must have.

good job.

Re: [Djulia] Tutorial for plugin ?

By hvbuilder - April 10, 2010

Hello,

I upgraded to version 2.03 and installed your plugin, but I do not receive an email when a record is added or changed. Is there something else I need to do?

Thanks,

James