0 users online. Create an account or sign in to join them.Users

Search

In 1.7 one could simply put a

        function load(){            
        header("Location: http://google.com");
    }

in a stripped event But now with the abstraction applied I can't get rid of the missing method-errors.

Fatal error: Class eventForward_Page contains 1 abstract method and must therefore be declared        abstract or implement the remaining methods (Event::__trigger)

Can anyone advice how to create an event that simply redirects on load?

I attach the event I have used successfully. It redirects only if you are not logged in. Just rename it to event.redirect.php.

Attachments

I tried to use param values in the url, instead of hardcoding, like so;

'Location: {$root}/{$main-page}/{$active-language}'

ofcourse that doesnt work, any idea how to pull the params within php?

Classes that extend the Event class need to adhere to the Event interface, therefore they all need to have a __trigger function. So strip the content of these functions, but not the function declarations themselves :-)

Create an account or sign in to comment.

Symphony • Open Source XSLT CMS

Server Requirements

  • PHP 5.2 or above
  • PHP's LibXML module, with the XSLT extension enabled (--with-xsl)
  • MySQL 5.0 or above
  • An Apache or Litespeed webserver
  • Apache's mod_rewrite module or equivalent

Compatible Hosts

Sign in

Login details