|
#1
|
||||
|
||||
Direct Adopt Link?
Resolved
Hey so I'm trying to figure out how to do this so that I can give users the choice of whether or not they actually adopt a pet when they find one while exploring. So I want to add a link that, once clicked, adds the specific adopt they found to their account. Instead of; "Oh, you found a kitten!" and it automatically adding the cat to their account, it'd be; "Oh, you found a kitten! Adopt it?" with clicking "adopt it" adding the cat to their account. Does anyone know how to do this?
__________________
My Mods Site (1.3.4, 2020 Mods) Last edited by Abronsyth; 02-18-2016 at 02:47 PM. |
#2
|
||||
|
||||
I can't fully test this, but it's worth a shot. On the 'view' version of whatever explore area, we're going to create a new function that'll post an invisible form -- all you'll see is the button. It'll be easy to call, so we're doing it with a function to save time later.
PHP Code:
PHP Code:
PHP Code:
PHP Code:
edit: Lots of bugs I fixed when I arrived home. -u- Hope you didn't find it in the hour meanwhile. Still untested.
__________________
Please do not contact me directly outside of Mysidia.
I also cannot troubleshoot code more than two years old - I legit don't remember it. Last edited by Kyttias; 12-27-2015 at 03:12 PM. |
#3
|
||||
|
||||
OK, I know I'm doing something very wrong, but I attempted to put it together like this (and I am fairly certain this is incorrect), as instead of adding the cat to my account and displaying the "you've found..." page it is sending me to the .../explore page (and not adding the cat to the account). Is it the "action" part of the form that needs to be altered..?
PHP Code:
__________________
My Mods Site (1.3.4, 2020 Mods) |
#4
|
||||
|
||||
Probably! If the form doesn't work, try changing the action to the name of the current page?
Unfortunately, this is meant to work with my explore system, not one by other users... It should be easily modified, though? I haven't tried using other people's since mine fits my needs. (I'd rather only have on page, than have to make a new page for each zone.) And um...yeah, some of that stuff isn't quite right in right order, hang on... PHP Code:
__________________
Please do not contact me directly outside of Mysidia.
I also cannot troubleshoot code more than two years old - I legit don't remember it. Last edited by Kyttias; 12-27-2015 at 10:09 PM. |
#5
|
||||
|
||||
Ah, so it does work perfectly with your explore system (tested it)! Actually I'm really enjoying playing with your explore system, haha. Now if I can combine the randomness from the one I was using with yours...well then I'd be all set!
Thank you for the help Kyttias, I really do appreciate it <3 EDIT: It's ridiculous how much I am grinning right now...so I figured out how to make it so when a user visits a location (as set up in Kyttias' explore system) they have a random chance of encountering an adoptable! In fact this could be used to make the chance of encountering anything random (items, specific texts, etc). Here's just the snippet that I've gotten to work right now; PHP Code:
__________________
My Mods Site (1.3.4, 2020 Mods) Last edited by Abronsyth; 12-28-2015 at 12:11 AM. |
#6
|
||||
|
||||
Hey ... thats great. you're amazing
Thank you both. I take this for my side too, in a different version :) Last edited by draugluin; 02-14-2016 at 08:35 AM. |
#7
|
||||
|
||||
HAAALLP! I've fallen and I can't get up!
OKAY! So, I tried implementing this on my own and I'm still too PHP Dense to get it. Here's the "test" page code for the explore system thing I use. My code is probably jacked, but it works for now. LOL (The explore works, this is the code without any modifications for buttons.) Can someone pretty please add the code for the buttons for me, so I can see what it's suppose to look like?
Thanks for your help in advance! 8D PHP Code:
__________________
Venture Into The Mist |
#8
|
||||
|
||||
I didn't test it, but I think this ought to work?
PHP Code:
__________________
My Mods Site (1.3.4, 2020 Mods) |
#9
|
||||
|
||||
Abronsyth, thanks for putting it together, but that didn't work. T_T It sends me to the home screen and no pet is awarded.
__________________
Venture Into The Mist |
#10
|
||||
|
||||
That might be because I apparently accidentally removed where you had $species defined ^^; Oops
__________________
My Mods Site (1.3.4, 2020 Mods) |
|
|
What's New? |
What's Hot? |
What's Popular? |