|
Page 1 of 1
|
NuTeLLo
Joined: August 2006
Posts: 5
Location:
|
 [xs2] Forum Like Portal
Hello,
i wish to edit the template of my xs2 forum in order to make it similar to the portal one.
I'd like that the forum (forum.php) have the same block structure of the portal (index.php).
I've tried to edit index_body.tpl, but I made only troubles!
Simply i wish that forum template was like portal one (with sx & dx blocks), but without central block, that woulds contain forums list.
I hope someone can help me!
NuTeLLo
P.S.:
Excuse for my english!!
|
#1 Sun 10 Sep, 2006 20:30 |
|
Sponsors

|
Icy Phoenix is an open source project, you can show your appreciation and support future development by donating to the project.
|
|
moreteavicar
Joined: August 2006
Posts: 608
Location:  Classified
|
 Re: [xs2] Forum Like Portal
In other words, you are aiming for is to maintain the left hand navigation block (and possibly the right-hand blocks)? You do this through IMPortal in your ACP. You set up forum wide blocks via Portal>>Portal Configuration. Then select System wide portal header and system-wide Portal footer. In IMportal terminology, the header is the left-hand column, and footer is the right-hand column.
However.... there is a small spanner in the works here though, in that the XS installation of IMPortal has been customised slightly (omission of some code), so that without some changes to the code, you can't get forum wide blocks! The good news is that the changes are small. If I remember, I'll post them here later... or else, as you sound like you're night afraid to play with code, download IMPortal from Integramod, and go through the install script. The important lines are mainly for overal_header.tpl and overall_footer.tpl (you might also need to edit pageheader.php, can't remember now), where template variables are parsed e.g. {portal_header} which actually contains the column of blocks, and layouts defined in the blocks templates files... Anyway, if you go through the install script, it should be clear whats missing, so simply add it in.
|
#2 Mon 11 Sep, 2006 20:01 |
|
NuTeLLo
Joined: August 2006
Posts: 5
Location:
|
 Re: [xs2] Forum Like Portal
Thanks for your help!!
I've tried to edit index_body.tpl according IMPortal install notes.
I've done these edit:
OPEN index_body.tpl
FIND
<script language="Javascript" type="text/javascript">
<!--
function links_me()
BEFORE ADD
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
{PORTAL_HEADER}
<td width="10"><img src="images/spacer.gif" alt="" width="10" height="30" /></td>
<td valign="top">
FIND
<!-- FINISH FORUM TABLE -->
</td>
</tr>
</table>
<!-- CLOSING LEFT TPL -->
AFTER ADD
{PORTAL_TAIL}<td width="10"><img src="images/spacer.gif" alt="" width="10" height="30" /></td></tr></table>
I didn't need to edit page_header.php, 'cause it was already complete with the code included in IMPortal install note.
Two thin and empty coloumns (a left one and a right one) appear at the edges of forum.php, but without showing blocks.
I think there's something wrong in my procedure! I'm not so pratice with modding!
I hope you can help me!
Thank you so much!!
|
#3 Mon 11 Sep, 2006 21:27 |
|
moreteavicar
Joined: August 2006
Posts: 608
Location:  Classified
|
 Re: [xs2] Forum Like Portal
