View Full Version : Blank showthread.php, anyone a wiz on this?
Started setting up my forum, got it to work the way I wanted (to start with) except for one thing, showthread.php ends up all white, so I suppose I've done a doodie in there somewhere. Since this is my first confrontation with vb3 I'm not familiar with it yet.
Think anyone can spot the error? Probably something small & stupid :/
v3Articles, v3Arcade, Statistics hacks installed.
http://www.vajb.se/forums
http://www.vajb.se/forums/showthread.php?t=1
Attaching showthread.php / functions_showthread.php.
[edit]
http://vajb.se/forums/announcement.php?f=2 - didn't work too well either :(
Colin F
08-04-2004, 10:52 AM
Well you get a valid error message if the thread isn't around. (t=88)
I also get a foreach error on line 653 of the functions_showthread file, which when I check in your file is something from the arcade
I think it's missing the $awards variable, but I see a global $awards, so let's have a look at the showthread file as well...
OK, it's not in the showthread file either. I don't know the arcade hack that well.
Go through the instructions again and check if you did everything the way it says...
Okay, so if VB3 misses a variable it just doesn't ignore that "part" but blanks out the page instead?
I'll browse through the arcade straigth away.
Colin F
08-04-2004, 11:05 AM
it doesn't have anything to do with vBulletin but rather with PHP
you inserted code which asked it to do something with a variable. Because it can't find that variable (I'm assuming that's the problem) it displays an error.
Well the only thing that doesn't seem right straight away would be that it instructs me to find;
// ###################### Start getreputationimage #######################
and Add this Above it;
if ($arcadegeneral['awardson']==1) {
// declares the arcade image directory
$stylevar['imgdir_arcade'] = "images/arcade";
$arcade_result = $DB_site->query("SELECT shortname,title,gamesettings,highscorerid,highscor e,miniimage,gameid FROM " . TABLE_PREFIX . "games ");
while ($arcade = $DB_site->fetch_array($arcade_result)){
if (($arcade[gamesettings] & $_GAMESCHECK['showaward'])){
$awards[$arcade[shortname]]['userid'] = $arcade['highscorerid'];
$awards[$arcade[shortname]]['gametitle'] = $arcade['title'];
$awards[$arcade[shortname]]['icon'] = $arcade['miniimage'];
$awards[$arcade[shortname]]['highscore'] = $arcade['highscore'];
$awards[$arcade[shortname]]['gameid'] = $arcade['gameid'];
}
}
}
----------------------------
Though, there is no get reputation image line, but - there is something i thought was similar, which made me add it before that part instead.
// get reputation
if ($vboptions['reputationenable'])
{
fetch_reputation_image($post, $checkperms["$post[userid]"]);
$show['reputation'] = true;
}
else
{
$show['reputation'] = false;
}
-----------------------------
This part did not exist in functions_showthread either:
// sorts through all the stuff to return the postbit template
Where you should place this below it:
// arcade
global $awards,$arcadegeneral;
So i ended up placing it "here" instead:
// arcade
global $awards,$arcadegeneral;
// do alternate postbit types
Colin F
08-04-2004, 11:13 AM
I found the second part.
try looking for this: // ###################### Start getpostbit #######################
function construct_postbit($post, $maintemplatename = 'postbit', $alternate = '')
{
// sorts through all the stuff to return the postbit template
and if you don't find exactly that, try looking for parts of it. It should be around line 85
I coudn't find the first part in the functions_showthread file either...
Sorted the secondpart, dunno how I could've missed it to be honest, still no result from trying to look at threads/announcements, hopeless.
Hmm, tried replacing showthread and includes/functions_showthread with the "original" ones from the vb package, still no result, hence the error is not in there.
This might be the spot for me to express a loud Blah!
Colin F
08-04-2004, 11:26 AM
:)
Once again, try going through the whole instructions...
Already did, think I'll just to the whole install procedure over again in a couple of hours when I get back, something lost track somewhere. Did follow the instructions for the arcade, and the article/ statistics weren't complicated nor deep enough to cause problems i reckon.
I normally just code my own stuff, a cs-gamingleague for a few friends, getting into someone elses code is just the worst thing :)
Xenon
08-04-2004, 04:05 PM
vajb: I have deleted the files from your first post.
Our board rules do not allow to upload full vb files.
Just so you know of next time.
Ouch, very sorry, didn't think that far, kind of obvious rule, point taken :)
Reinstalled from scratch and remade all changes for the arcade, eventually the error occured again so I reuploaded an unmodified file, when I reuploaded global.php the showthread page worked fine again.
==========
global.php
==========
Find:
__________________________________________________ ______________________________ ___________
echo "End call of global.php: $aftertime\n";
echo "\n<hr />\n\n";
}
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ ¯¯¯¯¯ ¯¯¯¯¯¯¯¯¯¯¯
Below this, add:
__________________________________________________ ______________________________ ___________
// Creates general settings for the Arcade
$arcadegeneral = convert_bits_to_array($arcadesettings,$_ARCADE);
$arcadeuser = convert_bits_to_array($bbuserinfo['arcadesettings'],$_ARCADEUSER);
$arcadepermissions = convert_bits_to_array($permissions['arcadepermissions'],$_BITFIELD['usergroup']['arcadepermissions']);
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ ¯¯¯¯¯ ¯¯¯¯¯¯¯¯¯¯¯
==============
Save and Close
==============
So its something in there in global.php that my forum just doesnt like (unmodified except for this install of the arcade)
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.