Wiclear

You are here :


Notice: Undefined offset: 0 in /mnt/110/sda/b/8/wiclear/inc/classes/WiclearWikiRenderer.conf.php on line 481

Notice: Undefined offset: 0 in /mnt/110/sda/b/8/wiclear/inc/classes/WiclearWikiRenderer.conf.php on line 481

 steve ideas

Tuesday, 11. July 2006 19:56:07, by anonymous anonymous

 

Please use what you like and discard what you don't. All the product of a lazy Friday.

David (03/07/06) : Steve, I finally managed to find some time and I have integrated all your latest dev. Do you know tla ? This is a content revision system that allows you to archive your source code at any stage. I've got a public archive available. Have a look to the tla page and have a try.
Steve (11/07/06) : David, sorry for delay have been away at seminar/confernces. I tried tla at work with the windows version, but it gives me error "arch_archive_connect: attempt to connect to incompatible archive". I will try again from home, I have linux and windows there so i can test what the problem is.

Maybe some of these would be better as plugins?

New diff

Steve (11/07/06) : I noticed that you had a request one bugs page. I would like this improved so went off in search of any php functions/classes already written (As I have no idea what the best way to compare two documents is ;-)). I found a pear module called Text_Diff which is written by some of the people from http://www.horde.org. I have grafted that module into wiclear and designed some better rendering templates. It works by first producing an array of the differences (via diff engine) and then uses a renederer class that can easily be etended and modified to present the diff in any format you want.

I have set it up to other you three different layouts. The side by side is an enhancement of the current wiclear layout (much like wikipedia). The Inline layout shows one copy marking the inserts and deletions inline with the text. The other I am not sure about and is called Unified layout, this is similar to the way phpwiki do theirs.

I have attached a file called diff.zip to this page so you can have a look.

I don't think the diff engine is perfect yet but it works well in almost all the tests I through at it and is still in developement. I think it is good enough to use. The bits I have done will no doubt need testing, I have check everything, but something normally slips through! ;-)

Hope this is usefull.

Icons and graphics, opensource

I have come across a few collections of icons that are under the creative commons or part of open source projects. I mention this because I have made use of some of them for the ideas listed below.

  1. Feed Icon
  2. Tango Desktop Project (part of linux freedesktop.org)
  3. FamFamFam - this is the one I use a work and other projects.

You may have seen these, but I though I would share as I know how hard it can be to find icons for software developement.

Confirmation of history delete

steve (28/06/06) : Some could to get the user to confirm they want to delete node history.

Confirmation of history delete code

David(09/07/06) : done

Adding title attribute to edit_section link

Thought this would be good for helping users and especially accesability. Display a tooltip/title that says "Edit section - heading/title"

WiclearWikiRenedere.conf.php -> class WRB_wc_title extends WRB_title

$html .= '<a class="section_edit" href="'.$url.'" >'.tr("Edit").'</a>';

becomes (also added some white space around <a></a>, thinking of printing/screen reader)

$html .= ' <a class="section_edit" href="'.$url.'" title="Edit section - '.htmlspecialchars($string).'">'.tr("Edit").'</a> ';

David(09/07/06) : done

Display icon when link is off site

This is the one my boss asked me about. On sites like wikipedia you get a little icon after a link if it goes off site or is secure, etc. This script should let you put different icons after a link depending on it's protocol.

See code Display icon when link is off site

This makes use of some icons from the FamFamFam site listed above, i resized them to 10x10 pixels. I can shend them to you if you want?

David(09/07/06) : done

More emoticons

Again using the FamFamFam icon sets, I've added more emoticon conversions to WiclearWikiRenderer.conf.php

function WiclearWikiRendererConfig()
  {
    //$this->simpletags'<img src="wc_icons/emoticons/smile.png"(..) = '<img src="'.createIconURL('laugh.png').'" alt=":-)" />';
    
    //sdw - render emoticons as images - uses famfam icons
    $this->simpletags'<img src="wc_icons/emoticons/unhappy.pn(..) = '<img src="'.createIconURL('/emoticons/unhappy.png').'" alt=":-(" />';
    $this->simpletags'<img src="wc_icons/emoticons/unhappy.pn(..) = '<img src="'.createIconURL('/emoticons/unhappy.png').'" alt=":(" />';
    $this->simpletags'<img src="wc_icons/emoticons/tongue.png(..) = '<img src="'.createIconURL('/emoticons/tongue.png').'" alt=":-P" />';
    $this->simpletags'<img src="wc_icons/emoticons/surprised.(..) = '<img src="'.createIconURL('/emoticons/suprised.png').'" alt=":-o" />';
    $this->simpletags'<img src="wc_icons/emoticons/surprised.(..) = '<img src="'.createIconURL('/emoticons/suprised.png').'" alt=":-0" />';
    $this->simpletags'<img src="wc_icons/emoticons/wink.png" (..) = '<img src="'.createIconURL('/emoticons/wink.png').'" alt=";-)" />';
    $this->simpletags'<img src="wc_icons/emoticons/wink.png" (..) = '<img src="'.createIconURL('/emoticons/wink.png').'" alt=",-)" />';
    $this->simpletags'<img src="wc_icons/emoticons/smile.png"(..) = '<img src="'.createIconURL('/emoticons/smile.png').'" alt=":-)" />';
    $this->simpletags'<img src="wc_icons/emoticons/happy.png"(..) = '<img src="'.createIconURL('/emoticons/smile.png').'" alt=":)" />';
    $this->simpletags'<img src="wc_icons/emoticons/evilgrin.p(..) = '<img src="'.createIconURL('/emoticons/grin.png').'" alt=":-D" />';
    $this->simpletags'<img src="wc_icons/emoticons/grin.png" (..) = '<img src="'.createIconURL('/emoticons/grin.png').'" alt=":D" />';

I can send you the icons for these as well or get them straight from FamFamFam.

David(09/07/06) : done

Icon wiki markup

I had the idea after doing the above two things that it might be quite cool to be able to specify icons anywhere you wanted. I personal would find this very useful when connected to the 1000 icons from FamFamFam, it would allow quickly locating types of information based on icon. The FamFamFam icon set has icons for almost everything from ticks and crosses to database symbols and bug symbols.

i though simple markup like icon_name

$inlinetags = ... 'icons' =>array('','', array('name'),'wiclearwikibuildicon') ..
/*Steve create icon based on name*/
function wiclearwikibuildicon($name = '')
{   
   global $wikiRenderer;
   
   if(!isset($name0)) return '';
   $icon = $name0;
   
   if($icon != '' 

REDIRECT TO: http://wiclear.free.fr/index.php?from=steve%20ideas

$icon != null){ if ($wikiRenderer->config->showImage == true){ $html = ' <img class="icon" src="'.createIconUrl('icons/'.$icon.'.png').'" alt="'.$icon.'" title="'.$icon.'" /> '; return $html; }else{ return ' '.$icon.' '; } }else{ return ''; } }

David(09/07/06) : done