TinyPortal

Development => Support => Topic started by: HotJoint on July 03, 2007, 03:34:27 AM

Title: More boards to show on the index
Post by: HotJoint on July 03, 2007, 03:34:27 AM
TP came with the option to show only 5 boards on the index, theres any way to add more boards on it?
Title: Re: More boards to show on the index
Post by: G6Cad on July 03, 2007, 08:28:21 AM
Search is your best friend  ;)
http://www.tinyportal.net/index.php?topic=10999.0
Title: Re: More boards to show on the index
Post by: HotJoint on July 03, 2007, 03:53:10 PM
The topic or board you are looking for appears to be either missing or off limits to you.

i cant see that post :(
Title: Re: More boards to show on the index
Post by: IchBin on July 03, 2007, 08:24:53 PM
TPortalAdmin.template.php. look for this code:

// board 5
echo '
<select size="1" name="tp_ssiboard5"><option value="0">',$txt['tp-none-'],'</option>';
$tn=sizeof($context['TPortal']['boards']);
for($n=0 ; $n<$tn; $n++){
echo '
<option value="'.$context['TPortal']['boards'][$n]['id'].'" ' ,$context['TPortal']['boards'][$n]['id']==$context['TPortal']['SSI_board5'] ? 'selected' : '' , '>'.$context['TPortal']['boards'][$n]['name'].'</option>';
}

echo '





and adding this code after :

</select> ';

// board 6
echo '
<select size="1" name="tp_ssiboard6"><option value="0">',$txt['tp-none-'],'</option>';
$tn=sizeof($context['TPortal']['boards']);
for($n=0 ; $n<$tn; $n++){
echo '
<option value="'.$context['TPortal']['boards'][$n]['id'].'" ' ,$context['TPortal']['boards'][$n]['id']==$context['TPortal']['SSI_board6'] ? 'selected' : '' , '>'.$context['TPortal']['boards'][$n]['name'].'</option>';
}
echo '



TPortalAdmin.php find:

                   elseif($what=='tp_ssiboard1'){
$bo=array();
$bo[0]=$_POST['tp_ssiboard1'];
$bo[1]=$_POST['tp_ssiboard2'];
$bo[2]=$_POST['tp_ssiboard3'];
$bo[3]=$_POST['tp_ssiboard4'];
$bo[4]=$_POST['tp_ssiboard5'];
$value=implode(',',$bo);
                       db_query("UPDATE {$tp_prefix}settings SET value='$value' WHERE name='SSI_board'", __FILE__, __LINE__);
                       $go=6;


Insert more lines if you'd like, making the appropriate adjustments:
$bo[5]=$_POST['tp_ssiboard6'];

Title: Re: More boards to show on the index
Post by: HotJoint on July 03, 2007, 09:25:41 PM
godly, thanx! :)