PDA

View Full Version : Forum Home Enhancements - Latest X Threads on Forumhome


Michael Biddle
22 Dec 2007, 03:28
Latest X Threads on Forum Index
by: whitemike
Demo: Here (http://www.vbulletinzone.com/)


What this does?

This will add the latest x posts onto your forum index

Features?

Enable/Disable - Master Switch to Turn Latest Posts on or off
Title - Change the title of the Site News
Posts to Show - Number of Last Posts to show
Cutoff Length - How many characters to show before the ... at the end
Exclude Forums - Choose what forums you do not want to be listed
Thread Title Width - Width of Title Table
User Title Width - Width of User Table
Forum Title Width - Width of Forum Table
Auto Location - Enable/Disable auto location
Location - Gives Options for Under navbar, above forum, or below forum
Date & Time - Enable/Disable the time and date from being shownAdded?

2 Template
3 Plugins
11 Settings
29 Phrases
Installation?

Import Product
Thats It!

Releases

1.0 - Initial release
Please Click Install if you use

For Latest X Posts on Forum Home CLICK HERE (http://www.vbulletin.org/forum/showthread.php?t=142759)

Michael Biddle
22 Dec 2007, 03:29
Reserved

shcchief
22 Dec 2007, 06:11
Nice work first of all, I use your mod on my site and it's great but...

Is there a mod that has similar functionality to this site

http://www.3fsj.com.au/modules.php?name=Forums

Where it only lists the threads with the recent posts in them, and not the actual posts themselves?

Sofia
22 Dec 2007, 07:13
Hi Mickael ! How are you ? :p

Thank you for this hack. Works perfectly :)

projectego
22 Dec 2007, 19:24
/me clicks install

Snake
22 Dec 2007, 19:32
Working great. Thanks!

Namaless
04 Jan 2008, 16:06
WOW! Thanks man :D

soletrader
05 Jan 2008, 05:09
Hi, I have a question. If I want to add this inside a certain subforum page, which template should I insert it to?

Michael Biddle
05 Jan 2008, 06:31
This will only work on forumhome.

Nikke
05 Jan 2008, 07:37
What this does?

This will add the latest x posts onto your forum index

Which one is it? :)

And can this be installed multiple times for multiple tables with different threads?

Nikke
10 Jan 2008, 20:07
Anyone? How can this be installed twice for two different latest threads tables?

Michael Biddle
11 Jan 2008, 15:03
Why would you want more then one?

Nikke
12 Jan 2008, 08:54
Why would you want more then one?

I would like to have one with latest news and one with latest promotions. They would take the threads from different forums.

theoz1
12 Jan 2008, 11:12
I am currently building a home page for my forums through microsoft frontpage and am wanting to put this on the frontpage due to this making my forums slower. Is there a way to do this? Ive tried putting the code in and it works, it just doesnt update. If this is possible I appreciate any help.

thx.

AWMGolfer
14 Jan 2008, 02:56
It seems to be a tad slow on adding new posts, is there a way to make it show new posts as soon as the posts are made? Knowing my luck it's somewhere in general settings that I've just missed..lol. Thanks!!

Michael Biddle
15 Jan 2008, 14:57
This would have nothing to do in not pulling the latest data. On the refresh it will query the latest X amount of threads that you want.

BoredOutOfMyMin
19 Jan 2008, 08:17
s l o w as molasses on my board.

Uninstalled

Great mod if you can get it speedy.

heroia
19 Jan 2008, 10:19
Indeed, is slowly a lot the entire forum.

nyqnzguju
23 Jan 2008, 17:27
I really like this Hack. And i have ready installed it on my forum but i want to make the text bold and different colors.
Like i want Latest 5 Threads color different , Forum color different and Author color different. It would really helpful if you tell me how to change it. Thanks in adv.

https://www.vbulletin.org/forum/

nyqnzguju
23 Jan 2008, 20:38
Hey guys Just letting you know that Its working fine on 3.6.5. Great hack :);)

