Mysidia Adoptables Support Forum  

Home Community Mys-Script Creative Off-Topic
Go Back   Mysidia Adoptables Support Forum > Community Board > Mysidia Adoptables Official Announcement

Notices

Closed Thread
 
Thread Tools Display Modes
  #41  
Old 04-09-2012, 05:17 AM
Hall of Famer's Avatar
Hall of Famer Hall of Famer is offline
Administrator, Lead Coder
 
Join Date: Dec 2008
Location: South Brunswick
Posts: 4,448
Gender: Male
Credits: 329,572
Hall of Famer is on a distinguished road
Default

Oh wait a sec what is this about? The glitch you have after trying to manipulate the register.php and login.php files?
__________________


Mysidia Adoptables, a free and ever-improving script for aspiring adoptables/pets site.
  #42  
Old 04-09-2012, 05:35 AM
SilverDragonTears's Avatar
SilverDragonTears SilverDragonTears is offline
I am your Nemesis.
 
Join Date: Jun 2011
Posts: 1,113
Gender: Female
Credits: 82,019
SilverDragonTears is on a distinguished road
Default

No. This is a fresh install without modifying the files.
__________________

Check out SilvaTales
  #43  
Old 04-09-2012, 05:50 AM
Hall of Famer's Avatar
Hall of Famer Hall of Famer is offline
Administrator, Lead Coder
 
Join Date: Dec 2008
Location: South Brunswick
Posts: 4,448
Gender: Male
Credits: 329,572
Hall of Famer is on a distinguished road
Default

Oh a fresh install? I believe the problem is not with the script since I've installed/upgraded the script on my dev demo server for many times and never had problem leveling up/clicking adoptables.

Edit:
I visited your site and tested the levelup.php myself on one of your pets. It worked perfectly, as I was able to click it at the first time and then receive an error message when I try to click again:


So yeah, I have no idea why it was being mean to you. XD
__________________


Mysidia Adoptables, a free and ever-improving script for aspiring adoptables/pets site.
  #44  
Old 04-09-2012, 06:41 AM
SilverDragonTears's Avatar
SilverDragonTears SilverDragonTears is offline
I am your Nemesis.
 
Join Date: Jun 2011
Posts: 1,113
Gender: Female
Credits: 82,019
SilverDragonTears is on a distinguished road
Default

Well no matter who's pets I click on, I've already leveled them up.
__________________

Check out SilvaTales
  #45  
Old 04-09-2012, 07:05 AM
Hall of Famer's Avatar
Hall of Famer Hall of Famer is offline
Administrator, Lead Coder
 
Join Date: Dec 2008
Location: South Brunswick
Posts: 4,448
Gender: Male
Credits: 329,572
Hall of Famer is on a distinguished road
Default

I see what you mean, I registered an account on your site and once I click one adoptable, I will not be able to click any others and instead receive the error message saying I've leveled them up. Again this is strange as I never had the issue on my two demo sites, are you sure this is a fresh installation? I just did a fresh installation and did not have this problem. Anyway I will ask other members and see if they have the same problem as well. Thanks for bringing it up.
__________________


Mysidia Adoptables, a free and ever-improving script for aspiring adoptables/pets site.
  #46  
Old 04-09-2012, 09:47 AM
AlexC's Avatar
AlexC AlexC is offline
Moderator
 
Join Date: Dec 2009
Location: Canada
Posts: 753
Gender: Unknown/Other
Credits: 66,894
AlexC is an unknown quantity at this point
Default

Quote:
Originally Posted by Hall of Famer View Post
Thank you so much, I wasnt aware of this css issue since the main theme never had any of them. Seems that other themes do suffer such problems, such as the elements and green themes. I fixed all of them already, and a quick note you forgot to mention that messages.php has the same css flaw as myadopts.php and profile.php. It is present whenever pagination is used.

Looks like the css font size glitch only applies to the main theme, the green theme is unaffected. Weird, but its somewhat interesting to investigate.
I actually only just figured out the messages.php one while I was testing the notification thing. xD But I fixed it there too. It could possibly even work for the profile itself, but that doesn't resolve the ID missing thing.

Quote:
Originally Posted by Hall of Famer View Post
I see what you mean, I registered an account on your site and once I click one adoptable, I will not be able to click any others and instead receive the error message saying I've leveled them up. Again this is strange as I never had the issue on my two demo sites, are you sure this is a fresh installation? I just did a fresh installation and did not have this problem. Anyway I will ask other members and see if they have the same problem as well. Thanks for bringing it up.
I think I had this issue in 1.3.0 as well - I just tested and I don't have it now, but it sounds familiar.
__________________
  #47  
