Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Correct route to make Cancel button go to the category you are in?
danmerhar
New
I can't seem to wrap my head around the correct route to make the cancel button go back to the particular category you decided to make a post in.
Is there something really simple I'm neglecting to see?
Any help would be greatly appreciated.
0
Comments
add javascript history -1 to the onclick handler
http://www.w3schools.com/jsref/met_his_back.asp
There was an error rendering this rich post.
I'm not a developer by any means, but I am comfortable enough to poke around in the code and make changes. Which file is the code for the cancel button hiding? I saw on the forums earlier that there is a wiki (which I'll be sure to check out).
This is all kind of overwhelming, but I feel like Vanilla is an excellent way to understand php and js.
in views/post the cancel url is defaulted to /vanilla/discussions/
Line 1 thru 7 ( i am on 2.0.81) Somewhat bemused myself now...my setup is.
Seemingly, the routing is cockeyed, when cancelling from a category new discussion. Perhaps its a bug
There was an error rendering this rich post.
It happens on both the "back to discussions" link and from an edit. I used to code in Flash (AS3) and JS is kind of similar. I figured it out.
Thanks for the help!
so if you figured it out. Share your code , thats the way its done round here
There was an error rendering this rich post.
To fix the back to discussions link:
add this after line 305 in vanilla/js/discussions.js:
I can't figure out how to fix it on the edit discussion screen, though. It should be just as simple?
how are you triggering that to an ID, as it is that will be applied to all a href's ( unless you have added class .Back to another place
There was an error rendering this rich post.
I... don't know. It fixed the problem, though.
edit: actually - you're right. I neglected to think about the button when you access from any other part of the forums.
I re read you question - possible answer for you to try, worked for me.
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
try this:
in /applications/vanilla/views/post/discussion.php
change from
then add
to your conf/config.php
should take you back to the category with a cancel.
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
I am using a custom theme I've been working on myself, but the default theme is guilty as well. There is no actual "button", just a link.
http://forums.danmerhar.com/
I switched to the default theme. I'm using Version 2.0.18.4
we cross-posted - see may answer above.
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
That solved the cancel issue when editing a discussion, but the problem still remains with the "back to discussions" button. I will just hide it with CSS, it's not really a necessity.
The shifting question routine
Correct route to make Cancel button go to the category you are in?
That solved the cancel issue when editing a discussion,
but the problem still remains with the "back to discussions"
thx. the question you never asked - you've solved I take it.
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
Oh, oops. The two are quite similar in scope. My bad!
Thanks for the help.