Michael Biddle
23 Jan 2008, 21:22
I really like this Hack. And i have ready installed it on my forum but i want to make the text bold and different colors.
Like i want Latest 5 Threads color different , Forum color different and Author color different. It would really helpful if you tell me how to change it. Thanks in adv.

http://i168.photobucket.com/albums/u162/highranger/Desi9-2.jpg

It would be in the forumhome_latest and forumhome_latest_bits I believe

Hey guys Just letting you know that Its working fine on 3.6.5. Great hack :);)

Thanks.

nyqnzguju
24 Jan 2008, 15:37
Can you show me the path and what code need to be added? It would be much helpful. thanks for your quick reply.
Again i want to make the Thread title, Author and Forum (in which the thread created) colorful.

https://www.vbulletin.org/forum/

theoz1
30 Jan 2008, 02:02
I am currently building a home page for my forums through microsoft frontpage and am wanting to put this on the frontpage due to this making my forums slower. Is there a way to do this? Ive tried putting the code in and it works, it just doesnt update. If this is possible I appreciate any help.

thx.

Any chance?

Michael Biddle
30 Jan 2008, 03:17
Can you show me the path and what code need to be added? It would be much helpful. thanks for your quick reply.
Again i want to make the Thread title, Author and Forum (in which the thread created) colorful.

http://i168.photobucket.com/albums/u162/highranger/Desi9-3.jpg

Try editing forumhome_latest_thread_bit or something similar.

Michael Biddle
30 Jan 2008, 03:18
Any chance?

This modification would not put any more load onto your forumhome, then adding it to a separate page. Regardless which page its on, it is a query.

theoz1
30 Jan 2008, 03:32
ya its gotten better. But wanted to put it on the home page with few other things. So is there a way to put it on a home page thats not vbulletin related?

Michael Biddle
30 Jan 2008, 20:52
If you want to have it on a different page (Not powered by vbulletin) You would need to connect to the database and query the information. Same concept really.

theoz1
31 Jan 2008, 06:00
im pretty new to website building, any chance you can explain that a little bit to me? If it would take a little while to explain it, dont worry about it than.

thx.

Michael Biddle
31 Jan 2008, 06:09
Yea its too complicated to explain it. Besides that is not what this thread is for. Sorry.

thetoolman
03 Feb 2008, 12:49
Is there a way to display the latest thread on all inside pages too?

Eagle Creek
13 Feb 2008, 12:47
Will it work when I've got 3.6.x?

Michael Biddle
13 Feb 2008, 15:38
I have a version for 3.6.x, but this should work. Not tested

relivo
15 Feb 2008, 07:09
I just wish this thing could work on every page...it would be so much more useful. Great hack though!

ChurchMedia
10 Mar 2008, 02:48
I have this working on vB 3.7 B5 with no problems. In fact, I have "latest threads" and "latest posts" running at the same time on the forum home page: www.churchmedia.net

I'd like it to show the thread prefixes and the thread icons. Is that an easy mod?

I'd also to be able to exclude certain forums from showing up in the recent threads/posts. I have some heavily used forums that aren't really designed for visitors and I'm afraid the topics might be confusing.

Thanks for the great hack! :)

Networknutz
20 Mar 2008, 03:11
I installed this mod and it is working in mozilla but not explorer.

Here is link to my site www.rotofans.com/forums

If I do the auto include it puts the latest posts directly below my navbar whether I use "Above forums" or "below navbar".

When I tried to hardcode it to my forumhome it would not take in explorer.

Now in mozilla it's works fine. It looks just like any of my other main forums areas.

Any ideas? I love the mod if I could get it to work in explorer.

Thanks
Will

Networknutz
20 Mar 2008, 14:13
figured it out!!!! just have to be careful where put the latest code in your template.

Michael Biddle
20 Mar 2008, 15:38
Please click install if you use.

Boofo
20 Mar 2008, 15:40
Mike, how many queries does this add to the forumhome, sir? ;)

Michael Biddle
21 Mar 2008, 22:12
One

thenutthouse
30 Mar 2008, 14:28
5. Exclude Forums - Choose what forums you do not want to be listed

