Mysidia Adoptables Support Forum  

Home Community Mys-Script Creative Off-Topic
Go Back   Mysidia Adoptables Support Forum > Projects > The Bug Tracker > Bug

Notices

Guests Issue Tools
issueid=39 02-03-2014 06:02 PM
Premium Member
Guests

Quote:
You just gave (name of adoptable) one LevelUP Point.
Be sure and come back again tomorrow to feed this adoptable.

You have earned 0 (name of currency) for leveling up this adoptable.
You now have (name of currency)
Can I put in a memo that guests probably should not be seeing the second two lines? I'm sure a way to disable this can be patched in, but for future reference, I'd consider this an issue...? (Is this the proper place to report this?)
Issue Details
Project The Bug Tracker
Category Unknown
Status Not a Bug
Priority 10 - Lowest
Affected Version Mys v1.3.4
Fixed Version (none)
Users able to reproduce bug 2
Users unable to reproduce bug 0
Assigned Users (none)
Tags (none)

02-03-2014 07:23 PM
Moderator
 
In the levelup php pages (1.3.4, so in two files. In 1.3.3 it's one file only), I added if($mysidia->user->username != NULL){} around the lines related to that part to fix it, like

PHP Code:
if($mysidia->user->username != NULL){
        
$summary->add(new Comment("<br> You have earned {$reward} {$mysidia->settings->cost} for leveling up this adoptable. "));
        
$summary->add(new Comment("You now have {$mysidia->user->getcash()} {$mysidia->settings->cost}"));
        } 
and

PHP Code:
$reward 0;
            if(
$mysidia->user->username != NULL){
            
$reward $mysidia->user->clickreward($this->settings->reward);
            
$mysidia->user->changecash($reward);
            } 
There's other ways, maybe related to the usergroup, it was just the first thing I thought of
Reply
02-04-2014 12:46 AM
Premium Member
 
Ah, thankyou. In v1.3.4, it seems the location of what I needed to change was in view/levelupview.php. I found the lines there to wrap in the NULL and it seems to work, now. (I couldn't find the second part? But I don't think I need it...)

This and the redirect after login definitely need to come standard in the soonest new version of Mysidia possible, I think. (And I'm still having trouble properly redirecting to the index on logout, but that's another matter entirely and I'll scratch my head some more over that later.)
Reply
02-04-2014 07:14 AM
Moderator
 
Ah the pages are divided into two. In view/somepageview.php you got the viewing aspect of the page and outside all folders you have the somepage.php that contains the verifications of access and submission of input fields. They seem to share information between each other through a hashmap, basically two functions: setField and getField. The second parameter of the function has to be an object
If the page is yourwebsite/levelup or yourwebsite/levelup/click then the information will be all in levelup.php (verifications) and levelupview.php (text displayed), then it will have the click() function there

The second one is not needed, since the text won't display anyway, it's just in case you want to prevent it at all from calculating a reward and trying to distribute it to visitors (they won't see the result anyway) xD
Reply
02-04-2014 04:15 PM
Administrator, Lead Coder
 
This is not really a bug, but I agree it can be annoying to some users. I will see if I will fix it in Mys v1.4.0, good chance it will happen.

Anyway there's a reason why in Mys v1.3.4 you need to edit the file levelupview.php instead of the levelup.php file. The levelup.php contains a controller class, while levelupview.php is the view. If you understand what I mean by presentation logic, you'd know that what information to display is about the presentation of your site. For presentation logic, there's a good chance that you will find it in a view file rather than a controller file.
Reply
Reply

All times are GMT -5. The time now is 12:29 PM.

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