Vanilla 1 is no longer supported or maintained. If you need a copy, you can get it here.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

Ability to add link classes with an extension?

edited July 2006 in Vanilla 1.0 Help
Hey, I've decided to start poking around and try to write my first extension.

I'm currently looking at something pretty simple. I would like to add the 'thickbox' class to the "Sign In/Sign Out" link so that it will automatically pull the page into a thickbox window. I really don't like how a user doesn't get forwarded back to the main forum after signout and signing in would be so much easier in a thickbox window.

Are there any examples of modifying forum links (or something similar) in the extension dev docs or elsewhere to get me started?

Thanks for the help. ^_^

Comments

  • Not sure if I was too confusing with this. I have a hard time explaining my thoughts most times.
    Is it the confusion, or are there no examples?
  • lechlech Chicagoland
    Not sure if this is impossible (it's not) but looking at it from that perspective, you would need to be able to tell vanilla to update with the user info at the current page. If you look at the add comments extension, you might be able to modify it to work within the confines of either thickbox or greybox. How useful it would be after that is up to the person having to interact with it.

    Thick/Greybox simply pulls in an external frame/iframe into the current document and interacts with it from there to my knowledge, so you'll see if there's a way to blur that line a bit, I might suggest just rewriting the login link with a form that slides/fades in/out with an alternate bit of ajax to aleviate the page switching if possible.
  • "I really don't like how a user doesn't get forwarded back to the main forum after signout " That has always slightly irritated me as well.
  • lechlech Chicagoland
    edited July 2006
    As mentioned before, there's a method to work around that although it requires a slight modification. /me wanders off to find it.
  • lech - True. I hadn't thought of it that way either. It would be a little too difficult for my casual coding self to figure out how to have it pass info out of the Thickbox script and update the page with the user info...Ugh. And I seriously doubt I will be the one to do the login form sliding-in-out code. I know my way around JS, but working with more advanced functions as is the case with ajax - too much for me.

    I guess I'll just stick with the login-in-sidebar extension I'm using and then use a bit of refresh code to forward users back to the index. Although, if you can find that mod it would be awesome too. 20 or so minutes of my poking around with the search didn't turn up anything, but maybe I was searching for the wrong idea. o.o

    Thanks so much.
  • lechlech Chicagoland
    Yeah... I can't find the discussion at all now with the 2+ pages of new discussion since yesterday (wow!). But in a nutshell, it involved creating a copy of the login templates and modifying some people code to change where users end up when logging out. I should have bookmarked that discussion now that I think about it, as I had a similar idea I wanted to try. But I think mark posted a bit of relevant code describing what and how to modify the file in question.
This discussion has been closed.