From: Jonny B. <jo...@ti...> - 2015-05-25 14:02:27
|
Hi Torsten and {list} fans! :) Several things going on here, will comment inline below... > On 25 May 2015, at 11:16, Torsten Fabricius <to...@ti...> wrote: > > Hi Devs (maybe mainly Jonny?), Hi! :) > I want to use a jquery tile plugin like "Masonry", "Isotope" or > "Packery" for displaying articles on a HomePage. There are various way of doing this, we should make it simpler or at least document how to do it most easily, then perhaps we wouldn't get so many "unused" plugins being added to Tiki (which i then have to try and look after ;) Usually, i add the plugin js file in the theme or theme option directory (to keep things tidy) and then use $.getScript in custom.js (also in the theme directory) to load it. This has the benefit of giving you a callback function where you can then do stuff with the plugin knowing it has loaded and initialised properly. Here's an example (from memory): $(document).ready(function () { $.getScript("themes/mytheme/js/example-plugin.min.js", function () { // do your init code here }); }); > I have some idea how to build a template for that based on Jonny's shop > example. But I am struggling how to build the WikiPlugin part with > PluginList. Does anybody have some hints for me, how to LIST articles > with formats for introline, title, optional image, etc.? Not sure what you mean by the WikiPlugin part, here's a simple example with articles: {LIST()} {filter type="article"} {LIST} Hmm, i was just going to check on http://doc.tiki.org/pluginlist for something more on articles and it's gone really odd - what's happened here? There's a "sortable list of commands" with things like "body" and "carousel" in it - mixed up with "display" and "filter" - isn't this really confusing? Then there are things it calls "parameters" (that aren't parameters) and "values"... i'm afraid this seems all rather wrong and i don't understand it... :( Anyway, fields you can use in the output sub-plugin are here http://doc.tiki.org/Unified+Index#Fields, so things like topic_id, article_subtitle and sitetitle (but not the optional image thing i think). So to use them you'd have something like {LIST()} {filter type="article"} {OUTPUT()} * {display name="title"} ({display name="article_subtitle"}) {OUTPUT} {LIST} Which would give you an unordered list of article title and subtitles (which i think is what Masonry etc need) > I can aswell imagine, that we could use one of these jquery plugins for > a "global" tiki.org landing page in conjunction with more static content > (dynamic content or simple div content). > > By the way: "Masonry" is MIT, whilst "Isotope" and "Packery" are dual > licenced proprietary and GPL. So only Masonry is ok for us (we need LGPL i believe?) but probably doesn't need to be in the code based imho. > For the first step I need advice for getting the appropriate parts of > the articles listed with LIST, in a latter step I might need some > support in building a proper template, whilst I think I will be able to > create a proof of concept template on my own. > Might become another interesting example template to be committed!? Should all be possible with wiki syntax i think, but still not sure about the image thing (articles handle images in a rather old-fashioned sort of way ;) HTH jonny > > Any help appreciated. > > Regards, > Torsten > > > > > ------------------------------------------------------------------------------ > One dashboard for servers and applications across Physical-Virtual-Cloud > Widest out-of-the-box monitoring support with 50+ applications > Performance metrics, stats and reports that give you Actionable Insights > Deep dive visibility with transaction tracing using APM Insight. > http://ad.doubleclick.net/ddm/clk/290420510;117567292;y > _______________________________________________ > TikiWiki-devel mailing list > Tik...@li... > https://lists.sourceforge.net/lists/listinfo/tikiwiki-devel > |