#1
|
||||
|
||||
Embed All
This script will allow your users to select all adopts that are unfrozen and not adults.
First you need to make a new file (I call mine embed.php) Then copy and paste: PHP Code:
PHP Code:
I think some parts may be unnecessary but it works for me. Last edited by SilverDragonTears; 03-28-2012 at 04:52 AM. |
#2
|
||||
|
||||
... That is really, really awesome. Like seriously awesome. GONNA INSTALL IT RIGHT NOW~~~~
EDIT: Worked perfectly! Thank you! :D
__________________
Last edited by AlexC; 03-28-2012 at 05:50 AM. |
#3
|
||||
|
||||
Thank you :) I don't even consider this stuff mods... but eh. I'm possibly going to add some more later. Like... I have one where you can show the date you caught an adopt or if it was bred it will say "Laid on:" Then it will also list the parents.
|
#4
|
||||
|
||||
But see, those are all the little features people want. D: It gives people just that little bit extra to look for or be interested in.
If you don't consider them mods, you could always stick them in one thread - just little edits to make to the script. People want those.
__________________
|
#5
|
||||
|
||||
Hey Silver, what's the fetch supposed to do?
Quote:
__________________
|
#6
|
||||
|
||||
Well this one does not work nowadays 'cause $prefix does not exist any longer. The database information is now stored in constants, not variables/globals.
__________________
Mysidia Adoptables, a free and ever-improving script for aspiring adoptables/pets site. |
#7
|
||||
|
||||
Ah, see. Now I know it needs worked on. ;3
__________________
|
#8
|
||||
|
||||
New code :)
Code:
<?php include("functions/functions.php"); include("functions/functions_users.php"); include("functions/functions_adopts.php"); include("inc/lang.php"); //***************// // START SCRIPT // //***************// $id = $_GET["id"]; $act = $_GET["act"]; $more = $_GET["more"]; $page = $_GET["page"]; if($isloggedin == "yes"){ if($act == ""){ $article_title = "Embed"; $article_content .= "<br> This will allow you to select all your available hamster's codes.<br>"; $article_content .= "<textarea rows='20' cols='80'>"; // We need to get all of the user's adoptables from the database and display them... $query = "SELECT * FROM ".constant("PREFIX")."owned_adoptables, ".constant("PREFIX")."adoptables, ".constant("PREFIX")."levels WHERE ".constant("PREFIX")."owned_adoptables.owner = '{$loggedinname}' AND ".constant("PREFIX")."adoptables.type = ".constant("PREFIX")."owned_adoptables.type AND ".constant("PREFIX")."levels.thisislevel = ".constant("PREFIX")."owned_adoptables.currentlevel AND ".constant("PREFIX")."levels.adoptiename = ".constant("PREFIX")."adoptables.type ORDER BY ".constant("PREFIX")."owned_adoptables.totalclicks"; $rowsperpage = 10; $pagination = new Pagination($adopts, $query, $rowsperpage, "http://".constant("DOMAIN").constant("SCRIPTPATH")."/myadopts.php"); $pagination->setPage($_GET[page]); $query = "SELECT * FROM ".constant("PREFIX")."owned_adoptables, ".constant("PREFIX")."adoptables, ".constant("PREFIX")."levels WHERE ".constant("PREFIX")."owned_adoptables.owner = '{$loggedinname}' AND ".constant("PREFIX")."adoptables.type = ".constant("PREFIX")."owned_adoptables.type AND ".constant("PREFIX")."levels.thisislevel = ".constant("PREFIX")."owned_adoptables.currentlevel AND ".constant("PREFIX")."levels.adoptiename = ".constant("PREFIX")."adoptables.type ORDER BY ".constant("PREFIX")."owned_adoptables.type "; $stmt = $adopts->query($query); while($row = $stmt->fetchObject()){ if($row->usealternates == 'yes') $image = $row->alternateimage; else $image = $row->primaryimage; if($row->currentlevel == 0) $image = $row->eggimage; if($image=='') $image = $row->primaryimage; if($row->currentlevel >= '4') { $article_content .= ""; } else if($row->isfrozen == 'yes') { $article_content .= ""; } else{ $article_content .= ""; } } $article_content .= "</textarea>"; } } else{ $article_title = $accden; $article_content = $reqlogin; } // End is logged in check else //***************// // OUTPUT PAGE // //***************// echo showpage($article_title, $article_content, $date); ?> |
#9
|
||||
|
||||
It looks like the page works now...
__________________
|
#10
|
||||
|
||||
Let me know if you need any help :)
|
|
|
What's New? |
What's Hot? |
What's Popular? |