Is there anyway to have it only Include Forums instead. It's not the forums that bother me, but it includes the subforums too, and I have over 100 all together. I only want to show about 30 subforums (or one forum). It would be much easier to add what I want instead of what I don't want. Plus there are still new subforms popping up alomost every month, which would make this a pain to keep going in and adding the new subforms to the exclude list.

Great Mod though.

Thnx,
~thenutthouse

Edit: also would there be a way to have it display the default usergroups color for the authors? (example: Administrators, Moderators, VIP, Members)

Lapsetur
02 Apr 2008, 12:03
CAn it be possible latest x threads and latest x post on forum home

Michael Biddle
02 Apr 2008, 15:23
check out both of my mods.

Lapsetur
04 Apr 2008, 13:02
What I ment was both latest X posts and latest X thread on same MOD.

Michael Biddle
04 Apr 2008, 15:38
Why would I do double the work? Is it too hard for an extra click? It does not take any template edits.

Al Gregory
17 Apr 2008, 20:22
Installed in ten seconds Thanks

synisterk
19 Apr 2008, 21:25
Great mod...I love it. Nice Work.

silver_wing
26 Apr 2008, 17:55
I am using the Right and Left sidebar Mod. How can I place Latest Threads in the sidebar instead of the center?

Michael Biddle
28 Apr 2008, 17:23
As I stated before, this will only show from within the forumhome template.

useractive
02 May 2008, 17:58
Hi,

Could someonw please help me out a bit with installing this mod?

I add it using "Manage products", give the ID, title description etc and I see the "Latest X Threads on Forum Home" product added. Fine.

Next i want to find the controll panel to switch the product ON and modify the parameters. But I can not find it!? It is not in "vBulletin Options", not in UserCP, its nowhere...

What am i doing wrong? Appreciate your help and advises!

Jezlad
03 May 2008, 20:04
Any chance of changing this to an Ajax updater that displays the latest thread as and when they're posted?

fahl
07 May 2008, 15:25
Having problems with this,Shows up ok but when thread link is clicked it is showing
No Thread specified. If you followed a valid link, please notify the administrator

Thepage it is attempting to access is
http://www.goldies.us/forums/showthread.php?t=2720

The page it should go to is
http://goldiez.com/forums/showthread.php?t=2721

I have downloaded latest version & reinstalled it,but still the same

bigtime
07 May 2008, 18:11
How can this be used on a non-VB page?

shaynehammy
08 May 2008, 06:19
Is there any way we can just have the thread title and not part of the post underneath it? This virtually doubles the length of the hack on the forum home. Ie i want to disaply the last 30 threads but dont want the user to be scrolling down for ages just to look through it all.

Thanks mate.

vanbao
10 May 2008, 04:41
I am looking for ways to display the latest x posts on a non vb homepage. Like this one.
http://www.vietshowbiz.com

Can someone please help.

car20
10 May 2008, 06:23
tanks a lot for this nice hack .
please tell me how do i can change Author , Forum And Latest 5 Threads words to other lang .
and how do i can changes dir to right to left .

shaynehammy
12 May 2008, 00:14
Is this mod still supported?

Anyone know how to get rid of the preview that is showing under the last updated post. I would also like to show thread view and replies to the thread that has been updated where the lastest post is.

If that makes sense.

orok
13 May 2008, 04:44
i did some changes to lock like this :

http://www.vbulletin.org/forum/attachment.php?attachmentid=80519&stc=1&d=1210653797

