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 10-22-2014, 12:12 PM
parayna's Avatar
parayna parayna is offline
Member
 
Join Date: May 2013
Location: Devon, UK
Posts: 342
Gender: Female
Credits: 16,105
parayna is on a distinguished road
Default Adopt Spotlight Broken?

Hey, the adopt spotlight on my site seems to be broken? The names appear in the list when you are choosing from your profile but for some reason the image appears broken (with that broken image icon). Does anyone know why? ^_^

Thanks~
Reply With Quote
  #2  
Old 10-25-2014, 10:39 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,784
Hall of Famer is on a distinguished road
Default

Umm does this happen to every user on your site, or only a few of them? I can tell that adopt spotlight may be broken if you hard delete an adoptable that is assigned on adopt spotlight, since in this case the adoptable ID will no longer exist.
__________________


Mysidia Adoptables, a free and ever-improving script for aspiring adoptables/pets site.
Reply With Quote
  #3  
Old 11-02-2014, 05:58 PM
pachoofoosh's Avatar
pachoofoosh pachoofoosh is offline
Artist
 
Join Date: Dec 2012
Location: New York
Posts: 98
Gender: Unknown/Other
Credits: 15,236
pachoofoosh is on a distinguished road
Default

I broke the adoptspotlight on my site by deleting adoptables directly from the database (was resetting everything); after I reset the auto_increment values it got mean and decided not to work. QvQ

This fixed the problem for me and got the adoptSpotlight working, it might work on your site? ^^

in class_userprofile.php, find the following function (should be around line 55):
PHP Code:
public function getFavpet(){
      if(
is_numeric($this->favpet)){
          
$this->favpet = ($this->favpet == 0)?new Comment("None Selected"):new Link("levelup/click/{$this->favpet}", new Image("levelup/siggy/{$this->favpet}"), TRUE); 
      } 
      return 
$this->favpet;      
  } 
Replace it with this:
PHP Code:
  public function getFavpet(){
      if(
is_numeric($this->favpet)){
          
$adopty = new OwnedAdoptable($this->favpet);
          
$favimg $adopty->getImage();
          
$this->favpet = ($this->favpet == 0)?new Comment("None Selected"):new Link("levelup/click/{$this->favpet}", new Image($favimg), TRUE); 
      } 
      return 
$this->favpet;      
  } 
__________________
The calzones... betrayed me?
Reply With Quote
  #4  
Old 11-09-2014, 08:04 AM
parayna's Avatar
parayna parayna is offline
Member
 
Join Date: May 2013
Location: Devon, UK
Posts: 342
Gender: Female
Credits: 16,105
parayna is on a distinguished road
Default

@HoF and @pachoofoosh : Pachoofoosh's way worked! Thank you! ^_^

(Sorry for the late reply, I have had exams recently >.<)

~Parayna
Reply With Quote
  #5  
Old 11-18-2014, 03:37 PM
parayna's Avatar
parayna parayna is offline
Member
 
Join Date: May 2013
Location: Devon, UK
Posts: 342
Gender: Female
Credits: 16,105
parayna is on a distinguished road
Default

Hi, I am not sure if it is to do with this piece of code but for some reason when I go onto someone's profile and they DON'T have a favourite pet selected it says, 'Adoptable ID 0 does not exist or does not belong to the owner specified... '

For once I actually know what it means (I think... XD) as when I go to the admin CP on my host site, under the fav pet in the users_profile thing it has a 0 for the default. And for some reason it thinks it is a valid ID. Does anyone know how to fix this? Thanks ^_^
Reply With Quote
  #6  
Old 12-05-2014, 04:01 PM
parayna's Avatar
parayna parayna is offline
Member
 
Join Date: May 2013
Location: Devon, UK
Posts: 342
Gender: Female
Credits: 16,105
parayna is on a distinguished road
Default

Bumping :)
Reply With Quote
  #7  
Old 12-06-2014, 08:31 AM
pachoofoosh's Avatar
pachoofoosh pachoofoosh is offline
Artist
 
Join Date: Dec 2012
Location: New York
Posts: 98
Gender: Unknown/Other
Credits: 15,236
pachoofoosh is on a distinguished road
Default

Ah i've got that too. :'o

Hmm maybe this will work?:

PHP Code:
public function getFavpet(){ 
      if(
is_numeric($this->favpet) && $this->favpet != 0){ 
          
$adopty = new OwnedAdoptable($this->favpet); 
          
$favimg $adopty->getImage(); 
          
$this->favpet = new Link("levelup/click/{$this->favpet}", new Image($favimg), TRUE);  
      }  
        elseif(
$this->favpet 0) {
           
$this->favpet = new Comment("None Selected");
        }
      return 
$this->favpet;       
  } 
__________________
The calzones... betrayed me?
Reply With Quote
  #8  
Old 12-07-2014, 09:22 AM
parayna's Avatar
parayna parayna is offline
Member
 
Join Date: May 2013
Location: Devon, UK
Posts: 342
Gender: Female
Credits: 16,105
parayna is on a distinguished road
Default

Hmm, I tried that but now all that's coming up is a white page.. but only for people who have no favourite pet selected.. D:
Reply With Quote
  #9  
Old 12-07-2014, 02:40 PM
Kyttias's Avatar
Kyttias Kyttias is offline
Premium Member
 
Join Date: Jan 2014
Posts: 857
Gender: Unknown/Other
Credits: 87,034
Kyttias is on a distinguished road
Default

When checking for a value to be equal, isn't it two == and not just one =? That might be a start. So the last bit elseif($this->favpet = 0), try it with two ==. (Does it need to be an else if? Why not just else?)
__________________
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-07-2014 at 02:43 PM.
Reply With Quote
  #10  
Old 12-07-2014, 02:46 PM
parayna's Avatar
parayna parayna is offline
Member
 
Join Date: May 2013
Location: Devon, UK
Posts: 342
Gender: Female
Credits: 16,105
parayna is on a distinguished road
Default

I'll try that! Thanks! ^_^

EDIT: I got rid of the 'if' and it made all users have a white page.. maybe that's why it is needed? I dunno XD

EDIT2: Yay! I fixed it! It was fixed when I did this:

PHP Code:
public function getFavpet(){ 
      if(
is_numeric($this->favpet) && $this->favpet != 0){ 
          
$adopty = new OwnedAdoptable($this->favpet); 
          
$favimg $adopty->getImage(); 
          
$this->favpet = new Link("levelup/click/{$this->favpet}", new Image($favimg), TRUE);  
      }  
        elseif(
$this->favpet == 0) {
           
$this->favpet = new Comment("None Selected");
        }
      return 
$this->favpet;       
  } 
I put another equals in front of the 0 after the 'elseif'.

Thank you!! ^_^

Last edited by parayna; 12-07-2014 at 02:49 PM.
Reply With Quote
Reply

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
Spotlight Adopt in Sidebar Abronsyth Questions and Supports 2 11-18-2015 01:23 PM
Broken Theme Zoroark Questions and Supports 1 10-15-2012 09:55 PM
Pet Spotlight / BBCodes - Problem Kimba Questions and Supports 7 11-27-2011 11:20 AM
Problem with the Pet Spotlight and the forum codes Isura Questions and Supports 0 09-30-2011 12:43 PM
Broken Login konzair Questions and Supports 8 01-26-2011 09:43 AM


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

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