Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
First Plugin
#4
angelazou Wrote:I think what I want to add is a tag like the one you use in the I18N gallery, so user can choose where to include this scroller and its related functions (although I think it's much more likely to see users placing the scroller on every single page, plus, I'm not sure I should be lazy enough to let the user do this work).

Then see the function i18n_gallery_replace, which is called on the content filter (add_filter('content','i18n_gallery_replace');/). If somebody wants to include the gallery in the sidebar, he can use get_i18n_gallery - both call i18n_gallery_display in the end.

angelazou Wrote:And the jQuery file you mention, the option to include it or not. I don't know how that would work out, honestly, because this original component requires at least jquery 1.4, and I have no idea where the user would place this file. I place it in the themes folder, another user might place it in the data folder. I would then need a function to search through the all the directories to find it? I'm not sure.
Still, I do think this is an important design option, don't get me wrong, but I'm just not sure if this is the best way to go.

The easiest way is to tell the user to make sure he includes jQuery 1.4+ in the template.

In I18N Gallery I include a version of jQuery in the plugin (in the directory i18n_gallery/js) and include it if needed.
Of course, if the user includes multiple plugins (on the same page or in the template and page) all using jQuery, he must include it himself and switch off jQuery inclusion in the plugins, as otherwise jQuery would be included multiple times.
I18N, I18N Search, I18N Gallery, I18N Special Pages - essential plugins for multi-language sites.
Reply


Messages In This Thread
First Plugin - by angelazou - 2011-06-05, 01:16:25
First Plugin - by mvlcek - 2011-06-05, 01:50:43
First Plugin - by angelazou - 2011-06-05, 02:05:40
First Plugin - by mvlcek - 2011-06-05, 02:19:57



Users browsing this thread: 1 Guest(s)