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)
-   -   vBChat v2.3 (https://vborg.vbsupport.ru/showthread.php?t=71049)

RsX 11-10-2004 10:32 AM

My index.php looks different.. what to change it to? Oo

Code:


        while ($loggedin = $DB_site->fetch_array($forumusers))
        {
                $userid = $loggedin['userid'];
                if (!$userid)
                {        // Guest
                        $numberguest++;
                        $inforum["$loggedin[inforum]"]++;
                }
                else if (empty($userinfos["$userid"]) OR ($userinfos["$userid"]['lastactivity'] < $loggedin['lastactivity']))
                {
                        $userinfos["$userid"] = $loggedin;
                }
        }

        foreach($userinfos AS $userid => $loggedin)
        {
                $numberregistered++;
                if ($userid != $bbuserinfo['userid'])
                {
                        $inforum["$loggedin[inforum]"]++;
                }
                $loggedin['musername'] = fetch_musername($loggedin);

                if (fetch_online_status($loggedin))
                {
                        $numbervisible++;
                        eval('$activeusers .= ", ' . fetch_template('forumhome_loggedinuser') . '";');
                }
        }


SVTOA 11-10-2004 10:47 AM

Quote:

Originally Posted by RsX
My index.php looks different.. what to change it to? Oo

Code:


        while ($loggedin = $DB_site->fetch_array($forumusers))
        {
                $userid = $loggedin['userid'];
                if (!$userid)
                {        // Guest
                        $numberguest++;
                        $inforum["$loggedin[inforum]"]++;
                }
                else if (empty($userinfos["$userid"]) OR ($userinfos["$userid"]['lastactivity'] < $loggedin['lastactivity']))
                {
                        $userinfos["$userid"] = $loggedin;
                }
        }

        foreach($userinfos AS $userid => $loggedin)
        {
                $numberregistered++;
                if ($userid != $bbuserinfo['userid'])
                {
                        $inforum["$loggedin[inforum]"]++;
                }
                $loggedin['musername'] = fetch_musername($loggedin);

                if (fetch_online_status($loggedin))
                {
                        $numbervisible++;
                        eval('$activeusers .= ", ' . fetch_template('forumhome_loggedinuser') . '";');
                }
        }




I think this is the reason I am having trouble with the online users in chat function. When I followed the instructions I was given in my other post, that caused the "Who's online" display to stop working on forumhome, but I was able to correct that myself by comparing code between the additon and the replacement. Now that works again, however the who is currently in chat does not and I am sure it's related to the forumhome code change.

RsX 11-10-2004 11:17 AM

do u in other words know what i need to change? Oo

SVTOA 11-10-2004 11:23 AM

Well, since it does not work, I would not alter your index.php yet. That is not a requirement for the VB CHat to work, it's to have the "who is in chat" function. I'd wait until we get an answer on this.

RsX 11-10-2004 11:54 AM

lol kk np.. cant wait for him to fix it ^^

EDIT: Installed ^^ Just need 2 more things

*The Index.php replacement (code above)
*How to change message and connected users area BG without killing the style sheet
*How to make Smileys appear not randomly, and only from a selected smileys group

Other than that this is a great hack Zero Tolerance, Awesome job!!
IMO ur hacks are the most usefull ever! especially the warning system.. and u make them so well ^^

Delw 11-10-2004 01:08 PM

I used his latest release ( I believe I dloaded it last night at 6 pm mountain standard time) the whos online works for me just fine. I ran it right out of the box so to speak.
the only edit I had to make was in the admincp/index.php file mentioned above.

Delw

RsX 11-10-2004 01:14 PM

NVM i got it myself :) scroll down :P

SVTOA 11-10-2004 01:24 PM

Quote:

Originally Posted by Delw
I used his latest release ( I believe I dloaded it last night at 6 pm mountain standard time) the whos online works for me just fine. I ran it right out of the box so to speak.
the only edit I had to make was in the admincp/index.php file mentioned above.


Delw

You must have had to edit your forum index.php file, because otherwise the online function would not work?! I'm not talking about the "regular" who's online, I am talking about the "xx users in VB Chat" portion. If you didn't edit index.php then nothing would be effected.

It works on ZT's website so this must be fixable. :D Maybe it's the version of the forum I am using this on? (3.00)

Delw 11-10-2004 01:35 PM

Sorry my bad , I'm still half asleep

Delw

RsX 11-10-2004 01:55 PM

NVM i got it myself well, I stile have 2 more things that I really need, please if you could help me

*How to change message and connected users area BG without killing the style sheet

*How to make Smilies appear not randomly, and only from a selected smilies group (Generic Smilies)

wattieuk 11-10-2004 05:05 PM

Got this working this morning - thank you very much for all the help and for developing the mod - it's much appreciated. The only thing I would like to change is the size of the messages window which at the moment needs to scroll to the right to be able to see all of the posted messages.
Is there any way to stop this from happening? Cheers.

RsX 11-10-2004 05:13 PM

Yes there is... This will not only mak ethe messages table bigger, it wil even it out with the connected users table...


Go to template chat_man

Find:
PHP Code:

        <td class='alt2' align='center' width='80%' height='300' rowspan='2'>
        <
iframe width='100%' height='100%' frameborder='0' border='0' src='vBChat.php?&do=chatFrame' name='vBChatFrame' onload='checkInp()'>Your Browser Does Not Support Iframe's, Get One That Does!</iframe>
        </td>
        <td class='
alt2' align='center' width='20%' height='300'>
        <iframe width='
100%' height='100%' frameborder='0' border='0' src='vBChat.php?&do=chatUser' name='vBChatUser'>Your Browser Does Not Support Iframe'sGet One That Does!</iframe>
        </
td



Replace With:
PHP Code:

        <td class='alt2' align='center' width='80%' height='345' rowspan='2'>
        <
iframe width='100%' height='100%' frameborder='0' border='0' src='vBChat.php?&do=chatFrame' name='vBChatFrame' onload='checkInp()'>Your Browser Does Not Support Iframe's, Get One That Does!</iframe>
        </td>
        <td class='
alt2' align='center' width='20%' height='300'>
        <iframe width='
100%' height='100%' frameborder='0' border='0' src='vBChat.php?&do=chatUser' name='vBChatUser'>Your Browser Does Not Support Iframe'sGet One That Does!</iframe>
        </
td




I ALSO NEED HELP PLEASE!!!!

*How to change message and connected users area BG without killing the style sheet

*How to make Smilies appear not randomly, and only from a selected smilies group (Generic Smilies)

adp 11-10-2004 05:54 PM

Very fine addon! Our users love it!

*clicks install*

One question, would it be possible to change the admin panel to make it work in a way that I do not ban usergroup, but allow them? I'd like to let only certain groups in, and at the moment it seems as if the script is only looking at primary user groups. I'd love it if it would be possible to have a secondary usergroup where I can set if users are allowed to chat or now.

I've got my secondary usergroups setup like "feature_arcade" and "feature_chat" etc, so I'll just drop users in he right group to let them have a certain feature.

Thanks a lot,
adp

Galadrium 11-10-2004 06:17 PM

Thanks for a great hack. Just updated to 1.1.0. Is there anyway to get the time/date stamp back? My users seemed to like that better.

RsX 11-10-2004 06:18 PM

this is important:

I ALSO NEED HELP PLEASE!!!!

*How to change message and connected users area BG without killing the style sheet

*How to make Smilies appear not randomly, and only from a selected smilies group (Generic Smilies)

My users cant see what they write even if they use a diff color.. my forum BG isnt good for this

wattieuk 11-10-2004 06:32 PM

Quote:

Originally Posted by RsX
Yes there is... This will not only mak ethe messages table bigger, it wil even it out with the connected users table...


Go to template chat_man

Find:
PHP Code:

        <td class='alt2' align='center' width='80%' height='300' rowspan='2'>
        <
iframe width='100%' height='100%' frameborder='0' border='0' src='vBChat.php?&do=chatFrame' name='vBChatFrame' onload='checkInp()'>Your Browser Does Not Support Iframe's, Get One That Does!</iframe>
        </td>
        <td class='
alt2' align='center' width='20%' height='300'>
        <iframe width='
100%' height='100%' frameborder='0' border='0' src='vBChat.php?&do=chatUser' name='vBChatUser'>Your Browser Does Not Support Iframe'sGet One That Does!</iframe>
        </
td



Replace With:
PHP Code:

        <td class='alt2' align='center' width='80%' height='345' rowspan='2'>
        <
iframe width='100%' height='100%' frameborder='0' border='0' src='vBChat.php?&do=chatFrame' name='vBChatFrame' onload='checkInp()'>Your Browser Does Not Support Iframe's, Get One That Does!</iframe>
        </td>
        <td class='
