Variable [message #27386] |
Tue, 06 September 2005 18:54 |
Melf
Messages: 28 Registered: August 2005 Location: Germany
Karma: 0
|
Junior Member |
|
|
Hello,
Where does the Fudforum put ( or safe ) the variable "$FUD_OPT_1" ?
Thx for your help.
|
|
|
|
Re: Variable [message #27405 is a reply to message #27386] |
Wed, 07 September 2005 09:32 |
Melf
Messages: 28 Registered: August 2005 Location: Germany
Karma: 0
|
Junior Member |
|
|
Hello...
/**
* @return boolean TRUE => System is
* disabled.
*/
function system_closed()
{
$closed = false;
// Readout the status of the forum
return $closed;
}
Maybe u can help me top filout the missing function.
[Updated on: Wed, 07 September 2005 09:33] Report message to a moderator
|
|
|
Re: Variable [message #27415 is a reply to message #27405] |
Wed, 07 September 2005 13:31 |
Ilia
Messages: 13241 Registered: January 2002
Karma: 0
|
Senior Member Administrator Core Developer |
|
|
<?php if (!($GLOBALS['FUD_OPT_1'] & 1)) {
exit("forum is disabled");
} ?>
FUDforum Core Developer
|
|
|
Re: Variable [message #27416 is a reply to message #27415] |
Wed, 07 September 2005 13:49 |
Melf
Messages: 28 Registered: August 2005 Location: Germany
Karma: 0
|
Junior Member |
|
|
Ilia wrote on Wed, 07 September 2005 09:31 |
<?php
forum is disabled");
?>
|
Thank you
But,
Can't I put "$DISABLED_REASON" instead of that ? Because I it is maybe better, if I want to change the Message in the Admin Menu.
If I put that one you wrote in, I alwaz have to change the "forum is disabled", or not ?
and where do I have to put your Code in? Can you maybe show me the final Code ?
[Updated on: Wed, 07 September 2005 13:50] Report message to a moderator
|
|
|
Re: Variable [message #27417 is a reply to message #27416] |
Wed, 07 September 2005 14:25 |
Ilia
Messages: 13241 Registered: January 2002
Karma: 0
|
Senior Member Administrator Core Developer |
|
|
You can use $GLOBALS['DISABLED_REASON'], sure...
Put the code in the place of the comment inside your function.
FUDforum Core Developer
|
|
|
|
|
Re: Variable [message #27421 is a reply to message #27386] |
Wed, 07 September 2005 14:53 |
Melf
Messages: 28 Registered: August 2005 Location: Germany
Karma: 0
|
Junior Member |
|
|
But when I fill the Code into the Index.php file and cut this part of the index.php instead, nothing does happen and I can still see the whole forum ( http://movie-fact.de/fuforum27/forum/index.php ). Do you know why?
/* before we go on, we need to do some very basic activation checks */
if (!($FUD_OPT_1 & 1)) {
fud_use('errmsg.inc');
exit($DISABLED_REASON . __fud_ecore_adm_login_msg);
}
if (!$FORUM_TITLE && @file_exists($WWW_ROOT_DISK.'install.php')) {
fud_use('errmsg.inc');
exit(__fud_e_install_script_present_error);
}
if ($FUD_OPT_2 & 16384 && $t != 'getfile') {
ob_start(array('ob_gzhandler', (int)$PHP_COMPRESSION_LEVEL));
}
if ($t == 'rview') {
if (isset($_GET['th']) || isset($_GET['goto'])) {
$t = $_GET['t'] = d_thread_view;
} else if (isset($_GET['frm_id'])) {
$t = $_GET['t'] = t_thread_view;
} else {
$t = $_GET['t'] = 'index';
}
} else if (ereg('[^a-z_]', $t) || !@file_exists($WWW_ROOT_DISK . fud_theme . $t . '.php')) {
$t = 'index';
}
if ($FUD_OPT_2 & 524288 && isset($_COOKIE[$COOKIE_NAME.'1']) && $t != 'error') {
fud_use('errmsg.inc');
exit(__fud_banned__);
}
[Updated on: Wed, 07 September 2005 14:54] Report message to a moderator
|
|
|
Re: Variable [message #27422 is a reply to message #27421] |
Wed, 07 September 2005 14:57 |
Ilia
Messages: 13241 Registered: January 2002
Karma: 0
|
Senior Member Administrator Core Developer |
|
|
Did you load GLOBALS.php where the settings are found?
FUDforum Core Developer
|
|
|
|
|
Re: Variable [message #27426 is a reply to message #27423] |
Wed, 07 September 2005 16:43 |
Ilia
Messages: 13241 Registered: January 2002
Karma: 0
|
Senior Member Administrator Core Developer |
|
|
Not sure, I suspect the variable is not in the scope.
FUDforum Core Developer
|
|
|
|
|
Re: Variable [message #27457 is a reply to message #27454] |
Thu, 08 September 2005 20:21 |
Ilia
Messages: 13241 Registered: January 2002
Karma: 0
|
Senior Member Administrator Core Developer |
|
|
Dunno, see what variables are available...
FUDforum Core Developer
|
|
|
|
|
|
Re: Variable [message #27528 is a reply to message #27527] |
Sun, 11 September 2005 17:10 |
Ilia
Messages: 13241 Registered: January 2002
Karma: 0
|
Senior Member Administrator Core Developer |
|
|
Inside the forum's include/ directory.
FUDforum Core Developer
|
|
|
|
Re: Variable [message #27534 is a reply to message #27532] |
Sun, 11 September 2005 17:23 |
Ilia
Messages: 13241 Registered: January 2002
Karma: 0
|
Senior Member Administrator Core Developer |
|
|
You cannot open .php remotely, since you'll get the executed result (empty page) rather the the script.
FUDforum Core Developer
|
|
|
|
Re: Variable [message #27548 is a reply to message #27537] |
Mon, 12 September 2005 14:03 |
Ilia
Messages: 13241 Registered: January 2002
Karma: 0
|
Senior Member Administrator Core Developer |
|
|
The GLOBALS.php file is always available no matter if the forum is online or offline.
FUDforum Core Developer
|
|
|
|
Re: Variable [message #27556 is a reply to message #27553] |
Mon, 12 September 2005 14:37 |
Ilia
Messages: 13241 Registered: January 2002
Karma: 0
|
Senior Member Administrator Core Developer |
|
|
Make sure you include GLOBALS.php from disk.
FUDforum Core Developer
|
|
|
|
Re: Variable [message #27561 is a reply to message #27559] |
Mon, 12 September 2005 14:57 |
Ilia
Messages: 13241 Registered: January 2002
Karma: 0
|
Senior Member Administrator Core Developer |
|
|
You need to make your script owned by the webserver user or disable safe_mode.
FUDforum Core Developer
|
|
|
|
|