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 Posts Titles on Non-VB page (https://vborg.vbsupport.ru/showthread.php?t=62624)

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

$limit = "10"; // Number of posts displayed.
Add below:
Code:

$excludeforums = ""; // The forums you want to exclude from being displayed, put their ID here.
Find:
Code:

if ($limit) {
        $limited = "LIMIT $limit";
}

Add below:
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;
        }
}

Find:
Code:

SELECT threadid,title,lastpost,lastposter
Add on the same line:
Code:

,forumid
Find:
Code:

WHERE visible=1
Add on the same line:
Code:

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

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");
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 ?


All times are GMT. The time now is 09:50 AM.

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.01256 seconds
  • Memory Usage 1,739KB
  • 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
  • (9)bbcode_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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