vBulletin Mods

The Official vBulletin Modifications Site
https://www.vbulletin.org/forum/showthread.php?t=236404

[WIDGET] Recent Threads
by cory_booth
20 Feb 2010 15:45

1 Attachment(s)
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.

tort 20 Feb 2010 15:59

Where do you put this in?

cory_booth 20 Feb 2010 15:59

PHP Widget in the CMS

zbosskiller 20 Feb 2010 15:59

Create a new CMS PHP Widget mate.

zbosskiller 20 Feb 2010 16:05

Great little widget Cody, thx.

Any chance you could make this so it works as a centre widget? i.e. above the Articles?

At the moment it is all right sided, which is correct for a sideblock.

If you have any time to do it I'd appreciate it.

Thx

Z

cory_booth 20 Feb 2010 16:11

Quote:

Originally Posted by zbosskiller (Post 1987370)
Great little widget Cody, thx.

Any chance you could make this so it works as a centre widget? i.e. above the Articles?

At the moment it is all right sided, which is correct for a sideblock.

If you have any time to do it I'd appreciate it.

Thx

Z

Hmmm....
You mean just center all the text?


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


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


zbosskiller 20 Feb 2010 16:32

It more so something like a block that has a header, in the header it shows

'Thread' | 'Posted By' | 'Views' | 'Last Post''

This is probably a lot of work but thought I would ask as its what I was used to with VB 3.8.4

cory_booth 20 Feb 2010 16:49

Oh, gotcha - I know what you mean...

And believe it or not, I had something like that running but dumped it a long time ago.
(just experimenting)...

I'll see what I can scratch up...

zbosskiller 20 Feb 2010 16:57

Thx, really appreciate it!

cory_booth 20 Feb 2010 18:50

Hey I was thinking....
What if you put this in as a Widget...

http://www.vbulletin.org/forum/showthread.php?t=235841

You could turn off some of the areas and it would act as a threads module...

I don't have it installed, but try making a JS Enhanced Widget
Make a new template and insert:

{vb:raw vsatopstats}

Videx 21 Feb 2010 02:33

Thanks. Installed.

For those that want to make it a little smaller (or larger), just edit the "LIMIT 0, 15" line. I dunno what the 0 means, but if I change 15 to 5, I only see 5 newest threads.

RedHacker 22 Feb 2010 08:37

Cant show date....

cory_booth 22 Feb 2010 16:52

You may wish to check here:
$recent_thread[lastpostdate] = vbdate('M jS', $recent_thread[lastpost], 1);

I suppose this hard-coded date format (M jS) might mess with other country formats.

sqzdog 22 Feb 2010 19:07

Hey Cory- nice widget. I would like to use this but have it show latest posts instead of threads. Is there an easy way to do this?

klyde 22 Feb 2010 20:58

Quote:

Originally Posted by RedHacker (Post 1988624)
Cant show date....

Replace:


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

by:


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



All times are GMT. The time now is 10:01.

Powered by vBulletin® Version 3.8.14
Copyright © 2020, MH Sub I, LLC dba vBulletin. All Rights Reserved. vBulletin® is a registered trademark of MH Sub I, LLC
Copyright ©2001 - , vbulletin.org. All rights reserved.