MyBB Community Forums

Full Version: Create another Portal
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Is it possible to create another portal? As in, I'm using the current one, but I want one just for News (as far as the Mac World is concerned). Possible?
If you want exactly the same thing as the MyBB portal, just make a copy of it and hardcode the announcements fid to your other news forum.
How do I hardcode it?

(and is copying it as simple as making a duplicate of portal.php and renaming it?)
Yeah, just duplicate the existing portal.php, then find:

$query = $db->query("SELECT * FROM ".TABLE_PREFIX."forums WHERE fid='".$mybb->settings['portal_announcementsfid']."'");
And add the following code before the above:
$mybb->settings['portal_announcementsfid'] = 4;
Replace 4 with your announcement forum ID.

If you would like to change other parts of the portal, then you will need to make additional modifications.
DennisTT Wrote:Yeah, just duplicate the existing portal.php, then find:

$query = $db->query("SELECT * FROM ".TABLE_PREFIX."forums WHERE fid='".$mybb->settings['portal_announcementsfid']."'");
And add the following code before the above:
$mybb->settings['portal_announcementsfid'] = 4;
Replace 4 with your announcement forum ID.

If you would like to change other parts of the portal, then you will need to make additional modifications.
How would one go about making templates for the new portal?
Then you would need to create a copy of the portal templates (copy from old ones, and add it in the new one), and rename all the

$templatelist = "portal_welcome,portal_welcome_membertext,portal_stats,portal_search,portal_whosonline_memberbit,portal_whosonline,portal_latestthreads_thread_lastpost,portal_latestthreads_thread,portal_latestthreads,portal_announcement_numcomments_no,portal_announcement,portal_announcement_numcomments,portal";
and all of these things:
eval("\$pms = \"".$templates->get("portal_pms")."\";");