PDA

View Full Version : Is there a hook for changing ad_ and headinclude templates before fetching them?


ThorstenA
08-21-2008, 09:32 AM
I want to change all ad_ templates and headinclude template before fetching them. As most ad_ templates are just fetched, like ad_showthread_firstpost in showthread.php, I need to manipulate this template before it is fetched.

Example: My ad_showthread_firstpost template is as follows:

728x90 ad
Now I want to change it to

template_before
728x90 ad
template_after

Opserty
08-21-2008, 12:12 PM
Just put a variable in them and evaluate the variables in global_start or something?

E.g.
eval('$template_before = "'. fetch_template('template_before') .'";');

Then in the ad_location templates you just use $template_before