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)
-   -   vBindex v3.0.0 RC5 (https://vborg.vbsupport.ru/showthread.php?t=59524)

oliwood 11-28-2004 04:40 PM

oh, in my vbb 3.0.0 it writes "could not find 'vbindex_settings_saved' after i want to save the options with vbioptions.php.

in vbindex.php it states

Quote:

Datenbankfehler in vBulletin 3.0.0:

Ungueltige SQL-Abfrage:
## GET NEWS ##
SELECT thread.*,thread.iconid AS threadiconid, threadpost.pagetext AS pagetext,
threadpost.attach AS attachcount,
avatarpath, NOT ISNULL(avatardata) AS customavatar, user.avatarrevision, customavatar.dateline AS customdateline,
NOT ISNULL(subscribethread.subscribethreadid) AS issubscribed,
IF(user.displaygroupid = 0, user.usergroupid, user.displaygroupid) AS displaygroupid
FROM thread AS thread
LEFT JOIN user AS user ON (thread.postuserid = user.userid)
LEFT JOIN post AS threadpost ON (thread.firstpostid = threadpost.postid)
LEFT JOIN deletionlog AS deletionlog ON(thread.threadid = deletionlog.primaryid AND type = 'thread')

LEFT JOIN customavatar AS customavatar ON (customavatar.userid = user.userid)
LEFT JOIN avatar AS avatar ON (avatar.avatarid = user.avatarid)

LEFT JOIN subscribethread AS subscribethread ON(subscribethread.threadid = thread.threadid AND subscribethread.userid = 2)
WHERE forumid IN ()
AND deletionlog.primaryid IS NULL
AND forumid NOT IN (0)
AND thread.open <> 10
AND thread.visible = '1'

AND thread.postuserid NOT IN (7681,7681)
ORDER BY thread.sticky DESC, thread.dateline DESC
LIMIT 0
mysql error: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near ')
AND deletionlog.primaryid IS NULL
AND forumid NOT IN (0

mysql error number: 1064

Datum: 28.11.2004 19:36:14
Skript: http://www.testboard.planet-oliwood.to/vbb/vbindex.php

TheEnd 11-30-2004 07:50 PM

Works GREAT.
I had a few questions though:

I was wondering if there was a way I could add a "Home" to the navbar on each style. If anyone knows how, please let me know.

Also, how could I replace the "News" section with a template on another page, (Like have the original news page, then like blah.php that has everything that vbindex.php has, but without the News, just link it to another template, basically just html inside it)
Heres an example.
Code:

              -Forums - Usercp - FAQ - Logout-

-Users Online-                    -blah-                      -Shoutbox-
                            blah content blah content
-VBindexCustom1-      blah content blah blah

                              -Latest Threads-


TheEnd 11-30-2004 07:53 PM

Quote:

Originally Posted by paulmjno
This doesnt show right for anyone but the admin...I have simply disabled users online...

Try hitting Refresh. I noticed it would say 0 users online, then I would refresh and then it would show me. I'm not clear on what your asking if thats not it.

chet 12-01-2004 08:11 AM

Hi all, I want to add this to the bottom of my portal, I guess just above "All times are GMT. The time now is" would be nice, could someone let me know how I would achieve this

Thanks

Chet

jmacieira 12-01-2004 11:00 AM

Olá pessoal

ninguem fala Portugues por aqui ?
fiz a instalação do vBindex v3.0.0 RC5 e correu tudo bem (sem erros), mas agora que tenho eu de fazer para vizualizar no meu site as janelas laterais ?

jmacieira 12-01-2004 09:46 PM

Thank´s ...I love this....

I resolve my problems

TheEnd 12-02-2004 06:29 PM

Alright, well I edited out some of the news strings in the index.php and called it roster.php, and same with vbioptions.php, which i copied and made it vbioptions2.php. The settings are still set on both, which one = the other. Is there a way I can change the database where vbioptions2 is saved? Heres what I got (not much).
Roster.php
HTML Code:

<?php

// +--------------------------------------------------------------------+
// | vBindex Version 3.0.0 Release Candidate 5 (UK English)
// | Copyright (C) MMII - MMIV Winter Systems
// | This file may not be redistributed in whole or significant part.
// +--------------------------------------------------------------------+
// | vBindex, File v3.0.21
// |--------------------------------------------------------------------+
// | Support will only be given at Core Forums (http://www.coreforums.net)
// | to those who have confirmed they are licenced, or at vBulletin.org
// | via the vBindex 3.x thread listed bellow.
// +--------------------------------------------------------------------+
// | v1.x Release(s) by el3m3nt:
// |        (https://vborg.vbsupport.ru/showthread.php?threadid=37021)
// | v2.x Release(s) by NTLDR (aka Eldorado):
// |        (https://vborg.vbsupport.ru/showthread.php?threadid=41916)
// | v3.x Release(s) by NTLDR (aka Eldorado):
// |    (http://www.coreforums.net/forums/showthread.core?threadid=93)
// |        (https://vborg.vbsupport.ru/showthread.php?threadid=59524)
// +--------------------------------------------------------------------+

// ####################### SET PHP ENVIRONMENT ###########################
error_reporting(E_ALL & ~E_NOTICE);

// #################### DEFINE IMPORTANT CONSTANTS #######################
define('NO_REGISTER_GLOBALS', 1);
define('THIS_SCRIPT', 'vbindex');
define('AVATAR_ON_NAVBAR', 1);

// ################### PRE-CACHE TEMPLATES AND DATA ######################
// get special phrase groups
$phrasegroups = array(
        'vbindex'
);

// get special data templates from the datastore
$specialtemplates = array(
        'smiliecache',
        'bbcodecache',
        'iconcache',
        'userstats',
        'birthdaycache',
        'vbindex_setting',
        'vbindex_version',
        'vbindex_config'
);

// pre-cache templates used by all actions
$globaltemplates = array(
        // global templates
        'VBINDEX',
        'VBINDEX_SHELL',
        'vbindex_side',
        'vbindex_header',
        'vbindex_footer',
        'vbindex_onlineuser',
        'vbindex_onlineusers',
        'vbindex_pm_popup_script',
        'vbindex_navbar',
        'vbindex_headinclude',
        // roster
        'vbindex_roster',
        // latest threads
        'vbindex_latestthreads',
        'vbindex_latestthreadbit',
        'vbindex_centerthreadbit',
        // shoutbox
        'vbindex_shoutbox',
        'vbindex_shoutboxbit',
        // today's events
        'vbindex_event',
        'vbindex_eventbit',
        // bbocode
        'bbcode_code',
        'bbcode_html',
        'bbcode_php',
        'bbcode_quote',
        // bithdays
        'vbindex_birthdays',
        // calendar
        'vbindex_calendar',
        'calendar_smallmonth_day',
        'calendar_smallmonth_day_other',
        'calendar_smallmonth_header',
        'calendar_smallmonth_week',
        // poll
        'vbindex_poll',
        'vbindex_poll_option',
        'vbindex_poll_result',
        // custom boxes
        'vbindex_customblock_php',
        // default to 6 to prevent extra queries
        'vbindex_customblock_1',
        'vbindex_customblock_2',
        'vbindex_customblock_3',
        'vbindex_customblock_4',
        'vbindex_customblock_5',
        'vbindex_customblock_6',
);

// pre 4.1.0 don't have superglobals, so lets create the
// two indexs we're interested in before vB does
if (PHP_VERSION < '4.1.0') {
        $_REQUEST['page'] = &$HTTP_GET_VARS['page'];
        $_REQUEST['section'] = &$HTTP_GET_VARS['section'];
}

// pre-cache templates used by specific actions
// link the page we're requesting to the do var so that vB3 will
// pre-cache the template and save 1 query
if (!empty($_REQUEST['page'])) {
        $_REQUEST['do'] = &$_REQUEST['page'];
        define('EXTRA_PAGE', true);
}
// pre cache the phpinc template per extra page.
if (!empty($_REQUEST['section'])) {
        $_REQUEST['do'] = &$_REQUEST['section'];
        define('EXTRA_PAGE', true);
}
$actiontemplates = array(
        $_REQUEST['page'] =>
array(
                'vbindex_extra_'.$_REQUEST['page']
        ),
        $_REQUEST['section'] => array(
                'vbindex_extra_'.$_REQUEST['section'],
                'vbindex_extra_php_'.$_REQUEST['section']
        )
);

if (!defined('EXTRA_PAGE')) {
        define('EXTRA_PAGE', false);
}

// ######################### REQUIRE BACK-END ############################
// this contains a few config vars for vBindex to make upgrades easier
require_once('./vbiconfig2.php');

if (!defined('SCRIPT_EXTENSION')) {
        // should the script extension not be defined assume .php
        define('SCRIPT_EXTENSION', '.php');
}

chdir(CHDIR_PATH);
require_once('./global'.SCRIPT_EXTENSION);
require_once('./includes/functions_bbcodeparse'.SCRIPT_EXTENSION);
require_once('./includes/functions_bigthree'.SCRIPT_EXTENSION);
require_once('./includes/functions_user'.SCRIPT_EXTENSION);

// ######################### vBindex OPTIONS #############################
$vbindex = unserialize($datastore['vbindex_setting']);
$vbindex['version'] = $datastore['vbindex_version'];
$ext = SCRIPT_EXTENSION;

// options bitfields
$_VBINDEX['options'] = array(
        'vbi_left_col'          => 1,
        'vbi_right_col'        => 2,
        'vbi_shownews'          => 4,
        'vbi_shownewsavatar'    => 8,
        'vbi_showthreads'      => 16,
        'vbi_showshoutbox'      => 32,
        'vbi_both_cols'        => 64,
        'vbi_wol'                                => 128,
        'vbi_subnews'                        => 256,
        'vbi_subthreads'                => 512,
        'vbi_subnewposts'                => 1024,
        'vbi_welcomeav'                        => 2048,
        'vbi_scrollshoutbox'        => 4096,
        'vbi_allowshoutdelete'        => 8192,
        'vbi_showcalendar'                => 16384,
        'vbi_showbirthdays'                => 32768,
        'vbi_showpoll'                        => 65536,
        'vbi_randompoll'                => 131072,
        'vbi_disabledshout'                => 262144,
        'vbi_shownewposts'                => 524288,
        'vbi_stickynews'                => 1048576,
        'vbi_24wol'                                => 2097152,
        'vbi_24woluser'                        => 4194304,
        'vbi_ascshout'                        => 8388608,
        'vbi_vbwar'                                => 16777216,
        'vbi_showweekends'                => 33554432,
        //'vbi_newscharlimit'                => 67108864, // needs to be added to vbioptions.php, as does $vbindex['newscharlimit'] for the number of chars
        'vbi_showcenterthreads'        => 134217728,
);

// define all the options for on the spot checks
foreach($_VBINDEX['options'] AS $option => $bitfield) {
        define(strtoupper($option), $bitfield);
}
unset($option, $bitfield);

// #######################################################################
// ######################## START MAIN SCRIPT ############################
// #######################################################################

// ############################ INIT VARS ###############################

// user configured forumids to exclude
if (!empty($vbindex['limitfids'])) {
        $limitfids = array();
        $limitfids = explode(',', $vbindex['limitfids']);
        foreach($limitfids AS $key => $value) {
                $limitfids["$key"] = intval($value);
        }
} else {
        $limitfids = array(0);
}

$globalignore = ''; // global ignore list
$globalshoutignore = ''; // global ignore list as used in the shoutbox
$shoutignore = ''; // users ignore list as used in the shoutbox
$ignorelist = ''; // users ignore list
$onlineusers = '';
$previewfield = '';
$previewjoin = '';
$pollbits = '';
$home['subscribedthreads'] = 0;
$home['newposts'] = 0;
$home['newthreads'] = 0;
$avatarcache = array(); // avatar cache, saves 1 query if a avatar is returned from the cache
$threadids = array();
$iconcache = unserialize($datastore['iconcache']); // thread icon cache

// #################### PROCESS FORUM PERMISSIONS #######################

// fetch the permissions for each forum
$forumperms = array();
foreach($forumcache AS $forum) {

        $forumperms["$forum[forumid]"] = fetch_permissions($forum['forumid']);

        // ## HIDE FORUMS WITHOUT THE CANVIEW OR CANVIEWOTHERS PERMISSION ##
        if (!($forumperms["$forum[forumid]"] & CANVIEW) || !($forumperms["$forum[forumid]"] & CANVIEWOTHERS)) {
                // forum pass? || !verify_forum_password($forum['forumid'], $foruminfo['password'], false);) {
                $limitfids[] = $forum['forumid'];
        }
}
unset($forum);

// ####################### PROCESS IGNORE LISTS #########################
// ## GLOBAL IGNORE ##
if ($Coventry = fetch_coventry('string')) {
        $globalignore = "AND thread.postuserid NOT IN ($Coventry) ";
        $globalshoutignore = "AND shoutbox.userid NOT IN ($Coventry)";
}
// ## USERS IGNORE ##
if (trim($bbuserinfo['ignorelist'])) {
        $ignorelist = 'AND thread.postuserid NOT IN ('.str_replace(' ', ',', $bbuserinfo['ignorelist']).')';
        $shoutignore = 'AND shoutbox.userid NOT IN ('.str_replace(' ', ',', $bbuserinfo['ignorelist']).')';
}

// ################ PROCESS SPECIFIC GET/POST ACTIONS ###################
// ## START INSERT NEW SHOUT ##
if (($vbindex['options'] & VBI_SHOWSHOUTBOX) && trim(!empty($_POST['shout'])) && $bbuserinfo['userid']) {

        // needed for convert_url_to_bbcode();
        require_once('./includes/functions_newpost'.SCRIPT_EXTENSION);

        // check length of shout
        if (!empty($vbindex['max_shout_length']) && vbstrlen($_POST['shout']) > $vbindex['max_shout_length']) {
                eval(print_standard_error('error_vbi_shout_too_long'));
        }

        $DB_site->query("        ## INSERT NEW SHOUT ##
                                                INSERT INTO ".TABLE_PREFIX."vbindex_shoutbox
                                                (shoutid, userid, shout, dateline)
                                                VALUES
                                                (NULL, '$bbuserinfo[userid]', '".addslashes(convert_url_to_bbcode($_POST['shout']))."',
                            '".TIMENOW."')");

                        $url = "$_SERVER[PHP_SELF]?$session[sessionurl]";
                        eval(print_standard_redirect('redirect_vbi_shoutadded'));
}
// ## START DELETE SHOUT ##
if ($_REQUEST['action'] == 'deleteshout') {

        $shoutid = intval($_REQUEST['shoutid']);

    if (in_array($bbuserinfo['usergroupid'], $vbindex['global_shout_delete'])) {
                // global shout delete group so delete it
                $deleteshout = true;
        } else {
                $deleteshout = false;
        }

        if (($vbindex['options'] & VBI_ALLOWSHOUTDELETE) && !$deleteshout) {

                // check user is the shouter
                $shout = $DB_site->query_first("## DELETE SHOUT ##
                                                                                SELECT userid, shoutid
                                                                                FROM ".TABLE_PREFIX."vbindex_shoutbox
                                                                                WHERE shoutid = '$shoutid'");

                if ($shout['userid'] == $bbuserinfo['userid']) {
                        // delete shout as user is shouter
                        $deleteshout = true;
                } else {
                        $deleteshout = false;
                        // error user isn't shouter
                        eval(print_standard_error('error_vbi_cant_delete_others_shouts'));
                }
        }

        if ($deleteshout === true) {
                $DB_site->query("DELETE FROM ".TABLE_PREFIX."vbindex_shoutbox WHERE shoutid = '$shoutid'");
                $url = "$_SERVER[PHP_SELF]?$session[sessionurl]";
                eval(print_standard_redirect('redirect_vbi_shoutdeleted'));
        }
}

// #################### GET NEW POSTS/THREAD INFO #######################
if ($bbuserinfo['userid'] > 0 && ($vbindex['options'] & VBI_SHOWNEWPOSTS)) {
        if (!empty($bbuserinfo['lastvisit'])) {
                $datecut = $bbuserinfo['lastvisit'];
        } else {
                $datecut = TIMENOW - (24 * 60 * 60 * 1);
        }

        $getnew = $DB_site->query("
                        ## GET NEW POSTS / THREADS ##
                        SELECT post.postid, post.threadid
                        ".iif(($vbindex['options'] & VBI_SUBNEWPOSTS) AND $bbuserinfo['userid'], ', NOT ISNULL(subscribethread.subscribethreadid) AS issubscribed')."
                        FROM ".TABLE_PREFIX."post AS post
                        ".iif(($vbindex['options'] & VBI_SUBNEWPOSTS) AND $bbuserinfo['userid'], "
                        LEFT JOIN ".TABLE_PREFIX."subscribethread AS subscribethread ON(subscribethread.threadid = post.threadid AND subscribethread.userid = $bbuserinfo[userid])"
                        )."
                        WHERE dateline >= $datecut
                        AND visible = '1'");

        while($new = $DB_site->fetch_array($getnew)) {
                $home['newposts']++;
                if (!in_array($new['threadid'], $threadids)) {
                        $home['newthreads']++;
                        $threadids[] = $new['threadid'];
                        if ($new['issubscribed']) {
                                $home['subscribedthreads']++;
                        }
                }
        }
        $home['newposts'] = vb_number_format($home['newposts']);
        $home['newthreads'] = vb_number_format($home['newthreads']);
        // memory saving
        unset($new, $datecut, $threadids);
        $DB_site->free_result($getnew);
}

// user statistics
$userstats = unserialize($datastore['userstats']);
$home['numbermembers'] = vb_number_format($userstats['numbermembers']);
$home['newusername'] = $userstats['newusername'];
$home['newuserid'] = $userstats['newuserid'];
unset($userstats);

// ####################### PROCESS vBindex WOL ##########################
if ($vbindex['options'] & VBI_WOL) {
        $online['datecut'] = TIMENOW - $vboptions['cookietimeout'];
        $buddies = explode(' ', $bbuserinfo['buddylist']);

        $onlineusers = $DB_site->query("
                                                ## GET ONLINE USERS ##
                                                SELECT user.username, (user.options & $_USEROPTIONS[invisible]) AS invisible,
                                                user.usergroupid, session.userid, session.lastactivity,
                                                IF(displaygroupid=0, user.usergroupid, displaygroupid) AS displaygroupid
                                                FROM ".TABLE_PREFIX."session AS session
                                                LEFT JOIN ".TABLE_PREFIX."user AS user ON (user.userid = session.userid)
                                                WHERE session.lastactivity > $online[datecut]
                                                ORDER BY ".iif($permissions['genericpermissions'] & CANSEEHIDDEN, 'invisible ASC, ')."username ASC");

        $home['onlinetotal'] = 0;
        $home['onlineguesttotal'] = 0;
        $home['onlinemembertotal'] = 0;
        $done = array();
        while($onlineuser = $DB_site->fetch_array($onlineusers)) {

                if ($onlineuser['userid'] && !$done["$onlineuser[userid]"]) {

                        $done["$onlineuser[userid]"] = true;

                        $home['onlinetotal']++;
                        $home['onlinemembertotal']++;

                        // do invisible users
                        if (($permissions['genericpermissions'] & CANSEEHIDDEN) && $onlineuser['invisible']) {
                                $onlineuser['invisiblemark'] = '*';
                        } elseif ($onlineuser['invisible']) {
                                $home['onlineguesttotal']++;
                                $home['onlinemembertotal']--;
                                break 1;
                        }

                        // do buddies
                        if (in_array($onlineuser['userid'], $buddies)) {
                                $onlineuser['buddymark'] = '+';
                        }

                        $onlineuser['musername'] = fetch_musername($onlineuser);
                        eval("\$home[onlineusers] .= \", ".fetch_template('vbindex_onlineuser')."\";");

                } elseif ($onlineuser['userid'] == 0) {
                        $home['onlineguesttotal']++;
                        $home['onlinetotal']++;
                }
        }

        if ($vbindex['options'] & VBI_24WOL) {
                // show users from the last 24 hours
                $show['last24'] = true;
                unset($onlineuser);
                $starttime = mktime(0, 0, 0, date('m'), date('d'), date('Y'));


                if ($vbindex['options'] & VBI_24WOLUSER) {

                        // show user names and count
                        $show['last24user'] = true;

                        $fetchusers = $DB_site->query("
                                                ## USERS IN PAST 24HRS ##
                                                SELECT username, userid, usergroupid,
                                                (user.options & $_USEROPTIONS[invisible]) AS invisible,
                                                IF(displaygroupid=0, user.usergroupid, displaygroupid) AS displaygroupid
                                                FROM ".TABLE_PREFIX."user AS user
                                                WHERE lastactivity >= $starttime
                                                ORDER BY username ASC
                        ");

                        while($onlineuser = $DB_site->fetch_array($fetchusers)) {

                                $home['last24count']++;
                                $onlineuser['musername'] = fetch_musername($onlineuser);

                                if (($permissions['genericpermissions'] & CANSEEHIDDEN) && $onlineuser['invisible']) {
                                        $onlineuser['invisiblemark'] = '*';
                                } elseif ($onlineuser['invisible']) {
                                        $onlineuser['musername'] = '';
                                        $home['last24count']--;
                                }

                                eval("\$home[last24] .= \", ".fetch_template('vbindex_onlineuser')."\";");
                        }
                        // removed inital comma in online list
                        $home['last24'] = substr($home['last24'], 2);
                        // memory saving
                        unset($user);
                        $DB_site->free_result($fetchusers);

                } else {

                        // show count only
                        $show['last24user'] = false;
                        $onlinetoday = $DB_site->query_first("  ## USERS IN LAST 24HRS COUNT ##
                                                                                                        SELECT COUNT(*) AS count
                                                                                                        FROM ".TABLE_PREFIX."user
                                                                                                        WHERE lastactivity >= $starttime
                                                                        ");
                        $home['last24count'] = $onlinetoday['count'];
                }
        }

        // removed inital comma in online list
        $home['onlineusers'] = substr($home['onlineusers'], 2);
        eval("\$side[onlineusers] .= \"".fetch_template('vbindex_onlineusers')."\";");
        // memory saving
        unset($onlineuser, $done, $online, $buddies);
        $DB_site->free_result($onlineusers);
}

// ######################### PROCESS NEWS ############################
// standard news block
if (($vbindex['options'] & VBI_SHOWNEWS) && !($vbindex['options'] & VBI_VBWAR) && !EXTRA_PAGE && $_REQUEST['action'] != 'shoutbox') {

        $getnews = $DB_site->query("
                ## GET NEWS ##
                SELECT thread.*,thread.iconid AS threadiconid, threadpost.pagetext AS pagetext,
                threadpost.attach AS attachcount,
                ".iif($vbindex['options'] & VBI_SHOWNEWSAVATAR, 'avatarpath, NOT ISNULL(avatardata) AS customavatar, user.avatarrevision, customavatar.dateline AS customdateline,')."
                ".iif(($vbindex['options'] & VBI_SUBNEWS) AND $bbuserinfo['userid'], 'NOT ISNULL(subscribethread.subscribethreadid) AS issubscribed,')."
                IF(user.displaygroupid = 0, user.usergroupid, user.displaygroupid) AS displaygroupid
                FROM ".TABLE_PREFIX."thread AS thread
                LEFT JOIN ".TABLE_PREFIX."user AS user ON (thread.postuserid = user.userid)
                LEFT JOIN ".TABLE_PREFIX."post AS threadpost ON (thread.firstpostid = threadpost.postid)
                LEFT JOIN ".TABLE_PREFIX."deletionlog AS deletionlog ON(thread.threadid = deletionlog.primaryid AND type = 'thread')
                ".iif($vbindex['options'] & VBI_SHOWNEWSAVATAR, '
                LEFT JOIN '.TABLE_PREFIX.'customavatar AS customavatar ON (customavatar.userid = user.userid)
                LEFT JOIN '.TABLE_PREFIX.'avatar AS avatar ON (avatar.avatarid = user.avatarid)'
                )."
                ".iif(($vbindex['options'] & VBI_SUBNEWS) AND $bbuserinfo['userid'], "
                LEFT JOIN ".TABLE_PREFIX."subscribethread AS subscribethread ON(subscribethread.threadid = thread.threadid AND subscribethread.userid = $bbuserinfo[userid])"
                )."
                WHERE forumid IN ($vbindex[newsfid])
                AND deletionlog.primaryid IS NULL
                AND forumid NOT IN (".implode(',', $limitfids).")
                AND thread.open <> 10
                AND thread.visible = '1'
                $globalignore
                $ignorelist
                ORDER BY ".iif($vbindex['options'] & VBI_STICKYNEWS, 'thread.sticky DESC,', '')." thread.dateline DESC
                LIMIT $vbindex[newsposts]");

        while($news = $DB_site->fetch_array($getnews)) {

                  $news['title'] = fetch_censored_text($news['title']);
                  $news['time'] = vbdate($vboptions['timeformat'], $news['dateline']);
                  $news['date'] = vbdate($vboptions['dateformat'], $news['dateline'], 1);
                  $news['musername'] = fetch_musername($news, 'displaygroupid', 'postusername');
                  $news['attachcount'] = vb_number_format($news['attachcount']);
                  $news['replycount'] = vb_number_format($news['replycount']);

                  if ($news['iconid']) {
                        $news['showicon'] = true;
                        $news['threadiconpath'] = &$iconcache["$news[threadiconid]"]['iconpath'];
                        $news['threadicontitle'] = &$iconcache["$news[threadiconid]"]['title'];
                } elseif (!empty($vboptions['showdeficon'])) {
                        $news['showicon'] = true;
                        $news['threadiconpath'] = $vboptions['showdeficon'];
                        $news['threadicontitle'] = $vbphrase['default'];
                }

                  // ## CENSOR NEWS AND PARSE vB CODE ##
                  if (!empty($vbindex['newscharlimit']) && (vbstrlen(strip_bbcode($news['pagetext'])) > $vbindex['newscharlimit'])) {
                            $news['pagetext'] = fetch_censored_text(strip_bbcode(parse_bbcode(fetch_trimmed_title($news['pagetext'], $vbindex['newscharlimit']), true, true), $news['forumid'], 1));
                            $show['readmore'] = true;
                } else {
                        $news['pagetext'] = fetch_censored_text(parse_bbcode($news['pagetext'], $news['forumid'], 1));
                        $show['readmore'] = false;
                }

                // ## GET POSTERS AVATAR ##
                $news['avatar'] = false;
                if ($vbindex['options'] & VBI_SHOWNEWSAVATAR) {

                        if (!isset($avatarcache["$news[postuserid]"])) {

                                if (!empty($news['customavatar'])) {

                                        if ($vboptions['usefileavatar']) {
                                                $news['avatarurl'] = "$vboptions[avatarurl]/avatar$news[postuserid]_$news[avatarrevision].gif";
                                        } else {
                                                $news['avatarurl'] = "$vboptions[bburl]/image".SCRIPT_EXTENSION."?userid=$news[postuserid]&amp;dateline=$news[customdateline]";
                                        }

                                        $news['avatar'] = true;
                                        $avatarcache["$news[postuserid]"] = $news['avatarurl'];
                                        DEVDEBUG("cached avatar for userid $news[postuserid]");
                                } elseif (!empty($news['avatarpath'])) {
                                        $news['avatarurl'] = $vboptions['bburl'].'/'.$news['avatarpath'];
                                        $news['avatar'] = true;
                                        $avatarcache["$news[postuserid]"] = $news['avatarurl'];
                                        DEVDEBUG("cached avatar for userid $news[postuserid]");
                                } elseif (!empty($vbindex['useravatar'])) { // we have a default av specified
                                        $news['avatarurl'] = $vbindex['useravatar'];
                                        $avatarcache["$bbuserinfo[userid]"] = $news['avatarurl'];
                                        $news['avatar'] = true;
                                }

                          } else {
                                $news['avatar'] = true;
                                $news['avatarurl'] = $avatarcache["$news[postuserid]"];
                        }
                }

                  eval("\$home[roster] .= \"".fetch_template('vbindex_roster')."\";");
        }
          // memory saving
        unset($news);
        $DB_site->free_result($getnews);
}

// if vBwar is enabled then show that instead
if ((($vbindex['options'] & VBI_VBWAR) && !($vbindex['options'] & VBI_SHOWNEWS)) && !EXTRA_PAGE && $_REQUEST['action'] != 'shoutbox') {

        require_once('./vnews.php');

}

// ######################## CREATE WELCOME BOX ###########################
// moved bellow news as it creates the posibility of one less query
// if the users avatar has been cached from a news post
$showavatar = false;

// if we are a member
if ($bbuserinfo['userid']) {

        // show members welcome
        $showmemberwelcome = true;

        // ## GET & CACHE AV ##
        if ($vbindex['options'] & VBI_WELCOMEAV) {

                if (!isset($avatarcache["$bbuserinfo[userid]"])) {

                        if (trim($vboptions['templateversion']) == '3.0.0 Gamma') {
                                $avatarurl = $vboptions['bburl'].'/'.fetch_avatar_url($bbuserinfo['userid']);
                        } else {
                                if ($vboptions['usefileavatar']) {
                                        $avatarurl = "$vboptions[avatarurl]/avatar$bbuserinfo[userid]_$bbuserinfo[avatarrevision].gif";
                                } else {
                                        $avatarurl = $vboptions['bburl']."/image".SCRIPT_EXTENSION."?userid=$bbuserinfo[userid]&amp;dateline=$bbuserinfo[customdateline]";
                                }
                        }
                        $avatarcache["$bbuserinfo[userid]"] = $avatarurl;
                        DEVDEBUG("cached avatar for userid $bbuserinfo[userid]");
                } else {
                        $avatarurl = $avatarcache["$bbuserinfo[userid]"];
                }

                if ($avatarurl != $vboptions['bburl'].'/') {
                        $showavatar = true;
                } elseif (!empty($vbindex['useravatar'])) { // we have a default av specified
                        $avatarurl = $vbindex['useravatar'];
                        $avatarcache["$bbuserinfo[userid]"] = $avatarurl;
                        $showavatar = true;
                }
        }

} else {
        // a guest is viewing
        if (!empty($vbindex['guestavatar'])) {
                $avatarurl = $vbindex['guestavatar'];
                $showavatar = true;
                $home['welcomemessage'] = construct_phrase($vbphrase['vbi_welcome_guest_message'], $vboptions['bbtitle'], $vboptions['bburl'], SCRIPT_EXTENSION.'?'.$session['sessionurl']);
        }
          $showmemberwelcome = false;
}

// #################### PROCESS LATEST THREADS #######################
if ($vbindex['options'] & VBI_SHOWTHREADS) {

        if ($vboptions['threadpreview'] > 0) {
                $previewfield = ', post.pagetext AS preview';
                $previewjoin = 'LEFT JOIN '.TABLE_PREFIX.'post AS post ON(post.postid = thread.firstpostid)';
        }

        $getthreads = $DB_site->query("
                ## GET LATEST THREADS ##
                SELECT thread.*,thread.iconid AS threadiconid $previewfield
                ".iif(($vbindex['options'] & VBI_SUBTHREADS) AND $bbuserinfo['userid'], ', NOT ISNULL(subscribethread.subscribethreadid) AS issubscribed')."
                ".iif($vbindex['options'] & VBI_SHOWCENTERTHREADS, ',forum.title AS forumtitle')."
                FROM ".TABLE_PREFIX."thread AS thread
                LEFT JOIN ".TABLE_PREFIX."deletionlog AS deletionlog ON(thread.threadid = deletionlog.primaryid AND type = 'thread')
                ".iif(($vbindex['options'] & VBI_SUBTHREADS) AND $bbuserinfo['userid'], "
                LEFT JOIN " . TABLE_PREFIX . "subscribethread AS subscribethread ON(subscribethread.threadid = thread.threadid AND subscribethread.userid = $bbuserinfo[userid])"
                )."
                ".iif($vbindex['options'] & VBI_SHOWCENTERTHREADS, "LEFT JOIN ".TABLE_PREFIX."forum AS forum ON(forum.forumid = thread.forumid)")."
                $previewjoin
                WHERE open = '1'
                AND thread.open <> 10
                AND thread.forumid NOT IN (".iif(is_numeric($vbindex['newsfid']), "$vbindex[newsfid],").implode(',', $limitfids).")
                AND thread.visible = '1'
                AND deletionlog.primaryid IS NULL
                $globalignore
                $ignorelist
                ORDER BY lastpost
                DESC LIMIT $vbindex[maxlthreads]");

        while($thread = $DB_site->fetch_array($getthreads)) {

                $threads = true;
            $thread['title'] = fetch_censored_text(fetch_trimmed_title(unhtmlspecialchars($thread['title']), 22));
            $thread['date'] = vbdate($vboptions['dateformat'], $thread['lastpost'], 1);
            $thread['time'] = vbdate($vboptions['timeformat'], $thread['lastpost']);
            $thread['preview'] = preg_replace('#\[quote(=(&quot;|"|\'|).*\\2)?\](.*)\[/quote\]#siU', '', $thread['preview']);
                $thread['preview'] = htmlspecialchars_uni(fetch_trimmed_title(strip_bbcode(fetch_censored_text($thread['preview']), false, true), $vboptions['threadpreview']));
                $thread['replycount'] = vb_number_format($thread['replycount']);
                $thread['views'] = vb_number_format($thread['views']);

            // thread icon
            $show['icon'] = false;
            if ($thread['iconid']) {
                        $show['icon'] = true;
                        $thread['threadiconpath'] = &$iconcache["$thread[threadiconid]"]['iconpath'];
                        $thread['threadicontitle'] = &$iconcache["$thread[threadiconid]"]['title'];
                } elseif (!empty($vboptions['showdeficon'])) {
                        $show['icon'] = true;
                        $thread['threadiconpath'] = $vboptions['showdeficon'];
                        $thread['threadicontitle'] = $vbphrase['default'];
                }

                // show goto new post
                $show['firstnew'] = false;
                $bbforumview = fetch_bbarray_cookie('forum_view', $thread['forumid']);

                if ($bbforumview > $bbuserinfo['lastvisit']) {
                        $lastread = $bbforumview;
                } else {
                        $lastread = $bbuserinfo['lastvisit'];
                }

                if ($thread['lastpost'] > $lastread) {

                        $threadview = fetch_bbarray_cookie('thread_lastview', $thread['threadid']);

                        if ($thread['lastpost'] > $threadview) {
                                $show['firstnew'] = true;
                                $show['icon'] = false;
                        }
                }

            exec_switch_bg();

            eval("\$threadbits .= \"".fetch_template('vbindex_latestthreadbit')."\";");
            if ($vbindex['options'] & VBI_SHOWCENTERTHREADS) {
                    // prepare center threads block
                    eval("\$centerthreadbits .= \"".fetch_template('vbindex_centerthreadbit')."\";");
                }
        }
        if ($threads) {
                eval("\$side[latestthreads] = \"".fetch_template('vbindex_latestthreads')."\";");
        }
        // memory saving
        unset($thread, $threads);
        $DB_site->free_result($getthreads);
}

// ######################### PROCESS POLL ###############################
if ($vbindex['options'] & VBI_SHOWPOLL) {

        // the $pollinfo query here is experimental, to save one query later on I have joined
        // the pollvote table if the bbuser is registed, this seems to work fine from my testing

        $pollinfo = $DB_site->query_first("
                        ## GET POLL ##
                        SELECT thread.pollid, thread.forumid, open, threadid, replycount, question, poll.dateline,
                        options, votes, active, numberoptions, timeout, multiple, voters,
                        pollvote.voteoption, pollvote.userid AS voteuserid
                        FROM ".TABLE_PREFIX."thread AS thread
                        LEFT JOIN ".TABLE_PREFIX."poll AS poll ON (thread.pollid = poll.pollid)
                        LEFT JOIN ".TABLE_PREFIX."deletionlog AS deletionlog ON(thread.threadid = deletionlog.primaryid AND type = 'thread')
                        LEFT JOIN ".TABLE_PREFIX."pollvote AS pollvote ON(thread.pollid = pollvote.pollid AND pollvote.userid = $bbuserinfo[userid])
                        WHERE forumid NOT IN (".implode(',', $limitfids).")
                        AND deletionlog.primaryid IS NULL
                        AND thread.pollid <> 0
                        AND thread.open <> 10
                        AND thread.visible = '1'
                        ".iif(strtoupper($vbindex['pollsforumid']) != 'ALL', "AND thread.forumid IN ($vbindex[pollsforumid])")."
                        $globalignore
                        $ignorelist
                        ORDER BY ".iif($vbindex['options'] & VBI_RANDOMPOLL, 'RAND()', 'thread.threadid')." DESC
                        LIMIT 1");

        if ($pollinfo['pollid']) {

                $pollinfo['question'] = fetch_censored_text($pollinfo['question']);

                $splitoptions = explode('|||', $pollinfo['options']);
                $splitvotes = explode('|||', $pollinfo['votes']);

                $showresults = '';
                $uservoted = '';

                if (!$pollinfo['active'] || !$pollinfo['open'] || ($pollinfo['dateline'] + ($pollinfo['timeout'] * 86400) < TIMENOW && $pollinfo['timeout'])) {
                        // poll closed
                        $showresults = true;
                } elseif (!($forumperms["$pollinfo[forumid]"] & CANVOTE)) {
                        // user cannot vote on this poll
                        $nopermission = true;
                } elseif (fetch_bbarray_cookie('poll_voted', $pollinfo['pollid'])) {
                        // cookie shows user has voted
                        $uservoted = true;
                } elseif ($bbuserinfo['userid'] == $pollinfo['voteuserid'] && !empty($pollinfo['voteoption'])) {
                        // pollinfo query shows user has voted
                        $uservoted = true;
                }

                $i = 0;

                while($i++ < $pollinfo['numberoptions']) {
                        $pollinfo['numbervotes'] += $splitvotes[$i - 1];
                }

                $i = 0;
                $option = array();

                while($i++ < $pollinfo['numberoptions']) {

                        exec_switch_bg();

                        $option['question'] = fetch_censored_text(parse_bbcode($splitoptions[$i - 1], $pollinfo['forumid'], $pollinfo['allowsmilies']));
                        $option['votes'] = $splitvotes[$i - 1];
                        $option['number'] = $i;

                        if ($showresults || $uservoted || $nopermission) {
                                if ($showresults) {
                                        $status = $vbphrase['this_poll_is_closed'];
                                } elseif ($uservoted) {
                                        $status = $vbphrase['you_have_already_voted_on_this_poll'];
                                } elseif ($nopermission) {
                                        $status = $vbphrase['you_may_not_vote_on_this_poll'];
                                }

                                $percent = 0;
                                if ($option['votes']) {
                                        $percent = vb_number_format($option['votes'] / $pollinfo['numbervotes'] * 100, 2);
                                }

                                $option['graphicnumber'] = $option['number'] % 6 + 1;
                                $option['barnumber'] = round($percent) * 1.3;

                                $showform = false;
                                eval("\$home[pollbits] .= \"".fetch_template('vbindex_poll_result')."\";");
                        } elseif ($pollinfo['multiple']) {
                                // mutiple choice poll
                                $multiple = true;
                                $showform = true;
                                eval("\$home[pollbits] .= \"".fetch_template('vbindex_poll_option')."\";");
                        } else {
                                // single choice poll
                                $multiple = false;
                                $showform = true;
                                eval("\$home[pollbits] .= \"".fetch_template('vbindex_poll_option')."\";");
                        }
                }
                eval("\$side[poll] = \"".fetch_template('vbindex_poll')."\";");
        }
}

// ####################### PROCESS CAlENDAR & EVENTS ##########################
if ($vbindex['options'] & VBI_SHOWCALENDAR) {

        // lets prevent hacking and do our own calendar permissions checking
        $cpermscache = array();
        $calendarcache = array();

    // fetch the membergroupids
    $membergroupids = fetch_membergroupids_array($bbuserinfo);

    $calendarpermissions = $DB_site->
query("
        ## CALENDAR PERMS & OPTIONS QUERY (userid: $bbuserinfo[userid], membergroupids: $bbuserinfo[membergroupids]) ##
        SELECT calendarpermission.usergroupid, calendarpermission.calendarpermissions,
        calendar.calendarid,calendar.title, calendar.options, calendar.startofweek, displayorder
        FROM ".TABLE_PREFIX."calendar AS calendar
        LEFT JOIN ".TABLE_PREFIX."calendarpermission AS calendarpermission ON (calendarpermission.calendarid=calendar.calendarid AND usergroupid IN(".implode(',', $membergroupids)."))
        ORDER BY displayorder ASC");

        while($calendarpermission = $DB_site->fetch_array($calendarpermissions)) {
                if (!empty($calendarpermission['displayorder'])) {
                        // leave permissions at 0 for calendars that aren't being displayed
                        $cpermscache["$calendarpermission[calendarid]"]["$calendarpermission[usergroupid]"] = intval($calendarpermission['calendarpermissions']);
                        $calendarcache["$calendarpermission[calendarid]"]['title'] = $calendarpermission['title'];
                        $calendarcache["$calendarpermission[calendarid]"]['options'] = $calendarpermission['options'];
                        $calendarcache["$calendarpermission[calendarid]"]['startofweek'] = $calendarpermission['startofweek'];
                }
        }
        // memory saving
        unset($calendarpermission);
        $DB_site->free_result($calendarpermissions);

        // Combine the calendar permissions for all member groups
        foreach($cpermscache AS $calendarid => $cpermissions) {
                $user['calendarpermissions']["$calendarid"] = 0;
                foreach($membergroupids AS $usergroupid) {
                        if (isset($cpermissions["$usergroupid"])) {
                                $bbuserinfo['calendarpermissions']["$calendarid"] |= $cpermissions["$usergroupid"];
                        } else {
                                $bbuserinfo['calendarpermissions']["$calendarid"] |= $usergroupcache["$usergroupid"]['calendarpermissions'];
                        }
                }
        }

        // require the calendar functions
        require_once('./includes/functions_calendar'.SCRIPT_EXTENSION);

        // get the first viewable calendarid
        $showcalendar = false;
        foreach ($calendarcache AS $id => $value) {
                if ($bbuserinfo['calendarpermissions']["$id"] & CANVIEWCALENDAR) {

                        $calendarinfo = array(
                                'options'                => $value['options'],
                                'title'                        => $value['title'],
                                'startofweek'        => $value['startofweek'],
                                'calendarid'        => $id
                        );

                        $startofweek = $value['startofweek'];
                        $calendarid = $id;
                        $showcalendar = true;
                        break;
                }
        }

        if ($showcalendar) {

                // bbuser has access to a calendar, so lets process it
                if ($bbuserinfo['startofweek'] > 7 || $bbuserinfo['startofweek'] < 1) {
                        $bbuserinfo['startofweek'] = $calendarinfo['startofweek'];
                }

                $today = getdate(TIMENOW - $vboptions['hourdiff']);
                $today['month'] = $vbphrase[strtolower($today['month'])];

                $usertoday = array(
                        'firstday' =>
gmdate('w', gmmktime(0, 0, 0, $today['mon'], 1, $today['year'])),
                        'month' => $today['mon'], 'year' => $today['year']
                );

                $getoptions = convert_bits_to_array($calendarinfo['options'], $_CALENDAROPTIONS);
                $calendarinfo = array_merge($calendarinfo, $getoptions);
                $calendarinfo['showweekends'] = iif($vbindex['options'] & VBI_SHOWWEEKENDS, 1, 0);

                // events
                //$eventarray = unserialize($datastore['vbi_eventcache']);
                //$eventcache = $eventarray["$calendarinfo[calendarid]"];
                //unset($eventarray);echo '<pre>';print_r($eventcache);exit;
                $erange = array(
                        'frommonth' => $today['mon'],
                        'fromyear'  => $today['year'],
                        'nextmonth' => $today['mon'],
                        'nextyear'  => $today['year']
                );
                $eventcache = cache_events($erange);

                if (is_array($eventcache)) {
                        // only process events if we have an array of them
                        $i = 0;
                        foreach($eventcache AS $event) {
                                if (!($bbuserinfo['calendarpermissions']["$calendarinfo[calendarid]"] & CANVIEWOTHERSEVENT) && $bbuserinfo['userid'] != $event['userid']) {
                                        unset($eventcache["$i"]);
                                }
                                $i++;
                        }
                }

                $calendarbits = str_replace('calendar'.SCRIPT_EXTENSION, "$vboptions[bburl]/calendar".SCRIPT_EXTENSION, construct_calendar_output($today, $usertoday, $calendarinfo, 0));
                eval("\$side[calendar] = \"".fetch_template('vbindex_calendar')."\";");
        } else {
                $side['calendar'] = '';
        }
}

// #################### PROCESS TODAYS BIRTHDAYS #######################
if ($vbindex['options'] & VBI_SHOWBIRTHDAYS) {

        // birthdays
        $birthdays = unserialize($datastore['birthdaycache']);
        $birthdaydate = vbdate('Y-m-d', TIMENOW);

        if (!is_array($birthdays) || ($birthdaydate != $birthdays['day1'] && $birthdaydate != $birthdays['day2'])) {
                // update the cache
                require_once('./includes/functions_databuild'.SCRIPT_EXTENSION);
                $birthdays = build_birthdays();
                DEVDEBUG('Updated Birthday Cache');
        }

        if ($birthdays['day1'] == $birthdaydate && !empty($birthdays['users1'])) {
                // process day1
                $home['birthdaybit'] = str_replace('member'.SCRIPT_EXTENSION.'?u', "$vboptions[bburl]/member".SCRIPT_EXTENSION.'?userid', $birthdays['users1']);
                eval("\$side[birthdays] = \"".fetch_template('vbindex_birthdays')."\";");
        } elseif ($birthdays['day2'] == $birthdaydate && !empty($birthdays['users2'])) {
                // process day2
                $home['birthdaybit'] = str_replace('member'.SCRIPT_EXTENSION.'?u', "$vboptions[bburl]/member".SCRIPT_EXTENSION.'?userid', $birthdays['users2']);
                eval("\$side[birthdays] = \"".fetch_template('vbindex_birthdays')."\";");
        } else {
                $side['birthdays'] = '';
        }
        unset($birthdays, $birthdaydate);
}

// ######################## PROCESS SHOUTBOX ############################
if ($vbindex['options'] & VBI_SHOWSHOUTBOX) {

        if ($_REQUEST['action'] == 'shoutbox') {
                $pagenumber = intval($_REQUEST['pagenumber']);
                $perpage = intval($_REQUEST['perpage']);
                $mainpage = true;

                $total = $DB_site->query_first("## COUNT SHOUTS ##
                                                                                SELECT COUNT(*) AS shouts
                                                                                FROM ".TABLE_PREFIX."vbindex_shoutbox
                                                                                WHERE 1 = 1
                                                                                $globalshoutignore
                                                                                  $shoutignore");

                // set defaults
                sanitize_pageresults($total['shouts'], $pagenumber, $perpage, 100, 25);

                $limitlower = ($pagenumber - 1) * $perpage+1;
                $limitupper = ($pagenumber) * $perpage;
                $counter = 0;

                if ($limitupper > $total['shouts']) {
                        $limitupper = $total['shouts'];
                        if ($limitlower > $total['shouts']) {
                                $limitlower = $total['shouts']-$perpage;
                        }
                }
                if ($limitlower <= 0) {
                        $limitlower = 1;
                }

                // limit for mysql query when full page is selected
                $limit = ($limitlower - 1).", $perpage";


                $navarray = array(
                        '' =>
'Shoutbox'
                );
                $navbits = construct_navbits($navarray);
                $pagenav = str_replace('&amp;page=', '&amp;pagenumber=', construct_page_nav($total['shouts'], "$_SERVER[PHP_SELF]?$session[sessionurl]action=shoutbox&amp;perpage=$perpage"));
        } else {
                // limit for mysql query when only side box is show
                $limit = $vbindex['maxshouts'];
                $pagenav = '';
        }

        $getshouts = $DB_site->query("        ## GET SHOUTS ##
                                                                          SELECT user.username, user.userid,
                                                                          shoutbox.shoutid, shoutbox.shout, shoutbox.dateline,
                                                                          IF(user.displaygroupid = 0, user.usergroupid, user.displaygroupid) AS displaygroupid
                                                                          FROM ".TABLE_PREFIX."vbindex_shoutbox AS shoutbox
                                                                          LEFT JOIN ".TABLE_PREFIX."user AS user USING (userid)
                                                                          WHERE 1 = 1
                                                                          $globalshoutignore
                                                                          $shoutignore
                                                                          ORDER BY shoutbox.dateline DESC
                                                                          LIMIT $limit");

        $i = 0;
        while ($shout = $DB_site->fetch_array($getshouts)) {
                $i++;
                $shouts = true;
                $shout['shout'] = fetch_censored_text(parse_bbcode($shout['shout']));
                // lets word wrap the shouts to prevent an expanded column
                if (!empty($vbindex['shout_wrap_length'])) {
                        $shout['shout'] = preg_replace("#([^\n\r ?&./<>\"\\-\[\]]{".$vbindex['shout_wrap_length'].'})#i', "\\1  ", $shout['shout']);
                }
                $shout['musername'] = fetch_musername($shout);
                $shout['date'] = vbdate($vboptions['dateformat'], $shout['dateline'], 1);
            $shout['time'] = vbdate($vboptions['timeformat'], $shout['dateline']);
                exec_switch_bg();

                if (in_array($bbuserinfo['usergroupid'], $vbindex['global_shout_delete']) || (($vbindex['options'] & VBI_ALLOWSHOUTDELETE) && $shout['userid'] == $bbuserinfo['userid'])) {
                        $shoutdelete = true;
                } else {
                        $shoutdelete = false;
                }

                // prevent the side box showing more than the defined number of shouts
                // if we are viewing the full page one
                if ($i <= $vbindex['maxshouts']) {

                        if ($vbindex['options'] & VBI_ASCSHOUT) {
                                // asc order
                                eval("\$sbox[$shout[timestamp]] .= \"".fetch_template('vbindex_shoutboxbit')."\";");
                        } else {
                                // default desc order
                                eval("\$shoutbox[shoutbits] .= \"".fetch_template('vbindex_shoutboxbit')."\";");
                        }
                }

                if ($_REQUEST['action'] == 'shoutbox') {
                        eval("\$shoutbox[main_shoutbits] .= \"".fetch_template('vbindex_shoutboxbit')."\";");
                }
        }

        if (($vbindex['options'] & VBI_ASCSHOUT) && is_array($sbox)) {
                // asc sort
                krsort($sbox);
                foreach($sbox AS $sarea) {
                        $shoutbox['shoutbits'] .= $sarea;
                }
        }

        if ($bbuserinfo['userid'] || ($vbindex['options'] & VBI_DISABLEDSHOUT)) {
                exec_switch_bg();
                if (!$bbuserinfo['userid']) {
                        $shoutbox['postdisabled'] = true;
                } else {
                        $shoutbox['postdisabled'] = false;
                }
                $shoutbox['postshout'] = true;
        } else {
                $shoutbox['postshout'] = false;
        }

        if ($shouts || $shoutbox['postshout']) {
                if ($_REQUEST['action'] == 'shoutbox') {
                        $main = true;
                        eval("\$home[news] .= \"".fetch_template('vbindex_shoutbox')."\";");
                        $pagenav = '';
                        $main = false;
                        eval("\$side[shoutbox] .= \"".fetch_template('vbindex_shoutbox')."\";");
                } else {
                        $main = false;
                        eval("\$side[shoutbox] .= \"".fetch_template('vbindex_shoutbox')."\";");
                }
        }
        // memory saving
        unset($shout, $sbox, $sarea);
        $DB_site->
free_result($getshouts);
}

// #############################################################################
// unset vB's default template vars, do this at the end so any standard error
// or redirect calls still have the vars for use in the templates.
unset($header, $footer, $navbar, $headinclude);

// ####################### GENERATE SIDE BAR ##########################
// ## CUSTOM BLOCKS
if (!empty($vbindex['customboxes'])) {
        for($box = 1; $box <= $vbindex['customboxes']; $box++) {
                $collapseobj_vbindex_customblock = $vbcollapse['collapseobj_vbindex_customblock'.$box];
                $collapseimg_vbindex_customblock = $vbcollapse['collapseimg_vbindex_customblock'.$box];

                if (!is_demo_mode()) {
                        @ob_start();
                        eval(fetch_template('vbindex_customblock_php', -1, 0));
                        // this is the var to use in the template for the dynamic content
                        $contvar = 'box'.$box.'_php';
                        $$contvar = @ob_get_contents();
                        @ob_end_clean();
                }

                eval("\$side[customblock_".$box."] .= \"".fetch_template("vbindex_customblock_{$box}")."\";");
        }
}

// ## LEFT
if (($vbindex['options'] & VBI_BOTH_COLS) || ($vbindex['options'] & VBI_LEFT_COL)) {
        for($box = 1; $box < ($vbindex['totalboxes'] + 1 + $vbindex['customboxes']); $box++) {
                $leftright = $vbindex["left_{$box}"];
                $home['left']["$box"] = $side["$leftright"];
        }
        foreach($home['left'] AS $box =>
$content) {
                $home['leftblocks'] .= $content;
        }
}

// ## RIGHT
if (($vbindex['options'] & VBI_BOTH_COLS) || ($vbindex['options'] & VBI_RIGHT_COL)) {
        for($box = 1; $box < ($vbindex['totalboxes'] + 1 + $vbindex['customboxes']); $box++) {
                $leftright = $vbindex["right_{$box}"];
                $home['right']["$box"] = $side["$leftright"];
        }
        foreach($home['right'] AS $box =>
$content) {
                $home['rightblocks'] .= $content;
        }
}

if ($vbindex['options'] & VBI_BOTH_COLS) {
        $currentside = 'left';
        eval("\$home[leftside] = \"".fetch_template('vbindex_side')."\";");
        $currentside = 'right';
        eval("\$home[rightside] = \"".fetch_template('vbindex_side')."\";");
} elseif ($vbindex['options'] & VBI_LEFT_COL) {
        $currentside = 'left';
        eval("\$home[leftside] = \"".fetch_template('vbindex_side')."\";");
} elseif ($vbindex['options'] & VBI_RIGHT_COL) {
        $currentside = 'right';
        eval("\$home[rightside] = \"".fetch_template('vbindex_side')."\";");
}

// #################### EVAL GLOBAL TEMPLATES #######################
$vbphrase['copyright'] = construct_phrase($vbphrase['vbi_copyright'], $vboptions['templateversion'], $vbindex['version']);
eval("\$home[footer] = \"".fetch_template('vbindex_footer')."\";");
$footer = &$home['footer'];
eval("\$home[header] = \"".fetch_template('vbindex_header')."\";");
$header = &$home['header'];
eval("\$headinclude = \"".fetch_template('vbindex_headinclude')."\";");
$home['headinclude'] = &$headinclude;

$home['footer'] = str_replace('cron'.SCRIPT_EXTENSION, "$vboptions[bburl]/cron".SCRIPT_EXTENSION, $home['footer']);
// ## PM POPUP
if ($shownewpm) {
        eval("\$home[footer] = \"".fetch_template('vbindex_pm_popup_script')."\";");
}

$navbits = array('', $vboptions['hometitle']);
$navbits = construct_navbits($navbits);
eval("\$home[navbar] = \"".fetch_template('vbindex_navbar')."\";");

eval($datastore['vbindex_config']);

if (trim($vboptions['templateversion']) != '3.0.0 Gamma') {
        $headinclude = str_replace('link rel="stylesheet" type="text/css" href="clientscript/vbulletin_css', 'link rel="stylesheet" type="text/css" href="'.$vboptions['bburl'].'/clientscript/vbulletin_css', $headinclude);
}

// #################### SELECT OUTPUT TEMPLATE #######################
if (!EXTRA_PAGE) {
        eval("print_output(\"".fetch_template('VBINDEX')."\");");
} elseif (!empty($_REQUEST['page'])) {
        eval("\$home[content] = \"".fetch_template("vbindex_extra_{$_REQUEST[page]}")."\";");
        eval("print_output(\"".fetch_template('VBINDEX_SHELL')."\");");
} elseif (!empty($_REQUEST['section'])) {
        // we're using a PHP special extra page, so lets parse the PHP Include
        if (!is_demo_mode()) {
                @ob_start();
                eval(fetch_template("vbindex_extra_php_{$_REQUEST[section]}", -1, 0));
                // this is the var to use in the template for the dynamic content
                $php_output = @ob_get_contents();
                @ob_end_clean();

        }
        eval("\$home[content] = \"".fetch_template("vbindex_extra_{$_REQUEST[section]}")."\";");
        eval("print_output(\"".fetch_template('VBINDEX_SHELL')."\");");
}

?>

(Continued Below)

TheEnd 12-02-2004 06:30 PM

vbioptions2.php
HTML Code:

<?php

// +--------------------------------------------------------------------+
// | vBindex Version 3.0.0 Release Candidate 5 (UK English)
// | Copyright (C) MMII - MMIV Winter Systems
// +--------------------------------------------------------------------+
// | vbioptions.php, v3.0.4
// |--------------------------------------------------------------------+
// | Support will only be given at Core Forums (http://www.coreforums.net)
// | to those who have confirmed they are licenced, or at vBulletin.org
// | via the vBindex 3.x thread listed bellow.
// +--------------------------------------------------------------------+
// | v1.x Release(s) by el3m3nt:
// |        (https://vborg.vbsupport.ru/showthread.php?threadid=37021)
// | v2.x Release(s) by NTLDR (aka Eldorado):
// |        (https://vborg.vbsupport.ru/showthread.php?threadid=41916)
// | v3.x Release(s) by NTLDR (aka Eldorado):
// |    (http://www.coreforums.net/forums/showthread.core?threadid=93)
// |        (https://vborg.vbsupport.ru/showthread.php?threadid=59524)
// +--------------------------------------------------------------------+

// ######################## SET PHP ENVIRONMENT ###########################
error_reporting(E_ALL & ~E_NOTICE);

// ##################### DEFINE IMPORTANT CONSTANTS #######################
define('NO_REGISTER_GLOBALS', 1);


// #################### PRE-CACHE TEMPLATES AND DATA ######################
$phrasegroups = array(
        'vbindex_cp'
);
$specialtemplates = array(
        'vbindex_setting'
);

// ########################## REQUIRE BACK-END ############################
if (@file_exists('../vbiconfig.php')) {
        require_once('../vbiconfig.php');
        $configpath = '../vbiconfig.php';
} elseif (@file_exists('../../vbiconfig.php')) {
        $configpath = '../../vbiconfig.php';
        require_once('../../vbiconfig.php');
}

if (!defined('SCRIPT_EXTENSION')) {
        // vbiconfig.php couldn't be found, assume .php extension
        define('SCRIPT_EXTENSION', '.php');
}

require_once('./global'.SCRIPT_EXTENSION);

// ############################# LOG ACTION ###############################
log_admin_action();

// ########################################################################
// ######################### START MAIN SCRIPT ############################
// ########################################################################

print_cp_header($vbphrase['vbindex_options']);

if (empty($_REQUEST['do'])) {
        $_REQUEST['do'] = 'edit';
}

$vbindex = unserialize($datastore['vbindex_setting']);

// ###################### Start edit #######################
if ($_REQUEST['do'] == 'edit') {

        print_form_header('vbioptions', 'update');

        $coloptions = array(
                '0'  => $vbphrase['neither'],
                '1'  => $vbphrase['left'],
                '2 ' => $vbphrase['right'],
                '64' => $vbphrase['both']
        );
        if ($vbindex['options'] & 1) {
                $col = 1;
        } elseif ($vbindex['options'] & 2) {
                $col = 2;
        } elseif ($vbindex['options'] & 64) {
                $col = 64;
        }
        $colnames = array(
                '0'                                => $vbphrase['leave_unused'],
                'latestthreads' => $vbphrase['latest_threads'],
                'onlineusers'        => $vbphrase['online_users'],
                'shoutbox'                => $vbphrase['shoutbox'],
                'calendar'                => $vbphrase['calendar'],
                'birthdays'                => $vbphrase['birthdays'],
                'poll'                        => $vbphrase['poll']
        );
        for($box = 1; $box <= $vbindex['customboxes']; $box++) {
                $colnames["customblock_$box"] = construct_phrase($vbphrase['custom_block_x'], $box);
        }

        $totalboxes = 6;

        // side options
        print_table_header($vbphrase['side_columns']);
        print_select_row($vbphrase['columns_to_show'], 'vbi_bit[cols]', $coloptions, $col);
        print_input_row($vbphrase['number_of_custom_blocks'], 'vbi_int[customboxes]', $vbindex['customboxes'], 1, 2);
        construct_hidden_code('vbi[totalboxes]', $totalboxes);
        // left
        for($box = 1; $box < ($totalboxes + 1 + $vbindex['customboxes']); $box++) {
                print_select_row(construct_phrase($vbphrase['x_box_x'], $vbphrase['left'], $box), "vbi[left_{$box}]", $colnames, $vbindex["left_{$box}"]);
        }
        // right
        for($box = 1; $box < ($totalboxes + 1 + $vbindex['customboxes']); $box++) {
                print_select_row(construct_phrase($vbphrase['x_box_x'], $vbphrase['right'], $box), "vbi[right_{$box}]", $colnames, $vbindex["right_{$box}"]);
        }
        print_table_break();

        // news
        print_table_header($vbphrase['news']);
        print_checkbox_row($vbphrase['news_enabled'], 'vbi_bit[shownews]', iif($vbindex['options'] & 4, 1, 0), 4);
        print_checkbox_row($vbphrase['enable_vbwar'], 'vbi_bit[vbwar]', iif($vbindex['options'] & 16777216, 1, 0), 16777216);
        print_checkbox_row($vbphrase['news_posters_avatar'], 'vbi_bit[shownewsavatar]', iif($vbindex['options'] & 8, 1, 0), 8);
        print_input_row($vbphrase['news_forumid'], 'vbi[newsfid]', $vbindex['newsfid']);
        print_input_row($vbphrase['news_posts_to_show'], 'vbi_int[newsposts]', $vbindex['newsposts']);
        print_input_row($vbphrase['news_chars_to_show'], 'vbi_int[newscharlimit]', $vbindex['newscharlimit']);
        print_checkbox_row($vbphrase['show_subscribed_icon'], 'vbi_bit[subnews]', iif($vbindex['options'] & 256, 1, 0), 256);
        print_checkbox_row($vbphrase['show_sticky_news_threads'], 'vbi_bit[stickynews]', iif($vbindex['options'] & 1048576, 1, 0), 1048576);
        print_table_break();

        // latest threads
        print_table_header($vbphrase['latest_threads']);
        print_checkbox_row($vbphrase['latest_threads_enabled'], 'vbi_bit[showthreads]', iif($vbindex['options'] & 16, 1, 0), 16);
        print_checkbox_row($vbphrase['enable_center_threads'], 'vbi_bit[showcenterthreads]', iif($vbindex['options'] & 134217728, 1, 0), 134217728);
        print_input_row($vbphrase['recent_threads_to_show'], 'vbi_int[maxlthreads]', $vbindex['maxlthreads']);
        print_checkbox_row($vbphrase['show_subscribed_icon'], 'vbi_bit[subthreads]', iif($vbindex['options'] & 512, 1, 0), 512);
        print_table_break();

        // poll
        print_table_header($vbphrase['poll']);
        print_checkbox_row($vbphrase['poll_enabled'], 'vbi_bit[pollnews]', iif($vbindex['options'] & 65536, 1, 0), 65536);
        print_checkbox_row($vbphrase['random_poll_enabled'], 'vbi_bit[randompoll]', iif($vbindex['options'] & 131072, 1, 0), 131072);
        print_input_row($vbphrase['poll_forumid'], 'vbi[pollsforumid]', $vbindex['pollsforumid']);
        print_table_break();

        // shoutbox
        print_table_header($vbphrase['shoutbox']);
        print_checkbox_row($vbphrase['shoutbox_enabled'], 'vbi_bit[showshoutbox]', iif($vbindex['options'] & 32, 1, 0), 32);
        print_input_row($vbphrase['shouts_to_show'], 'vbi_int[maxshouts]', $vbindex['maxshouts']);
        print_checkbox_row($vbphrase['asc_order_shoutbox'], 'vbi_bit[ascshout]', iif($vbindex['options'] & 8388608, 1, 0), 8388608);
        print_input_row($vbphrase['shout_wrap_length'], 'vbi_int[shout_wrap_length]', $vbindex['shout_wrap_length']);
        print_input_row($vbphrase['max_shout_length'], 'vbi_int[max_shout_length]', $vbindex['max_shout_length']);
        print_checkbox_row($vbphrase['scrollable_shoutbox'], 'vbi_bit[shoutbox_type]', iif($vbindex['options'] & 4096, 1, 0), 4096);
        print_checkbox_row($vbphrase['shoutbox_showdisabled'], 'vbi_bit[shoutbox_postdisabled]', iif($vbindex['options'] & 262144, 1, 0), 262144);
        print_checkbox_row($vbphrase['shout_deletion'], 'vbi_bit[member_shout_delete]', iif($vbindex['options'] & 8192, 1, 0), 8192);
        // implode the global shout deletion groups into $vbindex['membergroupids'] so that print_memebergroup_row will check the usergroup boxes
        if (is_array($vbindex['global_shout_delete'])) {
                $vbindex['membergroupids'] = implode(',', $vbindex['global_shout_delete']);
        } else {
                $vbindex['membergroupids'] = array(0);
        }
        print_membergroup_row($vbphrase['global_shout_delete'], 'vbi_ug[global_shout_delete]', 0, $vbindex);
        // add 0 to the above array so that the foreach in the update allways has an array to create
        construct_hidden_code('vbi_ug[global_shout_delete][]', '0');
        print_table_break();

        // welcome box
        print_table_header($vbphrase['welcome_box']);
        print_checkbox_row($vbphrase['enable_new_posts'],'vbi_bit[shownewposts]', iif($vbindex['options'] & 524288, 1, 0), 524288);
        print_checkbox_row($vbphrase['show_users_avatar'], 'vbi_bit[showwavatar]', iif($vbindex['options'] & 2048, 1, 0), 2048);
        print_input_row($vbphrase['default_guest_avatar'], 'vbi[guestavatar]', $vbindex['guestavatar']);
        print_input_row($vbphrase['default_user_avatar'], 'vbi[useravatar]', $vbindex['useravatar']);
        print_checkbox_row($vbphrase['new_subscribed_threads'], 'vbi_bit[subnewposts]', iif($vbindex['options'] & 1024, 1, 0), 1024);
        print_table_break();

        // calendar
        print_table_header($vbphrase['calendar']);
        print_checkbox_row($vbphrase['enable_calendar'], 'vbi_bit[showcalendar]', iif($vbindex['options'] & 16384, 1, 0), 16384);
        print_checkbox_row($vbphrase['enable_todays_birthdays'], 'vbi_bit[showbirthdays]', iif($vbindex['options'] & 32768, 1, 0), 32768);
        print_checkbox_row($vbphrase['show_weekends'], 'vbi_bit[showweekends]', iif($vbindex['options'] & 33554432, 1, 0), 33554432);
        print_table_break();

        // wol
        print_table_header($vbphrase['whos_online']);
        print_checkbox_row($vbphrase['enable_online_users'], 'vbi_bit[wol]', iif($vbindex['options'] & 128, 1, 0), 128);
        print_checkbox_row($vbphrase['enable_online_today'], 'vbi_bit[24wol]', iif($vbindex['options'] & 2097152, 1, 0), 2097152);
        print_checkbox_row($vbphrase['enable_online_today_usernames'], 'vbi_bit[24woluser]', iif($vbindex['options'] & 4194304, 1, 0), 4194304);
        print_table_break();

        // misc
        print_table_header($vbphrase['misc']);
        print_input_row($vbphrase['exclude_forumids'], 'vbi[limitfids]', $vbindex['limitfids']);
        print_table_break();

        // save options row
        print_submit_row($vbphrase['save']);
}

// ###################### Start insert #######################
if ($_POST['do'] == 'update') {

        $_vbindex = array();
        $_vbindex['options'] = 0;

        // process bitfield options
        foreach($_POST['vbi_bit'] AS $value) {
                $_vbindex['options'] += intval($value);
        }
        unset($key, $value);

        // process int vals
        foreach($_POST['vbi_int'] AS $key => $value) {
                $_vbindex["$key"] = intval($value);
        }
        unset($key, $value);

        // process string vals
        foreach($_POST['vbi'] AS $key => $value) {
                $_vbindex["$key"] = trim($value);
        }
        unset($key, $value);

        // process usergroup options
        $is_array = false;
        foreach($_POST['vbi_ug'] AS $key => $array) {
                foreach($array AS $value) {
                        if (intval($value) != 0) {
                                $_vbindex["$key"][] = intval($value);
                                $is_array = true;
                        } elseif (!$is_array) {
                                $_vbindex["$key"] = array();
                        }
                }
        }
        unset($key, $value, $array, $is_array);

        $DB_site->query("UPDATE ".TABLE_PREFIX."datastore SET data = '".addslashes(serialize($_vbindex))."' WHERE title = 'vbindex_setting'");

        define('CP_REDIRECT', 'vbioptions'.SCRIPT_EXTENSION.'?do=edit');
        print_stop_message('vbindex_settings_saved');
        if ($debug) {
                echo '<pre>
';
                print_r($_vbindex);
                echo '</pre>';
        }

}

print_cp_footer();

?>


dreck 12-03-2004 08:24 PM

I installed this great hack earlier today. Nice work, thanks!

I clicked the install button. :)

I have a few very minor things that I would like to fix:

1.) From the admin cpanel the Forum home page link at top of page has been changed. Which the link is from my computer, I just not sure which template to edit & where? or why?
Code:

file:///C|/DOCUME%7E1/64/LOCALS%7E1/index.php?
2.) My avatar doesnt show up on the welcome screen? My path to the image is:
Any help with these minor things would be great!

Great stuff!!!!

Thanks, dreck

flstreetscene 12-04-2004 03:47 AM

Plz someone help me. :disappointed:

I've been at this basic problem for a while now...

Most links on my front page (navbar/login) is missing the /forums part of the url and therefore dont work. What do I need to edit for this?

Thank you.

flstreetscene 12-04-2004 01:27 PM

I've replaced the path to the forums as per instructions;

define('CHDIR_PATH', '/path/to/forums/');

to...

define('CHDIR_PATH', '/home/zeno/domains/floridastreetscene.com/public_html/forums');

vlad7 12-04-2004 03:47 PM

can i install this portal system on vb 3.0.3?

Blue Moose Aaron 12-05-2004 03:26 AM

Yes you can

Scerina 12-05-2004 04:58 PM

Quote:

Originally Posted by Ted Varnson
Yes you can

Umm...dunno if anyone know this or if anyone has encounter this sorta problem...but what if you have other Foriegn Language Packs Installed and it conflicts with the News Header Title in the VbIndex Options Section under Admin CP and also, it does not post the latest threads on the main vbIndex page when you create a thread in one of the Desinated News Forums. And am not sure if this has anything to do wit the Foriegn Language Packs I installed.

Can someone help me out here?

Blue Moose Aaron 12-05-2004 08:38 PM

I wouldn't think your language pack would make any difference. Can you give a link to your forum and vbindex page?

jmellicker 12-05-2004 09:17 PM

I am looking for a vBindex expert to install vBindex on our site and be available via IM to consult and do modifications, etc.

If you are interested, email:

josh ( a t ) dvcreators.net

(keep track of time and bill us!)

jmacieira 12-05-2004 10:49 PM

Hello

I have error in my calendar in vBindex

the link in calendar in vBindex is: http://www.reefforum.net/calendar.co...=2004-12-5&c=3 have error.

The correct link in forum is: http://www.reefforum.net/calendar.ph...=2004-12-5&c=3

because this error ?

sorry my ingles

Scerina 12-06-2004 12:42 AM

Quote:

Originally Posted by Ted Varnson
I wouldn't think your language pack would make any difference. Can you give a link to your forum and vbindex page?

my forum link is:

http://www.underworld-chaos.net/boards/vbindex.php

Scerina 12-06-2004 01:02 AM

Actually, ever since I installed some language packs from vb.com, my vbindex homepage is not working properly. For instance, you no longer see your avatar on the index page or whenever I make posts in the forums reserved for news posting, they do not show up on the vbindex homepage...so something is seriously wrong here. Can someone plz help me out? If you can help me out, plz contact me via one of these methods:

Email: Pandora@Sweet-November.Net
AIM: LisaScerina
MSN: Scerina@Hotmail.Com
YIM: lharris1813

Thanx in advance

flstreetscene 12-06-2004 04:59 PM

What do you have to edit so the front page spans as far as the navbar. Right now it's a bit more narrow;

http://www.floridastreetscene.com/

Scerina 12-06-2004 09:27 PM

Quote:

What do you have to edit so the front page spans as far as the navbar. Right now it's a bit more narrow;
How do I do that? Also, how do I make the header image wider like on the creator of this hack's forum:

http://www.thesistersthree.com/?

Delphy 12-07-2004 10:41 AM

I noticed a problem with the shoutbox.

When you configure vbIndex, you set the number of shoutbox posts, however, when you go to view all shouts the perpage value is set to 25, and the first page only has X number of shouts on it (ie the number you configured to show in the sidebar).

This means that when you go from page 1 to 2 you skip shouts. So, in my case, I'd go from viewing 1-10 to viewing 25-50, skipping everything in between.

I fixed this, and changed it so that it uses the users posts per page setting instead. Also, when viewing All Shouts, the side bar shoutbox doesn't appear.

gmarik 12-07-2004 08:43 PM

Any new addons?

suryoyena 12-08-2004 02:33 AM

Hi, I have two problems with this hack.

I'm using since yesterday vB 3.0.3 and installed the vBindex.

1.) Could not find phrase 'vbi_ ... '. in different cases

2.) I can't start the vbi-controlpanel from the adminpanel

I didn't find something with the search. It would be great if you can help me.

Thanks a lot!

Chris

jmacieira 12-08-2004 01:13 PM

hello

i have instalad vbindex.php and in my admin, and i have change im my admin the my home page index for vbindex but the home page it index continues to open my old page (index)

the page vbindex works correctly, does not only open as entrance page.

therefore I go my administration "Script Name I will be Forum Home Page" to modify index for vbindex and the system continues to open index as default

My vbindex http://www.reefforum.net/vbindex.php
my home http://www.reefforum.net/index.php

they know me to say because

(sorry my ingles im Portuguese)

suryoyena 12-08-2004 02:40 PM

@jmacieieira
Your problem is easy to solve.

1. Create a new file and put the following content in:
"DirectoryIndex vbindex.php index.php"

2. Save it as "htaccess"

3. Upload it into your root

That's it.

I hope someone can help me with my problem too.
Read my first post on this page..

Chris

Scerina 12-08-2004 11:56 PM

My vbIndex does not update when I post any new threads in the forums reserved for News Posting on the VbIndex Homepage.

Can someone help me fix this issue plz?

dreck 12-09-2004 05:57 PM

Guess everyone missed my post?
Or noone has a fix?

Thanks for any reply

Quote:

Originally Posted by dreck
I installed this great hack earlier today. Nice work, thanks!

I clicked the install button. :)

I have a few very minor things that I would like to fix:

1.) From the admin cpanel the Forum home page link at top of page has been changed. Which the link is from my computer, I just not sure which template to edit & where? or why?
Code:

file:///C|/DOCUME%7E1/64/LOCALS%7E1/index.php?
2.) My avatar doesnt show up on the welcome screen? My path to the image is:
Any help with these minor things would be great!

Great stuff!!!!

Thanks, dreck


noppid 12-09-2004 06:38 PM

Hey NTLDR.

vBindex has been very good for us thanks. I have one thing I can't work out and was hoping you could explain what I may do to overcome it.

I added this code...
PHP Code:

//vbgarage

    
$result_latest $DB_site->query("
        SELECT * FROM " 
TABLE_PREFIX "vbgarage_images ORDER BY vbgarageid DESC LIMIT 5
    "
);
    
    while (
$latest $DB_site->fetch_Array($result_latest))
    {
        eval(
'$latestbits .= "' fetch_template('vbgarage_latestbits') . '";');
    } 

Which parses this template...
HTML Code:

<td class="alt2" colspan="1" align="center"><a href="$vboptions[bburl]/vbgarage.php?do=view&amp;id=$latest[userid]"><img src="$vboptions[bburl]/vbgarage.php?do=thumb&amp;width=100&amp;id=$latest[vbgarageid]" border=0 /></a></td>
The code in the template calls the vbgarage php file to display the thumbs.

The code works with one anomoly, when it runs the vbgarage.php it updates the users location to the garage and not the index. I've tried the code in a few places with no luck. This isn't a show stopper, but with your experience I was hoping you may be able to make a suggestion.

Thanks and Regards

webophir 12-09-2004 10:44 PM

Hi,

I just installed VBindex 3.0.0RC5.
Everythin work smoothly. But I got a question.
I want vbindex.php file in other directory:

for example, suppose this is my directory structure.

root -> vbindex.php (i'll rename this to index.php)
-> forum (directory) (vbiconfig.php is in this directory)
-> gallery (directory)

I changed values in "vbindex.php" line 137:
require_once('./forum/vbiconfig.php');

And I changed values in "vbiconfig.php" line 25:
define('CHDIR_PATH', 'forum/');

Everything looks fine, but One problem I could not make it working was:
images path is missed (http://URL/images/misc/menu_open.gif). It must be 'http://url/forum/images/misc/menu_open.gif'.

how could I solve this problem?

=========================================

Finally I solved the problem.
My solution was: go to admin panel -> style manager -> all style options (go) -> Image Paths -> change values to my full URL pointing to forum image directory (http://URL/forum/images/buttons, etc).

Is it the best way? Any other efficient solution you have?

Gary King 12-09-2004 11:10 PM

My index looks bad when you are logged out: http://maloria.com/

Anyone know what's wrong and what I should do to fix this?

noppid 12-09-2004 11:13 PM

Have you edited templates? Did any of the edited elements contain a conditional that checked if the user is logged in or not? If so it looks like you have a table error in the code displayed to guests.

Gary King 12-09-2004 11:50 PM

I didn't change any templates. The page looks fine for others, only not for me. Weird. Anyways, I'll leave it then :eek:

noppid 12-10-2004 12:21 AM

Quote:

Originally Posted by Gary King
I didn't change any templates. The page looks fine for others, only not for me. Weird. Anyways, I'll leave it then :eek:

It's a mess for me too. You have google ads, someone edited something. :ermm:

EDIT:

It's working now when I go there, was a mess before. Go Figure!

Paudie 12-10-2004 11:11 PM

hey, erm could some pro out there tell me why this happens to mine
keep getting a line:

Warning: chdir(): No such file or directory (errno 2) in /home/yerix/public_html/index.php on line 144

I have followed instructions as best as i could a few times, but its just not happening for me.

http://www.yerix.com

much help is appreciated.

BarHopper 12-11-2004 05:06 PM

on vbindex.php, i get this error:

'.php'); ?>
Warning: chdir(): No such file or directory (errno 2) in /home/grealms/public_html/vbindex.php on line 144

Warning: main(./global.php): failed to open stream: No such file or directory in /home/grealms/public_html/vbindex.php on line 145

Fatal error: main(): Failed opening required './global.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/grealms/public_html/vbindex.php on line 145

TheEnd 12-11-2004 07:15 PM

I installed it a while ago, works great. Then I just added a bunch of new styles today. VBindex only works on the Default style, what do I need to do to view index with the different styles?

BarHopper 12-11-2004 09:04 PM

^ Run the innstaller again, setting your new style as the default, and run only the styles modifcations.

TheEnd 12-11-2004 10:15 PM

Thanks, worked!

TheEnd 12-11-2004 11:29 PM

Why are some styles messed up? Actually, all of them are.
http://rec0n.nauticaltech.com/index.php?styleid=7
http://rec0n.nauticaltech.com/index.php?styleid=8
http://rec0n.nauticaltech.com/index.php?styleid=9
http://rec0n.nauticaltech.com/index.php?styleid=10
They are supposed to look like:
http://rec0n.nauticaltech.com/forums....php?styleid=7
http://rec0n.nauticaltech.com/forums....php?styleid=8
http://rec0n.nauticaltech.com/forums....php?styleid=9
http://rec0n.nauticaltech.com/forums...php?styleid=10
The logo BG, navbar, cat gradients, and table borders aren't working. I think VBindex defines those vars differently than the forums or something. I know nothing about VB style coding so someone please help. :'(


All times are GMT. The time now is 02:53 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.12485 seconds
  • Memory Usage 2,256KB
  • 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
  • (5)bbcode_code_printable
  • (3)bbcode_html_printable
  • (1)bbcode_php_printable
  • (7)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (2)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)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