alt2' align='center' width='20%' height='300'>
        <iframe width='
100%' height='100%' frameborder='0' border='0' src='vBChat.php?&do=chatUser' name='vBChatUser'>Your Browser Does Not Support Iframe'sGet One That Does!</iframe>
        </
td


That didnt work - the window still wanted to scroll to the right so you could see all the message.

Guy G 11-10-2004 06:48 PM

having problems with the show connected users thing... it doesnt show :/

Sweet Evil 11-10-2004 06:53 PM

Nice, Thanks!

RsX 11-10-2004 08:01 PM

yeah whats wrong here? (same as zorobz question)

Code:

// ### LOGGED IN USERS #################################################
$activeusers = '';
if ($vboptions['displayloggedin'])
{
        $datecut = TIMENOW - $vboptions['cookietimeout'];
        $numbervisible = 0;
        $numberregistered = 0;
        $numberguest = 0;

        $forumusers = $DB_site->query("
                SELECT
                        user.username, (user.options & $_USEROPTIONS[invisible]) AS invisible, user.usergroupid,
                        session.userid, session.inforum, 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 > $datecut
                " . iif($vboptions['displayloggedin'] == 1, "ORDER BY username ASC") . "
        ");

        if ($bbuserinfo['userid'])
        {
                // fakes the user being online for an initial page view of index.php
                $bbuserinfo['joingroupid'] = iif($bbuserinfo['displaygroupid'], $bbuserinfo['displaygroupid'], $bbuserinfo['usergroupid']);
                $userinfos = array
                (
                        $bbuserinfo['userid'] => array
                        (
                                'userid' => $bbuserinfo['userid'],
                                'username' => $bbuserinfo['username'],
                                'invisible' => $bbuserinfo['invisible'],
                                'inforum' => 0,
                                'lastactivity' => TIMENOW,
                                'usergroupid' => $bbuserinfo['usergroupid'],
                                'displaygroupid' => $bbuserinfo['displaygroupid'],
                        )
                );
        }
        else
        {
                $userinfos = array();
        }
        $inforum = array();

// Get the users in vBChat
        $vbchat_users = array();

        while ($loggedin = $DB_site->fetch_array($forumusers))
        {
                $userid = $loggedin['userid'];
                if (!$userid)
                {        // Guest
                        $numberguest++;
                        $inforum["$loggedin[inforum]"]++;
                }
                else if (empty($userinfos["$userid"]) OR ($userinfos["$userid"]['lastactivity'] < $loggedin['lastactivity']))
                {
                        $userinfos["$userid"] = $loggedin;
                }

                if(preg_match("/vBChat.php/",$loggedin['location']) && $loggedin['userid']){
                $vbchat_users[$loggedin['userid']] = $loggedin;
                }

        }

        // Configure Peeps In vBChat
        $invBChat = "";

        if(is_array($vbchat_users)){
                foreach($vbchat_users as $invbc){
                        if($invBChat == ""){
                        $extra = "";
                        } else {
                        $extra = ", ";
                        }

                // Get Username Style
                $invbc['musername'] = fetch_musername($invbc);

                $invBChat .= "{$extra}<a href='member.php?{$session['sessionurl']}&u={$invbc['userid']}'>{$invbc['musername']}</a>";
                }
        }

        if($invBChat == ""){
        $invBChat = "<i>No one is currently inside vBChat</i>";
        }

        foreach($userinfos AS $userid => $loggedin)
        {
                $numberregistered++;
                if ($userid != $bbuserinfo['userid'])
                {
                        $inforum["$loggedin[inforum]"]++;
                }
                $loggedin['musername'] = fetch_musername($loggedin);

                if (fetch_online_status($loggedin))
                {
                        $numbervisible++;
                        eval('$activeusers .= ", ' . fetch_template('forumhome_loggedinuser') . '";');
                }
        }

        // memory saving
        unset($userinfos, $loggedin);

        $activeusers = substr($activeusers , 2); // get rid of initial comma

        $DB_site->free_result($loggedins);

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

        // ### MAX LOGGEDIN USERS ################################



And also How to change message and connected users area BG without killing the style sheet ?

SVTOA 11-10-2004 11:22 PM

I got mine to work myself, there was some code missing from the instructions...

djjeffa 11-11-2004 01:55 AM

anybody figer out whats up with the smillies? half are red x's and how could i close rooms?

SVTOA 11-11-2004 02:09 AM

Everything works on mine now.

Great hack.

Jag 11-11-2004 02:36 AM

*installed*

You're missing a semicolon in one of the instructional code bits BTW. ;)

RsX 11-11-2004 03:37 AM

Quote:

Originally Posted by RsX
yeah whats wrong here? (same as zorobz question)

Code:

// ### LOGGED IN USERS #################################################
$activeusers = '';
if ($vboptions['displayloggedin'])
{
        $datecut = TIMENOW - $vboptions['cookietimeout'];
        $numbervisible = 0;
        $numberregistered = 0;
        $numberguest = 0;

        $forumusers = $DB_site->query("
                SELECT
                        user.username, (user.options & $_USEROPTIONS[invisible]) AS invisible, user.usergroupid,
                        session.userid, session.inforum, 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 > $datecut
                " . iif($vboptions['displayloggedin'] == 1, "ORDER BY username ASC") . "
        ");

        if ($bbuserinfo['userid'])
        {
                // fakes the user being online for an initial page view of index.php
                $bbuserinfo['joingroupid'] = iif($bbuserinfo['displaygroupid'], $bbuserinfo['displaygroupid'], $bbuserinfo['usergroupid']);
                $userinfos = array
                (
                        $bbuserinfo['userid'] => array
                        (
                                'userid' => $bbuserinfo['userid'],
                                'username' => $bbuserinfo['username'],
                                'invisible' => $bbuserinfo['invisible'],
                                'inforum' => 0,
                                'lastactivity' => TIMENOW,
                                'usergroupid' => $bbuserinfo['usergroupid'],
                                'displaygroupid' => $bbuserinfo['displaygroupid'],
                        )
                );
        }
        else
        {
                $userinfos = array();
        }
        $inforum = array();

// Get the users in vBChat
        $vbchat_users = array();

        while ($loggedin = $DB_site->fetch_array($forumusers))
        {
                $userid = $loggedin['userid'];
                if (!$userid)
                {        // Guest
                        $numberguest++;
                        $inforum["$loggedin[inforum]"]++;
                }
                else if (empty($userinfos["$userid"]) OR ($userinfos["$userid"]['lastactivity'] < $loggedin['lastactivity']))
                {
                        $userinfos["$userid"] = $loggedin;
                }

                if(preg_match("/vBChat.php/",$loggedin['location']) && $loggedin['userid']){
                $vbchat_users[$loggedin['userid']] = $loggedin;
                }

        }

        // Configure Peeps In vBChat
        $invBChat = "";

        if(is_array($vbchat_users)){
                foreach($vbchat_users as $invbc){
                        if($invBChat == ""){
                        $extra = "";
                        } else {
                        $extra = ", ";
                        }

                // Get Username Style
                $invbc['musername'] = fetch_musername($invbc);

                $invBChat .= "{$extra}<a href='member.php?{$session['sessionurl']}&u={$invbc['userid']}'>{$invbc['musername']}</a>";
                }
        }

        if($invBChat == ""){
        $invBChat = "<i>No one is currently inside vBChat</i>";
        }

        foreach($userinfos AS $userid => $loggedin)
        {
                $numberregistered++;
                if ($userid != $bbuserinfo['userid'])
                {
                        $inforum["$loggedin[inforum]"]++;
                }
                $loggedin['musername'] = fetch_musername($loggedin);

                if (fetch_online_status($loggedin))
                {
                        $numbervisible++;
                        eval('$activeusers .= ", ' . fetch_template('forumhome_loggedinuser') . '";');
                }
        }

        // memory saving
        unset($userinfos, $loggedin);

        $activeusers = substr($activeusers , 2); // get rid of initial comma

        $DB_site->free_result($loggedins);

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

        // ### MAX LOGGEDIN USERS ################################



And also How to change message and connected users area BG without killing the style sheet ?


Doesnt anyone know how to fix this?
:ermm:

Red Blaze 11-11-2004 03:52 AM

Upgraded mine with no problems, excellent. ^_^

Zero Tolerance 11-11-2004 08:00 AM

Im at college at this moment, so when i get home ill fix the semi-colon error and update the index.php edits so it will work for everyone else, then i'll take a looksy at some of your idea's :)

Sorry for any problems, but with a little patience i will fix them.

- Zero Tolerance

Cornolio 11-11-2004 08:52 AM

it's a great hack, but.. i've got this error:
Code:

Parse error: parse error, unexpected T_VARIABLE in /web/htdocs/www.discutere.it/home/admincp/index.php on line 567
:confused:
at that line there's
Code:

$printhr = false;
can you help me?
tnx :)

RsX 11-11-2004 09:53 AM

Yeah i have this prob also.. Also,

I have some ideas...

1) Smiley caegory under vBChat options to organize how many smileys, witch smilies, ect..

2)In the options category page add a "BG editor" and a place to insert html wrap tags (like in usergroup editor) so we can put any image/color we want in the bg..

