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.
Replace link on Register and Login buttons
Hazulu
New
Hello there! Is there any way for me to hook into the register and login buttons (as a whole, not in a specific place.) What I want to do is change the popup to a div above the page that slides everything down when you hit login to display the fields, much like Xenforo. I also believe I can just edit the popup function, but I figured it'd be a lot cleaner overriding it. Thanks for your help .
0
Comments
I know it doesn't look perfect, but it should give you an idea how to do it.
My themes: pure | minusbaseline - My plugins: CSSedit | HTMLedit | InfiniteScroll | BirthdayModule | [all] - PM me about customizations
VanillaSkins.com - Plugins, Themes and Graphics for Vanillaforums OS
The bootstrap theme also modifies the popup:
https://github.com/kasperisager/vanilla-bootstrap/blob/master/less/components/modals.less
My themes: pure | minusbaseline - My plugins: CSSedit | HTMLedit | InfiniteScroll | BirthdayModule | [all] - PM me about customizations
VanillaSkins.com - Plugins, Themes and Graphics for Vanillaforums OS
Thank you! That definitely does it. The only problem I'm having right now is that the animation I put in custom.js is actually queued for after the default vanilla login popup. My animation only plays after the popup, how would I go about overriding the default function?
Sorry for the double post, I think I may need to actually change the link on the signin buttons and combine that with more js. The popupReveal function is used when the Login popup appears. I would have to switch the functions entirely imo, which I see as being the cleanest solution. It doesn't make sense to link the event to when the popup is actually appearing and then remove the popup, because I could just avoid any conflicts and switch the functions entirely so they aren't connect and it doesn't depend on anything.
Do you know how I could hook into the sign in button to change it's class? I'm about to start looking now, if I find anything within the 15minutes I can edit this post I will make the edit
Update: I seem to have found where I can hook into to change the link,
https://github.com/vanilla/vanilla/blob/2429347d96fa8c694d872b65459ed5af23cf8200/applications/dashboard/views/modules/guest.php
That is where the signin button is generated, how could I go about hooking into this to change the class?
Edit2: I just realized this is a view, does that mean for the plugin I'd have to add in a custom view? Or is there a way to hook into the method through a hook?
A view override would have to be done in a theme.
But there is a much easier solution.
Since it is live/delegated changing the class disables the original event handler. Now you can attach your own popup handler.
My themes: pure | minusbaseline - My plugins: CSSedit | HTMLedit | InfiniteScroll | BirthdayModule | [all] - PM me about customizations
VanillaSkins.com - Plugins, Themes and Graphics for Vanillaforums OS
@-@ I can't believe I didn't think of this. Thank you so much for your help .