PDA

View Full Version : Last X Posts Titles on Non-VB page


RobinHood
03-17-2004, 10:00 PM
Hi everyone,

Well, here is my first full release to the vB.org community. It's a small little script I just whipped up a few minutes ago. I already have this on my webpage for months now and thought I'd share it with the rest of you.

Description:
This script will display the titles, poster's names, and times of the last X's posts. It's fully customizable. Should be very easy to understand so enjoy!

Instructions:
1) Download the script below.
2) Change the settings in the script.
3) Insert include("/path/to/lastposts3.php"); anywhere in a non-VB page.

If you like to check out a live demo, you may go visit one of my sites: http://www.generazn.com.

If you have any problems, questions, or comments regarding this, feel free to post them here or send me an email to tre@phase1media.com.

sabret00the
03-18-2004, 09:03 AM
i can't see it on your site, screenie?

mr_fox
03-18-2004, 12:00 PM
it's work!
Thenks

gmarik
03-18-2004, 01:43 PM
heah, thanks ...

Owen
03-18-2004, 03:34 PM
Is it possible to limit the number of characters displayed?

bluecat
03-18-2004, 05:07 PM
Cool, I've been waiting for one for vb3. Thanks!

Q8vbhacks
03-19-2004, 11:42 AM
thanks

i get this error

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/XXX/public_html/lastposts3.php on line 43

accyroy
03-20-2004, 10:09 AM
how do i offset the time, my forum and server are different and this hack displays server time...?

Buddha
03-20-2004, 07:29 PM
is there a way to set this up so that it can display threads from a forum that is installed on another subdomain? say i've got a forum on a.domain.com and i want to display the latest threads on b.domain.com/index.php... how would i go about this?

thanks

apokphp
03-21-2004, 06:16 PM
very nice...this is what I've been waiting for. ;)

SmasherMaster
03-21-2004, 11:51 PM
Works...prefectly! :D

* SmasherMaster hits install

RobinHood
03-22-2004, 05:57 AM
thanks

i get this error

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/XXX/public_html/lastposts3.php on line 43
Make sure you set the $limit variable.

RobinHood
03-22-2004, 05:59 AM
is there a way to set this up so that it can display threads from a forum that is installed on another subdomain? say i've got a forum on a.domain.com and i want to display the latest threads on b.domain.com/index.php... how would i go about this?

thanks
As long as it's on the same server, you sure can.

All you have to do is change the original include to:

include("/path/to/lastpost3.php");

Also, make sure you change the $forum_url variable to forum A.

RobinHood
03-22-2004, 06:14 AM
Is it possible to limit the number of characters displayed?
It sure is. Just download the updated version of the script. :)

Buddha
03-22-2004, 06:36 PM
As long as it's on the same server, you sure can.

All you have to do is change the original include to:

include("/path/to/lastpost3.php");

Also, make sure you change the $forum_url variable to forum A.
thanks for the quick reply, robinhood... and i may seem like a complete dunce here, so bear with me, ok.

first, i'm assuming i upload the lastposts3.php file to the same directory as my forum... which is on subdomain A. then, on my index.php on subdomain B, i would put
<? include("/public_html/A/lastpost3.php"); ?>

if this is right, then i'm curious why it isn't working... i've changed the script so it points to the proper forum directory...

Ian Cunningham
03-22-2004, 07:23 PM
How could I make this check multiple forums? I changed $forum_id =(x,y), but that doesnt work :(

Buddha
03-24-2004, 02:56 PM
any chance getting some support on this, as i would really love to use this hack, but i cannot get it to work with the sub-domains.
thanks.

pablo
03-26-2004, 02:12 PM
why not use the RSS feeds for this ?

is this capable of giving the last replies that people have replied to, almost like a last 10 active topics.

pablo
03-28-2004, 02:08 PM
*bump*
anyone ? :confused:

Dok[AB]
04-01-2004, 06:28 AM
]How could I make this check multiple forums? I changed $forum_id =(x,y), but that doesnt work :(
:cry: :cry:

sammyman
04-02-2004, 05:36 AM
I am with Buddha. I am trying everything but it doesn't like me much. Where do I install this file, and what do I do for the include.

Any help for a beginer?

sammyman
04-02-2004, 06:13 AM
I realized that the file lastposts3.php works, but it is not importing correctly into the non-VB page. I guess the import file is not right.

sammyman
04-02-2004, 06:17 AM
Ok- I am an idiot. Don't answer my questions. I forgot the "s" in "lastposts". IDIOT.

Oblivion Knight
04-03-2004, 08:08 AM
Here's an addon to exclude forums that I've quickly thrown together.. :)

