Bravo List
Register
Go Back   > Bravo List > Source Code > Archived Trackers > Template Shares > Mods & Themes
Reply
  #1  
Old 30th March 2009, 00:59
Keiichi Keiichi is offline
Senior Member
 
Join Date: Feb 2008
Brazil
Posts: 25
Default [TSSE 5.x] Recent Threads
upgrade new version plugin Recent Threads

latestthreads.php
PHP Code:
<?php
// Dont change for future reference.
if (!defined('TS_P_VERSION'))
{
    
define('TS_P_VERSION''1.2.0 by Keiichi');
}
// Security Check.
if (!defined('IN_PLUGIN_SYSTEM'))
{
    die(
"<font face='verdana' size='2' color='darkred'><b>Error!</b> Direct initialization of this file is not allowed.</font>");
}

// BEGIN Plugin: lastXforumposts
include_once(INC_PATH.'/readconfig_forumcp.php');
$_res_lt_query sql_query("SELECT fp.fid,f.fid FROM ".TSF_PREFIX."forumpermissions fp LEFT JOIN ".TSF_PREFIX."forums f ON (fp.fid=f.pid) WHERE (fp.canview = 'no' OR fp.cansearch = 'no') AND fp.gid = ".sqlesc(($CURUSER $CURUSER['usergroup'] : UC_USER)));
if (
mysql_num_rows($_res_lt_query) > 0)
{
    while (
$notin mysql_fetch_assoc($_res_lt_query))
        
$uf[] = 0+$notin['fid'];
    
$unsearchforums implode(','$uf);
}

        
$_res_lt_query sql_query("SELECT fid,password FROM ".TSF_PREFIX."forums WHERE password != ''");
if (
mysql_num_rows($_res_lt_query) > 0)
{
    while (
$notin mysql_fetch_assoc($_res_lt_query))
    {
        if (
ts_get_array_cookie("forumpass"$notin['fid']) != md5($CURUSER['id'].$notin['password']))
        {
            
$uf2[] = 0+$notin['fid'];
        }
    }
    if (
count($uf2) > 0)
    {
        if (
$unsearchforums)
            
$unsearchforums .= ','.implode(','$uf2);
        else
            
$unsearchforums implode(','$uf2);
    }
}
if(
$unsearchforums$where_sql " AND t.fid NOT IN ($unsearchforums)";        
$_res_lt_query sql_query("SELECT t.tid, t.iconid, t.subject, t.dateline, t.uid, t.username, t.replies, t.lastpost, t.lastposter, t.lastposteruid, t.views FROM ".TSF_PREFIX."threads t WHERE 1=1 {$where_sql} ORDER BY t.lastpost DESC LIMIT 0, ".$i_post_limit);
    {    
        
$latestthreads '

        <!-- begin lastXforumposts -->
    <table width="100%" border="0" cellspacing="0" cellpadding="5">                
                    <tr>
                        <td class="subheader" width="1%"></td>
                        <td class="subheader" align="left" width="50%">'
.$lang->index['topictitle'].'</td>
                        <td class="subheader" align="center" width="30%">'
.$lang->index['lastposter'].'</td>
                        <td class="subheader" align="center" width="5%">'
.$lang->index['replies'].'</td>
                        <td class="subheader" align="center" width="5%">'
.$lang->index['views'].'</td>
                    </tr>'
;        
        while(
$thread mysql_fetch_assoc($_res_lt_query))
        {

            
$latestthreads .= '
            <tr>
                <td align="left"><img src="./tsf_forums/images/icons/icon'
.$thread['iconid'].'.gif" border="0" class="inlineimg">
                <td align="left"><strong><style="padding-top: 6px;"><a href="'
.$BASEURL.'/tsf_forums/showthread.php?tid='.$thread['tid'].'" alt="'.htmlspecialchars_uni($thread['subject']).'" title="'.htmlspecialchars_uni($thread['subject']).'">'.cutename(htmlspecialchars_uni($thread['subject']), 50).'</a></strong><br> '.sprintf($lang->index['by'], '<a href="'.$BASEURL.'/userdetails.php?id='.$thread['uid'].'">'.$thread['username'].'</a>' ).'<br />'.my_datee($dateformat$thread['dateline']).' '.my_datee($timeformat$thread['dateline']).'</td>
                
                <td align="right">'
.my_datee($dateformat$thread['lastpost']).' '.my_datee($timeformat$thread['lastpost']).'<br />&nbsp;'.sprintf($lang->index['by'], '<a href="'.$BASEURL.'/userdetails.php?id='.$thread['lastposteruid'].'">'.$thread['lastposter'].'</a>' ).'&nbsp;<a href="./tsf_forums/showthread.php?tid='.$thread['tid'].'&amp;page=last"><img src="./tsf_forums/images/lastpost.gif" class="inlineimg" border="0" alt="'.$lang->index['last'].'" title="'.$lang->index['last'].'"></a></td>
                <td align="center"><strong>'
.ts_nf($thread['replies']).'</strong></td>
                <td align="center"><strong>'
.ts_nf($thread['views']).'</strong></td>
            </tr>'
;
        }
        
$latestthreads .= '</table><!-- end lastXforumposts -->';
    }
// END Plugin: lastXforumposts
?>
Attached Thumbnails
Recent_Threads2.JPG  

Last edited by Keiichi; 6th April 2009 at 12:32. Reason: upgrade new version plugin Recent Threads
Reply With Quote
The Following 2 Users Say Thank You to Keiichi For This Useful Post:
Ashur (7th April 2009), DrNet (30th March 2009)
  #2  
Old 30th March 2009, 04:49
DrNet's Avatar
DrNet DrNet is offline
Senior Member
 
Join Date: May 2008
Posts: 184
Smile
thanks Keiichi , i have updated it to work with TS v5.4 , If any1 need it, You can download it From Attachments

Note , Edit the number of threads in lastXforumposts_config.php ,



Best Regards

DrNet
Attached Files
File Type: rar latest threads updated For v5.4.rar (1.6 KB, 90 views)
Reply With Quote
  #3  
Old 6th April 2009, 12:35
Keiichi Keiichi is offline
Senior Member
 
Join Date: Feb 2008
Brazil
Posts: 25
Default
upgrade new version plugin Recent Threads

Keiichi
Reply With Quote
The Following User Says Thank You to Keiichi For This Useful Post:
DrNet (7th April 2009)
  #4  
Old 6th April 2009, 23:41
DrNet's Avatar
DrNet DrNet is offline
Senior Member
 
Join Date: May 2008
Posts: 184
Default
thanks m8 , i have updated it to work with v5.4
Attached Files
File Type: rar latest threads updated For v5.4 By Keiichi v1.2.rar (1.7 KB, 115 views)
Reply With Quote
The Following User Says Thank You to DrNet For This Useful Post:
PsyK0 (5th February 2010)
  #5  
Old 28th October 2009, 20:45
mcryow mcryow is offline
Senior Member
 
Join Date: Jul 2009
P2P
Posts: 16
Default
looks good just cant find the files 2 edit or should i say were bouts i upload them 2 :)
Reply With Quote
  #6  
Old 9th January 2010, 12:06
DAKz's Avatar
DAKz DAKz is offline
Senior Member
 
Join Date: Jul 2009
P2P
Posts: 380
Default
Nice mod this works great as a middle plugin. Thanks
Reply With Quote
Reply

Tags
5x , recent , threads , tsse

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
torrent strike forum threads and posts not counted inebunit Torrent Strike 7 10th January 2010 14:16
Where forum threads are stored? databse or files? Syn Template Shares 1 30th June 2009 00:59
Help about plugin Recent Threads Joshua Template Shares 2 24th December 2008 18:27



All times are GMT +2. The time now is 15:54. vBulletin skin by ForumMonkeys. Powered by vBulletin® Version 3.8.11 Beta 3
Copyright ©2000 - 2024, vBulletin Solutions Inc.