The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
Last X Posts Titles on Non-VB page Details »» | |||||||||||||||||||||||||
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. Show Your Support
|
Comments |
#2
|
||||
|
||||
i can't see it on your site, screenie?
|
#3
|
|||
|
|||
it's work!
Thenks |
#4
|
||||
|
||||
heah, thanks ...
|
#5
|
|||
|
|||
Is it possible to limit the number of characters displayed?
|
#6
|
||||
|
||||
Cool, I've been waiting for one for vb3. Thanks!
|
#7
|
|||
|
|||
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 |
#8
|
|||
|
|||
how do i offset the time, my forum and server are different and this hack displays server time...?
|
#9
|
|||
|
|||
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 |
#10
|
|||
|
|||
very nice...this is what I've been waiting for.
|
#11
|
||||
|
||||
Works...prefectly!
[high]* SmasherMaster hits install[/high] |
#12
|
|||
|
|||
Quote:
|
#13
|
|||
|
|||
Quote:
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. |
#14
|
|||
|
|||
Quote:
|
#15
|
|||
|
|||
Quote:
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 PHP Code:
|
#16
|
|||
|
|||
How could I make this check multiple forums? I changed $forum_id =(x,y), but that doesnt work
|
#17
|
|||
|
|||
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. |
#18
|
|||
|
|||
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. |
#19
|
|||
|
|||
*bump*
anyone ? |
#20
|
|||
|
|||
]
Quote:
|
#21
|
|||
|
|||
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? |
#22
|
|||
|
|||
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.
|
#23
|
|||
|
|||
Ok- I am an idiot. Don't answer my questions. I forgot the "s" in "lastposts". IDIOT.
|
#24
|
||||
|
||||
Here's an addon to exclude forums that I've quickly thrown together..
Find: Code:
$limit = "10"; // Number of posts displayed. Code:
$excludeforums = ""; // The forums you want to exclude from being displayed, put their ID here. Code:
if ($limit) { $limited = "LIMIT $limit"; } Code:
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; } } Code:
SELECT threadid,title,lastpost,lastposter Code:
,forumid Code:
WHERE visible=1 Code:
$wheresql |
#25
|
||||
|
||||
nice add-on, when i get round to installing this i'll try and write a truncating threadname add-on
|
#26
|
|||
|
|||
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.
|
#27
|
|||
|
|||
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: Code:
$thread_sql = mysql_query("SELECT threadid,title,lastpost,lastposter,replycount,views FROM thread WHERE visible=1 AND open=1 $forumid ORDER BY lastpost DESC $limited"); $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 |
#28
|
|||
|
|||
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? |
#29
|
|||
|
|||
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. |
#30
|
|||
|
|||
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 ? |
#31
|
||||
|
||||
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
|
#32
|
|||
|
|||
I got Pluhnews working for my vb 3.0.1 and this works too.
|
#33
|
||||
|
||||
hmmmm ive got mine configured properly but the links never work, it always says that theyre wrong
|
#34
|
|||
|
|||
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. |
#35
|
|||
|
|||
great hack!
Just wondering though if there's any way to not show topic titles from forums the user is not allowed to see? |
#36
|
||||
|
||||
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? |
#37
|
|||
|
|||
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?
|
#38
|
|||
|
|||
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 |
#39
|
||||
|
||||
/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. |
#40
|
||||
|
||||
Quote:
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? |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|