Link to my site: http://www.bosveldboerbokklub.com
SMF version: 2RC3
TP version: 1.0 RC1
Default Forum Language: ENG
Theme name and version: ZAP Theme
Browser Name and Version: Firefox 3.6.12
Mods installed: Mods listed here
- Sitemap
- TinyPortal
- SA FBConnect
- Aeva Media
- SA Affiliates
- Google Analytics Code
- PDF Tag
Related Error messages: N/A
I have a question, under my left block i want to add a link that will be something like "view all"
and a link to a page with all the latest topics in order from newest to latest.
Possible??
All you have to do is put in a link that points to index.php?action=recent.
Nice. Now how do i edit the TP recent code to add this link??
Sorry for so many Q's.
You could add this code to a HTML & Javascript code block.
<p align="center"><b><a href="index.php?action=recent"><font size="4">Recent
Post</font></a></b></p>
Open the Themes/default/TPsubs.template.php file. Search for the "function TPortal_recentbox()" function. You can see where to add that link in the code there.
I dont see it. I am nOOb :(
Quote{
global $scripturl, $context, $settings, $options, $txt , $modSettings;
// is it a number?
if(!is_numeric($context['TPortal']['recentboxnum']))
$context['TPortal']['recentboxnum']='10';
// leave out the recycle board, if any
if(isset($modSettings['recycle_board']))
$bb=array($modSettings['recycle_board']);
else
$bb=array();
if($context['TPortal']['useavatar']==0)
{
$what = ssi_recentTopics($context['TPortal']['recentboxnum'], $bb, 'array');
That's the right spot though the function itself starts on line 68 and the echo statements are on farther down ...
// TPortal recent topics block
function TPortal_recentbox()
{
global $scripturl, $context, $settings, $options, $txt , $modSettings;
// is it a number?
if(!is_numeric($context['TPortal']['recentboxnum']))
$context['TPortal']['recentboxnum']='10';
// leave out the recycle board, if any
if(isset($modSettings['recycle_board']))
$bb=array($modSettings['recycle_board']);
else
$bb=array();
if($context['TPortal']['useavatar']==0)
{
$what = ssi_recentTopics($context['TPortal']['recentboxnum'], $bb, 'array');
// Output the topics
echo '
<ul class="middletext" style="line-height: 1.5em; ' , isset($context['TPortal']['recentboxscroll']) && $context['TPortal']['recentboxscroll']==1 ? 'overflow: auto; height: 20ex;' : '' , 'margin: 0; padding: 0;">';
foreach($what as $wi => $w){
echo '
<li style="margin: 0; list-style: none; line-height: 1.5em; padding: 4px 0;"><a href="'.$w['href'].'">'.$w['short_subject'].'</a> ', $txt['by'], ' ', $w['poster']['link'];
if(!$w['new'])
echo ' <a href="'.$w['href'].'"><img src="'. $settings['images_url'].'/'.$context['user']['language'].'/new.gif" alt="new" /></a> ';
echo ' ['.$w['time'].']
</li>';
}
echo '
</ul>';
}
else
{
$what = tp_recentTopics($context['TPortal']['recentboxnum'], $bb, 'array');
// Output the topics
echo '
<ul class="recent_topics" style="' , isset($context['TPortal']['recentboxscroll']) && $context['TPortal']['recentboxscroll']==1 ? 'overflow: auto; height: 20ex;' : '' , 'margin: 0; padding: 0;">';
foreach($what as $wi => $w){
echo '
<li>
<span class="tpavatar"><a href="' . $scripturl. '?action=profile;u=' . $w['poster']['id'] . '">' , empty($w['poster']['avatar']) ? '<img src="' . $settings['tp_images_url'] . '/TPguest.png" alt="" />' : $w['poster']['avatar'] , '</a></span><a href="'.$w['href'].'">' . $w['short_subject'].'</a><br />
', $txt['by'], ' <b>', $w['poster']['link'],'</b><br />';
if(!$w['new'])
echo ' <a href="'.$w['href'].'"><img src="'. $settings['images_url'].'/'.$context['user']['language'].'/new.gif" alt="new" /></a> ';
echo '['.$w['time'].']
</li>';
}
echo '
</ul>';
}
}
ZarPrime