Mysidia Adoptables Support Forum  

Home Community Mys-Script Creative Off-Topic
Go Back   Mysidia Adoptables Support Forum > Mysidia Adoptables > Questions and Supports

Notices

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #2  
Old 06-08-2020, 09:04 AM
kristhasirah's Avatar
kristhasirah kristhasirah is offline
Member
 
Join Date: Jan 2010
Location: In middle of the nothingness
Posts: 196
Gender: Female
Credits: 38,123
kristhasirah
Default

there are 2 ways to do archive this first the "notsoeasyone"
you can try adding a if to the levelup.php and levelupview.php
it can be something like:
if(adopt->getOwner() == $mysidia->user->username){levelupcode goes here}
else{ $document->addLangvar("you can't feed others pets");} but if your levelup.php and levelupview.php is very modified then it will be kind of tricky to put everything in place without breaking something...

now the easy way:
look for this code in levelup.php
PHP Code:
        elseif($this->settings->owner == "disabled" and $this->adopt->getOwner() == $mysidia->user->username){
             throw new 
LevelupException("owner");               
        } 
and add this below:
PHP Code:
        elseif($this->adopt->getOwner() != $mysidia->user->username){
             throw new 
LevelupException("user");

(note this is just a copy/paste/edit of the original code posted above)

to add the message that will appear for the users you must open lang_levelup.php and add this:
PHP Code:
$lang['user'] = "Unfortunately, the admin has disabled the option for users to click others adoptables."
(you can edit the message... that's just a copy/paste/edit of the error for the owner... when they can't levelup their own adopts)

I test the code on my site and so far it works for me... i can only level up my own adopts, for the rest it gives me an error. i recommend doing a backup of your files before adding the code and do a heavy test of it, to see if it works for you too.
to disable the code just add // before elseif and throw or just delete it.

VERY IMPORTANT!: with this enabled once the user logs out he/she can't level up any of the adopts. this means not even guest can help the adopts to grow up. maybe someone can find a way to allow guest to level the adopts...

take in mind that the daycare will not work correctly with this, so you will probably need to disable the daycare or edit it to show only the owned adoptables... but for that you just need to go to the myadopt page to see them. so there's no point for the daycare.
__________________

Last edited by kristhasirah; 06-08-2020 at 09:40 AM.
Reply With Quote
 


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 02:54 PM.

Currently Active Users: 3258 (0 members and 3258 guests)
Threads: 4,081, Posts: 32,032, 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 - 2025, vBulletin Solutions Inc.
vBCommerce I v2.0.0 Gold ©2010, PixelFX Studios
vBCredits I v2.0.0 Gold ©2010, PixelFX Studios
Emoticons by darkmoon3636