The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
"Remote Vb login" from webpage blows up with forum is "closed"
Im using the remote login to vb from the front of my webpage, basically it includes the functions and login script and displays it in a small table on the website portion of the site.
when the board is turned off, it in turn kills the webpage as well. What i'd like to do is make it just change that info in the table so i can display the board is closed message from vb. any ideas? http://www.turbobricks.com is the site |
#2
|
||||
|
||||
Ok, maybe this will help... In simple terms, when i turn off the board, the site with the remote login "turns off" as well. What i'd like is a simple IF statement to say "if the boards off - instead of the login boxes, use the vb supplied message/text saying the boards unavailable" not do it as the whole page with broken links and all.
This is the code (sorry i dont remember who wrote it from where) thats in the index.php of my main website page: PHP Code:
PHP Code:
|
#3
|
||||
|
||||
*bump* can anyone make a suggestion, or at least point me in the right direction? Basically if i knew what/how to check for "if the board=off" i can write the rest (i think)
|
#4
|
||||
|
||||
i cant imagine no ones done this before... perhaps i should hire someone lol
|
#5
|
||||
|
||||
In global.php is this code which I'm sure you can modify for your own needs:
Code:
// check that board is active - if not admin, then display error if (!$vboptions['bbactive'] AND THIS_SCRIPT != 'login') { if (!($permissions['adminpermissions'] & CANCONTROLPANEL)) { $show['enableforumjump'] = true; eval('standard_error("' . str_replace("\'", "'", addslashes($vboptions['bbclosedreason'])) . '");'); unset($shutdownqueries['lastvisit']); } else { // show the board disabled warning message so that admins don't leave the board turned off by accident eval('$warning = "' . fetch_template('board_inactive_warning') . '";'); $header = $warning . $header; $footer .= $warning; } } |
#6
|
||||
|
||||
yeah but how would i be able to differenciate between the remote login from the website vs. the board?
|
#7
|
||||
|
||||
bump from back in time... still wondering about this. Basically looking to write in a condition that can tell where the visitor is coming from
|
#8
|
||||
|
||||
OK... question... In the latest version of global.php... the code includes the following in teh initial if statement:
Code:
// ############################################################################# // check that board is active - if not admin, then display error if (!$vbulletin->options['bbactive'] AND THIS_SCRIPT != 'login') { if (!($vbulletin->userinfo['permissions']['adminpermissions'] & $vbulletin->bf_ugp_adminpermissions['cancontrolpanel'])) { if (THIS_SCRIPT == 'external') ... does this mean that on the site index where i've been requiring the global.php script... i can also add a variable: THIS_SCRIPT == 'external'; and this should tell global.php to not jack up my website while the board is down? --------------- Added [DATE]1252648758[/DATE] at [TIME]1252648758[/TIME] --------------- well i tried defining this_script as external and that just made a blank page. oh well. --------------- Added [DATE]1252651424[/DATE] at [TIME]1252651424[/TIME] --------------- eureka! So anyways... heres what i did in case anyone needs it. In the script to display the login box on my index page i encompassed the whole thing with the following: Code:
if ($vbulletin->options['bbactive']!=0){ //code for normal login/avatar/etc } else { //warning about board being closed } |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|