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)

NTLDR 09-14-2002 05:08 PM

Quote:

Originally posted by SuB_ZeR0
just a quick question .... where do I insert the <br> to separate one news post from another?
The home_news template.

garoboldy 09-14-2002 05:53 PM

ok, I got the index working fine on local and did some neat things with it....great hack...

but now I just installed it on my site....it didnt work for some reason...here is the link...

www.evolutionaryconcepts.com/vbindex.php

thanks for any info that you may have.

later

NTLDR 09-14-2002 06:02 PM

Have you set all the variables at the top of the files correctly? Are the home_ templates part of the template set the hack is using (should be) and have you unommented the chdir bit?

ie:

PHP Code:

chdir('./forum'); 


garoboldy 09-14-2002 06:03 PM

let me check it out real quick...hold on a sec

garoboldy 09-14-2002 06:22 PM

I have the chdir uncommented
chdir is ./forum
the require global.php is ./global.php

here is the bulletin code I put in...maybe something is wrong with that part...

// start vBulletin original code
// -------------------------
// add here the vBulletin code of the original index.php
// lines 139 - 213(in an unhacked 2.2.6 index.php)
$activeusers = "";
$loggedinusers = "";
if ($displayloggedin) {
$datecut=time()-$cookietimeout;

$loggedins=$DB_site->query_first("SELECT COUNT(*) AS sessions FROM session WHERE userid=0 AND lastactivity>$datecut");
$numberguest=$loggedins['sessions'];

$numbervisible=0;
$numberregistered=0;

$loggedins=$DB_site->query("SELECT DISTINCT session.userid,username,invisible,usergroupid
FROM session
LEFT JOIN user ON (user.userid=session.userid)
WHERE session.userid>0 AND session.lastactivity>$datecut
ORDER BY invisible ASC, username ASC");
if ($loggedin=$DB_site->fetch_array($loggedins)) {
$numberregistered++;
if ($loggedin['invisible']==0 or $bbuserinfo['usergroupid']==6) {
$numbervisible++;
$userid = $loggedin['userid'];
if ($loggedin['invisible'] == 1) { // Invisible User but show to Admin
$invisibleuser = '*';
} else {
$invisibleuser = '';
}
if ($loggedin['usergroupid'] == 6 and $highlightadmin) {
$username = "<b><i>$loggedin[username]</i></b>";
} else if (($mod["$userid"] or $loggedin['usergroupid'] == 5) and $highlightadmin) {
$username = "<b>$loggedin[username]</b>";
} else {
$username = $loggedin['username'];
}
eval("\$activeusers = \"".gettemplate('forumhome_loggedinuser')."\";" );
}

while ($loggedin=$DB_site->fetch_array($loggedins)) {
$numberregistered++;
$invisibleuser = '';
if ($loggedin['invisible']==1 and $bbuserinfo['usergroupid']!=6) {
continue;
}
$numbervisible++;
$userid=$loggedin['userid'];
if ($loggedin['invisible'] == 1) { // Invisible User but show to Admin
$invisibleuser = '*';
}
if ($loggedin['usergroupid'] == 6 and $highlightadmin) {
$username = "<b><i>$loggedin[username]</i></b>";
} else if (($mod["$userid"] or $loggedin['usergroupid'] == 5) and $highlightadmin) {
$username = "<b>$loggedin[username]</b>";
} else {
$username = $loggedin['username'];
}
eval("\$activeusers .= \", ".gettemplate('forumhome_loggedinuser')."\";") ;
}
}
$DB_site->free_result($loggedins);

$totalonline=$numberregistered+$numberguest;
$numberinvisible=$numberregistered-$numbervisible;

$maxusers=explode(" ", gettemplate('maxloggedin',0,0));
if ((int)$maxusers[0] <= $totalonline) {
$time = time();
$maxloggedin = "$totalonline " . $time;
$DB_site->query("UPDATE template SET template='$maxloggedin' WHERE title='maxloggedin'");
$maxusers[0] = $totalonline;
$maxusers[1] = $time;
}
$recordusers = $maxusers[0];
$recorddate = vbdate($dateformat,$maxusers[1]);
$recordtime = vbdate($timeformat,$maxusers[1]);
eval("\$loggedinusers = \"".gettemplate('forumhome_loggedinusers')."\"; ");
}
// -------------------------
// end vBulletin original code

SuB_ZeR0 09-15-2002 01:20 AM

Quote:

Originally posted by NTLDR


The home_news template.


where exactly in the home_news template do I insert the break? sorry for being such a newbie .. ;)

also .. is it possible to allow only about 200 characters to show up in the news bit ... and if people want to read the rest of the post they can click on the "read more" or "see whole post" which will bring them to the actually post in the News forum ...
some of my news posts are quite lengthy and I don't want them to take too much space on the front page. .... by default ... it will only show 5 most recent news post in the frontpage right? ... where do I go to edit this number? .... that's all the questions for the day ... :) ... Thanks again.

Sigon 09-15-2002 02:50 AM

Ok. Here is my problem
http://forums.lotronline.com/rpgcenter

I would like the hack to use my RPG Center Style set not my default one. How and what do I edit to accomplish this? Thanks!

CelticEnd 09-15-2002 01:05 PM

I'm having some trouble with VBindex.php

I've set up a test at http://news.thehuddleboard.com/vbindex.php but the page never loads despite the fact it is definetly there...

NTLDR 09-15-2002 06:05 PM

Quote:

Originally posted by Sigon
I would like the hack to use my RPG Center Style set not my default one. How and what do I edit to accomplish this? Thanks!
Untested, but it should work, after:

PHP Code:

require('./global.php'); 

Add:

PHP Code:

// figure out the chosen style settings
unset($styleid);
$styleid=

Where X is the style id number.

NTLDR 09-15-2002 06:06 PM

Quote:

Originally posted by CelticEnd
I'm having some trouble with VBindex.php

I've set up a test at http://news.thehuddleboard.com/vbindex.php but the page never loads despite the fact it is definetly there...

Try removing the Poll code from the PHP file and see if it works then.


All times are GMT. The time now is 02:56 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.02308 seconds
  • Memory Usage 1,756KB
  • 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
  • (3)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