Search

Hello guys.

I have been following brendo's tutorial on dual events, however I come across trouble when it comes down to editing the __trigger function to accomodate 2.3's way of handling $ROOTELEMENT.

$this->post[$this->$ROOTELEMENT]['fields']; does not work - I have tried to utilise this within the class.event.php and also within each individual event under a new __trigger function but i have had no luck.

I either get Undefined Constants or Empty Property errors.

Has anybody got around this tutorial using 2.3? If you did, could you point me in the right direction?

I have had a little bit of joy after a bit of playing about, but i'm not sure how well founded this progression truly is...

I changed line 400 of event.section.php to read: $result = new XMLElement($this->ROOTELEMENT);

instead of: $result = new XMLElement(self::ROOTELEMENT);

I have also added a unique __trigger function to each of my events instead of just using the global one in class.event.php as per brendo's tutorial (with hard coded reference to $ROOTELEMENT).

I think the real question is...should i be bludgeoned to death with a massive "Your a stupid ass" stick?

edited for easier reading

I think a lot of my problems stemmed from trying to reference the $ROOTELEMENT variable which is placed into each event. If i use $this->$ROOTELEMENT i get errors, but $this->ROOTELEMENT works fine...

Use $this->ROOTELEMENT :)

That'll teach me to not skim read.... for some reason I assumed it was $ROOTELEMENT because of the variable that gets created at the top of each event. I thought it was referencing that instead of a constant....oops.

Create an account or sign in to comment.

Symphony • Open Source XSLT CMS

Server Requirements

  • PHP 5.3-5.6 or 7.0-7.3
  • PHP's LibXML module, with the XSLT extension enabled (--with-xsl)
  • MySQL 5.5 or above
  • An Apache or Litespeed webserver
  • Apache's mod_rewrite module or equivalent

Compatible Hosts

Sign in

Login details