Fork me on GitHub

is there a way to....  Bottom

  • is there a way to write a plugin or something which will be done every single page that loads on zikula, i didn't really want to edit core files but i wanted to play around and get zikula to run a function every time a user views a page


    thanks in advance :)
    kyle
  • A plugin in the main templates (master and home) can do it, but it won't be executed in those situation where the template is not used (es. with a redirect the page would be executed twice, but the plugin only once).

    I'm not sure, but maybe you can do it with a hook. Since Zikula 1.1.x you can activate a hook for zikula itself (not for a specific module), it should be executed each time (I'm guessing, I'm not sure)

    --
    Zikula Italia
    SimpleGallery
  • Please use more descriptive titles
  • i was looking more for a way of doing it that does not require template/theme modification, i already have the code i need to do what i want hardwired into the template, but it would be nice to make it in a distributable fashion.

    what i'm doing is a PHP redirect from http to https for certain pages etc... this can easily be done directly in the PHP, or using the htaccess, but of course the htaccess method requires i have rewrite mod on apache, and its not exactlyt re-distributable. i would be interested in writing a very small module that you can specify certain pages or functions, and force it to redirect to https.

    the only way i really see of doing this (and feel free to point out others if you seen them) is for every time a page is accessed, the PHP checks (before doing anything else) if this page is supposed to be https, if it is https, and then rewrites based on what needs to happen.


    does zikula have a way of loading functions, that will be executed with every page?
  • the cleanest way to do this is to use a hook on the event "systeminit"
  • I want to do something similar for a Google Analytics module where it will add the code to the bottom of every page. I started this ages ago and ran out of time. About to start it up again soon.

    Where can we find information about what system hooks are available and how to use them?
  • 0 users

This list is based on users active over the last 60 minutes.