View Full Version : Guests cannot click adoptables
Hall of Famer
03-29-2012, 01:47 AM
Guests cannot click adoptables, even if they havent done that already...
It seems that the new script is somewhat hostile to guests, several privileges have been removed from unregistered users. Though most are supposed to be the way they are, this one is not and clearly a glitch. I've fixed this bug and it will not appear in Mys v1.3.1 and other future releases.
Hall of Famer
03-29-2012, 01:50 AM
So here is the solution for Mys v1.3.0 users. Go to line 52 from your levelup.php and find this:
if($userstatus['canlevel'] == "no"){
Replace the line with the following codes:
if($isloggedin == "yes" and $userstatus['canlevel'] == "no"){
If you need any explanation for this, well, the problem is in the variable $userstatus['canlevel']. For users it evaluates to 'yes' or 'no', but for guests it's simply an empty string that returns neither 'yes' nor 'no'.
solskenn
03-29-2012, 09:35 AM
49. $userstatus = getuserstatus($loggedinname);
50.
51. if(!is_object($voters) and $userstatus['canlevel'] == "yes"){
52.
53. // The number of results is still zero, so we did not vote on this adoptable yet today...
54.
55. // Now we see if the adoptable is frozen by its owner. If it is, we do not level...
That's what I see on mine. I didn't know about the problem till i saw this, but in case I went to the wrong .php it's the one under the public_html directory.
Hall of Famer
03-29-2012, 09:40 AM
Oh my goodness, looks like my levelup.php file is a bit different. But anyway, look at this line:
if(!is_object($voters) and $userstatus['canlevel'] == "yes"){
Replace with:
if($isloggedin == "yes" and $userstatus['canlevel'] == "no"){
$article_content .= "It appears that you have been banned from leveling up adoptables. Please contact an administrator for assistance.";
}
elseif(!is_object($voters)){
And you should be fine.
solskenn
03-29-2012, 12:10 PM
Thank you ^,^ I was worried for a bit there that I went to the wrong directory or area.
vBulletin® v3.8.11, Copyright ©2000-2025, vBulletin Solutions Inc.