Need to intercept access to levelup.php

Forum
Last Post
Threads / Messages

KatFennec

Member
Member
Joined
Apr 21, 2017
Messages
57
Points
0
Age
30
Mysidian Dollar
4,476
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
 
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:
/**
 * @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';
 
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/showthread.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
 
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
 
Last edited:
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
 
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/forum/showpost.php?p=36341&postcount=1
 

Similar threads

Users who are viewing this thread

  • Forum Contains New Posts
  • Forum Contains No New Posts

Forum statistics

Threads
4,277
Messages
33,118
Members
1,602
Latest member
BerrieMilk
BETA

Latest Threads

Top