MyBB Community Forums
[How To?] Change Hooks - Printable Version

+- MyBB Community Forums (https://community.mybb.com)
+-- Forum: 1.8 Support (https://community.mybb.com/forum-175.html)
+--- Forum: General Support (https://community.mybb.com/forum-176.html)
+--- Thread: [How To?] Change Hooks (/thread-186266.html)



Change Hooks - fredzy - 11-12-2015

i dont know much about php so forgive my subject.

basically what i want to do is to make a shortcode e.g {$whoisonline}, work in a different templates from its orignal.

To be more specific, i have a plugin (affiliate manager), with the shortcode {$affiliatesheader} which only works if placed in the header template group.

what i want is for this shortcode to work globally on all templates (most importantly, footer).

so if i place the shortcode in the footer templates, it will show.


RE: Change Hooks - expat - 11-12-2015

the header template is global !!! on top

the quickest way, find the template for {$affiliatesheader}, which should be in global templates?

copy its content into the footer template, then delete the content of the one in global templates, or delete {$affiliatesheader}

The more elegant way is to find how to hook into the footer template


RE: Change Hooks - fredzy - 11-19-2015

the problem with that is that affilliate header is a group not just one template, there is affiliate_list, affilate_none