# HG changeset patch # User Pascal Bellard # Date 1351955858 -3600 # Node ID 9f2bd6285998aec3bb295c5d3b92d0d1777879ec # Parent a16d86b1e8ae5e621ee3565e83623c83524bd6a0 Add blazekiss diff -r a16d86b1e8ae -r 9f2bd6285998 blazekiss/receipt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/blazekiss/receipt Sat Nov 03 16:17:38 2012 +0100 @@ -0,0 +1,30 @@ +# SliTaz package receipt. + +PACKAGE="blazekiss" +VERSION="current" +CATEGORY="office" +SHORT_DESC="Tiny Wiki Engine in french." +MAINTAINER="pascal.bellard@slitaz.org" +TARBALL="$PACKAGE.zip" +WEB_SITE="http://dizplay.idleman.fr/Projects/Wiki/blazekiss/" +WGET_URL="http://dizplay.idleman.fr/Projects/Archives/$TARBALL" +DEPENDS="lighttpd php" +CONFIG_FILES="/var/www/blazekiss/_config.php" + +# Rules to configure and make the package. +compile_rules() +{ + true +} + +# Rules to gen a SliTaz package suitable for Tazpkg. +genpkg_rules() +{ + index=$(find $src -name index.php) + src=$(dirname $index) + mkdir -p $fs/var/www + cp -a $src $fs/var/www/blazekiss + rm -f $fs/var/www/blazekiss/historique/*/*.bak + cp -a $stuff/* $fs/var/www/blazekiss/ + chown -R www.www $fs/var/www/blazekiss +} diff -r a16d86b1e8ae -r 9f2bd6285998 blazekiss/stuff/plugins/wkp_ToDo.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/blazekiss/stuff/plugins/wkp_ToDo.php Sat Nov 03 16:17:38 2012 +0100 @@ -0,0 +1,55 @@ +{TODO ...} tags +'; + +todo_index() +{ + grep -l '{TODO' pages/*.txt | while read file; do + page=$(basename $file .txt) + ref="$page" + grep '{TODO' $file | sed "s|.*{TODO\\([^}]*\\)}.*|

$ref\\1

|" + done +} + + if ($handle = @opendir("pages/data")) { + while(($item = readdir($handle)) !== false) { + if ($item == '..' || $item == '.') continue; + $CONTENT .= ''.$item.''; + } + } + return TRUE; + } + return FALSE; // action non traitée + $CONTENT = preg_replace('#\[(.*)|(pages/.*)\]#','$2',$CONTENT); + } // action + + function formatBegin() + { + global $CONTENT; + $CONTENT = preg_replace('#{TODO[^}]*}#','',$CONTENT); + } +} + +?>