ih and also... Whats wrong here?


PHP Code:

// ### LOGGED IN USERS #################################################
$activeusers '';
if (
$vboptions['displayloggedin'])
{
    
$datecut TIMENOW $vboptions['cookietimeout'];
    
$numbervisible 0;
    
$numberregistered 0;
    
$numberguest 0;

    
$forumusers $DB_site->query("
        SELECT
            user.username, (user.options & 
$_USEROPTIONS[invisible]) AS invisible, user.usergroupid,
            session.userid, session.inforum, 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 > 
$datecut
        " 
iif($vboptions['displayloggedin'] == 1"ORDER BY username ASC") . "
    "
);

    if (
$bbuserinfo['userid'])
    {
        
// fakes the user being online for an initial page view of index.php
        
$bbuserinfo['joingroupid'] = iif($bbuserinfo['displaygroupid'], $bbuserinfo['displaygroupid'], $bbuserinfo['usergroupid']);
        
$userinfos = array
        (
            
$bbuserinfo['userid'] => array
            (
                
'userid' => $bbuserinfo['userid'],
                
'username' => $bbuserinfo['username'],
                
'invisible' => $bbuserinfo['invisible'],
                
'inforum' => 0,
                
'lastactivity' => TIMENOW,
                
'usergroupid' => $bbuserinfo['usergroupid'],
                
'displaygroupid' => $bbuserinfo['displaygroupid'],
            )
        );
    }
    else
    {
        
$userinfos = array();
    }
    
$inforum = array();

// Get the users in vBChat
    
$vbchat_users = array();

    while (
$loggedin $DB_site->fetch_array($forumusers))
    {
        
$userid $loggedin['userid'];
        if (!
$userid)
        {    
// Guest
            
$numberguest++;
            
$inforum["$loggedin[inforum]"]++;
        }
        else if (empty(
$userinfos["$userid"]) OR ($userinfos["$userid"]['lastactivity'] < $loggedin['lastactivity']))
        {
            
$userinfos["$userid"] = $loggedin;
        }

        if(
preg_match("/vBChat.php/",$loggedin['location']) && $loggedin['userid']){
        
$vbchat_users[$loggedin['userid']] = $loggedin;
        }

    }

    
// Configure Peeps In vBChat
    
$invBChat "";

    if(
is_array($vbchat_users)){
        foreach(
$vbchat_users as $invbc){
            if(
$invBChat == ""){
            
$extra "";
            } else {
            
$extra ", ";
            }

        
// Get Username Style
        
$invbc['musername'] = fetch_musername($invbc);

        
$invBChat .= "{$extra}<a href='member.php?{$session['sessionurl']}&u={$invbc['userid']}'>{$invbc['musername']}</a>";
        }
    }

    if(
$invBChat == ""){
    
$invBChat "<i>No one is currently inside vBChat</i>";
    }

    foreach(
$userinfos AS $userid => $loggedin)
    {
        
$numberregistered++;
        if (
$userid != $bbuserinfo['userid'])
        {
            
$inforum["$loggedin[inforum]"]++;
        }
        
$loggedin['musername'] = fetch_musername($loggedin);

        if (
fetch_online_status($loggedin))
        {
            
$numbervisible++;
            eval(
'$activeusers .= ", ' fetch_template('forumhome_loggedinuser') . '";');
        }
    }

    
// memory saving
    
unset($userinfos$loggedin);

    
$activeusers substr($activeusers 2); // get rid of initial comma

    
$DB_site->free_result($loggedins);

    
$totalonline $numberregistered $numberguest;
    
$numberinvisible $numberregistered $numbervisible;

    
// ### MAX LOGGEDIN USERS ################################ 



And also How to change message and connected users area BG without killing the style sheet ?

manguish 11-11-2004 10:34 AM

Great chat room mod.

BUT : I have a number of usergroups banned from the chat - it bans them ok, and shows the right error message - HOWEVER - they still show within the chat room who's in the chat box while they are reading the error message.

Any ideas?

manguish 11-11-2004 10:50 AM

FOR ALL THOSE HAVING PROBLEMS WITH THE WHOs IN THE CHAT ROOM ON THE INDEX :

If you haven't got the code as stated in the instructions use this - it is working on my board (3.0.0) :

PHP Code:

// Get the users in vBChat
    
$vbchat_users = array();
    while (
$loggedin $DB_site->fetch_array($forumusers))
    {
        
$userid $loggedin['userid'];
        if (!
$userid)
        {    
// Guest
            
$numberguest++;
            
$inforum["$loggedin[inforum]"]++;
        }
        else if (empty(
$userinfos["$userid"]['lastactivity']) OR ($userinfos["$userid"]['lastactivity'] < $loggedin['lastactivity']))
        {
            
$userinfos["$userid"] = $loggedin;
            
$numberregistered++;
            if (
$userid != $bbuserinfo['userid'])
            {
                
$inforum["$loggedin[inforum]"]++;
            }
            
$loggedin['musername'] = fetch_musername($loggedin);

            if (
fetch_online_status($loggedin))
            {
                
$numbervisible++;
                eval(
'$activeusers .= ", ' fetch_template('forumhome_loggedinuser') . '";');
            }

            if(
preg_match("/vBChat.php/",$loggedin['location']) && $loggedin['userid'])
            {
                
$vbchat_users[$loggedin['userid']] = $loggedin;
            }
        }
    }
    
// Configure Peeps In vBChat
    
$invBChat "";

    if(
is_array($vbchat_users)){
        foreach(
$vbchat_users as $invbc){
            if(
$invBChat == ""){
            
$extra "";
            } else {
            
$extra ", ";
            }

        
// Get Username Style
        
$invbc['musername'] = fetch_musername($invbc);

        
$invBChat .= "{$extra}<a href='member.php?{$session['sessionurl']}&u={$invbc['userid']}'>{$invbc['musername']}</a>";
        }
    }

    if(
$invBChat == ""){
    
$invBChat "<i>No one is currently inside vBChat</i>";
    } 

Replace the bit it says in the instructions with that ;)

jeremy 11-11-2004 02:16 PM

Quote:

Originally Posted by Cornolio
it's a great hack, but.. i've got this error:
Code:

Parse error: parse error, unexpected T_VARIABLE in /web/htdocs/www.discutere.it/home/admincp/index.php on line 567
:confused:
at that line there's
Code:

$printhr = false;
can you help me?
tnx :)

change
PHP Code:

    $printhr true ;
    
construct_nav_option 'vBChat Options''admin_vbchat.php''<br />' ) ;
    
construct_nav_option 'vBChat Room Control''admin_vbchat.php?do=room''<br />' ) ;
    
construct_nav_option 'vBChat Prune Options''admin_vbchat.php?do=prune''<br />' ) ;
    
construct_nav_group 'vBChat Control''<hr />' 
    
$printhr false

to
PHP Code:

    $printhr true ;
    
construct_nav_option 'vBChat Options''admin_vbchat.php''<br />' ) ;
    
construct_nav_option 'vBChat Room Control''admin_vbchat.php?do=room''<br />' ) ;
    
construct_nav_option 'vBChat Prune Options''admin_vbchat.php?do=prune''<br />' ) ;
    
construct_nav_group 'vBChat Control''<hr />' ) ;
    
$printhr false


Cornolio 11-11-2004 03:07 PM

omg, it was just ";" :surprised:
thanks :)

owen100 11-11-2004 03:37 PM

Looking forward to getting this installed but a BIG problem for me ....

I've changed all the php files other than the admin/index.php file. If I add that extra code, when I try log on to my admin control panel, I don't get a log-in box or access, just a blank screen. The rest of the forum works fine. What's wrong with my admin/index.php file?

This is what it is currently without the extra code added

Code:

<?php
/*======================================================================*\
|| #################################################################### ||
|| # vBulletin 3.0.3 - Licence Number xxxxxxx
|| # ---------------------------------------------------------------- # ||
|| # Copyright ?2000?2004 Jelsoft Enterprises Ltd. All Rights Reserved. ||
|| # This file may not be redistributed in whole or significant part. # ||
|| # ---------------- VBULLETIN IS NOT FREE SOFTWARE ---------------- # ||
|| # http://www.vbulletin.com | http://www.vbulletin.com/license.html # ||
|| #################################################################### ||
\*======================================================================*/

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

