Mysidia Adoptables Support Forum  

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

Notices

Reply
 
Thread Tools Display Modes
  #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: 27,481
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
  #2  
Old 01-31-2013, 06:38 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: 483,086
Hall of Famer is on a distinguished road
Default

Well its not really difficult to convert Mys v1.2.x script into Mys v1.3.x compatible versions. You just need to find the appropriate location to add the if statement, which will get the number of adopts a user has and prevent adoption if the user has too many eggs.
__________________


Mysidia Adoptables, a free and ever-improving script for aspiring adoptables/pets site.
Reply With Quote
  #3  
Old 01-31-2013, 07:51 PM
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: 27,481
Infernette is on a distinguished road
Default

Okay, I that makes sense. :)

Should I make edits to the code to make it work? (I am a noob at this, sorry...(I honestly don't even have a clue where to put it...))
Reply With Quote
  #4  
Old 02-02-2013, 03:12 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: 483,086
Hall of Famer is on a distinguished road
Default

Of course you need to edit the code, but if it does not work for ya, post your problem here and I may take a look and tell you what you should do.
__________________


Mysidia Adoptables, a free and ever-improving script for aspiring adoptables/pets site.
Reply With Quote
  #5  
Old 02-03-2013, 07:47 PM
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: 27,481
Infernette is on a distinguished road
Default

Okay, I have figured out how to do it with the regular adopt page, but is there a doadopt part for the pound and the adopts shop, and where is it located so I can edit it as well?

Still need help finding the pound and adoptshop instances to edit and some help with the random adopts code :)

Still need some helpz :d
Reply With Quote
  #6  
Old 02-07-2013, 04:22 PM
kristhasirah's Avatar
kristhasirah kristhasirah is offline
Member
 
Join Date: Jan 2010
Location: In middle of the nothingness
Posts: 196
Gender: Female
Credits: 32,653
kristhasirah
Default

i think you can find the pound instances in Classes/class_pound.php
and the adoptshop in classes/class_stockadopt.php or class_adoptshop.php

i think, not sure
__________________
Reply With Quote
  #7  
Old 02-08-2013, 01:20 PM
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: 27,481
Infernette is on a distinguished road
Default

Okay, I checked there, it seems to be those locations :)

I don't need anymore help, also, with this :)

Last edited by Infernette; 02-08-2013 at 05:51 PM.
Reply With Quote
Reply


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 08:30 PM.

Currently Active Users: 720 (0 members and 720 guests)
Threads: 4,081, Posts: 32,029, 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