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-23-2005 05:34 PM

problems with functions.php
 
im testing this mod on my localhost...
all the files seems to be working fine exept functions.php
when I upload the edited functions.php the forum starts giving me a blank page
when I restore the old file, the forum works again!!!

I believe I did all the modifications just fine for that topic...
I donno what's happening!!

same thing goes to functions_showthread.php :\

sv1cec 05-23-2005 06:07 PM

Not very specific. Where does it give you a blank page? The functions.php modification is just two things, replace the global declaration and add a section of code. Also, you need to create a new phrase. That's it. Where do you get the blank page?

And when you say "the same thing goes to functions_showthread.php" what do you mean? You also get a blank page? Where?

Rgds

Snitz 05-23-2005 06:31 PM

when I replace functions_showthread.php, it starts giving me a blank page on showthread.php
and when I replace functions.php, it gives me a blank page on the whole forum.

I did create the new phrase you mentioned in ur instructions text!

sv1cec 05-23-2005 07:09 PM

Check the changes again. The changes in functions.php affect only the case, when a banned member tries to log in the forum. There is no reason to get a blank page if the change was done properly.

If you can't find the problem yourself, maybe you can let me have a look.

Rgds

Snitz 05-23-2005 07:13 PM

i'd be more than happen for you to have a look, but I found an error, it seems the mysql didn't install, coz when I went to "Execute Query" and ran the mysql code, it gave me the following

Code:

An error occurred while attempting to execute your query. The following information was returned.
error number: 1103
error desc: Incorrect table name '" . TABLE_PREFIX . "setting'


Marco van Herwaarden 05-23-2005 08:00 PM

What editor did you use?

Snitz 05-23-2005 08:08 PM

dreamweaver

why ? :confused:

Marco van Herwaarden 05-24-2005 04:24 AM

Dreamweaver is known for causing problems like this. Tr re-edit your files with a normal text based editor.

Snitz 05-24-2005 08:07 AM

i've been using dreamweaver since ever!!
never caused such problem :\
anyway I will try....

sv1cec, can you take a look at the code in my site plz?

sv1cec 05-24-2005 08:10 AM

I can, but you'll have to give me ftp and admin access. Email me or PM me.

Also, in order to run the queries manually, you have to change the ".TABLE_PREFIX." part, to the table prefix you are using (if you are using one), or remove it all together, if you are not using a table prefix.

Rgds

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 12:32 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.01103 seconds
  • Memory Usage 1,743KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (3)bbcode_code_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (12)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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete