vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.0 Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=33)
-   -   Last X Threads From A Particular Forum On Non-VB Page (https://vborg.vbsupport.ru/showthread.php?t=62823)

RobinHood 03-22-2004 10:00 PM

Last X Threads From A Particular Forum On Non-VB Page
 
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.

Owen 03-23-2004 10:44 AM

Can we also set it to all forums? Is it possible to limit the amount of characters?

Thanks.

Owen 03-23-2004 11:13 AM

Ignore that last post...

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

Quote:

Originally Posted by ga.net
$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

Quote:

Originally Posted by Anne Lise
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

Code:

$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:
Code:

$tsql = mysql_query("SELECT threadid,title,lastpost,postusername FROM thread WHERE forumid=$forum_id ORDER BY threadid DESC LIMIT $limit");
to this:
Code:

$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:
Code:

$psql = mysql_query("SELECT postid FROM post WHERE threadid=$tid ORDER BY postid ASC");
to this:
Code:

$psql = mysql_query("SELECT postid FROM vb3_post WHERE threadid=$tid ORDER BY postid ASC");

gwon 06-22-2004 04:06 PM

working well for me thanks :)

live @ http://www.somethingboring.com

hollyboy 06-25-2004 03:04 PM

Quote:

Originally Posted by Anne Lise
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

Quote:

Originally Posted by palosanto
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?

ipgn 09-13-2004 02:10 AM

Quote:

Originally Posted by Mark.B
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:
PHP Code:

$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?



PHP Code:

$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

Quote:

Originally Posted by lancepoint
can you just double up the row?



PHP Code:

$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:
Code:

if ($forum_id) {
        $forumid = "AND forumid=$forum_id";
}

and replace it with
Code:

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
Code:

$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


All times are GMT. The time now is 04: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
  • Page Generation 0.01410 seconds
  • Memory Usage 1,817KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (8)bbcode_code_printable
  • (3)bbcode_php_printable
  • (6)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete