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.
Extension: JQuery
Stash
✭
Edit 2007-01-11: jQuery and Smooth Page Jump are completely incompatible. Whichever one is activated last works and prevents the other one from working properly.
Edit 2007-01-20: WORKS with Smooth Page Jump, just enable SPJ AFTER JQuery and its extensions!
OK, so I've written my first ever Vanilla extension. It's very simple and hopefully will work for people other than just me, so please be kind and give me feedback
JQuery
The idea with this is that it's simple to update and will allow people to use jQuery in future extensions.
There's already a bug I've found (breaks "#pgbottom" in Smooth Page Jump 1.0 by Jazzman ), so no doubt there will be more, but I'll do my best to solve them. Any and all advice from seasoned extension authors and PHP gurus is welcomed as I'm learning as I go here.
Oh, and the version numbering... the numbers reflect the jQuery version number and the letter at the end is my revision letter, or "build number" if you will.
Edit: Incidentally, when I tried to upload as a ZIP file (compressed using 7-Zip) I got the following error...
Edit 2007-01-20: WORKS with Smooth Page Jump, just enable SPJ AFTER JQuery and its extensions!
OK, so I've written my first ever Vanilla extension. It's very simple and hopefully will work for people other than just me, so please be kind and give me feedback
JQuery
The idea with this is that it's simple to update and will allow people to use jQuery in future extensions.
There's already a bug I've found (breaks "#pgbottom" in Smooth Page Jump 1.0 by Jazzman ), so no doubt there will be more, but I'll do my best to solve them. Any and all advice from seasoned extension authors and PHP gurus is welcomed as I'm learning as I go here.
Oh, and the version numbering... the numbers reflect the jQuery version number and the letter at the end is my revision letter, or "build number" if you will.
Edit: Incidentally, when I tried to upload as a ZIP file (compressed using 7-Zip) I got the following error...
The file you attempted to upload (jQuery-1.0.4.a.zip)
was of type "application/octet-stream", but the file
extension "zip" did not match the accepted extensions
for this type of file: rar
0
This discussion has been closed.
Comments
(Personally, I'm of the opinion that forum software as slick as Vanilla ought to be on a JS library as slick as jQuery from the get go ;D)
So, did it work for you?
#1 - why not name it the jQuery plugin with normal Vanilla versioning, so we can separate your updates from theirs
#2 - if need be have it check the latest jQuery version on the site and warn the admin if a newer one is needed
#3 - make sure your extension identifies itself so third party extensions know it's installed? (e.g. set global var?)
PS while you're at it, can you re-write controls.js so the darn (pretty useless?) whisper auto-completer no longer
requires 25kB on every page? I never understood the use of the use of auto-complete for whispers, especially
since it uses the full user database and provides access to the full set of users?!?
#2 - That would be nice, is there a way to do this within the lussumo framework?
#3 - How? I'm still stumbling around in the dark wrt PHP and the lussumo framewrk, so a little guidance here would be lovely
Regarding the whisper autocomplete, that's currently beyond me, but I'll certainly have a try! Certainly would be nice to have it removed from Vanilla and added as an extension or jQuery plugin though
I was thinking of making jQuery plugins installable into the jQuery extension directory, instead of the extension directory directly. This way it's obvious that you have to have jquery installed first. What does everyone think to this?
Solution 1: plugin saves a datestamp to remind the admin to check for updates manually? (cf. vanilla check for update reminder)
Solution 2: plugin checks for update @ jquery.com if current user is admin and warns him/her is the latest version is newer?
#3 - I'd assume you could use a global var, cf. http://lussumo.com/community/discussion/4502/ (if (!defined('JQUERY_PRESENT')) exit();
Don't like the idea of JQuery extensions in the same dir. How about making all JQuery extensions use a common naming scheme
so they appear grouped in the extensions list and directories, e.g. JQ_ExtensionNames, JQ_AutoComplete, JQ_IgnoreWanderer, etc. etc.
#3 - I meant how do I set this variable in the first place But that bit you posted will certainly be useful!
jQ_ prefix for jQuery plugins is a damn good idea. As soon as I can do one I will I'll then work on some version checking code in the jQ_ plugins that will make sure they have what they need.
ROFL
- other extensions can use jQuery without having to enable other extensions with functions you may not want
- extension writers can use jQuery without having to worry about packaging it with their extensions
- and so it is easy to update jQuery to the current version.
Just imagine if you had 4 extensions installed that all used jQuery and all included different versions of it! Now *THAT* would get you some conflicts. I hope that for extensions that already use jQuery the authors could update them to "use" this (all it would really require is ripping some stuff out I'd have thought). Also, if you're referring to Attachments 1.4, isn't that obsoleted by Jazzman now for 2.1?However, this makes me wonder if certain things in JQuery now won't work as there's obviously a conflict between the two still. Any JS gurus know what's going on?
1.0.2 uploaded, path typo fixed and code readability improved.
Edit 2007-01-11: jQuery and Smooth Page Jump are completely incompatible. Whichever one is activated last works and prevents the other one from working properly.
Now, I have read a couple of things about getting prototype and jQuery 1.1 to co-exist, so you can see where this is going (ie, soon, but not yet). I hope you're speaking to houseinprogress on how to get prototype compatible with jQuery as well