Run custom php code in joomla module backend page

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-25 07:20:33

问题


i am using Joomla 2.5 , I am working on a module .My module loads some javascripts in frontend. I want to run few php code in backend, when admin click on save button. How to do that?


回答1:


You can write a plugin that uses the event trigger onBeforeSave, then when you hit the save button, the plugin is run. You can do any validation on the data sent by post, if it fails just return false and you will return to your form.

You can see some documentation on how to do this here:

http://docs.joomla.org/Plugin/Events

http://docs.joomla.org/J2.5:Creating_a_Plugin_for_Joomla



来源:https://stackoverflow.com/questions/23266011/run-custom-php-code-in-joomla-module-backend-page

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!