Results 1 to 10 of 14
-
19th Oct 2009, 02:24 PM #1OPGone off that MollyWebsite's:
thefaggotstore.orgDual Column Layout (Tutorial) (IPB 2.2.x & 2.3.x)
This mod will display two forums per row, inspired by Gaia Online.
Open sources/action_public/boards.php
The first set of edits all occur in function show_subfroum($fid).
FIND: (around line 211)
PHP Code:$temp_html = "";
$sub_output = "";
PHP Code:$subrowCount = 0;
PHP Code:foreach( $this->ipsclass->forums->forum_cache[ $fid ] as $forum_data )
{
PHP Code:$subrowCount++;
PHP Code:if ( $forum_data['redirect_on'] )
{
$forum_data['redirect_hits'] = $this->ipsclass->do_number_format( $forum_data['redirect_hits'] );
$forum_data['redirect_target'] = isset($forum_data['redirect_target']) ? $forum_data['redirect_target'] : '_parent';
$temp_html .= $this->ipsclass->compiled_templates['skin_boards']->forum_redirect_row( $forum_data );
}
else
{
$temp_html .= $this->ipsclass->compiled_templates['skin_boards']->ForumRow( $this->ipsclass->forums->forums_format_lastinfo( $this->ipsclass->forums->forums_calc_children( $forum_data['id'], $forum_data ) ) );
}
}
}
if ( $temp_html )
{
$sub_output .= $this->ipsclass->compiled_templates['skin_boards']->subheader($cat_data);
$sub_output .= $temp_html;
$sub_output .= $this->ipsclass->compiled_templates['skin_boards']->end_this_cat();
}
else
{
return $sub_output;
}
REPLACE WITH:
PHP Code:if ( $forum_data['redirect_on'] )
{
$forum_data['redirect_hits'] = $this->ipsclass->do_number_format( $forum_data['redirect_hits'] );
$forum_data['redirect_target'] = isset($forum_data['redirect_target']) ? $forum_data['redirect_target'] : '_parent';
$temp_html .= $this->ipsclass->compiled_templates['skin_boards']->forum_redirect_row( $forum_data );
}
else
{
$temp_html .= $this->ipsclass->compiled_templates['skin_boards']->ForumRow( $this->ipsclass->forums->forums_format_lastinfo( $this->ipsclass->forums->forums_calc_children( $forum_data['id'], $forum_data ) ) );
}
// If we have displayed 2 forums to display, move to the next row
if ($subrowCount % 2 == 0)
{
$temp_html .= $this->ipsclass->compiled_templates['skin_boards']->rowbreak();
}
}
//If we only have 1 forum in a row when we run out of them, print a blank td..
if ($subrowCount % 2 == 1)
{
$temp_html .= $this->ipsclass->compiled_templates['skin_boards']->emptytd();
}
//Reset our count to 0
$subrowCount = 0;
}
if ( $temp_html )
{
$sub_output .= $this->ipsclass->compiled_templates['skin_boards']->subheader($cat_data);
$sub_output .= $temp_html;
$sub_output .= $this->ipsclass->compiled_templates['skin_boards']->end_this_cat();
}
else
{
return $sub_output;
}
You're halfway there. The exact same edits have to be done to the full forums though, so lets go!
This set of edits all take place in function process_all_cats().
FIND: (around 335)
PHP Code://-----------------------------------------
// Get show / hide cookah
//-----------------------------------------
$collapsed_ids = ','.$this->ipsclass->my_getcookie('collapseprefs').',';
$this->ipsclass->forums->register_class( $this );
Add AFTER:
CODE
PHP Code:$rowCount = 0;
PHP Code:foreach( $this->ipsclass->forums->forum_cache[ $forum_data['id'] ] as $forum_data )
{
Add After:
PHP Code:$rowCount++;
Find (by 394):
PHP Code:if ( $forum_data['redirect_on'] )
{
$forum_data['redirect_target'] = isset($forum_data['redirect_target']) ? $forum_data['redirect_target'] : '_parent';
$temp_html .= $this->ipsclass->compiled_templates['skin_boards']->forum_redirect_row( $forum_data );
}
else
{
$temp_html .= $this->ipsclass->compiled_templates['skin_boards']->ForumRow( $this->ipsclass->forums->forums_format_lastinfo( $this->ipsclass->forums->forums_calc_children( $forum_data['id'], $forum_data ) ) );
}
}
}
if ( $temp_html )
{
$this->output .= $this->ipsclass->compiled_templates['skin_boards']->CatHeader_Expanded($cat_data);
$this->output .= $temp_html;
$this->output .= $this->ipsclass->compiled_templates['skin_boards']->end_this_cat();
}
Replace With:
PHP Code:if ( $forum_data['redirect_on'] )
{
$forum_data['redirect_target'] = isset($forum_data['redirect_target']) ? $forum_data['redirect_target'] : '_parent';
$temp_html .= $this->ipsclass->compiled_templates['skin_boards']->forum_redirect_row( $forum_data );
}
else
{
$temp_html .= $this->ipsclass->compiled_templates['skin_boards']->ForumRow( $this->ipsclass->forums->forums_format_lastinfo( $this->ipsclass->forums->forums_calc_children( $forum_data['id'], $forum_data ) ) );
}
if ($rowCount % 2 == 0)
{
$temp_html .= $this->ipsclass->compiled_templates['skin_boards']->rowbreak();
}
}
if ($rowCount % 2 == 1)
{
$temp_html .= $this->ipsclass->compiled_templates['skin_boards']->emptytd();
}
$rowCount = 0;
}
if ( $temp_html )
{
$this->output .= $this->ipsclass->compiled_templates['skin_boards']->CatHeader_Expanded($cat_data);
$this->output .= $temp_html;
$this->output .= $this->ipsclass->compiled_templates['skin_boards']->end_this_cat();
}
Save boards.php. Time for some skin edits..
Open Skin manager -> your skin -> edit template HTML -> Board Index
Scroll to the bottom of the right panel (add new template)
Template name: emptytd
Click "continue"
In the white screen, paste
PHP Code:<!-- Used in custom forum row -->
<td colspan="2" class="row2"><!-- empty td --></td>
Add a new template.
Template name: rowbreak
Click "continue"
In the white screen, paste
PHP Code:<!-- Used in custom forum row -->
</tr><tr>
Open CatHeader_Expanded
Find
Replace With:
PHP Code:<table class='ipbtable' cellspacing="1">
<tr>
Find
PHP Code:<table class='ipbtable' cellspacing="0">
<tr>
<th colspan="2" width="66%">{$this->ipsclass->lang['cat_name']}</th>
<th align="center" width="7%">{$this->ipsclass->lang['topics']}</th>
<th align="center" width="7%">{$this->ipsclass->lang['replies']}</th>
<th width="35%">{$this->ipsclass->lang['last_post_info']}</th>
</tr>
PHP Code:
<table class='ipbtable' cellspacing="1">
<tr>
Open ForumRow
Replace the contents with:
PHP Code:<td class="row2" width="50%" style="vertical-align: top;">
{$data['img_new_post']} <b><a href="{$this->ipsclass->base_url}showforum={$data['id']}">{$data['name']}</a></b>
<br />
<span class="forumdesc">{$data['description']}{$data['show_subforums']} <if="$data['moderator']">
<br /><i>{$data['moderator']}</i>
</if></td>
Phamous Reviewed by Phamous on . Dual Column Layout (Tutorial) (IPB 2.2.x & 2.3.x) This mod will display two forums per row, inspired by Gaia Online. Open sources/action_public/boards.php The first set of edits all occur in function show_subfroum($fid). FIND: (around line 211) $temp_html = ""; $sub_output = ""; Rating: 5
-
19th Oct 2009, 02:28 PM #2MemberWebsite's:
maxedoutdesigns.com
-
19th Oct 2009, 03:11 PM #3Too busy :|Website's:
L337Fx.com BeastieBay.netAwesome buddy
Very nice
-
19th Oct 2009, 03:18 PM #4MemberWebsite's:
Technsoft.Com iTBux.com DxWarez.com webxhost.netAwesome buddy
-
20th Oct 2009, 12:23 PM #5Member
Nice one
Is there an example of this anywhere? I know I've seen this on VB but I dont think I've seen it on IPB.
-
20th Oct 2009, 12:24 PM #6MemberWebsite's:
*************** IMGscene.comExample: Code-Projects.com
-
20th Oct 2009, 12:25 PM #7
-
20th Oct 2009, 12:26 PM #8MemberWebsite's:
*************** IMGscene.comNo problem
-
20th Oct 2009, 12:32 PM #9Member
Does this works for IPB 3 too ?
Respected: george101,Hawk,Image,sjshah
-
20th Oct 2009, 12:37 PM #10MemberWebsite's:
RohitCreations.com ThemeOrbit.com PaypalWordpress.com BlackMetal.coThanks man.....That's what i've been looking for.
Sponsored Links
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Similar Threads
-
HostAddon.com - 100 Mbit/1Gbit Uplink - Dual/Quad/Dual Quad Servers - USA/NL Location
By farooqwani19 in forum Dedicated Hosting OffersReplies: 0Last Post: 17th Sep 2012, 07:10 PM -
ServerDeals-Quad 16GB,Dual 5420 16GB,Dual E5-2620 48GB,D525 4GB from $33.99 (US,EU)
By ServerDeals in forum Dedicated Hosting OffersReplies: 0Last Post: 8th Aug 2012, 09:43 PM -
[Dedicated] Saaki.net - Dual Processor Dual Core 3.2 GHz Intel Xeon, 100Mbps- $60/month (Ukraine)
By WaQas in forum ArchiveReplies: 27Last Post: 5th Jul 2011, 04:56 PM -
Dual Column Layout
By ChosenOne in forum vBulletinReplies: 35Last Post: 25th Apr 2011, 05:51 AM -
[IPB 3] Double Column Tutorial
By Smith in forum IP.BoardReplies: 8Last Post: 21st Jan 2010, 08:11 PM
themaCreator - create posts from...
Version 3.24 released. Open older version (or...