On save....
3 posts by 2 authors in: Forums > CMS Builder
Last Post: March 23, 2009 (RSS)
By Toledoh - March 22, 2009
Hi Guys,
Ages and ages ago, I built a website with either PP or LM or AM... and one step in the process of modifying something or other was to tie an additional command to execute a php file whenever an article was saved (created or modified).
I've now built a new CMSB site, and added to custom functionality - and need to execute rss.xml.php?field=1, and rss.xml.php?field=2, and rss.xml.php?field=4 and 5 and 6 etc...
I'm guessing I need to modify cmsAdmin/lib/menus/default/save.php... but any pointers?
Cheers,
Ages and ages ago, I built a website with either PP or LM or AM... and one step in the process of modifying something or other was to tie an additional command to execute a php file whenever an article was saved (created or modified).
I've now built a new CMSB site, and added to custom functionality - and need to execute rss.xml.php?field=1, and rss.xml.php?field=2, and rss.xml.php?field=4 and 5 and 6 etc...
I'm guessing I need to modify cmsAdmin/lib/menus/default/save.php... but any pointers?
Cheers,
Cheers,
Tim (toledoh.com.au)
Tim (toledoh.com.au)
Re: [Toledoh] On save....
By Dave - March 23, 2009
Hi Tim,
We can't promise much for tips on modifying the internal code but I'll give it a shot.
In /lib/menus/default/save.php search for "redisplay list page" You're going to want to add your code ABOVE these lines:
We have a function called getPage you can use to download a web page, you use it like this:
list($html, $httpStatusCode) = getPage("http://www.interactivetools.com/includes/header.html");
Try adding something like this above exit:
Hope that helps! Let me know if that works for you.
We can't promise much for tips on modifying the internal code but I'll give it a shot.
In /lib/menus/default/save.php search for "redisplay list page" You're going to want to add your code ABOVE these lines:
### redisplay list page
exit; // print nothing to redisplay list page (done in edit_functions.js by ajax form submit code)
We have a function called getPage you can use to download a web page, you use it like this:
list($html, $httpStatusCode) = getPage("http://www.interactivetools.com/includes/header.html");
Try adding something like this above exit:
list($html, $httpStatusCode) = getPage("http://www.yourDomain.com/rss.xml.php?field=1");
list($html, $httpStatusCode) = getPage("http://www.yourDomain.com/rss.xml.php?field=2");
list($html, $httpStatusCode) = getPage("http://www.yourDomain.com/rss.xml.php?field=3");
list($html, $httpStatusCode) = getPage("http://www.yourDomain.com/rss.xml.php?field=4");
list($html, $httpStatusCode) = getPage("http://www.yourDomain.com/rss.xml.php?field=5");
list($html, $httpStatusCode) = getPage("http://www.yourDomain.com/rss.xml.php?field=6");
### redisplay list page
exit; // print nothing to redisplay list page (done in edit_functions.js by ajax form submit code)
Hope that helps! Let me know if that works for you.
Dave Edis - Senior Developer
interactivetools.com
interactivetools.com
Re: [Dave] On save....
By Toledoh - March 23, 2009
That's what I like about you guys - helpfull, knowledgable and quick to repond.
All working a treat!
Thank You!
All working a treat!
Thank You!
Cheers,
Tim (toledoh.com.au)
Tim (toledoh.com.au)