// ##################### DEFINE IMPORTANT CONSTANTS #######################
define('CVS_REVISION', '$RCSfile: index.php,v $ - $Revision: 1.211 $');
define('NO_REGISTER_GLOBALS', 1);

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

// ########################## REQUIRE BACK-END ############################
require_once('./global.php');

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

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

// #############################################################################

globalize($_REQUEST, array(
        'redirect' => STR,
        'nojs' => INT,
        'loc' => STR_NOHTML
));

// #############################################################################
// ################################## REDIRECTOR ###############################
// #############################################################################

if (!empty($redirect))
{
        require_once('./includes/functions_login.php');
        $redirect = fetch_replaced_session_url($redirect);

        print_cp_header($vbphrase['redirecting_please_wait'], '', "<meta http-equiv=\"Refresh\" content=\"0; URL=$redirect\">");
        echo "<p>&nbsp;</p><blockquote><p>$vbphrase[redirecting_please_wait]</p></blockquote>";
        print_cp_footer();
        exit;
}

// #############################################################################
// ############################### LOG OUT OF CP ###############################
// #############################################################################

if ($_REQUEST['do'] == 'cplogout')
{
        vbsetcookie('cpsession', '', 0);
        $DB_site->query("DELETE FROM " . TABLE_PREFIX . "cpsession WHERE userid = $bbuserinfo[userid] AND hash = '" . addslashes($_COOKIE[COOKIE_PREFIX . 'cpsession']) . "'");
        vbsetcookie('customerid', '', 0);
        exec_header_redirect("index.php?$session[sessionurl_js]");
}

// #############################################################################
// ################################# SAVE NOTES ################################
// #############################################################################

