MyBB Community Forums
adding template variablle - Printable Version

+- MyBB Community Forums (https://community.mybb.com)
+-- Forum: Community Archive (https://community.mybb.com/forum-106.html)
+--- Forum: Archived Forums (https://community.mybb.com/forum-143.html)
+---- Forum: Archived Development and Support (https://community.mybb.com/forum-155.html)
+----- Forum: MyBB 1.2 Series (https://community.mybb.com/forum-3.html)
+------ Forum: MyBB 1.2 General Support (https://community.mybb.com/forum-4.html)
+------ Thread: adding template variablle (/thread-25429.html)



adding template variablle - Tianzhui - 2007-11-07

Hi, may i know which part of the file or table must i amend to add in a new template variable like{welcomeback} ??


RE: adding template variablle - LeX- - 2007-11-07

What and Where ( on what page or global )


RE: adding template variablle - Tianzhui - 2007-11-07

Like for example, {$welcomeback} points to template->member_welcomeback.

How do i create a similar variable like the above for me to use in my template ? I have created a new template already but i need to know how to use a variable to point to it.


RE: adding template variablle - LeX- - 2007-11-07

eval("\$VARIABLE = \"".$templates->get("TEMPLATE_NAME")."\";");

After that you can use {$VARIABLE} to show it.


RE: adding template variablle - Tianzhui - 2007-11-07

May i know which file should i put that line in if i wish to add a variable to the template-> header ??


RE: adding template variablle - LeX- - 2007-11-07

Open global.php

Find
eval("\$header = \"".$templates->get("header")."\";");

Add yours above


RE: adding template variablle - Tianzhui - 2007-11-08

I go try now ! Thanks !!