vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   vBindex v2.1 (https://vborg.vbsupport.ru/showthread.php?t=41916)

-=dm=- 12-04-2002 10:22 PM

great worked perfect:D

what about those thread icons are they gone in this version or is there still a way to add these? (currently icons are not displayed instead a "6")

this apears 3 times in the misc.php do I have to add the code 3 times.

thanx

doformfooter("Update");

NTLDR 12-04-2002 10:37 PM

Icons don't appear for the threads in this one, use $latestthread[iconid] which should give you the ID for the icon and change add the HTML from the old version with that variable in it.

-=dm=- 12-04-2002 10:59 PM

in my old vBindex.php I have this line:

PHP Code:

if ($latestthread['iconid']==0) { $icon=""; } else { $icon="<img src=\"{*imagesfolder}/icons/icon$latestthread[iconid].gif\" border=0>"; } 

in threadbit template:
Code:

<td bgcolor="$threadbg" align="center">$icon</td>
but I dont know where to insert this code in the new vBindex.php
:(

[EDIT]
an another thing,
for some strange reason it shows "Last post 01-01-1970 by username"

Ryan McBain 12-05-2002 01:15 AM

Ok i have everything installed, but I want to have it some the user login, and the 5 most recent threads show on my main page at http://www.ryanmcbain.com what do I have to do to make this happen?

Kohhal 12-05-2002 07:16 AM

Quote:

Originally posted by NTLDR
The WOL will work correctly, for one file of each name. When looking at the homepage your localtion is set as / which is determined to be the Forum Home Page.
Hmmm, so basically the way I described it working is the only way it will work ie. unless vbindex.php is in the address bar it won't show it correctly because of the "/" being regarded as forum home?

Nuts :(

Is there any way around this?

-=dm=- 12-05-2002 11:06 AM

ok fixed :D
replaced:
PHP Code:

while ($latestthread $DB_site->fetch_array($threadsquery)) {

        
$title unhtmlspecialchars($latestthread['title']);
        
$starter $latestthread['postusername'];
        
$numreplies $latestthread['replycount'];
        
$lastposter $latestthread['lastposter'];
        
$mpostid$latestpost['postid'];
        
$postdate=vbdate($dateformat,$latestpost[dateline]);
        
$posttime=vbdate($timeformat,$latestpost[dateline]);
        
$postforum=$latestthread['title'];
        
$postforumid=$latestthread['forumid'];

        
$gothreadid $latestthread['threadid'];
        if ((
$counter++ % 2) != 0) {
        
$threadbg="#F1F1F1";
        } else {
        
$threadbg="#DFDFDF";
        }
        eval(
"\$threadbits .= \"".gettemplate('home_threadbit')."\";");
    }
eval(
"\$threads = \"".gettemplate('home_threads')."\";");


with this
PHP Code:

            while ($latestthread $DB_site->fetch_array($threadsquery)) {
            
$result1 $DB_site->query("SELECT postid,dateline,pagetext FROM post WHERE threadid='$latestthread[threadid]' order by dateline desc limit 1");
            
$latestpost $DB_site->fetch_array($result1);
            
$result2 $DB_site->query("SELECT title FROM forum WHERE forumid='$latestthread[forumid]' limit 1");
            
$latestforum $DB_site->fetch_array($result2);

            
$title $latestthread['title'];
            
$starter $latestthread['postusername'];
            
$numreplies $latestthread['replycount'];
            
$lastposter $latestthread['lastposter'];
            
$mpostid$latestpost['postid'];
            
$postdate=vbdate($dateformat,$latestpost[dateline]);
            
$posttime=vbdate($timeformat,$latestpost[dateline]);
            
$postforum=$latestforum['title'];
            
$postforumid=$latestthread['forumid'];

            if (
$latestthread['iconid']==0) { $icon=""; } else { $icon="<img src=\"https://vborg.vbsupport.ru/vbimages/icons/icon$latestthread[iconid].gif\" border=0>"; }

            
$gothreadid $latestthread['threadid'];
            if ((
$counter++ % 2) != 0) {
                
$threadbg="#F1F1F1";
            } else {
                
$threadbg="#DFDFDF";
            }

            eval(
"\$threadbits .= \"".gettemplate('home_threadbit')."\";");
        }
}

eval(
"\$threads = \"".gettemplate('home_threads')."\";"); 

I added this code from the old vBindex now its working.

but I have still the news problem.

NTLDR 12-05-2002 12:11 PM

Quote:

Originally posted by TheMasterG
Is there any way around this?
My index.php is just a standard redirect that points to vbindex.php so I can see exactly where they are:

PHP Code:

<?php
error_reporting
(7);

require(
'./global.php');

eval(
"standardredirect(\"".gettemplate("redirect_vbindex")."\",\"vbindex.php?s=$session[sessionhash]\");");

?>

Create a template called redirect_vbindex and add a redirection message to it.

NTLDR 12-05-2002 12:14 PM

Quote:

Originally posted by -=dm=-
I added this code from the old vBindex now its working.
I suggest that no one uses this as it will use 2 queries for each thread, and a base query, compared to the v2.1 code which uses 1 in total. For 5 threads thats a saving of 10 queries.

-=dm=- 12-05-2002 12:38 PM

but I couldnt get it to work with the other code:(

NTLDR 12-05-2002 03:45 PM

Quote:

Originally posted by -=dm=-
but I couldnt get it to work with the other code:(
Just add this part in the while loop:

PHP Code:

if ($latestthread['iconid']==0) { 
    
$icon="";
} else { 
    
$icon="<img src=\"{*imagesfolder}/icons/icon$latestthread[iconid].gif\" border=0>"




All times are GMT. The time now is 08:05 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.02602 seconds
  • Memory Usage 1,779KB
  • 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
  • (1)bbcode_code_printable
  • (5)bbcode_php_printable
  • (4)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (4)pagenav_pagelinkrel
  • (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