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.
Options

Jquery & vanilla

Is there an initiative to incorporate jquery with vanilla?

Comments

  • Options
    edited October 2006
    what in particular were you hoping to achieve? There was talk of ThickBox integration for Jazzman's Attachments extension if that's what you mean...
  • Options
    StashStash
    edited November 2006
    Schiz, judging from the lack of responses, I don't think so. But given that Attachments 2 doesn't integrate thickbox any more, I think there needs to be a jQuery extension. From this we can then have a ThickBox "sub-extension" (kinda like Attachments 2.0 and it's "sub-extension" Inline Images 1.1) and then all sorts of other jQuery sub-extensions. I like this idea :D

    In theory, all this jQuery extension would need to do is add a single line to the header of each page.
    <script type="text/javascript" src="extension/jQuery/jquery.js"></script>This will add 19,019 bytes weight to each page (using the latest compressed from today, not the 15kb the jQuery page mentions *sigh*), but if you want the pretty effects...

    If someone wants to point me in the right direction for adding a line to the header I'll do this (but then they could have done this quicker already!).
  • Options
    MarkMark Vanilla Staff
    If JQuery can do the autocomplete on the whisper input box, I'll put it in the core STAT. I hate the code I hacked together to do that - I still find it quite buggy.
  • Options
    Whisper box? What whisper box? :D

    Ah, it's right above where I'm typing right now (never used it).

    I wouldn't know if it could, but looking on the plugins page there is an example of an autocomplete plugin.

    Also, referring to ThickBox as a "sub-extension" was really stupid — it's obviously a PLUGIN! After all, it's referred to as a plugin on the jQuery page!
  • Options
    MarkMark Vanilla Staff
    *bookmarked*
  • Options
    I just took a look and found a style switcher which could be useful.
  • Options
    Is Minisweeper right here about the following code adding a line to the header of each page?$Head->AddString())
    Cos if he is, I'd like to get this going as an extremely simple extension, even if it ends up being short-lived because you (Mark) add it to the core.

    So in theory I just need an extension with this in?$Head->AddString(<script type=\"text/javascript\" src=\"extension/jQuery/jquery.js\">))</script>/me shows his incompetence with PHP and escaping...
  • Options
    I think that should probably work. You might have to use an absolute path though.
  • Options
    I love jquery's plugin style architecture. Hot stuff: http://interface.eyecon.ro/demos/autocompleter.html and some docs for it: http://interface.eyecon.ro/docs/autocomplete
  • Options
    @Minisweeper: When I get a moment *sigh* I'll give it a go. Can I use single quotes instead of double quotes, and then not use the escaping \'s ?
  • Options
    I dont see why not... You only need to use double quotes if you want php to evaluate the contents.
  • Options
    Oh jeez, I mean thanks minisweeper, I'm sure that was very helpful, but I haven't got a clue what you mean :/

    /me goes off to actually learn some PHP instead of just cutting and pasting it around...
  • Options
    edited December 2006
    Actually, I think the code would be more like:

    $Head->AddString('<script type="text/javascript" src="extension/jQuery/jquery.js"></script>');
    Although, that path looks like it might fail depending on the install location of the forum software. Look to some of the plugins that add custom stylesheets/scripts (Quotations is one) and see how they deal with that.

    p.s.:
    This will add 19,019 bytes weight to each page
    Not entirely true -- it adds that weight on the first page load. The rest of the time it's cached, so it's not a big issue.
  • Options
    StashStash
    edited December 2006
    I realise about the caching, but it still adds that much to the first page load, which is one of the most important. Besides, mainly I was pointing out that the jQuery page was incorrectly saying how big the file is ;)

    P.S. Thanks for the code correction ;)
  • Options
    Interesting stuff.. WordPress 2.2 was just realeased a few hours ago. Apparently WordPress is in the process of making a complete switch to JQuery: "We now use jQuery for a number of internal functions, and hope to transition all of our JS to use it." -- http://wordpress.org/development/2007/05/wordpress-22/ "Switched to jQuery for core JS, which is lighter and faster" -- http://codex.wordpress.org/Version_2.2#Developer_.2F_Power_User_Stuff
  • Options
    considering the popularity of wordpress. this will have lot of affect in the javascript library space. Look for more apps to move to jquery. specially now that ext (http://extjs.com/deploy/ext/docs/index.html) also works with it
  • Options
    Bah, just started mucking around with Wordpress again yesterday (ie 2.1) and they release this *sigh*. Oh well, I guess I can see how an upgrade goes ;)
  • Options
    I think jQuery rocks.
  • Options
    I think ext rolls.
  • Options
    ithcyithcy New
    edited May 2007
    what happened to $Head->AddScript()? isn't that still there?
This discussion has been closed.