Register Members List Search Today's Posts Mark Forums Read

Reply
 
Mod Options
[WIDGET] Recent Threads Details »
[WIDGET] Recent Threads
Mod Version: 1.00, by cory_booth (Coder) cory_booth is offline
Developer Last Online: Jun 2013 I like it Show Printable Version Email this Page

vB Version: 4.0.2 Rating: (13 votes - 4.77 average) Installs: 129
Released: 20 Feb 2010 Last Update: Never Downloads: 0
Not Supported Re-usable Code Is in Beta Stage  

In an attempt at mirroring an old ASP website I used to have, I modified the recent threads display to show a bit more information in a bit more compressed format.

Feel free to use/hack/slash this code for your own needs...

Navigate to AdminCP -> CMS -> Widgets.
Create a PHP Type Widget and paste the below code.

READ BELOW THE CODE FOR AN UPDATE


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.


Updated to reflect contribution from Inflikted:
http://www.vbulletin.org/forum/showp...7&postcount=25

Be SURE to update the following line:if (!in_array($recent_thread[forumid], array(105,83,121,110,82,112,109,101,102,72))), to group the forumids you wish to NOT have included in the query results.

Download Now

Only licensed members can download files, Click Here for more information.

Screenshots

Click image for larger version

Name:	forum.jpg
Views:	5641
Size:	83.4 KB
ID:	112675  

Show Your Support

  • To receive notifications regarding updates -> Click to Mark as Installed.
  • This modification may not be copied, reproduced or published elsewhere without author's permission.
  #46  
Old 08 Mar 2010, 05:27
Inflikted Inflikted is offline
 
Join Date: Mar 2002
change the font colors in the script, i had to modify the colors to make it look right with my theme. sorry i forgot to remove those parts out.
Reply With Quote
  #47  
Old 08 Mar 2010, 08:32
RedHacker RedHacker is offline
 
Join Date: Jan 2009
Originally Posted by AURFSCAN View Post
If you want forum id's 1,2,3,4 hidden then it would look like this

