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 06-06-2013, 04:19 PM
pachoofoosh's Avatar
pachoofoosh pachoofoosh is offline
Artist
 
Join Date: Dec 2012
Location: New York
Posts: 98
Gender: Unknown/Other
Credits: 15,223
pachoofoosh is on a distinguished road
Question Display AdoptSpotlight anywhere? c:

Hello! c:
I was wondering if there was a way to display a user's favorite pet anywhere on-site, and as a module in the sidebar? I was wondering because I'm planning on using the user's favorite pet as their 'active pet', which they'll be able to explore with, although I'm not quite sure how to have it display the pet.
Thanks for the help! <3
Reply With Quote
  #2  
Old 06-06-2013, 07:19 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: 23,612
Infernette is on a distinguished road
Default

I need this as well, but I'll try to fiddle around to see if it can work the same was as the avatar for you ^^
__________________
No, I have no idea what I'm doing. But it works. Barely.
Reply With Quote
  #3  
Old 06-10-2013, 06:55 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: 327,302
Hall of Famer is on a distinguished road
Default

Sure you can do that by creating a module for sidebar, although to display it on another widget/location can be difficult at this moment. You need to write a very simple php code in the adoptsoptlight module, I will post a tutorial a few days later.
__________________


Mysidia Adoptables, a free and ever-improving script for aspiring adoptables/pets site.
Reply With Quote
  #4  
Old 06-19-2013, 04:35 PM
pachoofoosh's Avatar
pachoofoosh pachoofoosh is offline
Artist
 
Join Date: Dec 2012
Location: New York
Posts: 98
Gender: Unknown/Other
Credits: 15,223
pachoofoosh is on a distinguished road
Default

Alright, awesome! Thanks, I'll play around with the code and see if I can get it to display the pet anywhere. ^^ (Sorry for the late reply! ^^;)
Reply With Quote
  #5  
Old 06-20-2013, 04:34 AM
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: 327,302
Hall of Famer is on a distinguished road
Default

Alright, I will post the tutorial this weekend or early next week. It really should not be difficult, although you better test it thoroughly on your site to make sure its not malfunctioning.
__________________


Mysidia Adoptables, a free and ever-improving script for aspiring adoptables/pets site.
Reply With Quote
  #6  
Old 07-03-2013, 12:00 PM
pachoofoosh's Avatar
pachoofoosh pachoofoosh is offline
Artist
 
Join Date: Dec 2012
Location: New York
Posts: 98
Gender: Unknown/Other
Credits: 15,223
pachoofoosh is on a distinguished road
Default

I figured out how to add it to the sidebar!
I used your tutorial on how to add avatars onto the sidebar, but played around with the script for a bit to see if it'd display the favorite pet. uwu

To display the AdoptSpotlight in the sidebar, make a new module, and in the text box for the Module's PHP, add this:

Code:
$profile = $mysidia->user->getprofile();
$favpet = new Image("levelup/siggy/" . $profile->getFavpetID());
$favpet->resize(100); // Resize the image to a certain size. This makes it 100x100 pixels.
$moduleContainer->add($favpet);
Reply With Quote
  #7  
Old 07-03-2013, 02:23 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: 327,302
Hall of Famer is on a distinguished road
Default

Thats indeed a smart strategy, the module system sure makes your life easy if you know what you are doing. Most users unfamiliar with PHP are expected to be using HTML code instead of PHP code though, but there are circumstances that you have to use PHP code.
__________________


Mysidia Adoptables, a free and ever-improving script for aspiring adoptables/pets site.
Reply With Quote
  #8  
Old 07-04-2013, 12:39 PM
pachoofoosh's Avatar
pachoofoosh pachoofoosh is offline
Artist
 
Join Date: Dec 2012
Location: New York
Posts: 98
Gender: Unknown/Other
Credits: 15,223
pachoofoosh is on a distinguished road
Default

Quote:
Originally Posted by Hall of Famer View Post
Thats indeed a smart strategy, the module system sure makes your life easy if you know what you are doing. Most users unfamiliar with PHP are expected to be using HTML code instead of PHP code though, but there are circumstances that you have to use PHP code.
Haha yeah. cx Thankfully php is one of the more flexible languages though, so it can be easier to find different solutions to problems and such. The Module system makes it much easier to control a site's features quickly and efficiently. Although I'm starting to understand how the script works more, and I love how easy it is to edit once you've got the basic idea. It has really helped me understand the point of using OOP; Most tutorials I've seen around the internet were hard to understand because of the way they were written. Then again the best way to learn is by doing I suppose.
//Long reply whoops |D
Reply With Quote
  #9  
Old 07-04-2013, 03:34 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: 96,092
Tequila is on a distinguished road
Default

Quote:
Originally Posted by pachoofoosh View Post
I figured out how to add it to the sidebar!
I used your tutorial on how to add avatars onto the sidebar, but played around with the script for a bit to see if it'd display the favorite pet. uwu

To display the AdoptSpotlight in the sidebar, make a new module, and in the text box for the Module's PHP, add this:

Code:
$profile = $mysidia->user->getprofile();
$favpet = new Image("levelup/siggy/" . $profile->getFavpetID());
$favpet->resize(100); // Resize the image to a certain size. This makes it 100x100 pixels.
$moduleContainer->add($favpet);
Awesome! ;3 now to get it centered. Thanks! ;3
__________________
Artist. Designer. Gamer. Mother.
[portfolio] [tarot] [Rune Hollow] [freebies]
Reply With Quote
  #10  
Old 07-06-2013, 11:49 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: 327,302
Hall of Famer is on a distinguished road
Default

To get it centered, simply add this to the code block:

PHP Code:
$favpet->setAlign(new Align("center")); 
This should do the trick, lemme know if anything goes wrong.
__________________


Mysidia Adoptables, a free and ever-improving script for aspiring adoptables/pets site.
Reply With Quote
Reply

Tags
activepet, adoptspotlight, explore, module, sidebar

Thread Tools
Display Modes

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
Mys v1.3.4 Shop Listing Display Kyttias Mys v1.3.x Mods 13 06-13-2016 02:31 PM
Display on Phone? Glow Questions and Supports 1 01-05-2015 08:56 AM
Changing Shop and Item Display? Abronsyth Questions and Supports 2 12-16-2014 03:25 PM
Display codes for all of your adoptables kisazeky Questions and Supports 9 09-03-2010 03:32 PM
Edit Featured Adoptable display Tequila Questions and Supports 2 02-20-2009 10:19 AM


All times are GMT -5. The time now is 04:07 AM.

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