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
  #11  
Old 12-26-2015, 09:41 AM
Abronsyth's Avatar
Abronsyth Abronsyth is offline
A Headache Embodied
 
Join Date: Aug 2011
Location: NY
Posts: 1,011
Gender: Male
Credits: 113,219
Abronsyth is on a distinguished road
Default

Is there a way to make it so that the pet's "profile" is shown when the pet is frozen? I've tried several things but to no avail as of yet.
__________________
My Mods Site (1.3.4, 2020 Mods)
Reply With Quote
  #12  
Old 12-26-2015, 07:23 PM
Kyttias's Avatar
Kyttias Kyttias is offline
Premium Member
 
Join Date: Jan 2014
Posts: 857
Gender: Unknown/Other
Credits: 88,115
Kyttias is on a distinguished road
Default

I did some thinking on this today. You can find this line in levelup.php and comment it out (just make it so this whole elseif clause doesn't fire) -
PHP Code:
elseif($this->adopt->isFrozen() == "yes") { throw new LevelupException("frozen"); } 
to
PHP Code:
// elseif($this->adopt->isFrozen() == "yes") { throw new LevelupException("frozen"); } 
Or, hey, delete it if you're feeling safe with that, whatever.

Instead, we're going to pop on back up to where we checked if the pet had been visited today or not. This line opens up this clause:
PHP Code:
elseif($this->adopt->hasVoter($mysidia->user$date)){ 
We're going to modify it so it also fires when the pet is frozen. This is probably the most important part. Make it this:
PHP Code:
elseif($this->adopt->hasVoter($mysidia->user$date) || ($this->adopt->isFrozen() == "yes")){ 
Inside this, we can nest another if statement that can show a message that will say that the pet is frozen/locked:
PHP Code:
if (!$this->adopt->hasVoter($mysidia->user$date)){
    
$message .= "<b>This pet is frozen!</b>";

Setting a variable with 'dot equals' (.=) adds to the existing variable, appends to it - I think the technical term is that it concatenates to the existing variable.

Okay, so, ACTUALLY, if you used the code I gave originally without modifying it much, you'll see that I already did included something to happen if you're somehow on the page but hadn't visited the pet - the word 'Play' instead of the thankyou message. (To be honest I want to eventually create a feature so pet's aren't automatically counted as being clicked/visited as soon as the page loads, but wait until a button is pressed, so that's why it's there - well that doesn't work like that, and I haven't invented such a thing yet.) Regardless, here's that bit of code how I gave it in the original post:
PHP Code:
// If you haven't seen the pet today:
if (!$this->adopt->hasVoter($mysidia->user$date)){
        
$message .= "<div style='display: inline;'><span class='button'><i class='fa fa-paw'></i> Play</span></div>";

So go ahead and modify/use that. It'll show when you visit the page but the pet is frozen. Rest assured, pets will be treated as if they've already been seen for the day, and won't add on a new click.
__________________
Please do not contact me directly outside of Mysidia.
I also cannot troubleshoot code more than two years old - I legit don't remember it.

Last edited by Kyttias; 12-26-2015 at 07:28 PM.
Reply With Quote
  #13  
Old 12-26-2015, 08:11 PM
Abronsyth's Avatar
Abronsyth Abronsyth is offline
A Headache Embodied
 
Join Date: Aug 2011
Location: NY
Posts: 1,011
Gender: Male
Credits: 113,219
Abronsyth is on a distinguished road
Default

Aha! Excellent, thank you Kyttias! I wasn't too far off but I see now where I was going wrong.
__________________
My Mods Site (1.3.4, 2020 Mods)
Reply With Quote
  #14  
Old 07-28-2016, 11:32 AM
Missy Master's Avatar
Missy Master Missy Master is offline
Pet-Sim.Online
 
Join Date: Jan 2010
Posts: 475
Gender: Unknown/Other
Credits: 45,004
Missy Master is an unknown quantity at this point
Default

Does anyone have the code to make this simple profile page ? I've tried fixing up the code here for levelup and not having too much success.

This is the last thing I need for my sites, a basic working public pet profile page :)

Can anyone help on what to change/take out to make it work ?

I just get white pages no matter what I do ...
Reply With Quote
  #15  
Old 12-19-2016, 07:31 AM
parayna's Avatar
parayna parayna is offline
Member
 
Join Date: May 2013
Location: Devon, UK
Posts: 342
Gender: Female
Credits: 16,452
parayna is on a distinguished road
Default

I have the profiles for my pets set up:
  Spoiler: Image 

But would it be possible to have the same show up on the view_levelup file? I've tried tinkering but it does not want to work, and I think I lack the understanding to know 100% where I've gone wrong... for now, I've added a link under all the text that refreshes the page to take you to their 'profile'.
  Spoiler: Image 




Thank you ^_^


EDIT: I made some changes to my levelup view file! It now looks the same as my levelup so it's almost like the same page... I'm pretty happy I did it myself XD Took a while to realise I had to do {$adopt->whatever} and not {$this->adopt-whatever}... XD

  Spoiler: Images 
When you first click them to level them up. As a guest the reward bit won't show (tested and it works!)


After you've clicked that day. And also, when they're frozen it will show this but their name will have a snowflake next to it and the words will say you can't play with them.



What happens when they're frozen:

Last edited by parayna; 12-20-2016 at 11:51 AM.
Reply With Quote
  #16  
Old 01-15-2017, 07:54 PM
SilverDragonTears's Avatar
SilverDragonTears SilverDragonTears is offline
I am your Nemesis.
 
Join Date: Jun 2011
Posts: 1,113
Gender: Female
Credits: 82,271
SilverDragonTears is on a distinguished road
Default

I don't understand how to make the public profile. I have it working if you've already played with the pet but where is the code for the actual public profile?
__________________

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 07:48 AM.

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