Demo (http://www.khuzaa.com/forums/index.php)

thank you for this Product

meolangthang
20 May 2008, 16:17
Thank you man :D

Zacarias
07 Jun 2008, 11:35
I just wish this thing could work on every page...it would be so much more useful. Great hack though!

I got it to work on every page by changing the hook location for 'Main Code' from "forumhome_start" to "global_start". One query is added per page.

Also, some variables need to be changed to do it... Hope I'm allowed to do this.
First open the "Main Code" plugin.

Find:
// query to get the last posts
$query = $vbulletin->db->query_read("
SELECT
thread.forumid as forumid, thread.visible, thread.title as thread_title, thread.threadid as threadid, thread.postusername as username, thread.postuserid as userid, thread.dateline as date,
forum.title as forum_title,
post.postid, post.pagetext as pagetext
FROM " . TABLE_PREFIX . "thread as thread
LEFT JOIN " . TABLE_PREFIX . "post as post on (thread.firstpostid = post.postid)
LEFT JOIN " . TABLE_PREFIX . "forum as forum on (thread.forumid = forum.forumid)
WHERE thread.visible = 1 AND $latest_and AND $latest_and_1
ORDER BY postid DESC
LIMIT $limit"
);


Replace with:
// query to get the last posts
$query = $vbulletin->db->query_read("
SELECT
thread.forumid as forumid1, thread.visible, thread.title as thread_title1, thread.threadid as threadid1, thread.postusername as username1, thread.postuserid as userid1, thread.dateline as date,
forum.title as forum_title1,
post.postid, post.pagetext as pagetext1
FROM " . TABLE_PREFIX . "thread as thread
LEFT JOIN " . TABLE_PREFIX . "post as post on (thread.firstpostid = post.postid)
LEFT JOIN " . TABLE_PREFIX . "forum as forum on (thread.forumid = forum.forumid)
WHERE thread.visible = 1 AND $latest_and AND $latest_and_1
ORDER BY postid DESC
LIMIT $limit"
);

Find:
// strips the bbcode out of the post
$row['pagetext'] = strip_bbcode($row['pagetext'], $stripquotes = true, $fast_and_dirty = false, $showlinks = true);

// adds the cutoff ... with substr
$row['pagetext'] = substr($row['pagetext'], 0, $vbulletin->options['latest_thread_cut']) . '...';

// convert pagetext to nice looking variable
$pagetext = $row['pagetext'];
$username = $row['username'];
$userid = $row['userid'];
$forumid = $row['forumid'];
$threadid = $row['threadid'];
$forumtitle = $row['forum_title'];
$threadtitle = $row['thread_title'];

Replace with:
// strips the bbcode out of the post
$row['pagetext1'] = strip_bbcode($row['pagetext1'], $stripquotes = true, $fast_and_dirty = false, $showlinks = true);

// adds the cutoff ... with substr
$row['pagetext1'] = substr($row['pagetext1'], 0, $vbulletin->options['latest_thread_cut']) . '...';

// convert pagetext to nice looking variable
$pagetext1 = $row['pagetext1'];
$username1 = $row['username1'];
$userid1 = $row['userid1'];
$forumid1 = $row['forumid1'];
$threadid1 = $row['threadid1'];
$forumtitle1 = $row['forum_title1'];
$threadtitle1 = $row['thread_title1']; // strips the bbcode out of the post
$row['pagetext1'] = strip_bbcode($row['pagetext1'], $stripquotes = true, $fast_and_dirty = false, $showlinks = true);

// adds the cutoff ... with substr
$row['pagetext1'] = substr($row['pagetext1'], 0, $vbulletin->options['latest_thread_cut']) . '...';

// convert pagetext to nice looking variable
$pagetext1 = $row['pagetext1'];
$username1 = $row['username1'];
$userid1 = $row['userid1'];
$forumid1 = $row['forumid1'];
$threadid1 = $row['threadid1'];
$forumtitle1 = $row['forum_title1'];
$threadtitle1 = $row['thread_title1'];

Then open your "forumhome_latest_thread_bit" template and change the variables. Mine looks like this:

<tr>
<td class="$bgclass">
<a href="$vboptions[bburl]/showthread.php?$session[sessionurl]t=$threadid1" class="smallfont">$threadtitle1</a>
<if condition="$vboptions['latest_thread_time']"><span class="smallfont">$date</span></if>
<if condition="$vboptions['latest_thread_cut'] != '0'"><div class="smallfont">$pagetext1</div></if>
</td>
<td class="$bgclass">
<span class="smallfont">in</span> <a href="$vboptions[bburl]/forumdisplay.php?$session[sessionurl]f=$forumid1" class="smallfont">$forumtitle1</a>
</td>
<td class="$bgclass">
<span class="smallfont">by</span> <a href="$vboptions[bburl]/member.php?$session[sessionurl]u=$userid1" class="smallfont">$username1</a>
</td>
</tr>


Make sure "Auto Location" is set to no.
Then put "$latest" wherever you want it in your templates. I have it in my navbar template. :)
DEMO (http://www.i6boards.com) (must be registered.. sorry can't have guests running up queries.. oh and the place is still under construction too... :P)

I guess my version is kind of a new hack. Or a mod to this one...
Great hack anyway, thank you!

am3rgin
08 Jun 2008, 23:24
Any idea how to set the limit to something like 50, then add the pagenav options? Just like the search results but limit whats shown to the latest 5 on forum home. The pagnav would provide the ability to goto to the next 5 latest threads or jump to any page within the list of 50 latest threads.

This same mod from another forum package has this ability. Users can hit the "Next 5" link until they scroll through a weeks worth of threads.

Zacarias
09 Jun 2008, 21:55
That sounds pretty cool, imo. I'm sure something like this can be done with Javascript, maybe not necessarily AJAX..

am3rgin
14 Jun 2008, 01:11
Guess the pagination from this article would need to be implemented.

http://www.vbulletin.org/forum/showthread.php?t=120540&highlight=page

I've messed with it but haven't been able to get it to work.

Bacon Butty
19 Jun 2008, 10:46
Fantastic. Just what I was looking for.

Bacon Butty
19 Jun 2008, 10:51
Or so I thought... New posts are being made but it doesn't seem to want to update. :/

[Edit] Ah, it only updates with recent threads, not posts. Any way this could be changed so the latest posts are displayed?

Michael Biddle
20 Jun 2008, 06:21
I have a recent thread and recent post modification. Check out my profile for a list of my mods.

Zacarias
20 Jun 2008, 22:14
In the main code change the query where it's ordered by to "ORDER BY postid DESC "

Onone
26 Jun 2008, 16:17
tnx.
but i have one thing to ask, i can change the style of this thing?

Michael Biddle
26 Jun 2008, 19:31
Yes, you can modify how it looks by altering the two templates that are added in this.

Onone
28 Jun 2008, 20:20
you can help me? i mean like give the code of this mod, i will chang the style of the mod

ETDC
28 Jun 2008, 22:59
Any option for placement on sidebar/columns?

Michael Biddle
29 Jun 2008, 05:21
you can help me? i mean like give the code of this mod, i will chang the style of the mod

No, you can modify it for yourself, but nothing to distribute.

Any option for placement on sidebar/columns?

Not at this time, this is only for forumhome.

jbldesign
29 Jun 2008, 11:13
Is there any solution to only show 1 (one) latest post from a thread?

Onone
29 Jun 2008, 13:48
No, you can modify it for yourself, but nothing to distribute.



Not at this time, this is only for forumhome.


i dont now how do it.
you can to explain me plz?

ETDC
29 Jun 2008, 14:43
No, you can modify it for yourself, but nothing to distribute.



Not at this time, this is only for forumhome.
Is it possible though (with a little HTML trickery)? :)