Hmmm.. firstly well done for giving it a go! However... are you sure it tells you to add those to index_body.tpl? That doesn't sound right to me, in my version of IMPortal (1.2.0) you add those variables to overall_header.tpl and overall_footer.tpl. The reason is because these are the only two template parts which get called with every single page that gets viewed. Meanwhile index_body.tpl only gets viewed when you visit forum.php, and portal_body.php is viewed when you visit index.php... (Not sure of the exact reasons, but somebody decided to rename portal.php to index.php, and index.php to forum.php... possibly because index.php is the first thing a server points to if there is no index.html file).
Anyway, lets not get carried away... what you should have done is:
Quote: #
#-----[ OPEN ]------------------------------------------
#
templates/YOUR_TEMPLATE/overall_header.tpl
#
#-----[ AT THE END OF THE FILE, ADD ]------------------------------------------
#
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
{PORTAL_HEADER}
<td width="10"><img src="images/spacer.gif" alt="" width="10" height="30" /></td>
<td valign="top">
#
#-----[ OPEN ]------------------------------------------
#
templates/YOUR_TEMPLATE/overall_footer.tpl
#
#-----[ AT THE START OF THE FILE, ADD ]------------------------------------------
#
{PORTAL_TAIL}<td width="10"><img src="images/spacer.gif" alt="" width="10" height="30" /></td></tr></table>
The other thing is then to change the nav_box.tpl, since by default this parses nav_quick_links.tpl, which is only shown on home page and forum page. So what you do is (backup it up first) replace everything in nav_box.tpl with:
Quote: <table border="0" cellpadding="0" cellspacing="0" width="100%"><tbody>
<tr>
<td align="left" valign="top">
<div style="" id="quick_links">
</div>
<div id="news2" style="padding-top: 5px; padding-bottom: 5px; display: none;"><a href="javascript:ShowHide('news','news2','news');" title="{L_SHOW} {NEWS_TITLE}"><img src="{SHOW_LATEST_NEWS_IMG}" alt="{L_SHOW} {NEWS_TITLE}" height="127" width="22"></a></div>
<div id="quick_links2" style="padding-top: 5px; display: none;"><a href="javascript:ShowHide('quick_links','quick_links2','quick_links');" title="{L_SHOW} {L_QUICK_LINKS}"><img src="{SHOW_QUICK_LINKS_IMG}" alt="{L_SHOW} {L_QUICK_LINKS}" height="124" width="22"></a></div>
<a href="#" onClick="hdr_toggle('calendar_display','calendar_open_close', '{DOWN_ARROW}', '{UP_ARROW}'); return false;" title="{L_SHOW} {L_CALENDAR}"><img src="{TOGGLE_ICON}" id="calendar_open_close" border="0" / alt="{L_SHOW} {L_CALENDAR}">{_calendar_box.L_CALENDAR_TXT}</a>
<script language="javascript" type="text/javascript">
<!--
tmp = 'quick_links';
if(GetCookie(tmp) == '2')
{
ShowHide('quick_links','quick_links2','quick_links');
}
//-->
</script>
</td>
<td style="padding-left: 7px; padding-right: 7px;" valign="top" width="100%">
<script language="javascript" type="text/javascript">
<!--
tmp = 'news';
if(GetCookie(tmp) == '2')
{
ShowHide('news','news2','news');
}
//-->
</script>
(actually, these lines were already there, but you delete some lines, and its easier to copy and paste over everything here than say which lines have to be removed).
Finally you should then go to ACP>>Portal>>Blocks Management>>3Columns
Check to see if Nav Links exists, and is active.
If you can't see it, add a new block, name it "Nav Links" >>set its position to be left, or nav, and add a nav links block file near the bottom. Make sure the titlebar, border, BG, or localise are all "no". That should be it...
If you still can't get it to work, follow the install procedure all the way through, including install into the database, because the phpBBXS version has a lot of customised data in there. You should keep phpBBXS block files though, although you can rename the blocks directories to something else, and test it with what came with IMPortal. Then, once you are sure it works, you can revert to the phpBBXS blocks, and re-create the blocks with phpBBXS block files for the home page and forum wide side bars. As always back up the database first, or else perform this on a test website first.
Good luck, and let us know how it goes!
|
#4 Tue 12 Sep, 2006 15:52 |
|
NuTeLLo
Joined: August 2006
Posts: 5
Location:
|
 Re: [xs2] Forum Like Portal
I'm sorry but I'm unable to do this mod!
I've tried everything you suggest, but with no result!
Anyway I'm interested to edit only forum.php, so that I've edited only index_body.tpl! I wish to have left & right blocks only in index.php (portal) and forum.php (forum), not in every pages!
Actually I could just edit the tables of index_body.tpl in order to have 'Who's online', 'Birthday', 'Stats' & 'Shoutbox' blocks in the right side of forum.php (nav_link is already in the left side!), but I'm unable to do this!
Can you help me in this 'little template mod'?
Thanks for your support!
|
#5 Tue 12 Sep, 2006 17:56 |
|
moreteavicar
Joined: August 2006
Posts: 608
Location:  Classified
|
 Re: [xs2] Forum Like Portal
