q3utom
Not So New User
Joined: 05 Apr 2003
Posts: 27
|
Posted: April 26th 2003, 8:47 am Post subject: Creation of a Second Portal For ezPortal |
|
|
This is a tutorial that allows you to create a second portal using Smartor's ezPortal. Hope it's useful.
###############################################################
## Title: extra portals for ezportal
## Author: q3 tombb87@2c2d.co.uk www.2c2d.co.uk
## Description: This tutorial allows you to create additional portals for ezPortal.
I am presuming you already have ezPortal installed and are running phpBB forums.
##
## Installation Level: Easy
## Installation Time: 10 Minutes
##
## Files To create: 2 minimum but you can keep on adding portals
## portal2.php
## fetchposts2.php
## extras to create
## portal_body2.tpl
For additional help go to my site www.2c2d.co.uk/forum or Smartor’s http://smartor.is-root.com for help
All copyright for ezPortal goes to Smartor
###############################################################
Go to your forum files and find “portal.php” copy it and rename it “portal2.php”
Find:
// News Forum ID: separate by comma for multi-forums, eg. '1,2,5'
$CFG['news_forum'] = '1';
change it to whatever number you want it to get posts from. If you do not want this portal to get posts, leave it blank.
Find:
include($phpbb_root_path . 'fetchposts.'.$phpEx);
Change to:
include($phpbb_root_path . 'fetchposts2.'.$phpEx);
Find:
U_READ_FULL' => append_sid('portal.' . $phpEx . '?article=' . $i),
Change to:
U_READ_FULL' => append_sid('portal2.' . $phpEx . '?article=' . $i),
If you are creating a separate look to your first portal:
Create:
Fetchposts2.php
Do this by just copying fetchposts.php and renaming it to fetchposts2.php
If you are creating a separate portal_body.tpl
Copy portal_body.tpl
Change to: portal_body2.tpl
open portal2.php
Find:
$template->set_filenames(array(
'body' => 'portal_body.tpl'
Change to:
$template->set_filenames(array(
'body' => 'portal_body2.tpl'
These are the things I normally edit:
Open: forum/templates/yourstyle/portal_body2.tpl
Find:
<td class="catHead" height="25"><span class="genmed"><b>{L_NAME_WELCOME}</b></span></td>
{L_NAME_WELCOME} is the thing you want to change. So to have “Events” appear on the top of the page, change it to:
<td class="catHead" height="25"><span class="genmed"><b>Events</b></span></td>
Find:
<td class="catHead" height="25"><span class="genmed"><b>{L_ANNOUNCEMENT}
This is if you are getting the portal2.php to fetch posts from your forum. So mine is for events. It should be:
<td class="catHead" height="25"><span class="genmed"><b>Recent events
To create a link to your second portal in the portal_body.tpl
Open: forum/templates/yourstyle/portal_body2.tpl
Find:
<a href="{U_PORTAL}">{L_HOME}</a><br />
<a href="{U_INDEX}">{L_FORUM}</a><br /> <ahref="{U_MEMBERLIST}">{L_MEMBERLIST}</a><br />
<a href="{U_FAQ}">{L_FAQ}</a><br />
<a href="{U_SEARCH}">{L_SEARCH}</a><br /
Now somewhere in there you can add your link. For example mine reads like this:
<a href="{U_PORTAL}">{L_HOME}</a><br />
<ahref="http://www.yoursite..co.uk/forum/portal2.php">Weather</a><br />
<a href="{U_INDEX}">{L_FORUM}</a><br />
<ahref="{U_MEMBERLIST}">{L_MEMBERLIST}</a><br />
<a href="{U_FAQ}">{L_FAQ}</a><br />
<a href="{U_SEARCH}">{L_SEARCH}</a><br /
You can keep on adding these. For my own site it looks like this:
<a href="{U_PORTAL}">{L_HOME}</a><br />
<a href="http://www.onfolkestone.co.uk/forum/portal2.php">Weather</a><br />
<a href="http://www.onfolkestone.co.uk/forum/portal3.php">Events</a><br />
<a href="http://www.onfolkestone.co.uk/forum/portal4.php">Art</a><br />
<a href="http://www.onfolkestone.co.uk/forum/portal5.php">Artists</a><br />
<a href="http://www.onfolkestone.co.uk/forum/portal6.php">Jokes</a><br />
<a href="{U_INDEX}">{L_FORUM}</a><br />
<a href="{U_MEMBERLIST}">{L_MEMBERLIST}</a><br />
<a href="{U_FAQ}">{L_FAQ}</a><br />
<a href="{U_SEARCH}">{L_SEARCH}</a><br /
Remember to update the links in the other portal_body.tpls otherwise you will lose the link in that portal.
You can continue adding portals to the site. Just change the 2 to 3 and so on.
Save and upload all files. End of tutorial. |
|