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 04-27-2017, 03:43 PM
KatFennec's Avatar
KatFennec KatFennec is offline
Member
 
Join Date: Apr 2017
Posts: 57
Gender: Female
Credits: 7,873
KatFennec is on a distinguished road
Lightbulb 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
Reply With Quote
  #2  
Old 04-29-2017, 06:47 PM
p810 p810 is offline
Member
 
Join Date: Apr 2017
Posts: 6
Gender: Unknown/Other
Credits: 903
p810 is on a distinguished road
Default

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';
Reply With Quote
  #3  
Old 04-29-2017, 08:24 PM
kristhasirah's Avatar
kristhasirah kristhasirah is offline
Member
 
Join Date: Jan 2010
Location: In middle of the nothingness
Posts: 196
Gender: Female
Credits: 28,459
kristhasirah
Default

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
Reply With Quote
  #4  
Old 04-29-2017, 10:50 PM
KatFennec's Avatar
KatFennec KatFennec is offline
Member
 
Join Date: Apr 2017
Posts: 57
Gender: Female
Credits: 7,873
KatFennec is on a distinguished road
Default

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 by KatFennec; 04-29-2017 at 10:53 PM.
Reply With Quote
  #5  
Old 05-01-2017, 01:02 PM
kristhasirah's Avatar
kristhasirah kristhasirah is offline
Member
 
Join Date: Jan 2010
Location: In middle of the nothingness
Posts: 196
Gender: Female
Credits: 28,459
kristhasirah
Default

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
Reply With Quote
  #6  
Old 05-12-2017, 01:09 PM
KatFennec's Avatar
KatFennec KatFennec is offline
Member
 
Join Date: Apr 2017
Posts: 57
Gender: Female
Credits: 7,873
KatFennec is on a distinguished road
Default

Quote:
Originally Posted by KatFennec View Post
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
__________________
Reply With Quote
Reply


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 06:45 PM.

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