[pmwiki-users] Sortable tables

Henrik Bechmann henrik.bechmann at sympatico.ca
Thu Apr 24 11:29:50 CDT 2008


To get the effect of the alternating colors, modify 
Experments.Sortable.php to this:

<?php

$HTMLHeaderFmt['sortable'] =  '<script type="text/javascript" 
src="pub/sortable/sortable.js"></script>
<style type="text/css">
.even {
 background-color:#ccc;
}
.odd {
 background-color:white;
}
</style>';



Henrik Bechmann wrote:
> Luigi,
>
> http://www.joostdevalk.nl/code/sortable-table/ is dead easy.
>
> 1. Download the javascript file from the above link (right click, 
> "Save Link As..." on "Just the script, unzipped (9kb)"
>
> 2. Upload that file to your server, to wiki/pub/sortable/sortable.js
>
> 3. Create a file called Experiments.Sortable.php (ie a file that 
> corresponds in name to the wiki page where you have the sortable 
> table, plus the ".php" extension)
>
> 4. In that file type the following:
>
> <?php
>
> $HTMLHeaderFmt['sortable'] =  '<script type="text/javascript" 
> src="pub/sortable/sortable.js"></script>';
>
> 5. Upload Experiments.Sortable.php to your wiki/local directory
>
> 6. Create a wiki page called Experiments.Sortable (ie a page 
> corresponding in name to the file created in step 3.)
>
> 7. Add the following wiki text to your wiki page:
> ||class=sortable id=thetable
> || First Column || Second Column || Third Column ||
> || One || 1 || North America ||
> || Two || 2 || South America ||
> || Three || 3 || Europe ||
> || Four || 4 || Africa ||
> || Five || 5 || Australia ||
> 8. Enjoy!
>
> For a demo, see
>
> http://testwebsite.bechmann.ca/wiki/wiki.php?n=Experiments.Sortable
>
> To see the wiki source see 
> http://testwebsite.bechmann.ca/wiki/wiki.php?n=Experiments.Sortable?action=source
>
> Feel free to create a cookbook recipe out of this (I have to run...)
>
> Best,
>
> - Henrik
>
> kirpi at kirpi.it wrote:
>>> Luigi (quoting DaveG):
>>> http://motherrussia.polyester.se/docs/tablesorter/
>>>     
>>
>>   
>>> Sameer:
>>> I am using the javascript and the method indicated  towards the end of this page:
>>> http://www.pmwiki.org/wiki/PITS/00388
>>>     
>>
>>   
>>> Henrik
>>> Here's the javascript:
>>> http://en.wikipedia.org/skins-1.5/common/wikibits.js (search for "sortable")
>>> Here's the author's source: http://www.joostdevalk.nl/code/sortable-table/
>>>     
>>
>> It seems there is no lack of resources!
>> I'm not a coder, but in the past had sometimes success in copying
>> (looting) and pasting things together.
>> I'll try and see if anything works...
>>
>> Luigi
>>
>>   
>
> -- 
>
> Henrik Bechmann
> www.bechmann.ca
> Webmaster, www.dufferinpark.ca
> ------------------------------------------------------------------------
>
> _______________________________________________
> pmwiki-users mailing list
> pmwiki-users at pmichaud.com
> http://www.pmichaud.com/mailman/listinfo/pmwiki-users
>   

-- 

Henrik Bechmann
www.bechmann.ca
Webmaster, www.dufferinpark.ca

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.pmichaud.com/pipermail/pmwiki-users/attachments/20080424/dc0c927e/attachment.html 


More information about the pmwiki-users mailing list