MyBB Community Forums

Full Version: Different footer on different pages
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
(2010-05-09, 02:10 AM)Scoutie44 Wrote: [ -> ]It would be nice and I'd like some plugins to be integrated too, but they're not and you have to work with what you have.

Some plugins regarding calling custom templates require that they be a part of the global set otherwise they just won't work. Images will have to be hotlinked most likely but it's what you have to work with.

It's pity that we have to go through all these just to show a different footer on certain pages and still not something perfect.

As you rightly said .. we have to live with it.

Maybe if can use a template condition like ...< if member.php || ucp.php || newreply.php then>
Do something
< else >
Do nothing
</if>

Maybe....... I donoo Sad
(2010-05-09, 02:02 AM)HubSeo Wrote: [ -> ]Wish such basic things could have been done without a plugin though..

PHP isn't allowed/parsed in templates for security reasons, though a system to allow it might be implemented in 2.0

Realistically though, if the user knows PHP then it shouldn't be too hard to them to write a simple plugin themselves which just alters the footer template.
Include a variable (perhaps $ad) in your footer template. In your plugin, assign a value to $ad based on the current page being displayed (use the global_start hook). Nice and simple.
(2010-05-09, 05:34 AM)laie_techie Wrote: [ -> ]Include a variable (perhaps $ad) in your footer template. In your plugin, assign a value to $ad based on the current page being displayed (use the global_start hook). Nice and simple.

Not sure how to implement it. labrocca is now helping me with this . Smile
Pages: 1 2