Mysidia Adoptables Support Forum  

Home Community Mys-Script Creative Off-Topic
Go Back   Mysidia Adoptables Support Forum > Mysidia Adoptables > Addons and Modifications > Mys v1.3.x Mods

Notices

Reply
 
Thread Tools Display Modes
  #1  
Old 03-28-2012, 04:50 AM
SilverDragonTears's Avatar
SilverDragonTears SilverDragonTears is offline
I am your Nemesis.
 
Join Date: Jun 2011
Posts: 1,113
Gender: Female
Credits: 82,389
SilverDragonTears is on a distinguished road
Default 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

include("functions/functions.php");
include(
"functions/functions_users.php");
include(
"functions/functions_adopts.php");
include(
"classes/class_pagination.php");
include(
"css/pagination.css");
include(
"inc/lang.php");

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


$id $_GET["id"];
$act $_GET["act"];
$more $_GET["more"];

if(
$isloggedin == "yes"){

if(
$act == ""){


    
$article_title "Embed";
    


    
$article_content .= "<br>
        This will allow you to select all your available dragon's codes.<br>"
;



        
$article_content .= "<textarea rows='20' cols='80'>";


    
$query "SELECT * FROM {$prefix}owned_adoptables, 
                                
{$prefix}adoptables, 
                                
{$prefix}levels WHERE     {$prefix}owned_adoptables.owner = '{$loggedinname}
                                                        AND 
{$prefix}adoptables.type = {$prefix}owned_adoptables.type 
                                                        AND 
{$prefix}levels.thisislevel = {$prefix}owned_adoptables.currentlevel 
                                                        AND 
{$prefix}levels.adoptiename = {$prefix}adoptables.type 
                                                        ORDER BY 
{$prefix}owned_adoptables.totalclicks";
        
$rowsperpage 10;
        
$pagination = new Pagination($adopts$query$rowsperpage"http://{$domain}{$scriptpath}/myadopts.php");
        
$pagination->setPage($_GET[page]);
        
$query "SELECT * FROM {$prefix}owned_adoptables, 
                                
{$prefix}adoptables, 
                                
{$prefix}levels WHERE     {$prefix}owned_adoptables.owner = '{$loggedinname}
                                                        AND 
{$prefix}adoptables.type = {$prefix}owned_adoptables.type 
                                                        AND 
{$prefix}levels.thisislevel = {$prefix}owned_adoptables.currentlevel 
                                                        AND 
{$prefix}levels.adoptiename = {$prefix}adoptables.type 
                                                        ORDER BY 
{$prefix}owned_adoptables.totalclicks";
        
$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 >= '6') {
    
$article_content .= "";
}
else if(
$row->isfrozen == 'yes') {
    
$article_content .= "";
} else{
    
$article_content .= "[url=http://taleofdragons.net/levelup.php?id={$row->aid}][img]http://taleofdragons.net/get/{$row->aid}.gif[/img][/url]";
     }
}
    
$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);

?>
At line 59 you will need to change the number according to your highest level of adopt.

PHP Code:
if($row->currentlevel >= '6') { 
Then just add the file you created to your links.

I think some parts may be unnecessary but it works for me.
__________________

Check out SilvaTales

Last edited by SilverDragonTears; 03-28-2012 at 04:52 AM.
Reply With Quote
  #2  
Old 03-28-2012, 05:43 AM
AlexC's Avatar
AlexC AlexC is offline
Moderator
 
Join Date: Dec 2009
Location: Canada
Posts: 753
Gender: Unknown/Other
Credits: 67,303
AlexC is an unknown quantity at this point
Default

... 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.
Reply With Quote
  #3  
Old 03-28-2012, 05:46 PM
SilverDragonTears's Avatar
SilverDragonTears SilverDragonTears is offline
I am your Nemesis.
 
Join Date: Jun 2011
Posts: 1,113
Gender: Female
Credits: 82,389
SilverDragonTears is on a distinguished road
Default

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.
__________________

Check out SilvaTales
Reply With Quote
  #4  
Old 03-28-2012, 05:52 PM
AlexC's Avatar
AlexC AlexC is offline
Moderator
 
Join Date: Dec 2009
Location: Canada
Posts: 753
Gender: Unknown/Other
Credits: 67,303
AlexC is an unknown quantity at this point
Default

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.
__________________
Reply With Quote
  #5  
Old 05-01-2012, 01:08 PM
Tequila's Avatar
Tequila Tequila is offline
The Grim One
 
Join Date: Jan 2009
Location: Souther Tier, New York State
Posts: 1,356
Gender: Female
Credits: 97,299
Tequila is on a distinguished road
Default

Hey Silver, what's the fetch supposed to do?
Quote:
Fatal error: Call to a member function fetchObject() on a non-object in /home/u666097869/public_html/embed.php on line 54
__________________
Artist. Designer. Gamer. Mother.
[portfolio] [tarot] [Rune Hollow] [freebies]
Reply With Quote
  #6  
Old 05-01-2012, 01:50 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: 333,931
Hall of Famer is on a distinguished road
Default

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.
Reply With Quote
  #7  
Old 05-01-2012, 03:12 PM
Tequila's Avatar
Tequila Tequila is offline
The Grim One
 
Join Date: Jan 2009
Location: Souther Tier, New York State
Posts: 1,356
Gender: Female
Credits: 97,299
Tequila is on a distinguished road
Default

Quote:
Originally Posted by Hall of Famer View Post
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.
Ah, see. Now I know it needs worked on. ;3
__________________
Artist. Designer. Gamer. Mother.
[portfolio] [tarot] [Rune Hollow] [freebies]
Reply With Quote
  #8  
Old 05-01-2012, 04:40 PM
SilverDragonTears's Avatar
SilverDragonTears SilverDragonTears is offline
I am your Nemesis.
 
Join Date: Jun 2011
Posts: 1,113
Gender: Female
Credits: 82,389
SilverDragonTears is on a distinguished road
Default

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);

?>
__________________

Check out SilvaTales
Reply With Quote
  #9  
Old 05-01-2012, 06:05 PM
Tequila's Avatar
Tequila Tequila is offline
The Grim One
 
Join Date: Jan 2009
Location: Souther Tier, New York State
Posts: 1,356
Gender: Female
Credits: 97,299
Tequila is on a distinguished road
Default

It looks like the page works now...
__________________
Artist. Designer. Gamer. Mother.
[portfolio] [tarot] [Rune Hollow] [freebies]
Reply With Quote
  #10  
Old 05-01-2012, 06:11 PM
SilverDragonTears's Avatar
SilverDragonTears SilverDragonTears is offline
I am your Nemesis.
 
Join Date: Jun 2011
Posts: 1,113
Gender: Female
Credits: 82,389
SilverDragonTears is on a distinguished road
Default

Let me know if you need any help :)
__________________

Check out SilvaTales
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


All times are GMT -5. The time now is 10:31 AM.

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