Форумы / Cotonti / Extensions / [Q] How to Integrate the jQuery api / How to Tag?

urlkiller
#1 20.03.2009 12:13
is there any documentation on this yet?
was wondering because integrating the system as much as possible the same goes for the use of tags there anything?
URL shortener: <a href="http://bbm.li/!7AD5C7">http://bbm.li/!7AD5C7</a>
Trustmaster
#2 21.03.2009 04:05
jQuery is just jQuery, so the best is jQuery Docs. If you wonder what is special for Cotonti, take a look at js/base.js (though it is not very jquerish).

As for tags, you can find API reference in code reference, a series of function named sed_tag*. A good example of its use is the plugins/tags itself because it is implemented as a plugin for that API.
May the Source be with you!
urlkiller
#3 21.03.2009 06:27
sounds cool, will take a look in that files...
i was wondering about comp.problems if a plugin needs to integrate a specific verison of jquery or something else like mootools or scriptacoulus...
URL shortener: <a href="http://bbm.li/!7AD5C7">http://bbm.li/!7AD5C7</a>
Trustmaster
#4 22.03.2009 13:15
I guess it causes troubles for UserGal :-)

Well, we could look into using jQuery in compatibility mode, but this way it wouldn't be so sexy. So we need to make a choice somehow: either stick with jQuery or not use any JS framework at all and leave it all for users. So far we have chosen first. If you have a specific plugin that uses, say, prototype.js, you can either find a similar jQuery plugin, or disable jQuery and use prototype - everything will work in this case, except for some tiny things that make life easier.
May the Source be with you!
Kilandor
#5 22.03.2009 17:28
I've had this issue with lombi, all you have to do before you load up any js at all for your plugin, like Usergal or whatever, call jquery.NoConflict(); (think thats it) then it won't have an problems and will work fine.
pieter
#6 23.03.2009 02:48
Where can I put the jquery.NoConflict(); in a plugin?

Does it matter where? Because I have problems with usergallery and slimbox plugin together.
... can we help you ...
Kilandor
#7 23.03.2009 04:26
It could be in a tpl directly, you just need <script type="text/javascript">jQuery.noConflict();</script> before you load your JS files

Documentation on it may be found here.
http://docs.jquery.com/Using_jQuery_with_Other_Libraries

I'm guessing your problem with Slimbox is it auto-opens URL's its possible if you read the documentation to change it so Slimbox only opens on specific URL's with a rel designated to them. I just chose the auto method as most would likely beable to use that no prob.
pieter
#8 23.03.2009 05:19
No I thought maybe it was a solution for my problem with slimbox plugin and usergallery of UrlKiller (with indexpicture)

See http://www.kruisstraat89.be/
He opens the pictures on the left OK.
But the pictures in the news not ok. Only if I delete the index-random-pictures.

But the noconflict doesn't solve it.
... can we help you ...
Kilandor
#9 23.03.2009 16:14
Your actually calling the No Conflict to early. Your calling it before Jquery Is loaded, Put it right before </head>
pieter
#10 23.03.2009 18:16
Sorry, No working.
... can we help you ...
urlkiller
#11 27.03.2009 12:53
got some idea. what about a plugin that modifies the <header> with the google apis link for the specific framework. so you would make the system more slim and the users could choose what framework should be used and included. even more then one include could be possible. maybe worth for the internal core system? or just on plugin more...?
URL shortener: <a href="http://bbm.li/!7AD5C7">http://bbm.li/!7AD5C7</a>