Jump to content


Template Switcher


  • You cannot reply to this topic
27 replies to this topic

#21 Psycho Mantis

    Etomite Forum Fan

  • Member
  • Pip
  • 113 posts

Posted 23 March 2009 - 10:51 AM

Thanks Cris!

So a feature that can set template preferences for a user (via session or cookies) hasn't been implemented yet, right?

#22 Psycho Mantis

    Etomite Forum Fan

  • Member
  • Pip
  • 113 posts

Posted 14 April 2009 - 12:36 PM

On weird thing I noticed while trying to get this to work is, that when I manually add a ?tpl=15 to the URL of my pages, only the pages using the default template recognize that they're supposed to use template no. 15. All other pages using a different template completely ignore this $_GET input.

Is that a bug or a feature? :)

Edited by Psycho Mantis, 14 April 2009 - 12:41 PM.


#23 Ralph

    Loves Etomite Forums!

  • Admin
  • 6,524 posts
  • Gender:Male

Posted 14 April 2009 - 03:05 PM

View PostPsycho Mantis, on Apr 14 2009, 08:36 AM, said:

On weird thing I noticed while trying to get this to work is, that when I manually add a ?tpl=15 to the URL of my pages, only the pages using the default template recognize that they're supposed to use template no. 15. All other pages using a different template completely ignore this $_GET input.

Is that a bug or a feature? :)
Not a bug... It was done intentionally... It would be risky to have it change all template asignments across the board because then things like blank templates or XMLHttpRequest templates would be changed...

#24 Psycho Mantis

    Etomite Forum Fan

  • Member
  • Pip
  • 113 posts

Posted 14 April 2009 - 03:53 PM

View PostRalph, on Apr 14 2009, 05:05 PM, said:

Not a bug... It was done intentionally... It would be risky to have it change all template asignments across the board because then things like blank templates or XMLHttpRequest templates would be changed...

Hm...but that makes a template switcher for multiple templates that remembers the settings esessitially impossible to achieve?!

Would you characterize the risk of having blank templates as major security risk (don't know to much about PHP security)?

#25 Cris D.

    Loves Etomite Forums!

  • Developers
  • PipPipPipPip
  • 1,104 posts
  • Gender:Male

Posted 14 April 2009 - 04:26 PM

Quote

Would you characterize the risk of having blank templates as major security risk (don't know to much about PHP security)?
I don't think the issue is security related, it's more the point that some sites rely on blank templates and other implementations of templates (like AJAX implementations) that are more of a functional (coding) purpose than just providing markup or presentation. I had not been able to narrow down this "bug / feature" but now that it is mentioned, it makes sense. It shouldn't be too hard to put in a bit of logic to change all templates except those listed in an array to ignore, but it's starting to stray and feel like a nasty code base hack that may have ramifications further down the track.

#26 Ralph

    Loves Etomite Forums!

  • Admin
  • 6,524 posts
  • Gender:Male

Posted 14 April 2009 - 09:21 PM

Any number of modifications can be made to the underlying code... It was just something I threw in to play with... Don't hold your breath on this feature making into the next major release...

#27 Dean

    Loves Etomite Forums!

  • Admin
  • 4,758 posts
  • Gender:Male

Posted 14 April 2009 - 09:31 PM

Don't say that! I'll be stuck at 1.x if you remove the ?tpl= feature!!!

#28 Ralph

    Loves Etomite Forums!

  • Admin
  • 6,524 posts
  • Gender:Male

Posted 14 April 2009 - 09:57 PM

View PostDeanC, on Apr 14 2009, 05:31 PM, said:

Don't say that! I'll be stuck at 1.x if you remove the ?tpl= feature!!!

Ok... For you, Dean, it'll stay...





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users