Mysidia Adoptables Support Forum

Mysidia Adoptables Support Forum (http://www.mysidiaadoptables.com/forum/index.php)
-   Questions and Supports (http://www.mysidiaadoptables.com/forum/forumdisplay.php?f=18)
-   -   Need to intercept access to levelup.php (http://www.mysidiaadoptables.com/forum/showthread.php?t=5425)

KatFennec 04-27-2017 03:43 PM

Need to intercept access to levelup.php
 
I'm trying to figure out what all will direct a user to levelup.php, so that I can add a page that will load instead, giving them the option to proceed on to it, as well as display a set of information on the relevant adoptable

p810 04-29-2017 06:47 PM

If you want to redirect a user to levelup.php you have two options.

With PHP, you can send a Location header with the HTTP response. Note that this header must be sent before any output is sent to the user.

PHP Code:

/**
 * @see http://php.net/manual/en/function.header.php
 */
header('Location: /levelup.php');

exit; 

I will look at Mysidia later and tell you where it would be best to place this code. I know that Mysidia is built on some variant of MVC, but I haven't had my hands in the codebase since it was Rusnak's adoptables script so I need to brush up.

Another option is using JavaScript to redirect the user. This can be done after output has been sent and the page has been loaded. However users who have JavaScript disabled in their browsers will not be redirected.

Code:

wndow.location = '/levelup.php';

kristhasirah 04-29-2017 08:24 PM

you can create a new function in levelup.ph call it click and by using the trow excception message add the info. then the actual click page change the name like click2 and do the same in levelupview.php.
http://mysidiaadoptables.com/forum/s...ead.php?t=4941 there you can find examples of that of how to trasform the levelup in a kind of profile page, and for the new function you dont need to add all the click code...well thats how i made it, and now when a user click the lunk it takes them to the onew lclick and i added a button to lead them to the renamed click page... but if you want to make a complete change then you must look for the levelup link in the pages like myadoptview, class daycare, class userprofile... i think those are the pages... and maybe class ownedadoptables.
sorry if i dont make sense and for my bad writing is kind of difficult to write in a cellphone. will post how i have my levelup on monday in case i dint explain correctly

KatFennec 04-29-2017 10:50 PM

I'm actually mostly wondering what all directs to it, as in where I would look to redirect those. I want to put together a more permanent solution to the profile that acts as a middleman, where you click someone's pet, it goes to, say, otherpetprofile, and then you can go from there to levelup.php.

EDIT: Just looked through kristhasirah's post, so I will start looking where they suggested.
Who knows, maybe I'll actually have a mod for y'all soon enough

kristhasirah 05-01-2017 01:02 PM

this is the page where you will find the link of the levelup:

daycare link is in the same levelupview.php in the public daycare
and the other one is in the myadoptsview.php in the public manage
the link of the profile one is in: class_userprofile.php there you need to edit 2 links the one in the public getFavpet and the other one is in the public showalladopts

KatFennec 05-12-2017 01:09 PM

Quote:

Originally Posted by KatFennec (Post 36250)
I'm actually mostly wondering what all directs to it, as in where I would look to redirect those. I want to put together a more permanent solution to the profile that acts as a middleman, where you click someone's pet, it goes to, say, otherpetprofile, and then you can go from there to levelup.php.

EDIT: Just looked through kristhasirah's post, so I will start looking where they suggested.
Who knows, maybe I'll actually have a mod for y'all soon enough


And here it is!

http://www.mysidiaadoptables.com/for...41&postcount=1


All times are GMT -5. The time now is 10:20 PM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.