PDA

View Full Version : disable template eval in global.php


Princeton
09-11-2005, 02:38 PM
Is there a way to disable:
eval('$gobutton = "' . fetch_template('gobutton') . '";');
eval('$spacer_open = "' . fetch_template('spacer_open') . '";');
eval('$spacer_close = "' . fetch_template('spacer_close') . '";');
via plugins?

Marco van Herwaarden
09-11-2005, 05:35 PM
Why you want to do that?

Princeton
09-11-2005, 05:43 PM
I think spacer_open/spacer_close is just bloated code.
It's not necessary -- right now, I don't even use it but it's still being cached.

Also, gobutton template is not needed. I prefer adding the input (submit) button directly to the template.

Why cache a template for a submit button??? How many characters is that --- 20-30??

Marco van Herwaarden
09-11-2005, 05:47 PM
Then comment those lines out.

Princeton
09-11-2005, 05:48 PM
I'll refer you to the first post ..... "via plugins"

Marco van Herwaarden
09-11-2005, 05:52 PM
You could try unsetting $gobutton etc, in hook 'parse_templates'.

Princeton
09-11-2005, 05:58 PM
doesn't work :(

Marco van Herwaarden
09-11-2005, 08:06 PM
Did you do a global before unsetting?

Anyhow i wouldn't spend 1 minute on this, i really don't see the reason for trying to cut a few bits.

Andreas
09-11-2005, 08:10 PM
Make the Tamplates empty, unset the Variables in parse_templates, don't use them - there are many possibilites.
But honestly, I don't think it's worth even thinking about this.

Zachery
09-12-2005, 07:30 AM
Is there a way to disable:
eval('$gobutton = "' . fetch_template('gobutton') . '";');
eval('$spacer_open = "' . fetch_template('spacer_open') . '";');
eval('$spacer_close = "' . fetch_template('spacer_close') . '";');
via plugins?

Thats going to break alot of thigns on your website, spacer_open and closed are used all thoughout vB.

Princeton
09-12-2005, 11:09 AM
i really don't see the reason for trying to cut a few bits.
If I was using a stock vbulletin I would agree -- however, I'm using a custom built so any savings/cut backs would be beneficial. There is no sense in calling something that is not needed.

Thats going to break alot of thigns on your website, spacer_open and closed are used all thoughout vB.
Yea, I know -- they have been replaced.


For those who are wondering -- the goal was to prevent modifying the files.