Onone
29 Jun 2008, 17:19
i dont now.
that the reason i ask him.

Slyfox1
30 Jun 2008, 10:04
http://www.theuglybuggers.com/forum/index.php

This one works well for me :)

Onone
30 Jun 2008, 15:06
i dont now.
that the reason i ask him.



answer?

MikeHolohan
30 Jun 2008, 17:01
excellent thanks...

Michael Biddle
01 Jul 2008, 00:17
answer?

The answer is I am too busy to modify it simply for you.

jason_x
30 Aug 2008, 13:07
Is there any solution to only show 1 (one) latest post from a thread?

yep would be nice. anyone able to help? maybe the coder himself?


thread 1 post 5
thread 1 post 4
thread 2 post 1
thread 1 post 3
thread 1 post 2
thread 1 post 1

such listing isnt good for high traffic threads! there would be 10 posts from one thread in latest threads. :(

kottemann
30 Aug 2008, 20:18
thankyou for this

Blackhat
08 Sep 2008, 15:08
How can we put in on the sidebar instead ?

axi
02 Oct 2008, 09:02
Downloaded and installed. Works a treat. Thankss heaps

eBola75
08 Oct 2008, 09:48
Doesn't work to me...
Is it because I'm using Version 3.7.2?
I really need this kind of modification.

Michael Biddle
11 Oct 2008, 07:15
It says that you did not even download it. It works fine on 3.7.2.

somasimple
16 Oct 2008, 14:49
Hi,
it is great mod.:)
Is there a way to bold the thread title?
Is there a way to remove the begin of the post that is under the thread title?
and (sorry) a way to jump directly to the latest post of the thread instead of the first one?

