MyBB Community Forums

Full Version: Is it possible to call a variable on different template?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi gang,

is is possible to call a variable on another template?
I need to place this variable {$welcome} on the member_profile template
but it is not showing up.

the {$welcome} is originally found on the template Portal but I need to place it on
the template member_profile as well.

is there a function that I can use to make {$welcome} work on member_profile?


I've been trying all day to get this to work with no luck.
I would sincerely appreciate any point in the right direction.
Thanks.
It is possible with this method: http://community.mybb.com/thread-140152-...pid1008111 (use existing template name instead - so portal_welcome in this case). But keep in mind that not everything may be displayed - the {$something} inside templates are PHP variables and they have a specific scope. Some variables from portal.php may be not defined in member.php profile action, you'll have to copy the code from the 1st file to 2nd.
(2014-11-01, 07:52 PM)Destroy666 Wrote: [ -> ]It is possible with this method: http://community.mybb.com/thread-140152-...pid1008111 (use existing template name instead - so portal_welcome in this case). But keep in mind that not everything may be displayed - the {$something} inside templates are PHP variables and they have a specific scope. Some variables from portal.php may be not defined in member.php profile action, you'll have to copy the code from the 1st file to 2nd.

Hi Destroyer, thanks for taking your valubale time to answer this thread, my sincerest appreciation extends, the help I recieve here is priceless and I'm very thankful.