I see what you want to do now! Well, in that case, you are right to put those sections into index_body.tpl, exactly where you say. Strictly speaking, you then need to get the block variables parsed to the template variables, by butting the following directly before $template->pparse('body'); in forum.php:
Quote:
$template->set_filenames(array('portal_header' => 'portal_page_header.tpl'));
portal_parse_blocks($portal_config['default_portal'], TRUE, 'header');
$template->assign_var('HEADER_WIDTH', $portal_config['header_width']);
$template->assign_var('PORTAL_HEADER', portal_assign_var_from_handle($template, 'portal_header'));
$template->set_filenames(array('portal_tail' => 'portal_page_tail.tpl'));
portal_parse_blocks($portal_config['default_portal'], TRUE, 'tail');
$template->assign_var('FOOTER_WIDTH', $portal_config['footer_width']);
$template->assign_var('PORTAL_TAIL', portal_assign_var_from_handle($template, 'portal_tail'));
However, I have just tried it out, and still only see 2 empty columns as you describe, so there is something else modified in the XS version of IMPortal (in fact I've just noticed its been modified quite a lot between XS 049, which I still use, and XS 058, and sadly I wasn't keeping up with the development after phpBBXS.com went down!). Most likely it is something in SQL, but also the portal_page_header might be edited... I'll see if I can figure if out, unless Tom or MG already know what needs to be replaced to get IMPortal to work as it should.
I have noticed that XS058 doesn't appear to have portal_page_header.tpl and portal_page_tail.tpl, so if you have a separate copy of IMPortal, upload these files from that. It should go into your templates directory.
|
#6 Tue 12 Sep, 2006 19:32 |
|
moreteavicar
Joined: August 2006
Posts: 608
Location:  Classified
|
 Re: [xs2] Forum Like Portal
Well, I had some scuccess in that I was able to get the left colcumn to show only on index.php and forum.php, but the right hand column I could only get on index.php. To get that far, what you also have to do is go to template>>layout>>portal_body.tpl, or template>>layout>>3_column.tpl, or which ever template you're using. In there, add the same portal header and portal footer lines, e.g. at the top add:
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
{PORTAL_HEADER}
<td width="10"><img src="images/spacer.gif" alt="" width="10" height="30" /></td>
<td valign="top">
and the bottom:
{PORTAL_TAIL}<td width="10"><img src="images/spacer.gif" alt="" width="10" height="30" /></td></tr></table>
I also ran the sql.txt file that came with IMPortal, in phpmyAdmin. Then, go to the blocks, and configure them to suit your needs (since these will now contain default IMPortal stuff, rather than the default XS stuff).
|
#7 Tue 12 Sep, 2006 21:35 |
|
NuTeLLo
Joined: August 2006
Posts: 5
Location:
|
 Re: [xs2] Forum Like Portal
Thank you very much for your help!
As soon as possible I'll try it according to your suggests! Now I'm very busy!!
I'll make you know how it goes...!!
|
#8 Wed 13 Sep, 2006 11:05 |
|
Mighty Gorgon 
Luca Libralato
Joined: August 2006
Posts: 7192
Location:  Borgo San Michele
|
 Re: [xs2] Forum Like Portal
Good point... anyway these functionalities will be working fine in the new project... I hope!
____________ Luca
SEARCH is the quickest way to get support.
Icy Phoenix ColorizeIt - CustomIcy - HON
|
#9 Sun 01 Oct, 2006 20:04 |
|
|
Page 1 of 1
|
Was this topic useful?
Was this topic useful?
Link this topic |
URL |
|
BBCode |
|
HTML |
|
You cannot post new topics You cannot reply to topics You cannot edit your posts You cannot delete your posts You cannot vote in polls You cannot attach files You can download files You cannot post calendar events
|
|
|
|