View Single Post
  #1  
Old 01-31-2013, 10:26 AM
Infernette Infernette is offline
CODE CODE CODE CODE CODE
 
Join Date: Jan 2013
Location: Where I live? I live home.
Posts: 164
Gender: Female
Credits: 23,970
Infernette is on a distinguished road
Default Is there a Limit adopted eggs for 1.3.2?

I've been looking around, and was wondering if there was a mod for 1.3.2 that limited the amount of adoptable eggs a user could have, much like this older one, http://www.mysidiaadoptables.com/for...ead.php?t=1854 that did so..
If there is, could anyone possibly point me in the direction of it? -figured it out

I need to know the files for the shop and pound though, could anyone point me in that direction?

Edit : I also am trying to install the random adopts but, alas, I get the error, Parse error: syntax error, unexpected T_ELSE on line 45.. here the code...
  Spoiler: Code 
Code:
<?php

require("inc/init.php");

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

$mysidia->session->assign("adopt", 1, TRUE);
if(!$mysidia->user->isloggedin){
   // The user is not logged in, show generic login error message
   $mysidia->displayerror("guest");
   $mysidia->session->terminate("adopt");
}  
elseif(!is_numeric($mysidia->input->post("id"))){
   // We did not enter an id, or it is not a number
   $showingcontent = (!$mysidia->user->isloggedin)?$lang->guest:$lang->member;
   $mysidia->page->settitle($lang->title);
   $mysidia->page->addcontent($showingcontent);
   
   $stmt = $mysidia->db->join("adoptables_conditions", "adoptables_conditions.id = adoptables.id")
				       ->select("adoptables", array(), constant("PREFIX")."adoptables.shop='none'ORDER BY RAND() LIMIT 3");
   $adoptform = "<form name='form1' method='post' action='doadopt.php'><h3>Available Adoptables</h3><table>";
   while($row = $stmt->fetchObject()){
	  // Call a function to check if we have the proper privledge level to adopt this pet
	  $canadopt = canadopt($aid, "showing", "none", $row); // Feed an adoptable ID and showing, to show the adopt to guests...

	  if($canadopt == "yes"){
			//If we can adopt the adoptable, show the image and adoption link...
			$adoptform .= "<tr><td style='text-align: center'><img src='{$row->eggimage}' /></td></tr>";
}
 else{
            $eresult = runquery("SELECT * FROM ".$prefix."adoptables WHERE whenisavail='always' ORDER BY RAND() LIMIT 1");
            while($erow = mysql_fetch_array($eresult)){
                $aid=$erow['id']; //The adoptable's ID
                $type=$erow['type'];
                $description=$erow['description'];
                $eggimage=$erow['eggimage'];
                $article_content .= "<tr>

                <td style='text-align: center'><img src='".$eggimage."' /></td>";
            }

        }  
else{
   $row = $mysidia->db->join("adoptables_conditions", "adoptables_conditions.id = adoptables.id")
				      ->select("adoptables", array(), constant("PREFIX")."adoptables.id='{$mysidia->input->post("id")}' ")->fetchObject() ORDER BY RAND() LIMIT 3";  
  
   if(is_object($row)){
      $canadopt = canadopt($aid, "adopting", "none", $row); 
	  if($canadopt == "yes"){
	     $mysidia->page->settitle("Adopting {$row->type}");
		 $mysidia->page->addcontent($lang->adopt.$row->type.$lang->adopt2);
 	     $adoptform = "<br><img src='{$row->eggimage}' border='0'><br><form name='form1' method='post' action='doadopt.php'>
			           <p>Adoptable Name: <input name='name' type='text' id='name'>
				       <input name='id' type='hidden' id='id' value='{$row->id}'></p>
			           <p><input type='submit' name='Submit' value='Adopt Me'></p></form>"; 
         $mysidia->page->addcontent($adoptform);					   
	  }
	  else{
	     $mysidia->page->settitle($lang->global_guest_title);
		 $mysidia->page->addcontent($lang->adopt_failed);
      }	  
   }
   else $mysidia->displayerror("id");  
}

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

$mysidia->output(); 

?>


Sorry, again...

Last edited by Infernette; 02-07-2013 at 03:49 PM.
Reply With Quote