From: Dan B. <dan...@gm...> - 2010-01-11 09:14:29
|
Hi Jack, Just to let you know, I logged a (badly written) bug about the 'further results...' failing for tables generated with template format here: http://bugzilla.wikimedia.org/show_bug.cgi?id=18911 (I should really rewrite that bug report!) One workaround that I tried was to use the 'intro=' and 'outro=' query parameters, explored here: http://smw.referata.com/wiki/Talk:Use_the_ask_template_format_to_create_tabular_output However, I ran into the problem that many query parameters are not preserved by special ask (see Markus's comments on the above bug report). How come you decided to create new query parameters rather than use (or rather, fix) the 'intro=' and 'outro=' query parameters? The results look really nice. Its great to be able to fine tune the display of the special ask! Cheers, Dan. 2010/1/10 Jack D. Pond <jac...@ps...>: > I've been experimenting with ways to make tabular queries more functional > and came to the conclusion that the ability to use templates for both the > header and rows when specified in the query (#ask) might take us a long way > there. > > This has been submitted as > https://bugzilla.wikimedia.org/show_bug.cgi?id=22037 > > A users guide on how to implement these features can be found here > <https://wiki.montcopa.org/TestWiki/index.php?title=Advanced_Table_Formattin > g_for_SMW_Queries> . > > Some of the problems we've faced in presenting tabular queries are: > > 1. Concatenate Fields - A specific example is using a complete name > with a single link instead of having three different fields (Last, First MI) > into a single column. > 2. Column/Cell Level Text Alignment - Changing the text alignment in a > cell or column. > 3. Define whether or not a column is sortable. > 4. Highlight Cells (via formatting) based on content. > 5. Define Column Widths to enhance readability. > 6. Define Table Width (allow left/right scrollability instead of > "scrunching" for very wide tables). > > We have been doing this by using query templates within the article, but > that approach falls apart when there are "... further results" because said > formatting is not transferable the the Special:Ask query as a template would > be. > > The proposed solution is fairly straightforward; enable the use of > templates for both the header and the rows of the tables using one existing > parameter and two new ones: > > The two new parameters would be: > > headertemplate - a template that can define the class of the entire table > and the column headings cells > fixedwidth - would allow the tablewidth to be defined, including oversized > tables that use horizontal scrolling > > The existing parameter to be used: > template - the template that would define a row > > The code necessary to accomplish can all be done in SMW_QP_Table.php and the > changes are 100% backwards compatible with minimal or no performance impact > if the features are not used. (patch > <https://bugzilla.wikimedia.org/attachment.cgi?id=6941> ) > > You can test it (with examples and documentation) here > <http://wiki.montcopa.org/TestWiki/index.php?title=JDPTestPage> . > > ________________________________ > > > I'd like to move forward with this concept and would appreciate feedback > including: > > 1. Review to make sure concept is solid and will not have > unintended consequences > 2. Review for code and quality issues > 3. Alternatives for implementation > 4. Discuss whether or not this invites XSS security issues > > ________________________________ > > Jack D. Pond > "The ladder of success is never crowded at the top." -- Napoleon > Hill(1883-1970) > > > ------------------------------------------------------------------------------ > This SF.Net email is sponsored by the Verizon Developer Community > Take advantage of Verizon's best-in-class app development support > A streamlined, 14 day to market process makes app distribution fast and easy > Join now and get one step closer to millions of Verizon customers > http://p.sf.net/sfu/verizon-dev2dev > _______________________________________________ > Semediawiki-user mailing list > Sem...@li... > https://lists.sourceforge.net/lists/listinfo/semediawiki-user > |