Find:
$limit = "10"; // Number of posts displayed.
Add below:
$excludeforums = ""; // The forums you want to exclude from being displayed, put their ID here.
Find:
if ($limit) {
$limited = "LIMIT $limit";
}
Add below:
if ($excludeforums == "" or $excludeforums <= "0") {
$quarter = "no";
} else {
$excfid = explode(",",$excludeforums); $i = 0; $a = count($excfid);
while ($i < $a) {
$wheresql .= " AND thread.forumid!='$excfid[$i]'"; ++$i;
}
}
Find:
SELECT threadid,title,lastpost,lastposter
Add on the same line:
,forumid
Find:
WHERE visible=1
Add on the same line:
$wheresql

All done.. :)

sabret00the
04-03-2004, 02:18 PM
nice add-on, when i get round to installing this i'll try and write a truncating threadname add-on

krohnathlonman
04-09-2004, 08:44 PM
Anybody using this on a higher traffic site? I'll do about 50k pageviews today... I'm using turk mmcache and the load didn't seem to jump very much, but it was noticeable.

TYorke
04-14-2004, 12:35 AM
Alternating Row Colours

I added "outside" of the WHILE loop:

$color1 = "#DEDFDF";
$color2 = "#F7F7F7";
$rowcolorcount = 0;

"Inside" of the WHILE loop:

$rowcolor = ($rowcolorcount % 2) ? $color1 : $color2;

-- "Before" the final '}' at the end of the WHILE loop:

$rowcolorcount++;

add <tr bgcolor=\"$rowcolor\"> where you want your rows to change colours

Add Thread Replies and Views

Replace the entire line that starts with $thread_sql with:

$thread_sql = mysql_query("SELECT threadid,title,lastpost,lastposter,replycount,view s FROM thread WHERE visible=1 AND open=1 $forumid ORDER BY lastpost DESC $limited");

Find:

$tid = $thread_get['threadid'];

Add underneath:

$view = $thread_get['views'];
$reply = $thread_get['replycount'];

Use something like <br />Replies: $reply | Views: $view where you want the counts to display

For an example check out http://www.cchl.ca/web/scripts/last.php

nektar
04-18-2004, 10:23 AM
Hi!

If I could include the forum name of the post in the output this would be what I was looking for :squareeyed:

Any ideas?

nektar
04-22-2004, 07:33 AM
Hi!

Thank you for the hack!

However, I would like to see a more advanced Top X posts on my homepage like I do now whith phpbb2.

What I would like to see is the forum name of each post + an icon next to each post showing if the post has been read or not by the visitor.

I know this is available for phpbb2 because I'm using it. Now I want to move to vbulletin but my visitors have used to see the last posts (and if they have read them or not) on my homepage.

Is this possible?

I think this would make the hack perfect.

Thanks.

fabz
04-26-2004, 03:34 AM
Hello and thank you for this,

is there a way to get this script show post contents (like Pluhnews do for vb2) instead of only titles and posters ?

Detomah
05-06-2004, 12:06 PM
I've been trying to achieve this for a while now, with certain, but limited, success. This has just made my life so much easier, saving me quite a bit of work. Thanks :)

fabz
05-06-2004, 05:49 PM
I got Pluhnews working for my vb 3.0.1 and this works too.

