MyBB Community Forums

Full Version: how to add a custom portal page(s)
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi all;

I want to add additional custom page(s) to my portal. There are 3 columns. Only the center column will be changed in other pages; the left and right columns will be same. How can I do this shortly (if possible) ? thanks...

__________ edited _____________

I've done it like this;

- Copied the portal.php and renamed to (for example) -> example.php
- Edited this line in the .php file;
eval("\$portal = \"".$templates->get("portal")."\";");

like this

eval("\$portal = \"".$templates->get("example")."\";");
- Created a new tamplate called "example" ; and pasted & edited the "portal" template codes.

Thanks....
Hi,

It's really hard for me to say, since I'm not making it.

Are you planning to write up your own custom page with all sorts of PHP stuff, or do you just want to display static content on your custom pages?
At the moment I need just static content. In next days I'm planning to develope this function to work dynamic (if i can find free time out of my working times Smile ). Thank you...
The easiest solution for you would be to copy and paste the repetitive code for each part.

If you're more familiar with PHP, you can certainly split it up into different templates, however, you will really have to know what you're coding.

For a simple common variable, you could do this however:
Before your:
eval("\$portal = \"".$templates->get("example")."\";");
Add a line like:
eval('$myheader = "'.$templates->get('my_portal_header').'";');
And place {$myheader} wherever you want in your example template.