Old 04-09-2012, 02:48 PM
SilverDragonTears's Avatar
SilverDragonTears SilverDragonTears is offline
I am your Nemesis.
 
Join Date: Jun 2011
Posts: 1,113
Gender: Female
Credits: 82,019
SilverDragonTears is on a distinguished road
Default

I did add in some modifications but not to the levelup script.
__________________

Check out SilvaTales
  #48  
Old 04-09-2012, 03:01 PM
Hall of Famer's Avatar
Hall of Famer Hall of Famer is offline
Administrator, Lead Coder
 
Join Date: Dec 2008
Location: South Brunswick
Posts: 4,448
Gender: Male
Credits: 329,572
Hall of Famer is on a distinguished road
Default

Are you sure about that? If so, send me the levelup.php and the modified files on your site so I may see what was the cause of your problem. Also investigate into the table prefix.voters and see if anything appears abnormal there.
__________________


Mysidia Adoptables, a free and ever-improving script for aspiring adoptables/pets site.
  #49  
Old 04-09-2012, 03:11 PM
SilverDragonTears's Avatar
SilverDragonTears SilverDragonTears is offline
I am your Nemesis.
 
Join Date: Jun 2011
Posts: 1,113
Gender: Female
Credits: 82,019
SilverDragonTears is on a distinguished road
Default

Nothing looks weird there I don't think.....
Only thing I changed here is the is_numeric thing. But I changed that on my other site and it never messed it up.
levelup.php

Code:
<?php

include("functions/functions.php");
include("functions/functions_users.php");
include("functions/functions_adopts.php");
include("inc/lang.php");


//***************//
//  START SCRIPT //
//***************//

$id = $_GET["id"];
$id = preg_replace("/[^a-zA-Z0-9s]/", "", $id);
$id = secure($id);

if($id == ""){

// If the ID is blank or non-numeric, then it is invalid...

$article_title = $err_idnoexist;
$article_content = $err_idnoexist_text;

}
else{

// We have what appears to be a valid adoptable ID, so we pull the adoptable's information from the database...
$owned_adoptable = $adopts->select("owned_adoptables", array(), "aid='{$id}'")->fetchObject();	
if($owned_adoptable->aid == $id){

// The adoptable does exist, so now we need to see if we can vote...
// We need to get the date today and the user's IP address (if is guest we use this)

$date = date('Y-m-d');

$ip = $_SERVER['REMOTE_ADDR']; 
$ip = preg_replace("/[^a-zA-Z0-9@._-]/", "", $ip);
$ip = secure($ip);

$where_clause = ($isloggedin == "yes")
                ?"adoptableid='{$id}' and username = '{$loggedinname}' and date = '{$date}'"
				:"adoptableid='{$id}' and ip = '{$ip}' and date = '{$date}'";
$voters = $adopts->select("vote_voters", array(), $where_clause)->fetchObject();	
$userstatus = getuserstatus($loggedinname);


  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)){

	// The number of results is still zero, so we did not vote on this adoptable yet today...
	
	// Now we see if the adoptable is frozen by its owner.  If it is, we do not level...

	if($owned_adoptable->isfrozen == "yes"){

	$article_title = $lang_isfrozen_title;
	$article_content = $lang_isfrozen_explain;

	}
	else{

	  // Adoptable is NOT frozen, so I think we can actually proceed with the leveling up of this adoptable...
	  $newclicks = $owned_adoptable->totalclicks + 1; // Add 1 click to the current click total of this adoptable...

	  // Actually insert our click information into the database...
      $adopts->update("owned_adoptables", array("totalclicks" => $newclicks), "aid='{$id}'");

	  // Now we need to update our vote_voters table with the user's vote...
	  $adopts->insert("vote_voters", array("void" => NULL, "date" => $date, "username" => $loggedinname, "ip" => $ip, "adoptableid" => $id));

	  // Now we need to see if we actually level this adoptable up, see if another level actually exists...

	  $nextlevelexists = getnextlevelexists($owned_adoptable->type, $owned_adoptable->currentlevel);

	  if($nextlevelexists == "true"){

	    // A higher level does exist, so we see if it is time to level up
	    $nextlevel = $owned_adoptable->currentlevel + 1;
        $level = $adopts->select("levels", array(), "adoptiename='{$owned_adoptable->type}' and thisislevel='{$nextlevel}'")->fetchObject();	
	
	    // Check if the number of clicks we have now is greater than or equal to the required clicks to level up...
	    if($newclicks >= $level->requiredclicks and $level->requiredclicks != 0 and $level->requiredclicks != ""){

	      // We need to level this adoptable up...
	      $adopts->update("owned_adoptables", array("currentlevel" => $nextlevel), "aid='{$id}'");
	
	      // Now we check if we are enabling alternate images...	
	      $parentid = converttypetoparentid($owned_adoptable->type); // Get the ID of the parent type adoptable
	      $altstatus = getaltstatus($parentid, $id, $nextlevel); // Check if we are using alternate images or not...

	      if($altstatus == "yes") $adopts->update("owned_adoptables", array("usealternates" => 'yes'), "aid='{$id}'");
	      // Now we can see if the adoptable's owner gets a reward, the reward function will take care of sending out any reward that exists...
	      $rewardstatus = reward($id, $owned_adoptable->type, $nextlevel, $owned_adoptable->owner);
	    } // End the if statement if we are leveling the adoptable up	
	  }

	  // Show a thank you message along with the adoptable's information to the user...
	  $image = getcurrentimage($id); // Get the current image of the adoptable...
	  $article_title = $lang_gave."{$owned_adoptable->name} one ".$lang_unit;
	  $article_content = "<img src='{$image}'><br>{$lang_gave}{$owned_adoptable->name}	one {$lang_unit}.<br>".$lang_levelup_encourage;	
	} // Adoptable is not frozen, end isfrozen else check
 
    if($owned_adoptable->isfrozen == "no"){ 
	  $reward = clickreward(grabanysetting('rewardmoney'), $GLOBALS['username'], $GLOBALS['money']);
	  $newamount = $GLOBALS['money'] + $reward;
	  $adopts->update("users", array("money" => $newamount), "username = '{$loggedinname}'");
	  $article_content = $article_content . "<div align='center'><br />You have earned {$reward} ".grabanysetting('cost')." for leveling up this adoptable. <br />You now have {$newamount} ".grabanysetting('cost')."</div>";
    }

  }
  else{

	// We already voted on this adoptable today, so show an error...

	if($isloggedin == "yes"){
		$article_title = $lang_alreadyleveled_title;
		$article_content = $lang_member_alreadyleveled;
	}
	else{
		$article_title = $lang_alreadyleveled_title;;
		$article_content = $lang_guest_alreadyleveled;
	}
  }
}
else{

// Adoptable is invalid, show an error...

$article_title = $err_idnoexist;
$article_content = $err_idnoexist_text;

}



} // End the ID is not blank and is numeric else check


