![]() |
Home Community Mys-Script Creative Off-Topic |
|
![]() |
|
Thread Tools | Display Modes |
#1
|
||||
|
||||
![]()
just like the title says, im using the rarity code in my site, and is very useful, because i can hide some eggs from public view and show more some types than others, but i have no idea how i can edit the code to make it compatible with the new script =(
this is the code im using: Code:
$adoptform = "<form name='form1' method='post' action='doadopt.php'><h3>Available Adoptables</h3><table width='500' height='130' background='http://pokepony.x10.mx/picuploads/deserty1.png' class='adopt'>"; $onlyone = 0; $uncommon = rand(1,50); $rare = rand(1,100); $ultrarare = rand(1,200); $legendary = rand(1,300); $legendary2 = rand(1,250); if ($uncommon==1 && $onlyone==0){ $query = "SELECT * FROM ".constant('PREFIX'). "adoptables WHERE rarity='11' ORDER BY RAND() LIMIT 4"; $onlyone = 1; } else if ($rare==1 && $onlyone==0){ $query = "SELECT * FROM ".constant('PREFIX'). "adoptables WHERE rarity='12' ORDER BY RAND() LIMIT 4"; $onlyone = 1; } else if ($ultrarare==1 && $onlyone==0){ $query = "SELECT * FROM ".constant('PREFIX'). "adoptables WHERE rarity='13' ORDER BY RAND() LIMIT 4"; $onlyone = 1; } else if ($legendary==1 && $onlyone==0){ $query = "SELECT * FROM ".constant('PREFIX'). "adoptables WHERE rarity='4' ORDER BY RAND() LIMIT 4"; $onlyone = 1; } else if ($legendary2==1 && $onlyone==0){ $query = "SELECT * FROM ".constant('PREFIX'). "adoptables WHERE rarity='14' ORDER BY RAND() LIMIT 4"; $onlyone = 1; } else{ $query = "SELECT * FROM ".constant('PREFIX'). "adoptables WHERE rarity='10' ORDER BY RAND() LIMIT 4"; } $stmt = $mysidia->db->query($query); 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 .= "<td width='25%' VALIGN='center'><div align=center><img src='http://www.pokepony.x10.mx/picuploads/png/ee15a8cd09e9cde3a34896e250ece23d.png' /></div></a><br> <div align=center><input type='radio' name='id' id='id' value='{$row->id}' /></div><div align=center><strong>{$row->description}</strong></div></td>"; } } // End the loop $adoptform .= "</table><h3>Adopt</h3> <p>Adoptable Name: <input name='name' type='text' id='name' /> <p><input type='submit' name='Submit' value='Adopt Me'></p></form>"; $mysidia->page->addcontent($adoptform); |
#2
|
||||
|
||||
![]()
Well your raw html code should still work with this:
PHP Code:
__________________
![]() Mysidia Adoptables, a free and ever-improving script for aspiring adoptables/pets site. |
#3
|
||||
|
||||
![]()
believe me if i knew how to make use of the GUI package i would use it, but i have 0% of knowledge when it comes to coding, the only thing i can do is make small edits to the codes or add mods and nothing else, i din't make the rarity code, i got it from a post in here... that's why i was asking if there was a way to edit it to make it available for the new script.
and now here comes some questions... where should i add the code? or how should i add it? im kind of lost here =( |
#4
|
||||
|
||||
![]()
Well for this... Change this line below:
PHP Code:
PHP Code:
__________________
![]() Mysidia Adoptables, a free and ever-improving script for aspiring adoptables/pets site. |
#5
|
||||
|
||||
![]()
Thanks for your help HoF, sadly din't manage to make it work, i guess i wont be able to upgrade my site, because my site depends completly in the rarity code
thats the adopt page-> ![]() |
#6
|
||||
|
||||
![]()
Just to inform... after a year of waiting and a day of being bored, i manage to understand what you told me HoF, now i have the rarity code working for the v1.3.4 ^^
the code dont look pretty... but now i have dancing eggs XD ![]() |
![]() |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Item 'Rarity' Column | Kyttias | Questions and Supports | 3 | 11-08-2014 05:51 PM |
My art edit | solskenn | Art Gallery | 6 | 04-03-2012 09:58 PM |
Invite Code/Alpha Code | Shex | Questions and Supports | 0 | 03-07-2011 04:08 AM |
Edit No Name ??[Answered] | gjac1 | Questions and Supports | 5 | 12-03-2009 05:23 AM |
What's New? |
What's Hot? |
What's Popular? |