if ($_POST['do'] == 'notes')
{
        globalize($_POST, array('notes' => STR));
        $DB_site->query("
                UPDATE " . TABLE_PREFIX . "administrator
                SET notes = '" . addslashes(htmlspecialchars_uni($notes)) . "'
                WHERE userid = $bbuserinfo[userid]
        ");
        $bbuserinfo['notes'] = htmlspecialchars_uni($notes);
        $_REQUEST['do'] = 'home';
}

// #############################################################################
// ############################### SAVE NAV PREFS ##############################
// #############################################################################

if ($_REQUEST['do'] == 'navprefs')
{
        globalize($_REQUEST, array('numgroups' => INT, 'expand' => INT));

        if ($expand)
        {
                $_REQUEST['navprefs'] = array();
                for ($i = 0; $i < $numgroups; $i++)
                {
                        $_REQUEST['navprefs'][] = $i;
                }
                $_REQUEST['navprefs'] = implode(',', $_REQUEST['navprefs']);
        }
        else
        {
                $_REQUEST['navprefs'] = '';
        }

        $_REQUEST['do'] = 'savenavprefs';
}

if ($_REQUEST['do'] == 'buildnavprefs')
{
        globalize($_REQUEST, array('prefs' => STR, 'dowhat' => STR, 'id' => INT));

        $_tmp = preg_split('#,#', $prefs, -1, PREG_SPLIT_NO_EMPTY);
        $_navprefs = array();

        foreach ($_tmp AS $_val)
        {
                $_navprefs["$_val"] = $_val;
        }
        unset($_tmp);

        if ($dowhat == 'collapse')
        {
                // remove an item from the list
                unset($_navprefs["$id"]);
        }
        else
        {
                // add an item to the list
                $_navprefs["$id"] = $id;
                ksort($_navprefs);
        }

        $_REQUEST['navprefs'] = implode(',', $_navprefs);
        $_REQUEST['do'] = 'savenavprefs';
}

if ($_REQUEST['do'] == 'savenavprefs')
{
        globalize($_REQUEST, array('navprefs' => STR));

        if (preg_match('#^[0-9,]*$#', $navprefs))
        {
                $DB_site->query("
                        UPDATE " . TABLE_PREFIX . "administrator
                        SET navprefs = '" . addslashes($navprefs) . "'
                        WHERE userid = $bbuserinfo[userid]
                ");
        }

        $_NAVPREFS = preg_split('#,#', $navprefs, -1, PREG_SPLIT_NO_EMPTY);
        $_REQUEST['do'] = 'nav';
}

// #############################################################################
// ################################ BUILD FRAMESET #############################
// #############################################################################

if ($_REQUEST['do'] == 'frames' OR empty($_REQUEST['do']))
{

$navframe = "<frame src=\"index.php?$session[sessionurl]do=nav" . iif($nojs, '&amp;nojs=1') . "\" name=\"nav\" scrolling=\"yes\" frameborder=\"0\" marginwidth=\"0\" marginheight=\"0\" border=\"no\" />\n";
$headframe = "<frame src=\"index.php?$session[sessionurl]do=head\" name=\"head\" scrolling=\"no\" noresize=\"noresize\" frameborder=\"0\" marginwidth=\"10\" marginheight=\"0\" border=\"no\" />\n";
$mainframe = "<frame src=\"" . iif(!empty($loc) AND !preg_match('#^[a-z]+:#i', $loc), $loc, "index.php?$session[sessionurl]do=home") . "\" name=\"main\" scrolling=\"yes\" frameborder=\"0\" marginwidth=\"10\" marginheight=\"10\" border=\"no\" />\n";

?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
<html dir="<?php echo $stylevar['textdirection']; ?>" lang="<?php echo $stylevar['languagecode']; ?>">
<head>
<script type="text/javascript">
<!--
// get out of any containing frameset
if (self.parent.frames.length != 0)
{
        self.parent.location.replace(document.location.href);
}
// -->
</script>
<title><?php echo $vboptions['bbtitle'] . ' ' . $vbphrase['admin_control_panel']; ?></title>
</head>

<?php

if ($stylevar['textdirection'] == 'ltr')
{
// left-to-right frameset
?>
<frameset cols="195,*"  framespacing="0" border="0" frameborder="0" frameborder="no" border="0">
        <?php echo $navframe; ?>
        <frameset rows="20,*"  framespacing="0" border="0" frameborder="0" frameborder="no" border="0">
                <?php echo $headframe; ?>
                <?php echo $mainframe; ?>
        </frameset>
</frameset>
<?php
}
else
{
// right-to-left frameset
?>
<frameset cols="*,195"  framespacing="0" border="0" frameborder="0" frameborder="no" border="0">
        <frameset rows="20,*"  framespacing="0" border="0" frameborder="0" frameborder="no" border="0">
                <?php echo $headframe; ?>
                <?php echo $mainframe; ?>
        </frameset>
        <?php echo $navframe; ?>
</frameset>
<?php
}

?>

<noframes>
        <body>
                <p><?php echo $vbphrase['no_frames_support']; ?></p>
        </body>
</noframes>
</html>
<?php
}

// ################################ MAIN FRAME #############################

if ($_REQUEST['do'] == 'home')
{

print_cp_header($vbphrase['welcome_to_the_vbulletin_admin_control_panel']);

// there have been problems reported with fsockopen() in some PHP versions.
// this should work around it though
if (phpversion() < '4.3.0' OR phpversion() > '4.3.2' OR @ini_get('allow_url_fopen') != 1)
{
        $fp = @fsockopen('version.vbulletin.com', 80, $errno, $errstr, 3);
}
else
{
        $fp = @fopen('http://version.vbulletin.com', 'r');
}
if ($fp)
{
        fclose($fp);
?>
<script type="text/javascript" src="http://version.vbulletin.com/versioncheck.js"></script>
<script type="text/javascript" src="http://version.vbulletin.com/version.js?id=16448fc3"></script>
<script type="text/javascript">
<!--
if (typeof(vb_version) != "undefined" && isNewerVersion("<?php echo $vboptions['templateversion']; ?>", vb_version))
{
        var current_version = "<?php echo $vboptions['templateversion']; ?>";
        var latest_string = "<?php echo $vbphrase['latest_version_available_x']; ?>";
        var current_string = "<?php echo $vbphrase['you_are_running_vbulletin_version_x']; ?>";
        var download_string = "<?php echo $vbphrase['download_vbulletin_x_from_members_area']; ?>";

        document.writeln('<table cellpadding="4" cellspacing="0" border="0" align="center" width="90%" class="tborder"><tr><td class="tcat" align="center"><b><?php echo $vbphrase['there_is_a_newer_vbulletin_version']; ?></b></td></tr><tr><td class="alt1" align="center">');
        document.writeln('<p><b><a href="http://www.vbulletin.com/forum/showthread.ph' + 'p?postid=' + vb_announcementid + '" target="_blank">' + construct_phrase(latest_string, vb_version) + "</a></b></p>");
        document.writeln('<p>' + construct_phrase(current_string, current_version.bold()) + '</p>');
        document.writeln('<p><a href="http://www.vbulletin.com/members/" target="_blank">' + construct_phrase(download_string, vb_version.bold()) + '</a></p>');
        document.writeln('</td></tr></table>');
}
//-->
</script>

<?php
}
// *******************************
// Admin Quick Stats -- Toggable via the CP
if ($vboptions['adminquickstats'])
{

        $waiting = $DB_site->query_first("SELECT COUNT(*) AS users FROM " . TABLE_PREFIX . "user WHERE usergroupid = 4");

        $starttime = mktime(0, 0, 0, date('m'), date('d'), date('Y'));

        $attach = $DB_site->query_first("SELECT SUM(filesize) AS size FROM " . TABLE_PREFIX . "attachment");
        $avatar = $DB_site->query_first("SELECT SUM(filesize) AS size FROM " . TABLE_PREFIX . "customavatar");
        $profile = $DB_site->query_first("SELECT SUM(filesize) AS size FROM " . TABLE_PREFIX . "customprofilepic");

        $newusers = $DB_site->query_first("SELECT COUNT(*) AS count FROM " . TABLE_PREFIX . "user WHERE joindate >= $starttime");
        $newthreads = $DB_site->query_first("SELECT COUNT(*) AS count FROM " . TABLE_PREFIX . "thread WHERE dateline >= $starttime");
        $newposts = $DB_site->query_first("SELECT COUNT(*) AS count FROM " . TABLE_PREFIX . "post WHERE dateline >= $starttime");
        $users = $DB_site->query_first("SELECT COUNT(*) AS count FROM " . TABLE_PREFIX . "user WHERE lastactivity >= $starttime");

        $mysqlversion = $DB_site->query_first("SELECT VERSION() AS version");

        $indexsize = 0;
        $datasize = 0;
        if ($mysqlversion['version'] >= '3.23')
        {
                $DB_site->reporterror = 0;
                $tables = $DB_site->query("SHOW TABLE STATUS");
                $errno = $DB_site->errno;
                $DB_site->reporterror = 1;
                if (!$errno)
                {
                        while ($table = $DB_site->fetch_array($tables))
                        {
                                $datasize += $table['Data_length'];
                                $indexsize += $table['Index_length'];
                        }
                        if (!$indexsize)
                        {
                                $indexsize = $vbphrase['n_a'];
                        }
                        if (!$datasize)
                        {
                                $datasize = $vbphrase['n_a'];
                        }
                }
                else
                {
                        $datasize = $vbphrase['n_a'];
                        $indexsize = $vbphrase['n_a'];
                }
        }

        $DB_site->reporterror = 0;
        if ($variables = $DB_site->query_first("SHOW VARIABLES LIKE 'max_allowed_packet'"))
        {
                $maxpacket = $variables['Value'];
        }
        else
        {
                $maxpacket = $vbphrase['n_a'];
        }
        $DB_site->reporterror = 1;

        $attachcount = $DB_site->query_first("SELECT COUNT(*) AS count FROM " . TABLE_PREFIX . "attachment WHERE visible = 0");
        $eventcount = $DB_site->query_first("SELECT COUNT(*) AS count FROM " . TABLE_PREFIX . "event WHERE visible = 0");

        if (SAPI_NAME == 'apache' AND preg_match('#(Apache)/([0-9\.]+)\s#siU', $_SERVER['SERVER_SOFTWARE'], $wsregs))
        {
                $webserver = "$wsregs[1] v$wsregs[2]";
        }
        else
        {
                $webserver = SAPI_NAME;
        }

        $serverinfo = iif(ini_get('safe_mode') == 1 OR strtolower(ini_get('safe_mode')) == 'on', "<br />$vbphrase[safe_mode]");
        $serverinfo .= iif(ini_get('file_uploads') == 0 OR strtolower(ini_get('file_uploads')) == 'off', "<br />$vbphrase[file_uploads_disabled]");
        $postcount = $DB_site->query_first("SELECT COUNT(*) AS count FROM " . TABLE_PREFIX . "moderation WHERE type='reply'");
        $threadcount = $DB_site->query_first("SELECT COUNT(*) AS count FROM " . TABLE_PREFIX . "moderation WHERE type='thread'");
        $memorylimit = ini_get('memory_limit');

        print_form_header('index', 'home');
        print_table_header($vbphrase['welcome_to_the_vbulletin_admin_control_panel'], 6);
        $firstrow = array(
                $vbphrase['server_type'], PHP_OS . $serverinfo,
                $vbphrase['web_server'], $webserver,
                $vbphrase['mysql'], $mysqlversion['version'],
        );
        print_cells_row($firstrow, 0, 0, -4, 'top', 1, 1);
        print_cells_row(array(
                'PHP', PHP_VERSION,
                $vbphrase['php_max_post_size'], iif(ini_get('post_max_size'), ini_get('post_max_size'), $vbphrase['n_a']),
                $vbphrase['php_memory_limit'], iif($memorylimit AND $memorylimit != '-1', $memorylimit, $vbphrase['none']),
        ), 0, 0, -4, 'top', 1, 1);
        print_cells_row(array(
                $vbphrase['mysql_max_packet_size'], convert_kb_to_mb($maxpacket),
                $vbphrase['database_data_usage'], convert_kb_to_mb($datasize),
                $vbphrase['database_index_usage'], convert_kb_to_mb($indexsize),
        ), 0, 0, -4, 'top', 1, 1);
        print_cells_row(array(
                $vbphrase['attachment_usage'], convert_kb_to_mb($attach['size']),
                $vbphrase['custom_avatar_usage'], convert_kb_to_mb($avatar['size']),
                $vbphrase['custom_profile_picture_usage'], convert_kb_to_mb($profile['size']),
        ), 0, 0, -4, 'top', 1, 1);
        print_cells_row(array(
                $vbphrase['events_awaiting_moderation'], vb_number_format($eventcount['count']) . ' ' . construct_link_code($vbphrase['view'], "../$modcpdir/moderate.php?$session[sessionurl]do=events"),
                $vbphrase['users_awaiting_moderation'], vb_number_format($waiting['users']) . ' ' . construct_link_code($vbphrase['view'], "user.php?$session[sessionurl]do=moderate"),
                $vbphrase['attachments_awaiting_moderation'], vb_number_format($attachcount['count']) . ' ' . construct_link_code($vbphrase['view'], "../$modcpdir/moderate.php?$session[sessionurl]do=attachments"),
        ), 0, 0, -4, 'top', 1, 1);
        print_cells_row(array(
                $vbphrase['posts_awaiting_moderation'], vb_number_format($postcount['count']) . ' ' . construct_link_code($vbphrase['view'], "../$modcpdir/moderate.php?$session[sessionurl]do=posts#postlist"),
                $vbphrase['threads_awaiting_moderation'], vb_number_format($threadcount['count']) . ' ' . construct_link_code($vbphrase['view'], "../$modcpdir/moderate.php?$session[sessionurl]do=posts"),
                $vbphrase['new_users_today'], vb_number_format($newusers['count']),
        ), 0, 0, -4, 'top', 1, 1);
        print_cells_row(array(
                $vbphrase['new_posts_today'], vb_number_format($newposts['count']),
                $vbphrase['new_threads_today'], vb_number_format($newthreads['count']),
                $vbphrase['unique_registered_visitors_today'], vb_number_format($users['count']),
        ), 0, 0, -4, 'top', 1, 1);
        print_table_footer();

}

// *************************************
// Administrator Notes

print_form_header('index', 'notes');
print_table_header($vbphrase['administrator_notes'], 1);
print_description_row("<textarea name=\"notes\" style=\"width: 90%\" rows=\"9\">$bbuserinfo[notes]</textarea>", false, 1, '', 'center');
print_submit_row($vbphrase['save'], 0, 1);

// *************************************
// QUICK ADMIN LINKS

print_table_start();
print_table_header($vbphrase['quick_administrator_links']);

if ($stats = @exec('uptime 2>&1') AND trim($stats) != '')
{
        if (preg_match("#: ([\d.,]+),\s+([\d.,]+),\s+([\d.,]+)$#", $stats, $regs))
        {

                $datecut = TIMENOW - $vboptions['cookietimeout'];
                $guestsarry = $DB_site->query_first("SELECT COUNT(host) AS sessions FROM " . TABLE_PREFIX . "session WHERE userid = 0 AND lastactivity > $datecut");
                $membersarry = $DB_site->query("SELECT DISTINCT userid FROM " . TABLE_PREFIX . "session WHERE userid <> 0 AND lastactivity > $datecut");

                $guests = intval($guestsarry['sessions']);
                $members = intval($DB_site->num_rows($membersarry));

                $regs[1] = vb_number_format($regs[1], 2);
                $regs[2] = vb_number_format($regs[2], 2);
                $regs[3] = vb_number_format($regs[3], 2);

                // ### MAX LOGGEDIN USERS ################################
                $maxusers = unserialize($datastore['maxloggedin']);
                if (intval($maxusers['maxonline']) <= ($guests + $members))
                {
                        $maxusers['maxonline'] = $guests + $members;
                        $maxusers['maxonlinedate'] = TIMENOW;
                        build_datastore('maxloggedin', serialize($maxusers));
                }

                print_label_row($vbphrase['server_load_averages'], "$regs[1]&nbsp;&nbsp;$regs[2]&nbsp;&nbsp;$regs[3] | " . construct_phrase($vbphrase['users_online_x_members_y_guests'], vb_number_format($guests + $members), vb_number_format($members), vb_number_format($guests)), '', 'top', NULL, false);
        }
}

//require_once('./includes/adminfunctions_reminders.php');
//$reminders = fetch_reminders_array();
//print_label_row($vbphrase['due_tasks'], construct_phrase($vbphrase['you_have_x_tasks_due'], $reminders['total']) . construct_link_code($vbphrase['view_reminders'], "reminder.php?$session[sessionurl]"));

if (can_administer('canadminusers'))
{
        print_label_row($vbphrase['quick_user_finder'], '
                <form action="user.php" method="post" style="display:inline">
                <input type="hidden" name="s" value="' . $session['sessionhash'] . '" />
                <input type="hidden" name="do" value="find" />
                <input type="text" class="bginput" name="user[username]" size="30" tabindex="1" />
                <input type="submit" value=" ' . $vbphrase['find'] . ' " class="button" tabindex="1" />
                <input type="submit" class="button" value="' . $vbphrase['exact_match'] . '" tabindex="1" name="user[exact]" />
                </form>
                ', '', 'top', NULL, false
        );
}

print_label_row($vbphrase['php_function_lookup'], '
        <form action="http://www.ph' . 'p.net/manual-lookup.ph' . 'p" method="get" style="display:inline">
        <input type="text" class="bginput" name="function" size="30" tabindex="1" />
        <input type="submit" value=" ' . $vbphrase['find'] . ' " class="button" tabindex="1" />
        </form>
        ', '', 'top', NULL, false
);
print_label_row($vbphrase['mysql_language_lookup'], '
        <form action="http://www.mysql.com/search/" method="get" style="display:inline">
        <input type="hidden" name="doc" value="1" />
        <input type="hidden" name="m" value="o" />
        <input type="text" class="bginput" name="q" size="30" tabindex="1" />
        <input type="submit" value=" ' . $vbphrase['find'] . ' " class="button" tabindex="1" />
        </form>
        ', '', 'top', NULL, false
);
print_label_row($vbphrase['useful_links'], '
        <form style="display:inline">
        <select onchange="if (this.options[this.selectedIndex].value != \'\') { window.open(this.options[this.selectedIndex].value); } return false;" tabindex="1" class="bginput">
                <option value="">-- ' . $vbphrase['useful_links'] . ' --</option>' . construct_select_options(array(
                        'vBulletin' => array(
                                'http://www.vbulletin.com/' => $vbphrase['home_page'] . ' (vBulletin.com)',
                                'http://www.vbulletin.com/members/' => $vbphrase['members_area'],
                                'http://www.vbulletin.com/forum/' => $vbphrase['community_forums'],
                                'http://www.vbulletin.com/docs/html/' => $vbphrase['reference_manual']
                        ),
                        'PHP' => array(
                                'http://www.ph' . 'p.net/' => $vbphrase['home_page'] . ' (PHP.net)',
                                'http://www.ph' . 'p.net/manual/' => $vbphrase['reference_manual'],
                                'http://www.ph' . 'p.net/downloads.ph' . 'p' => $vbphrase['download_latest_version']
                        ),
                        'MySQL' => array(
                                'http://www.mysql.com/' => $vbphrase['home_page'] . ' (MySQL.com)',
                                'http://www.mysql.com/documentation/' => $vbphrase['reference_manual'],
                                'http://www.mysql.com/downloads/' => $vbphrase['download_latest_version'],
                        )
        )) . '</select>
        </form>
        ', '', 'top', NULL, false
);
print_table_footer(2, '', '', false);

// *************************************
// vBULLETIN CREDITS
require_once('./includes/vbulletin_credits.php');

?>

<div class="smallfont" align="center">
<!--<?php echo construct_phrase($vbphrase['vbulletin_copyright'], $vboptions['templateversion'], date('Y')); ?><br />-->
<script type="text/javascript">
<!--
if (typeof(vb_version) != "undefined")
{
        var this_vb_version = "<?php echo $vboptions['templateversion']; ?>";
        if (isNewerVersion(this_vb_version, vb_version))
        {
                document.writeln('<a href="http://www.vbulletin.com/forum/showthread.ph' + 'p?postid=' + vb_announcementid + '" target="_blank">' + construct_phrase(latest_string, vb_version) + '</a><br />' + construct_phrase(current_string, this_vb_version.bold()));
        }
        else
        {
                document.write(construct_phrase('<?php echo $vbphrase['your_version_of_vbulletin_is_up_to_date']; ?>', this_vb_version));
        }
}
// -->
</script>
</div>

<?php

echo $reminders['script'];

unset($DEVDEBUG);
print_cp_footer();

}

