GetSimple Support Forum

Full Version: Is there a Notification-feature for content-save
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi,
does anybody know a Plugin or has some hints
how to get such an Notification-feature for GS?
So that an email is sent, if something became saved.
best, B.
Bella,

please explain why you need this. This is not something what belongs to the essential features of a CMS.
Do you want to control multiple users when they published content?

What is the purpose?

Maybe you do not need a plugin for GS, there are millions of php-scripts, for example at hotscripts.com
Maybe you find there something?

check here: http://www.hotscripts.com/search/all-scr...date+check

I will try to remember if I ever encounterd such a tool

Cheers, Connie
Well that was rude and condescending.

They don't have to explain anything., this is the plugins forum, meaning he wants to extend it to do whatever they want for whatever reason.

Belletage,
Take a look at plugin hooks. Normally you need a plugin to perform actions on hooks.
But i make a plugin called hook components that let you tie a component to a hook.

If you are familiar with php and can write the sendmail code, you can use appropriate hooks to send mail.
Although I am not certain how you can get the id of the page edited off the top of my head.

Someone around here might actually be interested in making an admin audit plugin that lets you tie actions to events. Like email, or logging.
thank you, shawn_a!
I took it with a grain of salt. Smile its nothing,
no problem - its a very kind forum here and Connie is always courteous!

@Connie
"This is not something what belongs to the essential features of a CMS."
(lots of) CMS offer this feature. On my view its essential for a webmaster:
to fix fast & silent mistakes of backend-users (broken lists, to big pictures etc.).



I wanted to be sure, that I don´t miss any ready Plugin and maybe catch some ideas.
Than (if I take the time) I try to code something ... its not pressing, but anytime I will need it. Untill than, the users have to call the webmaster, if there emerge problems.

with "plugin hooks" do you mean
http://get-simple.info/extend/plugin/sa-...nents/487/
or "Forum > Scripts & Components"?
I'm not very used to the GS-terminology and don´t know, what a hook implies.
I will see to the wiki ... Plugin Hooks & Filters.


best, B.
with my plugin installed ( the one you linked )

Create a component named
hook_changedata-aftersave

Code:
<?php
GLOBAL $file,$author,$title;
sendmail('email@domain.com','admin notification','changedata-aftersave hook was executed file:'.$title.' was edited by '.$author);
?>
hi shawn,
thank you!
first: there seems to be two commata-errors in the downloaded hooks.php, whitch wipes back- and frontend-screen. I send the corrected, running one.

---

and about your description:
I put into my template the
Code:
<?php get_component('hook_changedata-aftersave'); ?>
I created the component, as you told and gave her my email.
something else, I have to do? It fetches itself the globals, where, because the variables are empty?
best, Bell.
Sorry about that, I fixed that in svn and forgot to upload it.
I just updated the plugin in extend, the subfolder can be removed also as its no longer used.

Also that is the instructions i posted, there are no ommited ones.
There is no calling it or adding it to templates.

Thats why its called a hook.
hi shawn,
thank you, it runs now well! Super!
simply uploading the Plugin, making the component with the receiver-email, thats it.
Great!

additional I personalise a bit in the adnin/incl/basic.php on
line 145: $fromemail =
line 83: function email_template

best, Bell.
Yeah you could just change that to use the php mail function, but i used the built in sendmail.

Hopefully in the future we can use our own email template, i have an enhancement request for that in SVN.

You might want to find a way to better that logic to make sure it doesn't send emails for every edit, but that should get you started.

frommail is defined in the config.php, mail wont work without it.