View Single Post
  #2  
Old 07-27-2009, 04:52 PM
BMR777 BMR777 is offline
Member
 
Join Date: Jan 2011
Posts: 1,122
Gender: Male
Credits: 11,327
BMR777 is on a distinguished road
Default RE: lvl up and adopt problem...

Ok, to allow only one pet per account, in inc > functions.php find:

PHP Code:
// End the is there conditions if statement 
Add after:

PHP Code:
$query "SELECT * FROM ".$prefix."owned_adoptables WHERE owner='".$loggedinname."'";
    
$result mysql_query($query);
    
$num mysql_numrows($result);

    if(
$num 0){
    
$canadopt "no";
    } 
As far as limiting the double level up situation, currently there's not really a way to prevent this. This isn't too big of an issue though because usually users only register one account. I can look into it though.

Also, as far as viewing the detailed info about who clicked what, you can do this in PHPMyAdmin by looking at the adopts_vote_voters table, which lists all votes by username or IP address and which adoptable they voted for.

Hope this helps,
Brandon
Reply With Quote