// ################################ NAVIGATION FRAME #############################

if ($_REQUEST['do'] == 'nav')
{
        require_once('./includes/adminfunctions_navpanel.php');
        print_cp_header();

        echo "\n<div>";
        ?><img src="../cpstyles/<?php echo $vboptions['cpstylefolder']; ?>/cp_logo.gif" title="<?php echo $vbphrase['admin_control_panel']; ?>" alt="" border="0" hspace="4" <?php $df = print_form_middle("16448fc3"); ?> vspace="4" /><?php
        echo "</div>\n\n" . iif(is_demo_mode(), "<div align=\"center\"><b>DEMO MODE</b></div>\n\n") . "<div style=\"width:168px; padding: 4px\">\n";

        // cache nav prefs
        can_administer();

        construct_nav_spacer();

        // *************************************************

        $printhr = false;
        if (can_administer('canadminsettings'))
        {
                $printhr = true;
                construct_nav_option($vbphrase['vbulletin_options'], 'options.php?null=0', '<br />');
                if ($debug == 1)
                {
                        construct_nav_option($vbphrase['admin_help_manager'], 'help.php?do=manage&script=NOSCRIPT');
                }
                construct_nav_group($vbphrase['vbulletin_options'], '<hr />');
        }
        if ($printhr == true)
        {
                construct_nav_spacer();
        }

        // *************************************************
       

$printhr = false;
construct_nav_option("General Settings", 'arcadeadmin.php?do=general', '<br />');
construct_nav_option("Game Settings", 'arcadeadmin.php?do=games', '<br />');
construct_nav_option("Score Settings", 'arcadeadmin.php?do=scores', '<br />');
construct_nav_option("Challenges", 'arcadeadmin.php?do=challenges', '<br />');
construct_nav_group("Arcade", '<hr />');
        if (can_administer('canadminstyles'))
        {
                $printhr = true;
                construct_nav_option($vbphrase['style_manager'], 'template.php?do=modify', '<br />');
                construct_nav_option($vbphrase['search_in_templates'], 'template.php?do=search', '<br />');
                construct_nav_option($vbphrase['replacement_variable_manager'], 'replacement.php?do=modify', '<br />');
                construct_nav_option($vbphrase['download_upload_styles'], 'template.php?do=files', '<br />');
                construct_nav_option($vbphrase['find_updated_templates'], 'template.php?do=findupdates', '<br />');
                construct_nav_group("$vbphrase[styles] &amp; $vbphrase[templates]", '<hr />');
        }
        // ***
        if (can_administer('canadminlanguages'))
        {
                $printhr = true;
                construct_nav_option($vbphrase['language_manager'], 'language.php?do=modify', '<br />');
                construct_nav_option($vbphrase['phrase_manager'], 'phrase.php?do=modify&phrasetypeid=1', '<br />');
                construct_nav_option($vbphrase['search_in_phrases'], 'phrase.php?do=search', '<br />');
                construct_nav_option($vbphrase['download_upload_languages'], 'language.php?do=files');
                construct_nav_group("$vbphrase[languages] &amp; $vbphrase[phrases]", '<hr />');
        }
        // ***
        if (can_administer('canadminfaq'))
        {
                $printhr = true;
                construct_nav_option($vbphrase['faq_manager'], 'faq.php?null=0', '|');
                construct_nav_option($vbphrase['add_new_faq_item'], 'faq.php?do=add');
                construct_nav_group($vbphrase['faq']);
        }
        if ($printhr == true)
        {
                construct_nav_spacer();
        }

        // *************************************************

        construct_nav_option($vbphrase['announcement_manager'], 'announcement.php?do=modify', '|');
        construct_nav_option($vbphrase['add_new_announcement'], 'announcement.php?do=add');
        construct_nav_group($vbphrase['announcements']);
        // ***
        if (can_administer('canadminforums'))
        {
                construct_nav_option($vbphrase['forum_manager'], 'forum.php?do=modify', '|');
                construct_nav_option($vbphrase['add_new_forum'], 'forum.php?do=add', '|');
                construct_nav_option($vbphrase['forum_permissions'], 'forumpermission.php?do=modify', '<br />');
                construct_nav_option($vbphrase['show_all_moderators'], 'moderator.php?do=showlist', '<br />');
                construct_nav_option($vbphrase['view_permissions'], 'resources.php');
                construct_nav_group("$vbphrase[forums] &amp; $vbphrase[moderators]");
        }
        construct_nav_spacer();

        // *************************************************

        $printhr = false;
        if (can_administer('canadmincalendars'))
        {
                $printhr = true;
                construct_nav_option($vbphrase['calendar_manager'], 'admincalendar.php?do=modify', '|');
                construct_nav_option($vbphrase['add_new_calendar'], 'admincalendar.php?do=add', '|');
                construct_nav_option($vbphrase['calendar_permissions'], 'calendarpermission.php?do=modify', '<br />');
                construct_nav_option($vbphrase['holiday_manager'], 'admincalendar.php?do=modifyholiday', '<br />');
                construct_nav_group("$vbphrase[calendars] &amp; $vbphrase[moderators]");
        }
        if ($printhr == true)
        {
                construct_nav_spacer();
        }

        // *************************************************

        if (can_administer('canadminthreads'))
        {
                construct_nav_option($vbphrase['prune'], 'thread.php?do=prune', '|');
                construct_nav_option($vbphrase['move'], 'thread.php?do=move', '|');
                construct_nav_option($vbphrase['unsubscribe'], 'thread.php?do=unsubscribe', '<br />');
                construct_nav_option($vbphrase['strip_poll'], 'thread.php?do=killpoll', '|');
                construct_nav_option($vbphrase['who_voted'], 'thread.php?do=votes');
                construct_nav_group("$vbphrase[threads] &amp; $vbphrase[posts]");
        }
        // ***
        construct_nav_option($vbphrase['moderate_threads'], "../$modcpdir/moderate.php?do=posts", '<br />');
        construct_nav_option($vbphrase['moderate_posts'], "../$modcpdir/moderate.php?do=posts#posts", '<br />');
        construct_nav_option($vbphrase['moderate_attachments'], "../$modcpdir/moderate.php?do=attachments", '<br />');
        construct_nav_option($vbphrase['moderate_events'], "../$modcpdir/moderate.php?do=events");
        construct_nav_group($vbphrase['moderation'], '<hr />', "$df");
        // ***
        if (can_administer('canadminthreads'))
        {
                construct_nav_option($vbphrase['search'], 'attachment.php?do=intro', '|');
                construct_nav_option($vbphrase['moderate_attachments'], "../$modcpdir/moderate.php?do=attachments", '|');
                construct_nav_option($vbphrase['attachment_statistics'], 'attachment.php?do=stats', '<br />');
                construct_nav_option($vbphrase['attachment_storage_type'], 'attachment.php?do=storage', '<br />');
                construct_nav_option($vbphrase['extensions_and_sizes'], 'attachment.php?do=types');
                construct_nav_group($vbphrase['attachments']);
        }
        construct_nav_spacer();

        // *************************************************

        $printhr = false;
        if (can_administer('canadminusers'))
        {
                $printhr = true;
                construct_nav_option($vbphrase['add_new_user'], 'user.php?do=add', '|');
                construct_nav_option($vbphrase['search_for_users'], 'user.php?do=modify', '|');
                construct_nav_option($vbphrase['merge_users'], 'usertools.php?do=merge', '|');
                construct_nav_option($vbphrase['ban_user'], "../$modcpdir/banning.php?do=banuser", '<br />');
                construct_nav_option($vbphrase['prune_users'], 'user.php?do=prune', '|');
                construct_nav_option($vbphrase['private_message_statistics'], 'usertools.php?do=pmstats', '<br />');
                construct_nav_option($vbphrase['referrals'], 'usertools.php?do=referrers', '|');
                construct_nav_option($vbphrase['search_ip_addresses'], 'usertools.php?do=doips', '<br />');
                construct_nav_option($vbphrase['view_banned_users'], "../$modcpdir/banning.php?do=modify", '<br />');
                construct_nav_option($vbphrase['send_email_to_users'], 'email.php?do=start', '|');
                construct_nav_option($vbphrase['generate_mailing_list'], 'email.php?do=genlist', '<br />');
                construct_nav_option($vbphrase['access_masks'], 'accessmask.php?do=modify', '<br />');
                construct_nav_group($vbphrase['users']);
        }
        // ***
        if (can_administer('canadminpermissions'))
        {
                $printhr = true;
                construct_nav_option($vbphrase['usergroup_manager'], 'usergroup.php?do=modify', '|');
                construct_nav_option($vbphrase['add_new_usergroup'], 'usergroup.php?do=add', '|');
                construct_nav_option($vbphrase['join_requests'], "usergroup.php?do=viewjoinrequests", '<br />');
                construct_nav_option($vbphrase['promotions'], "usergroup.php?do=modifypromotion", '<br />');
                construct_nav_option($vbphrase['forum_permissions'], 'forumpermission.php?do=modify', '<br />');
                construct_nav_option($vbphrase['administrator_permissions'], 'adminpermissions.php?do=modify');
                construct_nav_group($vbphrase['usergroups']);
        }
        // ***
        if (can_administer('canadminusers'))
        {
                $printhr = true;
                construct_nav_option($vbphrase['user_title_manager'], 'usertitle.php?do=modify', '|');
                construct_nav_option($vbphrase['add_new_user_title'], 'usertitle.php?do=add');
                construct_nav_group($vbphrase['user_titles']);
                // ***
                construct_nav_option($vbphrase['user_rank_manager'], 'ranks.php?do=modify', '|');
                construct_nav_option($vbphrase['add_new_user_rank'], 'ranks.php?do=add');
                construct_nav_group($vbphrase['user_ranks']);
                // ***
                construct_nav_option($vbphrase['user_reputation_manager'], 'adminreputation.php?do=modify', '|');
                construct_nav_option($vbphrase['add_new_user_reputation'], 'adminreputation.php?do=add');
                construct_nav_option($vbphrase['view_reputation_comments'], 'adminreputation.php?do=list');
                construct_nav_group($vbphrase['user_reputations']);
                // ***
                construct_nav_option($vbphrase['user_profile_field_manager'], 'profilefield.php?do=modify', '|');
                construct_nav_option($vbphrase['add_new_user_profile_field'], 'profilefield.php?do=add');
                construct_nav_group($vbphrase['user_profile_fields'], '<hr />');
        }
// ***
        if (can_administer('canadminthreads'))
        {
                $printhr = false;
                construct_nav_option($vbphrase['subscription_manager'], 'subscriptions.php?do=modify', '|');
                construct_nav_option($vbphrase['add_new_subscription'], 'subscriptions.php?do=add');
                construct_nav_group($vbphrase['subscriptions'], '<hr />');
        }
        // ***
        $printhr = true;
        construct_nav_option('Shout Manager', 'shout.php?do=modify', '|');
        construct_nav_group('Shoutbox', '<hr />');

        if ($printhr == true)
        {
                construct_nav_spacer();
        }

        // *************************************************

        $printhr = false;
        if (can_administer('canadminimages'))
        {
                $printhr = true;
                construct_nav_option($vbphrase['avatar_manager'], 'image.php?do=modify&table=avatar', '|');
                construct_nav_option($vbphrase['add_new_avatars'], 'image.php?do=add&table=avatar', '<br />');
                construct_nav_option($vbphrase['upload_avatar'], 'image.php?do=upload&table=avatar', '|');
                construct_nav_option($vbphrase['avatar_storage_type'], 'avatar.php?do=storage', '<br />');
                construct_nav_group($vbphrase['avatars']);
                // ***
                construct_nav_option($vbphrase['post_icon_manager'], 'image.php?do=modify&table=icon', '|');
                construct_nav_option($vbphrase['add_new_post_icon'], 'image.php?do=add&table=icon', '|');
                construct_nav_option($vbphrase['upload_post_icon'], 'image.php?do=upload&table=icon', '<br />');
                construct_nav_group($vbphrase['post_icons']);
                // ***
                construct_nav_option($vbphrase['smilie_manager'], 'image.php?do=modify&table=smilie', '|');
                construct_nav_option($vbphrase['add_new_smilie'], 'image.php?do=add&table=smilie', '|');
                construct_nav_option($vbphrase['upload_smilie'], 'image.php?do=upload&table=smilie', '<br />');
                construct_nav_group($vbphrase['smilies']);
        }
        // ***
        if (can_administer('canadminbbcodes'))
        {
                $printhr = true;
                construct_nav_option($vbphrase['bb_code_manager'], 'bbcode.php?do=modify', '|');
                construct_nav_option($vbphrase['add_new_bb_code'], 'bbcode.php?do=add');
                construct_nav_group($vbphrase['custom_bb_codes'], '<hr />');
        }
        if ($printhr == true)
        {
                construct_nav_spacer();
        }

        // *************************************************

        if (can_administer('canadmincron'))
        {
                construct_nav_option($vbphrase['scheduled_task_manager'], 'cronadmin.php?do=modify', '|');
                construct_nav_option($vbphrase['add_new_scheduled_task'], 'cronadmin.php?do=edit', '<br />' );
                construct_nav_option($vbphrase['scheduled_task_log'], 'cronlog.php?do=choose', '<br />');
                construct_nav_group($vbphrase['scheduled_tasks']);
        }
        // ***
        construct_nav_option($vbphrase['statistics'], 'stats.php?do=index', '<br />');
        construct_nav_option($vbphrase['control_panel_log'], 'adminlog.php?do=choose', '|');
        construct_nav_option($vbphrase['moderator_log'], 'modlog.php?do=choose', '<br />');
        construct_nav_option($vbphrase['scheduled_task_log'], 'cronlog.php?do=choose', '<br />');
        if (!empty($vboptions['errorlogdatabase']) OR !empty($vboptions['errorlogsecurity']))
        {
                construct_nav_option($vbphrase['log_manager'], 'adminlog.php?do=logfiles', '<br />');
        }
        construct_nav_group("$vbphrase[statistics] &amp; $vbphrase[logs]", '<hr />');
        construct_nav_spacer();

        // *************************************************

        $printhr = false;
        if (can_administer('canadminmaintain'))
        {
                $printhr = true;
                construct_nav_option($vbphrase['database_backup'], 'backup.php?do=choose', '<br />');
                construct_nav_option($vbphrase['repair_optimize_tables'], 'repair.php?do=list', '<br />');
                construct_nav_option($vbphrase['update_counters'], 'misc.php?do=chooser', '|');
                construct_nav_option($vbphrase['diagnostics'], 'diagnostic.php?do=list', '<br />');
                if (file_exists('./impex/index.php'))
                {
                        construct_nav_option("$vbphrase[import] / $vbphrase[export]", '../impex/index.php', '<br />');
                }
                construct_nav_option($vbphrase['execute_sql_query'], 'queries.php?do=modify');
                construct_nav_option($vbphrase['view_php_info'], 'index.php?do=phpinfo');
                construct_nav_group("$vbphrase[import] &amp; $vbphrase[maintenance]");
        }
        if ($printhr == true)
        {
                construct_nav_spacer();
        }

        print_nav_panel();

        echo "</div>\n";
        // *************************************************

        define('NO_CP_COPYRIGHT', true);
        unset($DEVDEBUG);
        print_cp_footer();

}

// #############################################################################
// ################################# HEADER FRAME ##############################
// #############################################################################

if ($_REQUEST['do'] == 'head')
{
        ignore_user_abort(true);

        define('IS_NAV_PANEL', true);
        if (phpversion() < '4.3.0' OR phpversion() > '4.3.2' OR @ini_get('allow_url_fopen') != 1)
        {
                $fp = @fsockopen('version.vbulletin.com', 80, $errno, $errstr, 3);
        }
        else
        {
                $fp = @fopen('http://version.vbulletin.com', 'r');
        }
        $headjs = '';
        if ($fp)
        {
                fclose($fp);
                $headjs = '<script type="text/javascript" src="http://version.vbulletin.com/version.js?id=16448fc3"></script>';
        }
        print_cp_header('', '', $headjs);

        ?>
        <script type="text/javascript">
        <!--
        if (typeof(vb_version) == "undefined")
        {
                var vb_version = '<?php echo $vbphrase['n_a']; ?>';
        }
        // -->
        </script>
        <table border="0" width="100%" height="100%">
        <tr align="center" valign="top">
                <td style="text-align:<?php echo $stylevar['left']; ?>"><a href="http://www.vbulletin.com/" target="_blank"><b><?php echo $vbphrase['admin_control_panel']; ?></b> (vBulletin <?php echo $versionnumber.print_form_middle("16448fc3"); ?>)<?php echo iif(is_demo_mode(), ' <b>DEMO MODE</b>'); ?></a></td>
                <td><a href="http://www.vbulletin.com/members/" target="_blank"><script type="text/javascript"> document.write(construct_phrase('<?php echo $vbphrase['latest_version_available_x']; ?>', vb_version));</script></a></td>
                <td style="white-space:nowrap; text-align:<?php echo $stylevar['right']; ?>; font-weight:bold">
                        <a href="../<?php echo $vboptions['forumhome']; ?>.php?<?php echo $session['sessionurl']; ?>" target="_blank"><?php echo $vbphrase['forum_home_page']; ?></a>
                        |
                        <a href="index.php?<?php echo $session['sessionurl']; ?>do=cplogout" onclick="return confirm('<?php echo $vbphrase['sure_you_want_to_log_out_of_cp']; ?>');"  target="_top"><?php echo $vbphrase['log_out']; ?></a>
                </td>
        </tr>
        </table>
        <?php

        define('NO_CP_COPYRIGHT', true);
        unset($DEVDEBUG);
        print_cp_footer();

}

// ################################ SHOW PHP INFO #############################

if ($_REQUEST['do'] == 'phpinfo')
{
        phpinfo();
        exit;
}

/*======================================================================*\
|| ####################################################################
|| # Downloaded: 02:34, Sat Aug 14th 2004
|| # CVS: $RCSfile: index.php,v $ - $Revision: 1.211 $
|| ####################################################################
\*======================================================================*/
?>


spence2 11-11-2004 03:49 PM

Owen100,

I would remove the license number from your post ... too much information for "bad guys." Sorry I can't help you with your problem, but I'm sure someone will.

Blam Forumz 11-11-2004 04:15 PM

'Bad Guys' cant see the code tag unless they are licensed ;)

freakz 11-11-2004 04:18 PM

I get this error when trying to change anything in the admin control panel......

anyone able to tell how to fix this????

thanks

Database error in vBulletin 3.0.1:

Invalid SQL: update vbchat_datastore set d_online='yes',d_allowbbcode='yes',d_bannedgroups= '11|9|3|1|4',d_bannedusers='', d_chat_order='bottom',d_smiliedisplay='0',d_smilie amount='0',d_allowbantag='0',d _maxrooms='0' where did='1'
mysql error: Unknown column 'd_smiliedisplay' in 'field list'

mysql error number: 1054

freakz 11-11-2004 04:22 PM

I tried to reinstall and I get this when I do database mods

Database error in vBulletin 3.0.1:

Invalid SQL: alter table vb3_vbchat_datastore
add d_smiliedisplay tinyint(2) not null default '1',
add d_smilieamount int(15) not null default '10',
add d_allowbantag tinyint(2) not null default '1',
add d_chatrooms text not null default '',
add d_maxrooms int(15) not null default '5';
mysql error: Table 'freakz_vbulletin.vb3_vbchat_datastore' doesn't exist

mysql error number: 1146
__________________________________________________ ________________

Any help with this????

thanks

spence2 11-11-2004 04:46 PM

Quote:

Originally Posted by Blam Forumz
'Bad Guys' cant see the code tag unless they are licensed ;)

Oops, how could I have forgotten that everybody with a license is a "good guy"? :nervous:

Blam Forumz 11-11-2004 05:06 PM

Quote:

Originally Posted by spence2
Oops, how could I have forgotten that everybody with a license is a "good guy"? :nervous:


Well, im making a generlisation, but most people with licenses would think its stupid to use another license? They could just use the one they own again whcih would also be illegal

spence2 11-11-2004 05:14 PM

I think you're right! Most of us are the good guys here (heck, I actually paid for two licenses!) ... but I still think it may not be such a good practice to share your license info with everyone.
Anyhoo, have a good one!


All times are GMT. The time now is 08:18 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.03198 seconds
  • Memory Usage 2,258KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (9)bbcode_code_printable
  • (8)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
  • (1)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