MyBB Community Forums

Full Version: Template Callup
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi,
I made a custom template called "Posting" in "Global Templates"

I put some code in there, and tried to call this up into the Portal template: {$Posting}

But it's not working, I expected it probably won't just I'm just giving it a shot.

What do I need to do to make this work?

Thanks.

EDIT:

Got it, I placed:
eval("\$Posting= \"".$templates->get("Posting")."\";");

Above:
// Get latest news announcements
// First validate announcement fids:

And it worked.
That won't work as it is because you've not told it what $Postings mean. Putting a variable in curly brackets won't make it load a template with that name, you have to tell it to make that variable show a template.

You'd need this somewhere in ./portal.php:

eval("\$Posting = \"".$templates->get('Posting')."\";");
lol Thanks Matt, that kinda hit me so I opened up the file, looked around & found another code like that.
Just replaced whatever it was calling with "Posting".