HappyAndyK
24 Oct 2008, 18:13
I have a question, that can we show latest x post from a specific forum category only ? rather than pulling all post globaly ??

thanks,

DavidWWL
28 Mar 2009, 23:26
How to install this?

Import through "Manage Products"? Also confused about "allow overwrite"; should the file be renamed so that it will overwrite an existing file by a different name? Current filename is "product-latest_posts_whitemike".

Early in this post it says "Click Install". Where does one click to install? Then where does one go to change settings if necessary?

Michael Biddle
29 Mar 2009, 06:01
Click install here on vbulletin.org so I will give you support.

Just go into your admincp product importer and import this mod. You can adjust the settings in your vbulletin admincp options.

abraxus
15 May 2009, 12:44
Is there any solution to only show 1 (one) latest post from a thread?

pjaco
17 May 2009, 20:22
Thanks:D

Michael Biddle
18 May 2009, 04:53
Glad you like it.

ErnestA
25 Jun 2009, 05:04
Looks like a great mod? Will you be making a version for vBulletin 3.8?

Michael Biddle
01 Jul 2009, 02:28
This should be compatible with 3.8.

prolific_one
07 Sep 2009, 16:28
I have looked through forumhome and forumhome_latestthreadbit trying to find how I can make my cell rows only one row of text. right now the 'latest x posts' column lists the thread title/time on one line then the text preview on the next line. I'd like that all on one line. Is this a simple fix that i just don't see?

Michael Biddle
07 Sep 2009, 22:20
I have looked through forumhome and forumhome_latestthreadbit trying to find how I can make my cell rows only one row of text. right now the 'latest x posts' column lists the thread title/time on one line then the text preview on the next line. I'd like that all on one line. Is this a simple fix that i just don't see?

In the template: forumhome_latest_thread_bit

Find:

<a href="$vboptions[bburl]/showthread.php?$session[sessionurl]t=$threadid" class="smallfont">$threadtitle</a>
<if condition="$vboptions['latest_thread_time']"><span class="smallfont">$date $time</span></if>
<if condition="$vboptions['latest_thread_cut'] != '0'"><div class="smallfont">$pagetext</div></if>

You can make it something like:

<a href="$vboptions[bburl]/showthread.php?$session[sessionurl]t=$threadid" class="smallfont">$threadtitle</a>
<if condition="$vboptions['latest_thread_time']"><span class="smallfont">$date $time</span></if>
<if condition="$vboptions['latest_thread_cut'] != '0'"><span class="smallfont">$pagetext</span></if>

Zi55
08 Sep 2009, 02:00
Michale Thanks for this nice hack , but can you make it use datastore or cache , so we can save MySQL cpu usage .
Thanks ,
Zi55

Michael Biddle
08 Sep 2009, 04:08
It is only one query on the forumhome page, it really does not have usage at all.

royong
14 Nov 2009, 01:09
Installed and works on 3.8.x ... good mod ... and easy to install ... thanks.

I made some modifications on forumhome_latest_thread_bit and I have my display now as

<date><time><thread01><forum><author>
<date><time><thread02><forum><author>
<date><time><thread03><forum><author>
<date><time><thread04><forum><author>
<date><time><thread05><forum><author>
<date><time><thread06><forum><author>

Question ... I would like to change to

<date><time><thread01>...<date><time><thread04>
<date><time><thread02>...<date><time><thread05>
<date><time><thread03>...<date><time><thread06>

thereby removing the display of <forum> and <author> but using the space in the row to display another thread...

any advice?

many thanks in advance!