if (!in_array($recent_thread[forumid], array(1,2,3,4))) {
Parse error: syntax error, unexpected $end in /home/*****/public_html/packages/vbcms/widget/execphp.php(177) : eval()'d code on line 41
Reply With Quote
  #48  
Old 08 Mar 2010, 14:17
GONUMBER6's Avatar
GONUMBER6 GONUMBER6 is offline
 
Join Date: Jan 2010
Real name: Lisa
Make sure you use the entire code, don't just add the code to the original. Same thing happened to me until I earased and used the entire code.
Reply With Quote
  #49  
Old 08 Mar 2010, 15:21
Inflikted Inflikted is offline
 
Join Date: Mar 2002
ya.. its not just one line there is a bracket at the bottom your missing, which doesnt properly close the script.
Reply With Quote
  #50  
Old 08 Mar 2010, 19:57
RedHacker RedHacker is offline
 
Join Date: Jan 2009
Originally Posted by GONUMBER6 View Post
Make sure you use the entire code, don't just add the code to the original. Same thing happened to me until I earased and used the entire code.
I cant understand...
Reply With Quote
  #51  
Old 08 Mar 2010, 20:20
GONUMBER6's Avatar
GONUMBER6 GONUMBER6 is offline
 
Join Date: Jan 2010
Real name: Lisa
Originally Posted by Inflikted View Post
is there an easy way to block out private forums from this?

nevermind figured it out... for those others who wanted to know how

change
Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

to the proper forumid's you would like to block

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.
Sorry, use the above code, (the one that was added), don't use the original and then add the code. It does not work that way (yet).
Reply With Quote
  #52  
Old 08 Mar 2010, 20:22
GONUMBER6's Avatar
GONUMBER6 GONUMBER6 is offline
 
Join Date: Jan 2010
Real name: Lisa
How do I change the back ground color of the widget? Mine is currently white with blue/grey shaded in between threads.

Also, how do I increase the amount of recent threads showing? Right now I only show 8, would like to see 20.

Also, how to add a "go to last post" button to it?

Thanks in advance!

Last edited by GONUMBER6; 08 Mar 2010 at 23:41.
Reply With Quote
  #53  
Old 15 Mar 2010, 23:08
alkrida alkrida is offline
 
Join Date: Sep 2008
updata the arabic>>>

ob_start();
global $vbulletin, $db;
//Begin Thread Counts
$toutput='';
$recent_threads = $vbulletin->db->query_read("
SELECT thread.threadid, thread.title, thread.dateline, thread.lastpost, thread.lastposter, thread.lastposterid, thread.visible, thread.open, thread.postusername, thread.postuserid, thread.replycount, thread.views, forum.forumid, forum.title as forumtitle
FROM " . TABLE_PREFIX . "thread AS thread
LEFT JOIN " . TABLE_PREFIX . "forum AS forum ON ( forum.forumid = thread.forumid )
WHERE NOT ISNULL(threadid) AND visible = '1' AND open!='10'
ORDER BY lastpost DESC
LIMIT 0, 10
");
$i = 0;
while ($recent_thread = $db->fetch_array($recent_threads))
{
$i++;
if (!in_array($recent_thread[forumid], array(1,2,3))) {
if ($i & 1) {$class='alt1';} else {$class='alt2';}
$recent_thread[title] = unhtmlspecialchars($recent_thread[title]);
$recent_thread[lastpostdate] = vbdate('M jS', $recent_thread[lastpost], 1);
$recent_thread[lastposttime] = vbdate($vbulletin->options['timeformat'], $recent_thread[lastpost]);
$toutput .='<tr><td class="'.$class.'" align="left"><b><font color="#98B5E2" size="1" face="verdana,arial"><a href="showthread.php?t='. $recent_thread[threadid].'">'. $recent_thread[title].'</a></font></b><br/>';
$toutput .='<b><span style="color: #E1E1E2"><font size="1" face="verdana,arial">آخر مشاركة بواسطة: <a href="member.php?u='.$recent_thread[lastposterid].'">'.$recent_thread[lastposter].'</a></font><br/></span></b>';
$toutput .='<font size="1" face="verdana,arial">قسم: <a href="forumdisplay.php?f='.$recent_thread[forumid].'">'.$recent_thread[forumtitle].'</a> | الردود: '.$recent_thread[replycount].'</font><br/>';
$toutput .='<font size="1" face="verdana,arial">بتاريخ: <strong>'.$recent_thread[lastpostdate].'</strong> في: <strong>'. $recent_thread[lastposttime].'</strong></font><hr/></td></tr>';
}
}
//End Thread Counts

//Sidebar - Begin Forum Threads
$sb_threads = '
<table class="tborder" cellpadding="'.$stylevar[cellpadding].'" cellspacing="'.$stylevar[cellspacing].'" border="0" width="100%" align="center"> <thead> <tr> <td class="tcat"></td> </tr> </thead> <tbody> <div class="smallfont"> <tr> <td>
'.$toutput.'
</td> </tr> </div> </tbody> </table>
';
//Sidebar - End Forum Threads
echo $sb_threads;
$db->free_result($recent_threads);
$output=ob_get_contents();
ob_end_clean();
you need to clear the Cache

thankx
Reply With Quote
  #54  
Old 16 Mar 2010, 07:46
RedHacker RedHacker is offline
 
Join Date: Jan 2009
Can help me someone with this...?

I have Parse error: syntax error, unexpected T_STRING, expecting ']' in /home/xxxxx/public_html/packages/vbcms/widget/execphp.php(177) : eval()'d code on line 19

and i put this
Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Reply With Quote
  #55  
Old 16 Mar 2010, 10:33
Videx's Avatar
Videx Videx is offline
 
Join Date: Feb 2007
Originally Posted by RedHacker View Post
i put this
Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.
Why have you replaced 'forumid' with 'Hidden Area'? Nobody told you to do that. The only thing you're supposed to change is the numbers of the forums in the array.
Reply With Quote
  #56  
Old 17 Mar 2010, 06:55
RedHacker RedHacker is offline
 
Join Date: Jan 2009
Originally Posted by Videx View Post
Why have you replaced 'forumid' with 'Hidden Area'? Nobody told you to do that. The only thing you're supposed to change is the numbers of the forums in the array.
OK put this


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

and show this message:

Parse error: syntax error, unexpected $end in /home/xxxxx/public_html/packages/vbcms/widget/execphp.php(177) : eval()'d code on line 4
Reply With Quote
  #57  
Old 17 Mar 2010, 07:08
e-Peer e-Peer is offline
 
Join Date: Oct 2009
^ That error usually means you're missing a closing } before the php end tag (?>).
Reply With Quote
  #58  
Old 17 Mar 2010, 07:49
RedHacker RedHacker is offline
 
Join Date: Jan 2009
Originally Posted by e-Peer View Post
^ That error usually means you're missing a closing } before the php end tag (?>).
Thanks must be put
Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

before //End Thread Counts
Reply With Quote
  #59  
Old 19 Mar 2010, 00:43
johnny713 johnny713 is offline
 
Join Date: Mar 2006
Thank you for sharing Cory. This is what I looking for..installed .
Reply With Quote
  #60  
Old 19 Mar 2010, 00:56
sqzdog sqzdog is offline
 
Join Date: Apr 2005
Can anybody figure out how to make this widget scroll? vertical, not horizontal marquee.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Mod Options

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


New To Site? Need Help?

All times are GMT. The time now is 09:18.

Layout Options | Width: Wide Color: