vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Advanced Warning System (AWS) (https://vborg.vbsupport.ru/forumdisplay.php?f=105)
-   -   problems with functions.php (https://vborg.vbsupport.ru/showthread.php?t=81909)

Snitz 05-24-2005 10:40 AM

I uploaded the files to my site, and everything worked just fine until I uploaded the modified functions.php, the forum started giving me a blank page... so I had to restore the old file.
and the functions_showthread.php. is working fine now.
I stopped at the funtions.php

just a question, should I edit the template files also so the php files work ???

and sv1cec pm sent, hope u can fix it!

and by the way, in modcp/banning.php, I couldn't find the following as you said in ur instructions text:
Code:

$DB_site->query("
                        UPDATE " . TABLE_PREFIX . "userban SET
                        adminid = $bbuserinfo[userid],
                        bandate = " . TIMENOW . ",
                        liftdate = $liftdate
                        WHERE userid = $user[userid]
                ");

but I found this which is very similar:
Code:

$DB_site->query("
                        UPDATE " . TABLE_PREFIX . "userban SET
                        adminid = $bbuserinfo[userid],
                        bandate = " . TIMENOW . ",
                        liftdate = $liftdate,
                        adminid = $bbuserinfo[userid]
                        WHERE userid = $user[userid]
                ");

the adminid is added twice :confused:
donno thought this might be the problem!

oh I just found something really interested:

Quote:

15. This is not a mandatory change. Apply it, only if you want to display a special message to banned users who try to log in the forums. If the standard "You have no permission..." message is OK for you, do not apply this modification.

Open file includes/functions.php and find:

global $vboptions, $logincode, $url, $bbuserinfo, $session, $stylevar;

Replace that with:

global $DB_site, $vboptions, $logincode, $url, $bbuserinfo, $session, $stylevar;

Then find:

$bbuserinfo['badlocation'] = 1; // Used by exec_shut_down();

Right below that, add:

// Apply this for special message for banned users.
if (($bbuserinfo['usergroupid']==$vboptions['warn_banned_usergroup_id'] OR $bbuserinfo['usergroupid']==$vboptions['warn_troll_usergroup_id']) AND $bbuserinfo['userid'])
{
$ban = $DB_site->query_first("SELECT liftdate FROM " . TABLE_PREFIX . "userban WHERE userid=$bbuserinfo[userid]");
if ($ban['liftdate']=='0')
{
$until="permanently banned";
}
else
{
$until= vbdate ( $vboptions['dateformat'], $ban[liftdate] ) ;
$until=" temporarily banned, until the $until";
}
eval(print_standard_error('nopermission_banned', true));
}
what if im ok with the "You have no permission..." message, would it be ok not to modify functions.php. coz it's not working and causing probs in my forum!

sv1cec 05-24-2005 04:56 PM

We'll make it work for you. But you are right, this is not a mandatory change. As I told you, I'll check your site either later tonight or early tomorrow morning. Please give me some time.

Rgds


All times are GMT. The time now is 01:38 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01007 seconds
  • Memory Usage 1,725KB
  • 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
  • (2)bbcode_code_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (2)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