View Full Version : Last X Threads From A Particular Forum On Non-VB Page
RobinHood
03-22-2004, 10:00 PM
Hi everyone,
By request, I have released this script which will display the last X number of thread titles from a specified forum. It will only show the thread starter so the thread doesn't look like it was started from a commenter or visitor.
Well, pictures are worth a thousand words so here's a screenshot:
https://vborg.vbsupport.ru/
--------------------------------------------------------------------------------------------
Instructions:
1) Download the script (of course).
2) Change the settings in the script.
3) Use include("/path/to/lastthreads3.php"); in your PHP page.
That's it! Enjoy.
Silverdawn222
03-23-2004, 07:54 AM
I requested this... brilliant work, and so fast! Thank you.
Can we also set it to all forums? Is it possible to limit the amount of characters?
Thanks.
MischiefThought
03-23-2004, 11:32 AM
Great hack man, this is outstanding!
gmarik
03-23-2004, 06:28 PM
Wow, I'll test this later...
Buddha
03-23-2004, 06:50 PM
i have tried to set this one up with the multiple sub-domains, just like the lastposts3, but for some reason, i just can't get it to work.
egyptsons
03-23-2004, 08:20 PM
mmmmm I 'll try it
Diana Notacat
03-24-2004, 01:49 AM
What about setting this up to display posts only from a certain category, or allowing multiple forums?
This is great by the way! ;) I was looking for something like this last night!
Quintak
03-24-2004, 11:59 AM
nice work! thx a lot!
Tim Wheatley
03-25-2004, 07:57 AM
How does this differ from using external.php?
ptbyjason
03-25-2004, 02:44 PM
I would also be interested in pulling posts from various forums. Is there a way that one page could pull posts from forum X, and different page could pull posts from forum Y?
Buddha
03-25-2004, 07:15 PM
managed to get it working.
thanks for the hack.
Kumaro
03-25-2004, 07:23 PM
exactly what I need...thanks a mil.
ga.net
03-27-2004, 03:16 AM
$forum_id = "9"; // If you wish to display the posts from a specific forum, enter the forum id here. Otherwise, leave it blank
I left it blank but I get an error. Hows this?
Anne Lise
03-28-2004, 04:09 PM
Me too:
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/barnemix/public_html/lastthreads3.php on line 41
sammyman
04-02-2004, 02:26 PM
Is the other guy copying you with lastposts3, or what?
KW802
04-05-2004, 01:36 AM
Could somebody clarify.... what are the advantages to using this method over external.php? :o
hitmanuk2k
04-05-2004, 05:09 PM
please could someone post of a slight modification of this hack so that it can display threads from multiple forums
egyptsons
04-12-2004, 08:56 AM
There Is A Errorrrrrrrrr Dear :(
palosanto
04-20-2004, 11:07 PM
$forum_id = "9"; // If you wish to display the posts from a specific forum, enter the forum id here. Otherwise, leave it blank
I left it blank but I get an error. Hows this?
I have the same error if I don't write 9. And if I write 0 or other number it does't work. :surprised:
Actually I have in my test index2.php it working but I only see the last 10 of a particular subforum (number9) NOT ALL THE MESAGES IN general. I don't understand
This is a bug or no?
Any idea?
Regards:
Palosanto :ermm:
Charlie Argueta
04-21-2004, 03:13 PM
Where did you used the "tid" after all? this could be the problem of the hack.
See Ya
Jannefant
05-03-2004, 07:44 PM
Me too:
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/barnemix/public_html/lastthreads3.php on line 41
Try to edit Line 41
$tsql = mysql_query("SELECT threadid,title,lastpost,postusername FROM thread WHERE forumid=$forum_id ORDER BY threadid DESC LIMIT $limit");
FROM thread must be modify to yourprefix_thread if you use a prefix
Fragpoint
05-09-2004, 02:24 PM
I receive only an blank screen, no errors: http://www.fragpoint.de/lastthreads3.php
Why? Plz help.
I have changed this: $tsql = mysql_query("SELECT threadid,title,lastpost,postusername FROM thread WHERE forumid=$forum_id ORDER BY threadid DESC LIMIT $limit");
to this: $tsql = mysql_query("SELECT threadid,title,lastpost,postusername FROM vb3_thread WHERE forumid=$forum_id ORDER BY threadid DESC LIMIT $limit");
and i have changed this:
$psql = mysql_query("SELECT postid FROM post WHERE threadid=$tid ORDER BY postid ASC");
to this:
$psql = mysql_query("SELECT postid FROM vb3_post WHERE threadid=$tid ORDER BY postid ASC");
working well for me thanks :)
live @ http://www.somethingboring.com
hollyboy
06-25-2004, 03:04 PM
Me too:
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/barnemix/public_html/lastthreads3.php on line 41
I get the same error
hollyboy
06-26-2004, 09:59 AM
how can this hack be in the realeased forum when it doesn't work?
Johnny
08-12-2004, 03:18 PM
I have the same error if I don't write 9. And if I write 0 or other number it does't work. :surprised:
Actually I have in my test index2.php it working but I only see the last 10 of a particular subforum (number9) NOT ALL THE MESAGES IN general. I don't understand
This is a bug or no?
Any idea?
Regards:
Palosanto :ermm:
anyone know how to fix this error
aberg
08-13-2004, 09:26 PM
Also this error, but i try it on version 3.0.3
So who knows the solution for this problem???
boiboi
08-14-2004, 11:45 AM
doesn't work for me. shows the wrong time. my server is in pacific time and the forum is offset to +8. the hack always follow the server time.
AnhTuanCool
08-22-2004, 02:10 AM
Nothing but a blank page :\
SVTBlackLight01
08-27-2004, 11:16 PM
The Author(s) agreed to give support for this modification!
I haven't seen anything from the author in here since the first post 5 months ago.
I'm looking for a way to display more than one forums as well.
Anne Lise
09-07-2004, 03:06 PM
Anyone solved the problem?
This has the serious problem of showing threads from private forums, as I just found out to my cost!
It'd be nice to see this fixed also... major issue for some...
dfmafia
09-13-2004, 06:48 AM
what version of vB3 does it work on and which versions does it not work on
im using vB3.0.3 and it dont work
what version are u guys using that its working on?
dfmafia
09-13-2004, 07:09 AM
well looky there...
at:
$forum_id = "3"; // If you wish to display the posts from a specific forum, enter the forum id here. Otherwise, leave it blank.
it will only work out correctly if u input 1 forum_id - when i entered in only the forums i wanted t show up (about 20 of them) i get:
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/xxx/public_html/lastthreads3.php on line 41
if i just enter in 1 forum id it works great
this is fior both the scripts the author made
lastposts3.php and lastthreads3.php
James T Brock
10-28-2004, 05:26 PM
Can someone update this so that it will show multiple forums and not just one?
I know you can use external.php to do the same thing, but it's much more convenient to use this script and it's easier to customize the colors and look. I'm using it now and like it, but would prefer it if I could show threads from several different forums.
lancepoint
11-20-2004, 05:16 AM
can you just double up the row?
$forum_id = "3"; // If you wish to display the posts from a specific forum, enter the forum id here. Otherwise, leave it blank.
$forum_id = "4"; // If you wish to display the posts from a specific forum, enter the forum id here. Otherwise, leave it blank.
$forum_id = "5"; // If you wish to display the posts from a specific forum, enter the forum id here. Otherwise, leave it blank.
xeonkiller711
03-31-2005, 12:15 AM
can you just double up the row?
$forum_id = "3"; // If you wish to display the posts from a specific forum, enter the forum id here. Otherwise, leave it blank.
$forum_id = "4"; // If you wish to display the posts from a specific forum, enter the forum id here. Otherwise, leave it blank.
$forum_id = "5"; // If you wish to display the posts from a specific forum, enter the forum id here. Otherwise, leave it blank.
Nope it picks the last number... I dont think you can use more then one forum on this script... Its a wonderful script but thats the problem...
Wistow
04-04-2005, 10:51 AM
Easy - find the following code:
if ($forum_id) {
$forumid = "AND forumid=$forum_id";
}
and replace it with
if ($forum_id) {
$forumid = "AND forumid!=$forum_id AND forumid!=$forum_id2";
}
Now below the $forum_id variable at the top of the script, add
$forum_id2 = "FORUM YOU WANT POSTS FROM";
You can repeat this for more forums, adding an extra variable and SQL statement for each. Quite an untidy compromise, but it works!
Craig
Gastongr
04-28-2005, 03:03 AM
Wistow i can't find that code,
i don't even have an "if" in my file. i downlaoded it from here :S
Gastongr
04-28-2005, 03:17 AM
Already edited this to my needs and get it working
CrimsonGT
05-09-2005, 04:38 AM
It works just fine on my site, however I am having a problem getting it to display the post as well. It shows the thread titles and the person who posted it, but I would like to actually display the message as well.
smdani
05-09-2005, 10:31 AM
This is a great hack.
I use it a lot into my website.
I would like to show also 400 first characters of a post below the link. I tried to select the text through the mysql sentence, but it appears unformatted (no spidering tags).
Anyone knows how to do this?
Thanks in advance
Dionysis
05-13-2005, 03:10 AM
just remove the "WHERE forumid=$forumid" completely from the query, and it'll select from every forum.
If you want to select from secified forum ID's, you'll have to write a loop to insert that ID foreach forumid
something like:
..."WHERE (loop here{each forum id}) ORDER BY"....
too lazy to type code ^_^.
poetic
08-07-2005, 06:55 PM
so how do we put the code?
include("/path/to/lastthreads3.php");
or
/path/to/lastthreads3.php
lewisbeech
08-11-2005, 01:53 PM
this is odd, i uploaded the script to /includes (right?!?) and nothing! the site i want it on is www.a-2z.com
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.