Mysidia Adoptables Support Forum  

Home Community Mys-Script Creative Off-Topic
Go Back   Mysidia Adoptables Support Forum > Mysidia Adoptables > Questions and Supports

Notices

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #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: 24,340
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
 


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
limit adopted eggs kristhasirah Questions and Supports 9 04-19-2015 09:13 AM
Limit Adopted Eggs fadillzzz Mys v1.1.x Mods 17 04-03-2011 06:37 PM
Last adopted? Xius Questions and Supports 2 05-17-2009 03:14 PM
Adopted by certain user levels... densaugeo Questions and Supports 11 04-21-2009 03:33 PM
change the "You just adopted a ..." code output LilPixie Questions and Supports 2 02-14-2009 06:41 PM


All times are GMT -5. The time now is 12:29 AM.

Currently Active Users: 993 (0 members and 993 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