//***************//
//  OUTPUT PAGE  //
//***************//

echo showpage($article_title, $article_content, $date);

?>
__________________

Check out SilvaTales
  #50  
Old 04-09-2012, 03:19 PM
Hall of Famer's Avatar
Hall of Famer Hall of Famer is offline
Administrator, Lead Coder
 
Join Date: Dec 2008
Location: South Brunswick
Posts: 4,448
Gender: Male
Credits: 329,572
Hall of Famer is on a distinguished road
Default

Yeah, it does not look any different from mine. Id recommend you to debug the codes then, and see if any variables are assigned with incorrect values. Assume you have not clicked a pet, the object $voters should be nonexistent and the property $voters->void should be absent. Now find this line:

PHP Code:
$article_content $lang_member_alreadyleveled
Replace with:

PHP Code:
$article_content $lang_member_alreadyleveled;     
$article_content .= "The record is stored as {$voters->void} in the voters table."
Give a try on your site and see what message you receive.
__________________


Mysidia Adoptables, a free and ever-improving script for aspiring adoptables/pets site.
Closed Thread

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Mysidia Adoptables v1.3.3[Security Release] Hall of Famer Mysidia Adoptables Official Announcement 122 05-18-2013 04:02 PM
Mysidia Adoptables v1.3.0[Security Release] Hall of Famer Mysidia Adoptables Official Announcement 180 04-01-2012 10:16 PM
Mysidia Adoptables v1.2.0[Security Release] Hall of Famer Mysidia Adoptables Official Announcement 21 03-22-2011 04:13 PM
Mysidia Adoptables v1.1.4[Security Release] Hall of Famer Mysidia Adoptables Official Announcement 15 01-28-2011 11:48 AM
Mysidia Adoptables v1.1.3[Security Release] Hall of Famer Mysidia Adoptables Official Announcement 27 01-26-2011 02:59 PM


All times are GMT -5. The time now is 07:36 PM.

Currently Active Users: 529 (0 members and 529 guests)
Threads: 4,080, Posts: 32,024, Members: 2,016
Welcome to our newest members, jolob.
BETA





What's New?

What's Hot?

What's Popular?


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
vBCommerce I v2.0.0 Gold ©2010, PixelFX Studios
vBCredits I v2.0.0 Gold ©2010, PixelFX Studios
Emoticons by darkmoon3636