sbryan
05-13-2004, 09:59 AM
hmmmm ive got mine configured properly but the links never work, it always says that theyre wrong :(

fabz
05-13-2004, 03:59 PM
Yes, you have to modify your pluhnews php files and replace all the lines containing links.

For example, a link to a thread in vb 2 was :
http://path_to_your_forum/showthread.php?s=Array[sessionhash]&threadid=xxxx

In vb 3, links to threads are now like this
http://path_to_your_forum/showthread.php?t=xxxx

So just search for lines containing "threadid=", remove "s=....." and change "threadid=" to "t="

It's simple, but if you don't succeed in it, I can send you my files.

northernstar
05-13-2004, 08:27 PM
great hack!
Just wondering though if there's any way to not show topic titles from forums the user is not allowed to see?

boatdesign
05-13-2004, 08:39 PM
Great mod - but one big problem.

It is showing links to threads that have been soft deleted by a moderator, so when a non-admin clicks them they get "invalid thread specified" since it's been soft deleted.

Is there a way to make this mod not display the thread title if the thread has been soft deleted by a moderator?

Synicide
05-13-2004, 08:44 PM
Here's a question that's probably off topic a little bit, how would one go about and show the contents of the first post? Like say if I had event threads and the first post of those threads were summaries, could I have those summaries on that page?

freakify
05-26-2004, 06:22 AM
I keep getting this error:

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in "path" on line 57

Almost forgot, my line 57 is:
while($thread_get=mysql_fetch_array($thread_sql))

any suggestions?

thanks

007
06-05-2004, 11:01 PM
/me clicks install!

Works like a charm!

One thing I would like to see, is if the title gets cut off due to the character limit, it should add "..." at the end of the title like VB does on the forumhome.

sbryan
06-07-2004, 01:49 PM
I keep getting this error:

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in "path" on line 57

Almost forgot, my line 57 is:
while($thread_get=mysql_fetch_array($thread_sql))

any suggestions?

thanks

im getting a similar message as well...

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/xboxworld/public_html/lastposts3.php on line 48

does anyone know what causes this?

sbryan
06-10-2004, 09:05 PM
bump.

sbryan
06-14-2004, 05:46 AM
bump.
is anyone supporting this hack still? im still getting an error with it and would like some help if its possible still..

fabz
06-14-2004, 07:13 AM
Check that your VB version matches this hack, and that you didn't have copy/paste errors in your code.

This error occurs if the passed command to mysql is invalid (code error), or if it doesn't match the database structure.

sbryan
06-14-2004, 07:59 AM
Check that your VB version matches this hack, and that you didn't have copy/paste errors in your code.

This error occurs if the passed command to mysql is invalid (code error), or if it doesn't match the database structure.
mine is the latest, vBulletin Version 3.0.1.

The Author agreed to give support for this hack!

also, i dont think the author is supporting this. ive had no answers to PM's. if anyone is using VB3.0.1 and gets it going, please PM me :)

sbryan
06-20-2004, 03:00 AM
bump. is ANYONE supporting this hack. If a moderator sees this can you let me know whats happening and why it still says this hack is supported when it clearly isnt?

Baptizer
06-26-2004, 09:20 PM
I am surprised there isnt more interest in this :( makes me sad :( support for vb3 stuff is definitley lacking.............sad.

any idea how to get it to display today/yesterday for the time?

sbryan
06-26-2004, 11:28 PM
I am surprised there isnt more interest in this :( makes me sad :( support for vb3 stuff is definitley lacking.............sad.

any idea how to get it to display today/yesterday for the time?
i've even emailed the guy and had no reply. hope nothing bad has happened to him.

boiboi
08-14-2004, 07:31 AM
this hack cannot handle server offset time. oh well.

ChurchMedia
08-15-2004, 05:19 PM
Thanks for the hacks to exclude forums and alternating colors! It works perfectly. :)

JohnK
09-03-2004, 10:56 AM
I've installed this hack with both modifications and it works fine for me -- thanks! < clicks install >

If someone has the time and inclination to sort out the server time vs forum time issue that would be even better :)

John

TheClassic
09-09-2004, 06:23 PM
If someone has the time and inclination to sort out the server time vs forum time issue that would be even better :)
I'll take a look at this, no promises.

To do this, I need to know what the forum timezone is, any clues on where that is in the DB?

dfmafia
09-13-2004, 06:49 AM
what version of vB3 is it working on and which versions does it not work on

im using vB 3.0.3 and it dont work

dfmafia
09-13-2004, 07:11 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/lastposts3.php on line 48

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

JohnK
09-13-2004, 10:24 AM
I haven't used $forum_id but I have used $excludeforums successfully which could give you the same result in the end. A list of forum numbers separated by commas works here.

John

3dfly
09-17-2004, 06:01 PM
Is it possible to show Thumbnail from post ?

nhatrang
09-22-2004, 06:09 PM
any chance we can display the posts under the thread title as well too?

WoodiE
10-04-2004, 05:09 PM
Does anyone know how to convert the output of this script to valid XHTML code?

-Michael

therczone
03-29-2005, 08:31 AM
I want to start off by saying I take no credit for this code. I simply found a easy bug.

https://vborg.vbsupport.ru/showthread.php?t=62624
https://vborg.vbsupport.ru/showpost.php?p=516222&postcount=38

I have been looking for a "Racent Topics" script to pull 10-15 of the latest threads onto a non-vB page. Well I almost gave up, but decided to give RobinHood's code one last try.

The error that you receive is:

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/xxx/public_html/lastposts3.php on line 48

The reason being that the prefix for the tables has to be manually added.

Original:

<?php

#########################
## LAST X POSTS v3.1 ##
## PHASE(1) MEDIA ##
## WWW.PHASE1MEDIA.COM ##
## TRE@PHASE1MEDIA.COM ##
#########################

/* This script shows the last X numbers of posts (titles) posted last on a non-VB page.
You may customize it in any way you wish. If you have any problems with it, you can
post them at vB.org or send me an email to tre@phase1media.com.

Enjoy!
*/

## CUSTOMIZE SETTINGS FOR YOUR SITE ##
$db_host = "localhost"; // Change this if your MySQL database host is different.
$db_name = "vbulletin"; // Change this to the name of your database.
$db_user = "user"; // Change this to your database username.
$db_pw = "password"; // Change this to your database password.

$forum_url = "http://www.yourdomain.com/forum"; // Change this to reflect to your forum's URL.
$forum_id = ""; // If you wish to display the posts from a specific forum, enter the forum id here. Otherwise, leave it blank.
$limit = "10"; // Number of posts displayed.
$titlecolor = "#0000FF"; // This is the color of the title.
$postedcolor = "#404040"; // This is the color of the bottom text.
$txtlimit = "100"; // This is the character limit.
#######################################

// Connecting to your database
mysql_connect($db_host, $db_user, $db_pw)
OR die ("Cannot connect to your database");
mysql_select_db($db_name) OR die("Cannot connect to your database");

// Below is the beginning of a table. If you feel you don't need it, you may remove it.
echo "<table border=\"0\" width=\"100%\" cellspacing=\"0\" cellpadding=\"2\">";

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

if ($limit) {
$limited = "LIMIT $limit";
}
$thread_sql = mysql_query("SELECT threadid,title,lastpost,lastposter FROM thread WHERE visible=1 AND open=1 $forumid ORDER BY lastpost DESC $limited");

while($thread_get=mysql_fetch_array($thread_sql))
{
$lastpost = $thread_get['lastpost'];
$poster = $thread_get['lastposter'];
$tid = $thread_get['threadid'];
$psql = mysql_query("SELECT postid FROM post WHERE threadid=$tid ORDER BY postid DESC");
$getp=mysql_fetch_array($psql);
$pid = $getp['postid'];
$date2 = date ("m/d/y h:i A" ,$lastpost);
$title = $thread_get['title'];
$title = substr($title,0,$txtlimit);
echo "<tr><td><font size=\"2\" face=\"arial,verdana,geneva\"><a href=\"$forum_url/showthread.php?p=$pid#post$pid\"><FONT SIZE=\"2\" COLOR=\"$titlecolor\" face=\"arial,verdana,geneva\">$title</FONT></a></font><br /><font color=\"$postedcolor\" face=\"arial,verdana,geneva\" size='1'>posted by $poster <i>$date2</i></FONT></td></tr>";
}
echo "</table>";

?>

Correct (for vB3.0.7):

<?php

#########################
## LAST X POSTS v3.1 ##
## PHASE(1) MEDIA ##
## WWW.PHASE1MEDIA.COM ##
## TRE@PHASE1MEDIA.COM ##
#########################

/* This script shows the last X numbers of posts (titles) posted last on a non-VB page.
You may customize it in any way you wish. If you have any problems with it, you can
post them at vB.org or send me an email to tre@phase1media.com.

Enjoy!
*/

## CUSTOMIZE SETTINGS FOR YOUR SITE ##
$db_host = "localhost"; // Change this if your MySQL database host is different.
$db_name = "vbulletin"; // Change this to the name of your database.
$db_user = "user"; // Change this to your database username.
$db_pw = "password"; // Change this to your database password.

$forum_url = "http://www.yourdomain.com/forum"; // Change this to reflect to your forum's URL.
$forum_id = ""; // If you wish to display the posts from a specific forum, enter the forum id here. Otherwise, leave it blank.
$limit = "10"; // Number of posts displayed.
$titlecolor = "#0000FF"; // This is the color of the title.
$postedcolor = "#404040"; // This is the color of the bottom text.
$txtlimit = "100"; // This is the character limit.
#######################################

// Connecting to your database
mysql_connect($db_host, $db_user, $db_pw)
OR die ("Cannot connect to your database");
mysql_select_db($db_name) OR die("Cannot connect to your database");

// Below is the beginning of a table. If you feel you don't need it, you may remove it.
echo "<table border=\"0\" width=\"100%\" cellspacing=\"0\" cellpadding=\"2\">";

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

if ($limit) {
$limited = "LIMIT $limit";
}
$thread_sql = mysql_query("SELECT threadid,title,lastpost,lastposter FROM YOURPREFIXHERE_thread WHERE visible=1 AND open=1 $forumid ORDER BY lastpost DESC $limited");

while($thread_get=mysql_fetch_array($thread_sql))
{
$lastpost = $thread_get['lastpost'];
$poster = $thread_get['lastposter'];
$tid = $thread_get['threadid'];
$psql = mysql_query("SELECT postid FROM YOURPREFIXHERE_post WHERE threadid=$tid ORDER BY postid DESC");
$getp=mysql_fetch_array($psql);
$pid = $getp['postid'];
$date2 = date ("m/d/y h:i A" ,$lastpost);
$title = $thread_get['title'];
$title = substr($title,0,$txtlimit);
echo "<tr><td><font size=\"2\" face=\"arial,verdana,geneva\"><a href=\"$forum_url/showthread.php?p=$pid#post$pid\"><FONT SIZE=\"2\" COLOR=\"$titlecolor\" face=\"arial,verdana,geneva\">$title</FONT></a></font><br /><font color=\"$postedcolor\" face=\"arial,verdana,geneva\" size='1'>posted by $poster <i>$date2</i></FONT></td></tr>";
}
echo "</table>";

?>


Simple diagnostics:

$thread_sql = mysql_query("SELECT threadid,title,lastpost,lastposter FROM YOURPREFIXHERE_thread WHERE visible=1 AND open=1 $forumid ORDER BY lastpost DESC $limited");

while($thread_get=mysql_fetch_array($thread_sql))
{
$lastpost = $thread_get['lastpost'];
$poster = $thread_get['lastposter'];
$tid = $thread_get['threadid'];
$psql = mysql_query("SELECT postid FROM YOURPREFIXHERE_post WHERE threadid=$tid ORDER BY postid DESC");

sabret00the
03-29-2005, 08:40 AM
yup if you don't include the global.php then it has no way of knowing what "TABLE_PREFIX" means.

therczone
03-29-2005, 08:42 AM
Even if it was included, the table prefix snippet of code is not in this code. :)

Umpakati
04-17-2005, 04:33 AM
I felt dumb when I realized, but make sure $db_name is set to the right database. I got the same error as you guys before:

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/xxx/public_html/lastposts3.php on line 48

Gastongr
04-28-2005, 01:05 AM
I'd like to have this but in a all the vb pages.
I know there are many hacks for that but not for all pages, and if there are they display many details and requiere mayor edits.
Is there any way to include a php file from a template like footer or header?

Gastongr
04-28-2005, 01:59 AM
i have solved this creating a new variable containing the file in the phpinclude_start template. Then in just insert that variable where i want this displayed.
This is working in all pages except in showthread.php and forumdisplay.php where i get this error

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /includes/lastposts.php on line 47

This is line 47 in /includes/lastpost.php
while($thread_get=mysql_fetch_array($thread_sql))

how can i solve it?

Gastongr
04-28-2005, 02:11 AM
My line 47 is actually line 48 of the original file

Gastongr
04-28-2005, 02:23 AM
Just saw the fixed file by therczone. I'll try it now.
What's suppoused to be my thread prefix?
db table prefix?

Gastongr
04-28-2005, 02:49 AM
I really don't know what's wrong with this i did all the suggested in this thread, but the error is still there.
Can someone help me?

smdani
05-09-2005, 10:13 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

lazyseller
05-15-2005, 12:31 AM
if u dont use a prefix u delete this line YOURPREFIXHERE_ in both instances for people who are having trouble...

MarketingPatch
06-28-2005, 08:28 PM
Also the error message :
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/traffic/public_html/marketingpatch/lastposts.php on line 48

Gutspiller
08-08-2005, 03:23 PM
How do I get this to exclude forums as well? Also, does it respect viewable permissions so it won't show mod forum posts to people that aren't allowed?

Thanks.

lazyseller
08-09-2005, 03:25 PM
Also the error message :
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/traffic/public_html/marketingpatch/lastposts.php on line 48

u forgot to remove _ <~~~

Gutspiller
08-09-2005, 05:18 PM
How do I get this to run multiple times on the same non-vb page? I renamed the file, but one file includes all forums and the other just 1 latest thread from the announcement forum. When it displays on the page both show only threads from the announcement forum. How can I fix this without only including all the forums in the one and still be able to leave that setting blank?

leevoth
09-18-2005, 12:19 AM
I keep getting this error:

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in "path" on line 57

Almost forgot, my line 57 is:
while($thread_get=mysql_fetch_array($thread_sql))

any suggestions?

thanks

change the table prefix with your ;)
$wheresql .= " AND TABLEPREFIX_thread.forumid!='$excfid[$i]'"; ++$i;

Aeolian
10-05-2005, 02:21 AM
work needed in the code to fit the standard of 3.5.0

thanx~

PokerKnowledge
11-12-2005, 06:17 PM
Hi,
I have installed this but get a blank page once I click on it now. any sugestions?

Thanks

PokerKnowledge
11-13-2005, 11:34 AM
Ok, I have installed this now and working find if I click my url /last3posts.php BUT is it possible instead of just having one page that shows the last posts I can make it so it all appears somewhere on my homepage?
my homepage isn't php would it be possible to link this all together?

Thanks

Aaron RV
12-03-2005, 06:50 AM
Hi,

work in vb 3.5.1?

thank's. :nervous:

mrpotatohead
12-09-2005, 06:20 PM
Hi,
I have installed this but get a blank page once I click on it now. any sugestions?


Thanks


Me too!

Dark Riku
12-10-2005, 09:07 PM
I have it converted to vb 3.5 but i dont no how to add prefixes and robinhood did not add prefixes origionally.

@Powerknoledge
best thing to do is use iframes or use php =)

