![]() |
Howto: have the 10 newest posts on my homepage
I would like to have the 10 newest posts titles show up on the homepage for my site, the best idea I can come up with is to use an rss feed reader (although I don't think the forum software supports feeds) or something equivalent to that unless someone has a better idea.
|
Quote:
|
Create a new plugin
Product: vBulletin Hook: forumhome_complete In the box add: PHP Code:
|
This only displays one 'latest thread'
Is there a way to fix it? Thanks! |
He forgot a '.' :p
PHP Code:
|
AHH...thank you!
How would you go about coding this to follow forum permissions? I really appreciate any help! |
Does this still work in 3.7? I can't seem to get it to work...
|
thank you this works perfectly in vb 3.6.x
quick question for anyone is there anyway to limit it to only show titles from specific forums should i be doing select * from where something something is = to something thanks anyway |
Quote:
[sql] SELECT title, threadid FROM ". TABLE_PREFIX ."thread WHERE forumid IN (X, Y, Z) ORDER BY lastpost DESC LIMIT 10"[/sql] Change [minicode]title, threadid[/minicode] to * if you want to select all fields. X, Y, Z Being a comma separated list of the ForumID numbers. |
ahhh! many thanks opserty! that works absolutely absolutely perfectly
|
Hi all,
I've created the plugin, but I don't understand the part about putting $lasttitle in my forumhome template. I tried deleting everything in <!-- main --> in forumhome, and replacing it with '$lasttitle', but it looks like that wasn't correct :P Please help :) Callum p.s. In case its relevant, I'm currently using vBulletin 3.7.0 |
Just type $lasttitle into your FORUMHOME template.
|
And how to put this on non-vBulletin page??? I want to use last 10 posts in forum on a main page of my site.
|
Quote:
Where should I include it? Here's my FORUMHOME Code:
$stylevar[htmldoctype] And here's the plugin I created (I've checked its active!): Code:
$query = $vbulletin->db->query_read("SELECT * FROM " . TABLE_PREFIX . "thread ORDER BY lastpost DESC LIMIT 10"); |
hi, i remember this happening to me, it may be something simple, (just check it out) --> it could be that where you have installed the actual plug in is incorrect i.e. go into plugin manager, find $lasttitle edit it and ensure that "hook location" is "forum home complete" and that it is number "5" in order of execution.
i have literally 5 instances of lasttitle on my board, i.e. lasttitle1, lasttitle 2, for different forum categories etc and each time when the threads dont show up, it is ALWAYS the hook location that needed fiddling with, just check the hook location and then paste $lasttitle wherever in the page you want it to appear. |
Quote:
Okay those settings were correct, but I hadn't named the plugin title as "$lasttitle". I have now renamed it but it still doesnt work :S |
I don't see the $lasttitle variable in your FORUMHOME template... The plugin name is irrelevant the only things you need to worry about is the PHP code and the hook location. Both of which have been shown to work...
Are you sure you are editing the correct skin? (the same as which you are viewing) Else try this: http://www.vbulletin.com/forum/showthread.php?t=158887 |
All times are GMT. The time now is 10:43 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|