I am working on a hack and I am working on adding options in the admin menu to turn it on and off.
I have the following in TPortalAdmin.template.php:
<tr class="windowbg2">
<td align="right" width="45%">'.$txt['tp-showchildrenboards'].'</td>
<td>
<input name="tp_show_children_boards" type="radio" value="0" ' , $context['TPortal']['show_children_boards']==0 ? 'checked' : '' , '> '.$txt['tp-no'].'
<input name="tp_show_children_boards" type="radio" value="1" ' , $context['TPortal']['show_children_boards']==1 ? 'checked' : '' , '> '.$txt['tp-yes'].'
</td>
</tr>
<tr class="windowbg2">
<td align="right" width="45%">'.$txt['tp-showboardname'].'</td>
<td>
<input name="tp_show_board_name" type="radio" value="0" ' , $context['TPortal']['show_board_name']==0 ? 'checked' : '' , '> '.$txt['tp-no'].'
<input name="tp_show_board_name" type="radio" value="1" ' , $context['TPortal']['show_board_name']==1 ? 'checked' : '' , '> '.$txt['tp-yes'].'
</td>
</tr>
And the following in TPortalAdmin.php:
//-- START: Show Childern Boards Hack --//
elseif($what=='tp_show_children_boards'){
db_query("UPDATE {$tp_prefix}settings SET value='$value' WHERE name='show_children_boards'", __FILE__, __LINE__);
$go=6;
}
//-- END: Show Childern Boards Hack --//
//-- START: Show Board Names Hack --//
elseif($what=='tp_show_board_name'){
db_query("UPDATE {$tp_prefix}settings SET value='$value' WHERE name='show_board_name'", __FILE__, __LINE__);
$go=6;
}
//-- END: Show Board Names Hack --//
But I am unsure of where the following would be set:
$context['TPortal']['show_children_boards']
$txt['tp-showchildrenboards']
Thanks in advance!
Well, any $context values needs to be filled within TPortalAdmin.php, while the $txt entries needs to go into TPortalAdmin.language.php.
Alright thanks Bloc!
Hey here is another question... when tp is going to output "Both forum and articles - sorted on date" in
if ($output_method != 'echo')
return $return;
foreach ($return as $news)
{
echo '
<table border="0" width="100%" align="center" class="ssi_table">
<tr>
<td>', $news['icon'], ' <b>'$news['subject'], '</b><span class="smaller"><br />', $news['time'], ' ', $txt[525], ' ', $news['poster']['link'], '<br /><br /></span></td>
</tr>
<tr>
<td>', $news['body'], '<br /><br /></td>
</tr>
<tr>
<td>', $news['link'], ' | ', $news['new_comment'], '</td>
</tr>
</table>
<br />';
if (!$news['is_last'])
echo '
<hr width="100%" />
<br />';
}
does it use the above echo or is it returned in $output_method != 'echo';?
Thanks a bunch!
Oh and when I finish my hack where is a good place to post it?
I finished it! Thanks for all your help bloc! If anyone is curious what my hack does it can be viewed at http://www.teamgouranga.com
When I get time I will create a guide on how to do it.
[attachment deleted by admin]