@mrpotatohead
did you setup the config file and everything that needs to be edited?

malfuncion
12-22-2005, 05:36 AM
Hi,

work in vb 3.5.1?

thank's. :nervous:
i have it working in 3.5.2

alternating colors and excluding forums also works fine.

digitalSite
01-17-2006, 04:24 PM
i have it working in 3.5.2

alternating colors and excluding forums also works fine.

malfunction: Did you just install the script on your 3.5.2, or did you have to make some changes? I would like to know if I can install the script, since I am using 3.5.3, but I don't want to break something. Thanks!

croportal
02-06-2006, 06:22 PM
if this work witih 3.5.3

IanM
02-27-2006, 08:33 PM
This works great on a clean 3.5.4 install Great job, thanks!

mchaos
03-17-2006, 01:36 PM
I have hidden forums for mods and such. Is there any way to keep these forums from being included on the latest posts?

Oleks
04-17-2006, 05:15 AM
Hi,
Is any chance how to display the post title/link and “posted by Name mm/dd/yy time” in one line?

Thank you.

Oleks
04-19-2006, 02:23 PM
Hi,
lastposts3.php works well as a separate page.
Is any chance how to include this script into vBulletin 3.0.1 home page?

Can somebody help with this?

Thank you.

pcwfreak
08-04-2006, 01:37 AM
How do you get the last new thread instead of the last new post (like a new post wouldn't bump it up)? And make the link go to the topic instead of a specific post?

Hopefully, it's just some simple modifications...

Ryan McBain
08-04-2006, 03:00 AM
nevermind

datruth55
12-28-2006, 02:45 PM
I'd like to try and use this as an archive to my news posts on a specific forum on a non-VB page. Is there a way to get it to show say 5 posts after the first 5 posts?

Let me try to be a little clearer. I have vBAdvanced pulling from a specific forum to show on the portal. That forum is my "news" forum. It shows the last 5 articles. I want to display the previous 5 articles in an archive on a non-VB page. I know I need to loop through and then start counting on post number 6 from the database but not sure how to do it.

datruth55
12-29-2006, 05:30 PM
Never mind I figured it out. I added another number to the end of the query.

In other words after $limited I added , 5. This means that the query will return the limited number of posts after the 5th row.

I also had to add an array to convert bbcode to html code so that I could display the text on a non-VB page.

DPtheGod
03-24-2008, 08:19 AM
I love your hack, it's wonderful! I have a question, though.

Is it possible to restrict the hack from getting latest posts in boards only certain usergroups can see, such as staff boards?

CEO TaYloR?
08-08-2008, 04:52 PM
Where do you upload the script?

dragoncub
11-01-2008, 02:36 AM
Here's an addon to exclude forums that I've quickly thrown together.. :)

Find:
$limit = "10"; // Number of posts displayed.
Add below:
$excludeforums = ""; // The forums you want to exclude from being displayed, put their ID here.
Find:
if ($limit) {
$limited = "LIMIT $limit";
}
Add below:
if ($excludeforums == "" or $excludeforums <= "0") {
$quarter = "no";
} else {
$excfid = explode(",",$excludeforums); $i = 0; $a = count($excfid);
while ($i < $a) {
$wheresql .= " AND thread.forumid!='$excfid[$i]'"; ++$i;
}
}
Find:
SELECT threadid,title,lastpost,lastposter
Add on the same line:
,forumid
Find:
WHERE visible=1
Add on the same line:
$wheresql

All done.. :)
I followed these instructions to exclude a private forum, but its not working, its still showing the post on the homepage. Any ideas why?
BTW, I'm running 3.7.3

dragoncub
11-01-2008, 11:12 PM
Another thing, the list of the recent post does not automatically update when I load my homepage, I have to press the refress button in order to update the list. Is there a fix for this?

dragoncub
11-02-2008, 12:24 AM
I followed these instructions to exclude a private forum, but its not working, its still showing the post on the homepage. Any ideas why?
BTW, I'm running 3.7.3
nevermind, I figure it out, I was putting the wrong forum id number, I was putting the id of the parent forum not the actual child forum.