From f62ea8a1d1cf10eddeae777b11420624e111b7ea Mon Sep 17 00:00:00 2001 From: andi Date: Sun, 5 Jun 2005 12:38:42 +0200 Subject: directory layout cleanup !IMPORTANT This patch changes the directory structure of dokuwiki as suggested in http://www.freelists.org/archives/dokuwiki/06-2005/msg00045.html As the changes.log is not managed through darcs you need to move it your self to the new location in data/changes.log I think I modified the code at all nessessary places, but I may have forgotten a few things. darcs-hash:20050605103842-9977f-af20f63c1d604888375d175d89ac6bd71566d47d.gz --- lib/exe/ajax.php | 53 +++ lib/exe/fetch.php | 230 +++++++++++ lib/exe/media.php | 133 +++++++ lib/images/arrow_down.png | Bin 0 -> 462 bytes lib/images/arrow_up.png | Bin 0 -> 431 bytes lib/images/blank.gif | Bin 0 -> 42 bytes lib/images/del.png | Bin 0 -> 433 bytes lib/images/diff.png | Bin 0 -> 219 bytes lib/images/error.png | Bin 0 -> 655 bytes lib/images/favicon.ico | Bin 0 -> 7406 bytes lib/images/history.png | Bin 0 -> 202 bytes lib/images/info.png | Bin 0 -> 718 bytes lib/images/interwiki/amazon.de.gif | Bin 0 -> 882 bytes lib/images/interwiki/amazon.gif | Bin 0 -> 882 bytes lib/images/interwiki/amazon.uk.gif | Bin 0 -> 882 bytes lib/images/interwiki/bug.gif | Bin 0 -> 166 bytes lib/images/interwiki/coral.gif | Bin 0 -> 85 bytes lib/images/interwiki/doku.gif | Bin 0 -> 257 bytes lib/images/interwiki/google.gif | Bin 0 -> 980 bytes lib/images/interwiki/meatball.gif | Bin 0 -> 1100 bytes lib/images/interwiki/phpfn.gif | Bin 0 -> 330 bytes lib/images/interwiki/sb.gif | Bin 0 -> 886 bytes lib/images/interwiki/wiki.gif | Bin 0 -> 909 bytes lib/images/interwiki/wp.gif | Bin 0 -> 680 bytes lib/images/interwiki/wpde.gif | Bin 0 -> 680 bytes lib/images/interwiki/wpmeta.gif | Bin 0 -> 680 bytes lib/images/larger.gif | Bin 0 -> 87 bytes lib/images/loading.gif | Bin 0 -> 1876 bytes lib/images/smaller.gif | Bin 0 -> 86 bytes lib/images/smileys/delete.gif | Bin 0 -> 1421 bytes lib/images/smileys/fixme.gif | Bin 0 -> 1435 bytes lib/images/smileys/icon_arrow.gif | Bin 0 -> 170 bytes lib/images/smileys/icon_biggrin.gif | Bin 0 -> 172 bytes lib/images/smileys/icon_confused.gif | Bin 0 -> 171 bytes lib/images/smileys/icon_cool.gif | Bin 0 -> 172 bytes lib/images/smileys/icon_cry.gif | Bin 0 -> 498 bytes lib/images/smileys/icon_doubt.gif | Bin 0 -> 990 bytes lib/images/smileys/icon_doubt2.gif | Bin 0 -> 992 bytes lib/images/smileys/icon_eek.gif | Bin 0 -> 170 bytes lib/images/smileys/icon_evil.gif | Bin 0 -> 236 bytes lib/images/smileys/icon_exclaim.gif | Bin 0 -> 236 bytes lib/images/smileys/icon_frown.gif | Bin 0 -> 171 bytes lib/images/smileys/icon_fun.gif | Bin 0 -> 590 bytes lib/images/smileys/icon_idea.gif | Bin 0 -> 176 bytes lib/images/smileys/icon_kaddi.gif | Bin 0 -> 991 bytes lib/images/smileys/icon_lol.gif | Bin 0 -> 336 bytes lib/images/smileys/icon_mrgreen.gif | Bin 0 -> 349 bytes lib/images/smileys/icon_neutral.gif | Bin 0 -> 171 bytes lib/images/smileys/icon_question.gif | Bin 0 -> 248 bytes lib/images/smileys/icon_razz.gif | Bin 0 -> 176 bytes lib/images/smileys/icon_redface.gif | Bin 0 -> 650 bytes lib/images/smileys/icon_rolleyes.gif | Bin 0 -> 485 bytes lib/images/smileys/icon_sad.gif | Bin 0 -> 171 bytes lib/images/smileys/icon_silenced.gif | Bin 0 -> 231 bytes lib/images/smileys/icon_smile.gif | Bin 0 -> 174 bytes lib/images/smileys/icon_smile2.gif | Bin 0 -> 174 bytes lib/images/smileys/icon_surprised.gif | Bin 0 -> 174 bytes lib/images/smileys/icon_twisted.gif | Bin 0 -> 238 bytes lib/images/smileys/icon_wink.gif | Bin 0 -> 170 bytes lib/images/thumbup.gif | Bin 0 -> 167 bytes lib/images/toolbar/bold.png | Bin 0 -> 738 bytes lib/images/toolbar/code.png | Bin 0 -> 573 bytes lib/images/toolbar/empty.png | Bin 0 -> 516 bytes lib/images/toolbar/extlink.png | Bin 0 -> 849 bytes lib/images/toolbar/fonth1.png | Bin 0 -> 594 bytes lib/images/toolbar/fonth2.png | Bin 0 -> 712 bytes lib/images/toolbar/fonth3.png | Bin 0 -> 681 bytes lib/images/toolbar/fonth4.png | Bin 0 -> 688 bytes lib/images/toolbar/fonth5.png | Bin 0 -> 672 bytes lib/images/toolbar/image.png | Bin 0 -> 996 bytes lib/images/toolbar/italic.png | Bin 0 -> 676 bytes lib/images/toolbar/link.png | Bin 0 -> 798 bytes lib/images/toolbar/list.png | Bin 0 -> 582 bytes lib/images/toolbar/list_ul.png | Bin 0 -> 560 bytes lib/images/toolbar/rule.png | Bin 0 -> 574 bytes lib/images/toolbar/sig.png | Bin 0 -> 679 bytes lib/images/toolbar/underline.png | Bin 0 -> 743 bytes lib/plugins/info/syntax.php | 110 ++++++ lib/plugins/syntax.php | 66 ++++ lib/scripts/ajax.js | 51 +++ lib/scripts/pngbehavior.htc | 53 +++ lib/scripts/script.js | 456 ++++++++++++++++++++++ lib/scripts/tw-sack.js | 95 +++++ lib/styles/feed.css | 63 +++ lib/styles/style.css | 44 +++ lib/tpl/default/design.css | 642 +++++++++++++++++++++++++++++++ lib/tpl/default/footer.html | 56 +++ lib/tpl/default/images/bullet.gif | Bin 0 -> 50 bytes lib/tpl/default/images/button-cc.gif | Bin 0 -> 1231 bytes lib/tpl/default/images/button-css.png | Bin 0 -> 299 bytes lib/tpl/default/images/button-donate.gif | Bin 0 -> 200 bytes lib/tpl/default/images/button-dw.png | Bin 0 -> 427 bytes lib/tpl/default/images/button-php.gif | Bin 0 -> 269 bytes lib/tpl/default/images/button-rss.png | Bin 0 -> 280 bytes lib/tpl/default/images/button-xhtml.png | Bin 0 -> 321 bytes lib/tpl/default/images/closed.gif | Bin 0 -> 54 bytes lib/tpl/default/images/interwiki.png | Bin 0 -> 1089 bytes lib/tpl/default/images/link_icon.gif | Bin 0 -> 942 bytes lib/tpl/default/images/mail_icon.gif | Bin 0 -> 918 bytes lib/tpl/default/images/open.gif | Bin 0 -> 54 bytes lib/tpl/default/images/tocdot2.gif | Bin 0 -> 810 bytes lib/tpl/default/images/windows.gif | Bin 0 -> 223 bytes lib/tpl/default/layout.css | 109 ++++++ lib/tpl/default/main.php | 129 +++++++ lib/tpl/default/media.php | 61 +++ lib/tpl/default/print.css | 223 +++++++++++ lib/tpl/default/rtl.css | 111 ++++++ 107 files changed, 2685 insertions(+) create mode 100644 lib/exe/ajax.php create mode 100644 lib/exe/fetch.php create mode 100644 lib/exe/media.php create mode 100644 lib/images/arrow_down.png create mode 100644 lib/images/arrow_up.png create mode 100644 lib/images/blank.gif create mode 100644 lib/images/del.png create mode 100644 lib/images/diff.png create mode 100644 lib/images/error.png create mode 100644 lib/images/favicon.ico create mode 100644 lib/images/history.png create mode 100644 lib/images/info.png create mode 100644 lib/images/interwiki/amazon.de.gif create mode 100644 lib/images/interwiki/amazon.gif create mode 100644 lib/images/interwiki/amazon.uk.gif create mode 100644 lib/images/interwiki/bug.gif create mode 100644 lib/images/interwiki/coral.gif create mode 100644 lib/images/interwiki/doku.gif create mode 100644 lib/images/interwiki/google.gif create mode 100644 lib/images/interwiki/meatball.gif create mode 100644 lib/images/interwiki/phpfn.gif create mode 100644 lib/images/interwiki/sb.gif create mode 100644 lib/images/interwiki/wiki.gif create mode 100644 lib/images/interwiki/wp.gif create mode 100644 lib/images/interwiki/wpde.gif create mode 100644 lib/images/interwiki/wpmeta.gif create mode 100644 lib/images/larger.gif create mode 100644 lib/images/loading.gif create mode 100644 lib/images/smaller.gif create mode 100644 lib/images/smileys/delete.gif create mode 100644 lib/images/smileys/fixme.gif create mode 100644 lib/images/smileys/icon_arrow.gif create mode 100644 lib/images/smileys/icon_biggrin.gif create mode 100644 lib/images/smileys/icon_confused.gif create mode 100644 lib/images/smileys/icon_cool.gif create mode 100644 lib/images/smileys/icon_cry.gif create mode 100644 lib/images/smileys/icon_doubt.gif create mode 100644 lib/images/smileys/icon_doubt2.gif create mode 100644 lib/images/smileys/icon_eek.gif create mode 100644 lib/images/smileys/icon_evil.gif create mode 100644 lib/images/smileys/icon_exclaim.gif create mode 100644 lib/images/smileys/icon_frown.gif create mode 100644 lib/images/smileys/icon_fun.gif create mode 100644 lib/images/smileys/icon_idea.gif create mode 100644 lib/images/smileys/icon_kaddi.gif create mode 100644 lib/images/smileys/icon_lol.gif create mode 100644 lib/images/smileys/icon_mrgreen.gif create mode 100644 lib/images/smileys/icon_neutral.gif create mode 100644 lib/images/smileys/icon_question.gif create mode 100644 lib/images/smileys/icon_razz.gif create mode 100644 lib/images/smileys/icon_redface.gif create mode 100644 lib/images/smileys/icon_rolleyes.gif create mode 100644 lib/images/smileys/icon_sad.gif create mode 100644 lib/images/smileys/icon_silenced.gif create mode 100644 lib/images/smileys/icon_smile.gif create mode 100644 lib/images/smileys/icon_smile2.gif create mode 100644 lib/images/smileys/icon_surprised.gif create mode 100644 lib/images/smileys/icon_twisted.gif create mode 100644 lib/images/smileys/icon_wink.gif create mode 100644 lib/images/thumbup.gif create mode 100644 lib/images/toolbar/bold.png create mode 100644 lib/images/toolbar/code.png create mode 100644 lib/images/toolbar/empty.png create mode 100644 lib/images/toolbar/extlink.png create mode 100644 lib/images/toolbar/fonth1.png create mode 100644 lib/images/toolbar/fonth2.png create mode 100644 lib/images/toolbar/fonth3.png create mode 100644 lib/images/toolbar/fonth4.png create mode 100644 lib/images/toolbar/fonth5.png create mode 100644 lib/images/toolbar/image.png create mode 100644 lib/images/toolbar/italic.png create mode 100644 lib/images/toolbar/link.png create mode 100644 lib/images/toolbar/list.png create mode 100644 lib/images/toolbar/list_ul.png create mode 100644 lib/images/toolbar/rule.png create mode 100644 lib/images/toolbar/sig.png create mode 100644 lib/images/toolbar/underline.png create mode 100644 lib/plugins/info/syntax.php create mode 100644 lib/plugins/syntax.php create mode 100644 lib/scripts/ajax.js create mode 100644 lib/scripts/pngbehavior.htc create mode 100644 lib/scripts/script.js create mode 100644 lib/scripts/tw-sack.js create mode 100644 lib/styles/feed.css create mode 100644 lib/styles/style.css create mode 100644 lib/tpl/default/design.css create mode 100644 lib/tpl/default/footer.html create mode 100644 lib/tpl/default/images/bullet.gif create mode 100644 lib/tpl/default/images/button-cc.gif create mode 100644 lib/tpl/default/images/button-css.png create mode 100644 lib/tpl/default/images/button-donate.gif create mode 100644 lib/tpl/default/images/button-dw.png create mode 100644 lib/tpl/default/images/button-php.gif create mode 100644 lib/tpl/default/images/button-rss.png create mode 100644 lib/tpl/default/images/button-xhtml.png create mode 100644 lib/tpl/default/images/closed.gif create mode 100644 lib/tpl/default/images/interwiki.png create mode 100644 lib/tpl/default/images/link_icon.gif create mode 100644 lib/tpl/default/images/mail_icon.gif create mode 100644 lib/tpl/default/images/open.gif create mode 100644 lib/tpl/default/images/tocdot2.gif create mode 100644 lib/tpl/default/images/windows.gif create mode 100644 lib/tpl/default/layout.css create mode 100644 lib/tpl/default/main.php create mode 100644 lib/tpl/default/media.php create mode 100644 lib/tpl/default/print.css create mode 100644 lib/tpl/default/rtl.css (limited to 'lib') diff --git a/lib/exe/ajax.php b/lib/exe/ajax.php new file mode 100644 index 000000000..dfe0d2ceb --- /dev/null +++ b/lib/exe/ajax.php @@ -0,0 +1,53 @@ + + */ + +//fix for Opera XMLHttpRequests +if(!count($_POST) && $HTTP_RAW_POST_DATA){ + parse_str($HTTP_RAW_POST_DATA, $_POST); +} + +if(!defined('DOKU_INC')) define('DOKU_INC',realpath(dirname(__FILE__).'/../../').'/'); +require_once(DOKU_INC.'inc/init.php'); +require_once(DOKU_INC.'inc/common.php'); +require_once(DOKU_INC.'inc/pageutils.php'); +require_once(DOKU_INC.'inc/auth.php'); + +//call the requested function +$call = 'ajax_'.$_POST['call']; +if(function_exists($call)){ + $call(); +}else{ + print "The called function does not exist!"; +} + +/** + * Searches for matching pagenames + * + * @author Andreas Gohr + */ +function ajax_qsearch(){ + global $conf; + global $lang; + + $query = cleanID($_POST['q']); + if(empty($query)) return; + + $nsdir = str_replace(':','/',getNS($query)); + require_once(DOKU_INC.'inc/search.php'); + require_once(DOKU_INC.'inc/html.php'); + + $data = array(); + search($data,$conf['datadir'],'search_qsearch',array(query => $query),$nsdir); + + if(!count($data)) return; + + print ''.$lang['quickhits'].''; + print html_buildlist($data,'qsearch','html_list_index'); +} + +?> diff --git a/lib/exe/fetch.php b/lib/exe/fetch.php new file mode 100644 index 000000000..3fa8777f1 --- /dev/null +++ b/lib/exe/fetch.php @@ -0,0 +1,230 @@ + + */ + + if(!defined('DOKU_INC')) define('DOKU_INC',realpath(dirname(__FILE__)).'/'); + require_once(DOKU_INC.'inc/init.php'); + require_once(DOKU_INC.'inc/common.php'); + require_once(DOKU_INC.'inc/pageutils.php'); + require_once(DOKU_INC.'inc/confutils.php'); + require_once(DOKU_INC.'inc/auth.php'); + $mimetypes = getMimeTypes(); + + //get input + $MEDIA = $_REQUEST['media']; + $CACHE = calc_cache($_REQUEST['cache']); + $WIDTH = $_REQUEST['w']; + $HEIGHT = $_REQUEST['h']; + list($EXT,$MIME) = mimetype($MEDIA); + if($EXT === false){ + $EXT = 'unknown'; + $MIME = 'application/octet-stream'; + } + + //media to local file + if(preg_match('#^(https?|ftp)://#i',$MEDIA)){ + //handle external media + $FILE = get_from_URL($MEDIA,$EXT,$CACHE); + if(!$FILE){ + //download failed - redirect to original URL + header('Location: '.$MEDIA); + exit; + } + }else{ + $MEDIA = cleanID($MEDIA); + if(empty($MEDIA)){ + header("HTTP/1.0 400 Bad Request"); + print 'Bad request'; + exit; + } + + //check permissions (namespace only) + if(auth_quickaclcheck(getNS($MEDIA).':X') < AUTH_READ){ + header("HTTP/1.0 401 Unauthorized"); + //fixme add some image for imagefiles + print 'Unauthorized'; + exit; + } + $FILE = mediaFN($MEDIA); + } + + //check file existance + if(!@file_exists($FILE)){ + header("HTTP/1.0 404 Not Found"); + //FIXME add some default broken image + print 'Not Found'; + exit; + } + + //handle image resizing + if((substr($MIME,0,5) == 'image') && $WIDTH){ + $FILE = get_resized($FILE,$EXT,$WIDTH,$HEIGHT); + } + + + //FIXME set sane cachecontrol headers + //FIXME handle conditional and partial requests + + //send file + header("Content-Type: $MIME"); + header('Last-Modified: '.date('r',filemtime($FILE))); + header('Content-Length: '.filesize($FILE)); + + //application mime type is downloadable + if(substr($MIME,0,11) == 'application'){ + header('Content-Disposition: attachment; filename="'.basename($FILE).'"'); + } + + $fp = @fopen($FILE,"rb"); + if($fp){ + fpassthru($fp); //does a close itself + }else{ + header("HTTP/1.0 500 Internal Server Error"); + print "Could not read $FILE - bad permissions?"; + } + +/* ------------------------------------------------------------------------ */ + +/** + * Resizes the given image to the given size + * + * @author Andreas Gohr + */ +function get_resized($file, $ext, $w, $h=0){ + global $conf; + + $md5 = md5($file); + $info = getimagesize($file); + if(!$h) $h = round(($w * $info[1]) / $info[0]); + + + //cache + $local = $conf['mediadir'].'/_cache/'.$md5.'.'.$w.'x'.$h.'.'.$ext; + $mtime = @filemtime($local); // 0 if not exists + + if( $mtime > filemtime($file) || resize_image($ext,$file,$info[0],$info[1],$local,$w,$h) ){ + return $local; + } + //still here? resizing failed + return $file; +} + +/** + * Returns the wanted cachetime in seconds + * + * Resolves named constants + * + * @author Andreas Gohr + */ +function calc_cache($cache){ + global $conf; + + if(strtolower($cache) == 'nocache') return 0; //never cache + if(strtolower($cache) == 'recache') return $conf['cachetime']; //use standard cache + return -1; //cache endless +} + +/** + * Download a remote file and return local filename + * + * returns false if download fails. Uses cached file if available and + * wanted + * + * @author Andreas Gohr + */ +function get_from_URL($url,$ext,$cache){ + global $conf; + + $url = strtolower($url); + $md5 = md5($url); + + $local = $conf['mediadir']."/_cache/$md5.$ext"; + $mtime = @filemtime($local); // 0 if not exists + + //decide if download needed: + + // never cache exists but no endless cache not exists or expired + if( $cache == 0 || ($mtime != 0 && $cache != -1) || $mtime < time()-$cache ){ + if(io_download($url,$local)){ + return $local; + }else{ + return false; + } + } + + //if cache exists use it else + if($mtime) return $local; + + //else return false + return false; +} + +/** + * resize images + * + * @author Andreas Gohr + */ +function resize_image($ext,$from,$from_w,$from_h,$to,$to_w,$to_h){ + global $conf; + + if($conf['gdlib'] < 1) return false; //no GDlib available or wanted + + // create an image of the given filetype + if ($ext == 'jpg' || $ext == 'jpeg'){ + if(!function_exists("imagecreatefromjpeg")) return false; + $image = @imagecreatefromjpeg($from); + }elseif($ext == 'png') { + if(!function_exists("imagecreatefrompng")) return false; + $image = @imagecreatefrompng($from); + + }elseif($ext == 'gif') { + if(!function_exists("imagecreatefromgif")) return false; + $image = @imagecreatefromgif($from); + } + if(!$image) return false; + + if(($conf['gdlib']>1) && function_exists("imagecreatetruecolor")){ + $newimg = @imagecreatetruecolor ($to_w, $to_h); + } + if(!$newimg) $newimg = @imagecreate($to_w, $to_h); + if(!$newimg) return false; + + //keep png alpha channel if possible + if($ext == 'png' && $conf['gdlib']>1 && function_exists('imagesavealpha')){ + imagealphablending($newimg, false); + imagesavealpha($newimg,true); + } + + // create cachedir + io_makeFileDir($to); + + //try resampling first + if(function_exists("imagecopyresampled")){ + if(!@imagecopyresampled($newimg, $image, 0, 0, 0, 0, $to_w, $to_h, $from_w, $from_h)) { + imagecopyresized($newimg, $image, 0, 0, 0, 0, $to_w, $to_h, $from_w, $from_h); + } + }else{ + imagecopyresized($newimg, $image, 0, 0, 0, 0, $to_w, $to_h, $from_w, $from_h); + } + + if ($ext == 'jpg' || $ext == 'jpeg'){ + if(!function_exists("imagejpeg")) return false; + return imagejpeg($newimg, $to, 70); + }elseif($ext == 'png') { + if(!function_exists("imagepng")) return false; + return imagepng($newimg, $to); + }elseif($ext == 'gif') { + if(!function_exists("imagegif")) return false; + return imagegif($newimg, $to); + } + + return false; +} + + +//Setup VIM: ex: et ts=2 enc=utf-8 : +?> diff --git a/lib/exe/media.php b/lib/exe/media.php new file mode 100644 index 000000000..5ca3bd360 --- /dev/null +++ b/lib/exe/media.php @@ -0,0 +1,133 @@ += AUTH_UPLOAD){ + $UPLOADOK = true; + //create the given namespace (just for beautification) + $mdir = $conf['mediadir'].'/'.utf8_encodeFN(str_replace(':','/',$NS)); + io_makeFileDir("$mdir/xxx"); + }else{ + $UPLOADOK = false; + } + + //handle deletion + if($DEL && $AUTH >= AUTH_DELETE){ + media_delete($DEL); + } + + //handle upload + if($_FILES['upload']['tmp_name'] && $UPLOADOK){ + media_upload($NS,$AUTH); + } + + //start output and load template + header('Content-Type: text/html; charset=utf-8'); + include(DOKU_INC.'lib/tpl/'.$conf['template'].'/lib/exe/media.php'); + + //restore old umask + umask($conf['oldumask']); + +/**********************************************/ + +/** + * Deletes mediafiles - Auth is not handled here! + * + * @author Andreas Gohr + */ +function media_delete($delid){ + $file = mediaFN($delid); + if(@unlink($file)){ + return true; + } + //something went wrong + msg("'$file' couldn't be deleted - check permissions",-1); + return false; +} + +/** + * Handles Mediafile uploads + * + * @author Andreas Gohr + */ +function media_upload($NS,$AUTH){ + require_once(DOKU_INC.'inc/confutils.php'); + global $lang; + global $conf; + + // get file + $id = $_POST['id']; + $file = $_FILES['upload']; + // get id + if(empty($id)) $id = $file['name']; + $id = cleanID($NS.':'.$id); + // get filename + $fn = mediaFN($id); + + // get filetype regexp + $types = array_keys(getMimeTypes()); + $types = array_map(create_function('$q','return preg_quote($q,"/");'),$types); + $regex = join('|',$types); + + // we set the umask here but this doesn't really help + // because a temp file was created already + umask($conf['umask']); + if(preg_match('/\.('.$regex.')$/i',$fn)){ + //check for overwrite + if(@file_exists($fn) && (!$_POST['ow'] || $AUTH < AUTH_DELETE)){ + msg($lang['uploadexist'],0); + return false; + } + // prepare directory + io_makeFileDir($fn); + if(move_uploaded_file($file['tmp_name'], $fn)) { + // set the correct permission here + chmod($fn, 0777 - $conf['umask']); + msg($lang['uploadsucc'],1); + return true; + }else{ + msg($lang['uploadfail'],-1); + } + }else{ + msg($lang['uploadwrong'],-1); + } + return false; +} + +/** + * Userfunction for html_buildlist + * + * Prints available media namespaces + * + * @author Andreas Gohr + */ +function media_html_list_namespaces($item){ + $ret = ''; + $ret .= ''; + $pos = strrpos($item['id'], ':'); + $ret .= substr($item['id'], $pos > 0 ? $pos + 1 : 0); + $ret .= ''; + return $ret; +} + +?> diff --git a/lib/images/arrow_down.png b/lib/images/arrow_down.png new file mode 100644 index 000000000..cc0ab149c Binary files /dev/null and b/lib/images/arrow_down.png differ diff --git a/lib/images/arrow_up.png b/lib/images/arrow_up.png new file mode 100644 index 000000000..3031122e5 Binary files /dev/null and b/lib/images/arrow_up.png differ diff --git a/lib/images/blank.gif b/lib/images/blank.gif new file mode 100644 index 000000000..9935f8210 Binary files /dev/null and b/lib/images/blank.gif differ diff --git a/lib/images/del.png b/lib/images/del.png new file mode 100644 index 000000000..a3260d718 Binary files /dev/null and b/lib/images/del.png differ diff --git a/lib/images/diff.png b/lib/images/diff.png new file mode 100644 index 000000000..0b98d79ac Binary files /dev/null and b/lib/images/diff.png differ diff --git a/lib/images/error.png b/lib/images/error.png new file mode 100644 index 000000000..ad2ca6ee2 Binary files /dev/null and b/lib/images/error.png differ diff --git a/lib/images/favicon.ico b/lib/images/favicon.ico new file mode 100644 index 000000000..8b9616abb Binary files /dev/null and b/lib/images/favicon.ico differ diff --git a/lib/images/history.png b/lib/images/history.png new file mode 100644 index 000000000..ef9e311d3 Binary files /dev/null and b/lib/images/history.png differ diff --git a/lib/images/info.png b/lib/images/info.png new file mode 100644 index 000000000..ee5f3f5ad Binary files /dev/null and b/lib/images/info.png differ diff --git a/lib/images/interwiki/amazon.de.gif b/lib/images/interwiki/amazon.de.gif new file mode 100644 index 000000000..f52c1c581 Binary files /dev/null and b/lib/images/interwiki/amazon.de.gif differ diff --git a/lib/images/interwiki/amazon.gif b/lib/images/interwiki/amazon.gif new file mode 100644 index 000000000..f52c1c581 Binary files /dev/null and b/lib/images/interwiki/amazon.gif differ diff --git a/lib/images/interwiki/amazon.uk.gif b/lib/images/interwiki/amazon.uk.gif new file mode 100644 index 000000000..f52c1c581 Binary files /dev/null and b/lib/images/interwiki/amazon.uk.gif differ diff --git a/lib/images/interwiki/bug.gif b/lib/images/interwiki/bug.gif new file mode 100644 index 000000000..3432b8d57 Binary files /dev/null and b/lib/images/interwiki/bug.gif differ diff --git a/lib/images/interwiki/coral.gif b/lib/images/interwiki/coral.gif new file mode 100644 index 000000000..0f9f67587 Binary files /dev/null and b/lib/images/interwiki/coral.gif differ diff --git a/lib/images/interwiki/doku.gif b/lib/images/interwiki/doku.gif new file mode 100644 index 000000000..7dc4248e8 Binary files /dev/null and b/lib/images/interwiki/doku.gif differ diff --git a/lib/images/interwiki/google.gif b/lib/images/interwiki/google.gif new file mode 100644 index 000000000..fb39f6152 Binary files /dev/null and b/lib/images/interwiki/google.gif differ diff --git a/lib/images/interwiki/meatball.gif b/lib/images/interwiki/meatball.gif new file mode 100644 index 000000000..7ac545436 Binary files /dev/null and b/lib/images/interwiki/meatball.gif differ diff --git a/lib/images/interwiki/phpfn.gif b/lib/images/interwiki/phpfn.gif new file mode 100644 index 000000000..638d4c450 Binary files /dev/null and b/lib/images/interwiki/phpfn.gif differ diff --git a/lib/images/interwiki/sb.gif b/lib/images/interwiki/sb.gif new file mode 100644 index 000000000..e272a29b7 Binary files /dev/null and b/lib/images/interwiki/sb.gif differ diff --git a/lib/images/interwiki/wiki.gif b/lib/images/interwiki/wiki.gif new file mode 100644 index 000000000..e8dc5d274 Binary files /dev/null and b/lib/images/interwiki/wiki.gif differ diff --git a/lib/images/interwiki/wp.gif b/lib/images/interwiki/wp.gif new file mode 100644 index 000000000..ca853b8c9 Binary files /dev/null and b/lib/images/interwiki/wp.gif differ diff --git a/lib/images/interwiki/wpde.gif b/lib/images/interwiki/wpde.gif new file mode 100644 index 000000000..ca853b8c9 Binary files /dev/null and b/lib/images/interwiki/wpde.gif differ diff --git a/lib/images/interwiki/wpmeta.gif b/lib/images/interwiki/wpmeta.gif new file mode 100644 index 000000000..ca853b8c9 Binary files /dev/null and b/lib/images/interwiki/wpmeta.gif differ diff --git a/lib/images/larger.gif b/lib/images/larger.gif new file mode 100644 index 000000000..e137c92fa Binary files /dev/null and b/lib/images/larger.gif differ diff --git a/lib/images/loading.gif b/lib/images/loading.gif new file mode 100644 index 000000000..240bd88c5 Binary files /dev/null and b/lib/images/loading.gif differ diff --git a/lib/images/smaller.gif b/lib/images/smaller.gif new file mode 100644 index 000000000..66d3a51e7 Binary files /dev/null and b/lib/images/smaller.gif differ diff --git a/lib/images/smileys/delete.gif b/lib/images/smileys/delete.gif new file mode 100644 index 000000000..d668348b9 Binary files /dev/null and b/lib/images/smileys/delete.gif differ diff --git a/lib/images/smileys/fixme.gif b/lib/images/smileys/fixme.gif new file mode 100644 index 000000000..b66ea99d6 Binary files /dev/null and b/lib/images/smileys/fixme.gif differ diff --git a/lib/images/smileys/icon_arrow.gif b/lib/images/smileys/icon_arrow.gif new file mode 100644 index 000000000..2880055cc Binary files /dev/null and b/lib/images/smileys/icon_arrow.gif differ diff --git a/lib/images/smileys/icon_biggrin.gif b/lib/images/smileys/icon_biggrin.gif new file mode 100644 index 000000000..d3527723c Binary files /dev/null and b/lib/images/smileys/icon_biggrin.gif differ diff --git a/lib/images/smileys/icon_confused.gif b/lib/images/smileys/icon_confused.gif new file mode 100644 index 000000000..0c49e0698 Binary files /dev/null and b/lib/images/smileys/icon_confused.gif differ diff --git a/lib/images/smileys/icon_cool.gif b/lib/images/smileys/icon_cool.gif new file mode 100644 index 000000000..cead0306c Binary files /dev/null and b/lib/images/smileys/icon_cool.gif differ diff --git a/lib/images/smileys/icon_cry.gif b/lib/images/smileys/icon_cry.gif new file mode 100644 index 000000000..7d54b1f99 Binary files /dev/null and b/lib/images/smileys/icon_cry.gif differ diff --git a/lib/images/smileys/icon_doubt.gif b/lib/images/smileys/icon_doubt.gif new file mode 100644 index 000000000..fd7903b19 Binary files /dev/null and b/lib/images/smileys/icon_doubt.gif differ diff --git a/lib/images/smileys/icon_doubt2.gif b/lib/images/smileys/icon_doubt2.gif new file mode 100644 index 000000000..eb4b70b66 Binary files /dev/null and b/lib/images/smileys/icon_doubt2.gif differ diff --git a/lib/images/smileys/icon_eek.gif b/lib/images/smileys/icon_eek.gif new file mode 100644 index 000000000..5d3978106 Binary files /dev/null and b/lib/images/smileys/icon_eek.gif differ diff --git a/lib/images/smileys/icon_evil.gif b/lib/images/smileys/icon_evil.gif new file mode 100644 index 000000000..ab1aa8e12 Binary files /dev/null and b/lib/images/smileys/icon_evil.gif differ diff --git a/lib/images/smileys/icon_exclaim.gif b/lib/images/smileys/icon_exclaim.gif new file mode 100644 index 000000000..6e50e2eec Binary files /dev/null and b/lib/images/smileys/icon_exclaim.gif differ diff --git a/lib/images/smileys/icon_frown.gif b/lib/images/smileys/icon_frown.gif new file mode 100644 index 000000000..d2ac78c04 Binary files /dev/null and b/lib/images/smileys/icon_frown.gif differ diff --git a/lib/images/smileys/icon_fun.gif b/lib/images/smileys/icon_fun.gif new file mode 100644 index 000000000..a8bb8a303 Binary files /dev/null and b/lib/images/smileys/icon_fun.gif differ diff --git a/lib/images/smileys/icon_idea.gif b/lib/images/smileys/icon_idea.gif new file mode 100644 index 000000000..a40ae0d7e Binary files /dev/null and b/lib/images/smileys/icon_idea.gif differ diff --git a/lib/images/smileys/icon_kaddi.gif b/lib/images/smileys/icon_kaddi.gif new file mode 100644 index 000000000..1410f7f1e Binary files /dev/null and b/lib/images/smileys/icon_kaddi.gif differ diff --git a/lib/images/smileys/icon_lol.gif b/lib/images/smileys/icon_lol.gif new file mode 100644 index 000000000..374ba150f Binary files /dev/null and b/lib/images/smileys/icon_lol.gif differ diff --git a/lib/images/smileys/icon_mrgreen.gif b/lib/images/smileys/icon_mrgreen.gif new file mode 100644 index 000000000..b54cd0f94 Binary files /dev/null and b/lib/images/smileys/icon_mrgreen.gif differ diff --git a/lib/images/smileys/icon_neutral.gif b/lib/images/smileys/icon_neutral.gif new file mode 100644 index 000000000..4f311567e Binary files /dev/null and b/lib/images/smileys/icon_neutral.gif differ diff --git a/lib/images/smileys/icon_question.gif b/lib/images/smileys/icon_question.gif new file mode 100644 index 000000000..9d072265b Binary files /dev/null and b/lib/images/smileys/icon_question.gif differ diff --git a/lib/images/smileys/icon_razz.gif b/lib/images/smileys/icon_razz.gif new file mode 100644 index 000000000..29da2a2fc Binary files /dev/null and b/lib/images/smileys/icon_razz.gif differ diff --git a/lib/images/smileys/icon_redface.gif b/lib/images/smileys/icon_redface.gif new file mode 100644 index 000000000..ad7628320 Binary files /dev/null and b/lib/images/smileys/icon_redface.gif differ diff --git a/lib/images/smileys/icon_rolleyes.gif b/lib/images/smileys/icon_rolleyes.gif new file mode 100644 index 000000000..d7f5f2f4b Binary files /dev/null and b/lib/images/smileys/icon_rolleyes.gif differ diff --git a/lib/images/smileys/icon_sad.gif b/lib/images/smileys/icon_sad.gif new file mode 100644 index 000000000..d2ac78c04 Binary files /dev/null and b/lib/images/smileys/icon_sad.gif differ diff --git a/lib/images/smileys/icon_silenced.gif b/lib/images/smileys/icon_silenced.gif new file mode 100644 index 000000000..448399b2b Binary files /dev/null and b/lib/images/smileys/icon_silenced.gif differ diff --git a/lib/images/smileys/icon_smile.gif b/lib/images/smileys/icon_smile.gif new file mode 100644 index 000000000..7b1f6d304 Binary files /dev/null and b/lib/images/smileys/icon_smile.gif differ diff --git a/lib/images/smileys/icon_smile2.gif b/lib/images/smileys/icon_smile2.gif new file mode 100644 index 000000000..769639d32 Binary files /dev/null and b/lib/images/smileys/icon_smile2.gif differ diff --git a/lib/images/smileys/icon_surprised.gif b/lib/images/smileys/icon_surprised.gif new file mode 100644 index 000000000..cb2142431 Binary files /dev/null and b/lib/images/smileys/icon_surprised.gif differ diff --git a/lib/images/smileys/icon_twisted.gif b/lib/images/smileys/icon_twisted.gif new file mode 100644 index 000000000..502fe247e Binary files /dev/null and b/lib/images/smileys/icon_twisted.gif differ diff --git a/lib/images/smileys/icon_wink.gif b/lib/images/smileys/icon_wink.gif new file mode 100644 index 000000000..d14828804 Binary files /dev/null and b/lib/images/smileys/icon_wink.gif differ diff --git a/lib/images/thumbup.gif b/lib/images/thumbup.gif new file mode 100644 index 000000000..c96d73c71 Binary files /dev/null and b/lib/images/thumbup.gif differ diff --git a/lib/images/toolbar/bold.png b/lib/images/toolbar/bold.png new file mode 100644 index 000000000..d12c5710e Binary files /dev/null and b/lib/images/toolbar/bold.png differ diff --git a/lib/images/toolbar/code.png b/lib/images/toolbar/code.png new file mode 100644 index 000000000..8f74d8101 Binary files /dev/null and b/lib/images/toolbar/code.png differ diff --git a/lib/images/toolbar/empty.png b/lib/images/toolbar/empty.png new file mode 100644 index 000000000..e606cfd07 Binary files /dev/null and b/lib/images/toolbar/empty.png differ diff --git a/lib/images/toolbar/extlink.png b/lib/images/toolbar/extlink.png new file mode 100644 index 000000000..22971725c Binary files /dev/null and b/lib/images/toolbar/extlink.png differ diff --git a/lib/images/toolbar/fonth1.png b/lib/images/toolbar/fonth1.png new file mode 100644 index 000000000..13d52b979 Binary files /dev/null and b/lib/images/toolbar/fonth1.png differ diff --git a/lib/images/toolbar/fonth2.png b/lib/images/toolbar/fonth2.png new file mode 100644 index 000000000..8e39a14de Binary files /dev/null and b/lib/images/toolbar/fonth2.png differ diff --git a/lib/images/toolbar/fonth3.png b/lib/images/toolbar/fonth3.png new file mode 100644 index 000000000..80fd308e7 Binary files /dev/null and b/lib/images/toolbar/fonth3.png differ diff --git a/lib/images/toolbar/fonth4.png b/lib/images/toolbar/fonth4.png new file mode 100644 index 000000000..e3a333535 Binary files /dev/null and b/lib/images/toolbar/fonth4.png differ diff --git a/lib/images/toolbar/fonth5.png b/lib/images/toolbar/fonth5.png new file mode 100644 index 000000000..e9fc8bb56 Binary files /dev/null and b/lib/images/toolbar/fonth5.png differ diff --git a/lib/images/toolbar/image.png b/lib/images/toolbar/image.png new file mode 100644 index 000000000..f64493125 Binary files /dev/null and b/lib/images/toolbar/image.png differ diff --git a/lib/images/toolbar/italic.png b/lib/images/toolbar/italic.png new file mode 100644 index 000000000..f4ecd0ddf Binary files /dev/null and b/lib/images/toolbar/italic.png differ diff --git a/lib/images/toolbar/link.png b/lib/images/toolbar/link.png new file mode 100644 index 000000000..41fddbb28 Binary files /dev/null and b/lib/images/toolbar/link.png differ diff --git a/lib/images/toolbar/list.png b/lib/images/toolbar/list.png new file mode 100644 index 000000000..ffae5cfbf Binary files /dev/null and b/lib/images/toolbar/list.png differ diff --git a/lib/images/toolbar/list_ul.png b/lib/images/toolbar/list_ul.png new file mode 100644 index 000000000..b86bcef7d Binary files /dev/null and b/lib/images/toolbar/list_ul.png differ diff --git a/lib/images/toolbar/rule.png b/lib/images/toolbar/rule.png new file mode 100644 index 000000000..a432b206e Binary files /dev/null and b/lib/images/toolbar/rule.png differ diff --git a/lib/images/toolbar/sig.png b/lib/images/toolbar/sig.png new file mode 100644 index 000000000..2917048f6 Binary files /dev/null and b/lib/images/toolbar/sig.png differ diff --git a/lib/images/toolbar/underline.png b/lib/images/toolbar/underline.png new file mode 100644 index 000000000..db07038fd Binary files /dev/null and b/lib/images/toolbar/underline.png differ diff --git a/lib/plugins/info/syntax.php b/lib/plugins/info/syntax.php new file mode 100644 index 000000000..f0afcf2ec --- /dev/null +++ b/lib/plugins/info/syntax.php @@ -0,0 +1,110 @@ + + */ + +if(!defined('DOKU_INC')) define('DOKU_INC',realpath(dirname(__FILE__).'/../../').'/'); +if(!defined('DOKU_PLUGIN')) define('DOKU_PLUGIN',DOKU_INC.'lib/plugins/'); +require_once(DOKU_PLUGIN.'syntax.php'); + +/** + * All DokuWiki plugins to extend the parser/rendering mechanism + * need to inherit from this class + */ +class syntax_plugin_info extends DokuWiki_Syntax_Plugin { + + /** + * What kind of syntax are we? + */ + function getType(){ + return 'substition'; + } + + /** + * Where to sort in? + */ + function getSort(){ + return 155; + } + + + /** + * Connect pattern to lexer + */ + function connectTo($mode) { + $this->Lexer->addSpecialPattern('~~INFO:\w+~~',$mode,'plugin_info'); + } + + + /** + * Handle the match + */ + function handle($match, $state, $pos, &$handler){ + $match = substr($match,7,-2); //strip ~~INFO: from start and ~~ from end + return array(strtolower($match)); + } + + /** + * Create output + */ + function render($mode, &$renderer, $data) { + if($mode == 'xhtml'){ + //handle various info stuff + switch ($data[0]){ + case 'version'; + $renderer->doc .= getVersion(); + break; + case 'syntaxmodes'; + $renderer->doc .= $this->_syntaxmodes_xhtml(); + break; + case 'syntaxtypes'; + $renderer->doc .= $this->_syntaxtypes_xhtml(); + break; + default: + $renderer->doc .= "no info about ".htmlspecialchars($data[0]); + } + return true; + } + return false; + } + + /** + * lists all known syntax types and their registered modes + */ + function _syntaxtypes_xhtml(){ + global $PARSER_MODES; + $doc = ''; + + $doc .= ''; + foreach($PARSER_MODES as $mode => $modes){ + $doc .= ''; + $doc .= ''; + $doc .= ''; + $doc .= ''; + } + $doc .= '
'; + $doc .= $mode; + $doc .= ''; + $doc .= join(', ',$modes); + $doc .= '
'; + return $doc; + } + + /** + * lists all known syntax modes and their sorting value + */ + function _syntaxmodes_xhtml(){ + $modes = p_get_parsermodes(); + $doc = ''; + + foreach ($modes as $mode){ + $doc .= $mode['mode'].' ('.$mode['sort'].'), '; + } + return $doc; + } +} + +//Setup VIM: ex: et ts=4 enc=utf-8 : diff --git a/lib/plugins/syntax.php b/lib/plugins/syntax.php new file mode 100644 index 000000000..303c0de33 --- /dev/null +++ b/lib/plugins/syntax.php @@ -0,0 +1,66 @@ + + */ + +if(!defined('DOKU_INC')) define('DOKU_INC',realpath(dirname(__FILE__).'/../').'/'); +if(!defined('DOKU_PLUGIN')) define('DOKU_PLUGIN',DOKU_INC.'lib/plugins/'); +require_once(DOKU_INC.'inc/parser/parser.php'); + +/** + * All DokuWiki plugins to extend the parser/rendering mechanism + * need to inherit from this class + */ +class DokuWiki_Syntax_Plugin extends Doku_Parser_Mode { + + /** + * Needs to return one of the mode types defined in $PARSER_MODES in parser.php + */ + function getType(){ + trigger_error('getType() not implemented in '.get_class($this), E_USER_WARNING); + } + + /** + * Handler to prepare matched data for the rendering process + * + * Usually you should only need the $match param. + * + * @param $match string The text matched by the patterns + * @param $state int The lexer state for the match + * @param $pos int The character position of the matched text + * @param $handler ref Reference to the Doku_Handler object + * @return array Return an array with all data you want to use in render + */ + function handle($match, $state, $pos, &$handler){ + trigger_error('handle() not implemented in '.get_class($this), E_USER_WARNING); + } + + /** + * Handles the actual output creation. + * + * The function should always check for the given mode and return false + * when a mode isn't supported. + * + * $renderer contains a reference to the renderer object which is + * currently handling the rendering. You need to use it for writing + * the output. How this is done depends on the renderer used (specified + * by $mode + * + * The contents of the $data array depends on what the handler() function above + * created + * + * @param $mode string current Rendermode + * @param $renderer ref reference to the current renderer object + * @param $data array data created by handler() + * @return boolean rendered correctly? + */ + function render($mode, &$renderer, $data) { + trigger_error('render() not implemented in '.get_class($this), E_USER_WARNING); + } + +} + +//Setup VIM: ex: et ts=4 enc=utf-8 : diff --git a/lib/scripts/ajax.js b/lib/scripts/ajax.js new file mode 100644 index 000000000..b3c32e950 --- /dev/null +++ b/lib/scripts/ajax.js @@ -0,0 +1,51 @@ +//prepare class +function ajax_qsearch_class(){ + this.sack = null; + this.inObj = null; + this.outObj = null; + this.timer = null; +} + +//create global object and add functions +var ajax_qsearch = new ajax_qsearch_class(); +ajax_qsearch.sack = new sack(DOKU_BASE + 'lib/exe/ajax.php'); +ajax_qsearch.sack.AjaxFailedAlert = ''; +ajax_qsearch.sack.encodeURIString = false; + +ajax_qsearch.init = function(inID,outID){ + if(ajax_qsearch.inObj == null) + ajax_qsearch.inObj = document.getElementById(inID); + if(ajax_qsearch.outObj == null) + ajax_qsearch.outObj = document.getElementById(outID); +} + +ajax_qsearch.clear = function(){ + ajax_qsearch.outObj.style.display = 'none'; + ajax_qsearch.outObj.innerHTML = ''; + if(ajax_qsearch.timer != null){ + window.clearTimeout(ajax_qsearch.timer); + ajax_qsearch.timer = null; + } +} + +ajax_qsearch.exec = function(){ + ajax_qsearch.clear(); + var value = ajax_qsearch.inObj.value; + if(value == '') return; + ajax_qsearch.sack.runAJAX('call=qsearch&q='+encodeURI(value)); +} + +ajax_qsearch.sack.onCompletion = function(){ + var data = ajax_qsearch.sack.response; + if(data == '') return; + + ajax_qsearch.outObj.innerHTML = data; + ajax_qsearch.outObj.style.display = 'block'; +} + +ajax_qsearch.call = function(inID,outID){ + ajax_qsearch.init(inID,outID); + ajax_qsearch.clear(); + ajax_qsearch.timer = window.setTimeout("ajax_qsearch.exec()",500); +} + diff --git a/lib/scripts/pngbehavior.htc b/lib/scripts/pngbehavior.htc new file mode 100644 index 000000000..d1db8e765 --- /dev/null +++ b/lib/scripts/pngbehavior.htc @@ -0,0 +1,53 @@ +// this is an ugly fix to make Internet Explorer work with transparent +// PNG images - do your self a favour and use a real browser! + + + + + diff --git a/lib/scripts/script.js b/lib/scripts/script.js new file mode 100644 index 000000000..5ad930281 --- /dev/null +++ b/lib/scripts/script.js @@ -0,0 +1,456 @@ +/** + * Some of these scripts were taken from wikipedia.org and were modified for DokuWiki + */ + +/** + * Some browser detection + */ +var clientPC = navigator.userAgent.toLowerCase(); // Get client info +var is_gecko = ((clientPC.indexOf('gecko')!=-1) && (clientPC.indexOf('spoofer')==-1) + && (clientPC.indexOf('khtml') == -1) && (clientPC.indexOf('netscape/7.0')==-1)); +var is_safari = ((clientPC.indexOf('AppleWebKit')!=-1) && (clientPC.indexOf('spoofer')==-1)); +var is_khtml = (navigator.vendor == 'KDE' || ( document.childNodes && !document.all && !navigator.taintEnabled )); +if (clientPC.indexOf('opera')!=-1) { + var is_opera = true; + var is_opera_preseven = (window.opera && !document.childNodes); + var is_opera_seven = (window.opera && document.childNodes); +} + + +/** + * This function escapes some special chars + */ +function escapeQuotes(text) { + var re=new RegExp("'","g"); + text=text.replace(re,"\\'"); + re=new RegExp('"',"g"); + text=text.replace(re,'"'); + re=new RegExp("\\n","g"); + text=text.replace(re,"\\n"); + return text; +} + +/** + * Prints a animated gif to show the search is performed + * + * @author Andreas Gohr + */ +function showLoadBar(){ + if(document.getElementById){ + document.write(''); + } +} + +/** + * Disables the animated gif to show the search is done + * + * @author Andreas Gohr + */ +function hideLoadBar(){ + if(document.getElementById){ + document.getElementById('loading').style.display="none"; + } +} + +/** + * Checks if a summary was entered - if not the style is changed + * + * @author Andreas Gohr + */ +function summaryCheck(){ + if(document.getElementById){ + var sum = document.getElementById('summary'); + if(sum.value == ''){ + sum.className='missing'; + }else{ + sum.className='edit'; + } + } +} + +/** + * This function generates the actual toolbar buttons with localized text + * we use it to avoid creating the toolbar where javascript is not enabled + */ +function formatButton(imageFile, speedTip, tagOpen, tagClose, sampleText, accessKey) { + speedTip=escapeQuotes(speedTip); + tagOpen=escapeQuotes(tagOpen); + tagClose=escapeQuotes(tagClose); + sampleText=escapeQuotes(sampleText); + + document.write(""); + + document.write("\""+"); + document.write(""); + return; +} + +/** + * This function generates the actual toolbar buttons with localized text + * we use it to avoid creating the toolbar where javascript is not enabled + */ +function insertButton(imageFile, speedTip, value, accessKey) { + speedTip=escapeQuotes(speedTip); + value=escapeQuotes(value); + + document.write(""); + + document.write("\""+"); + document.write(""); + return; +} + +/** + * This adds a button for the MediaSelection Popup + */ +function mediaButton(imageFile, speedTip, accessKey, namespace) { + speedTip=escapeQuotes(speedTip); + document.write(""); + document.write("\""+"); + document.write(""); + return; +} + +/** + * apply tagOpen/tagClose to selection in textarea, use sampleText instead + * of selection if there is none copied and adapted from phpBB + * + * @author phpBB development team + * @author MediaWiki development team + * @author Andreas Gohr + * @author Jim Raynor + */ +function insertTags(tagOpen, tagClose, sampleText) { + var txtarea = document.editform.wikitext; + // IE + if(document.selection && !is_gecko) { + var theSelection = document.selection.createRange().text; + var replaced = true; + if(!theSelection){ + replaced = false; + theSelection=sampleText; + } + txtarea.focus(); + + // This has change + text = theSelection; + if(theSelection.charAt(theSelection.length - 1) == " "){// exclude ending space char, if any + theSelection = theSelection.substring(0, theSelection.length - 1); + r = document.selection.createRange(); + r.text = tagOpen + theSelection + tagClose + " "; + } else { + r = document.selection.createRange(); + r.text = tagOpen + theSelection + tagClose; + } + if(!replaced){ + r.moveStart('character',-text.length-tagClose.length); + r.moveEnd('character',-tagClose.length); + } + r.select(); + // Mozilla + } else if(txtarea.selectionStart || txtarea.selectionStart == '0') { + var replaced = false; + var startPos = txtarea.selectionStart; + var endPos = txtarea.selectionEnd; + if(endPos - startPos) replaced = true; + var scrollTop=txtarea.scrollTop; + var myText = (txtarea.value).substring(startPos, endPos); + if(!myText) { myText=sampleText;} + if(myText.charAt(myText.length - 1) == " "){ // exclude ending space char, if any + subst = tagOpen + myText.substring(0, (myText.length - 1)) + tagClose + " "; + } else { + subst = tagOpen + myText + tagClose; + } + txtarea.value = txtarea.value.substring(0, startPos) + subst + + txtarea.value.substring(endPos, txtarea.value.length); + txtarea.focus(); + + //set new selection + if(replaced){ + var cPos=startPos+(tagOpen.length+myText.length+tagClose.length); + txtarea.selectionStart=cPos; + txtarea.selectionEnd=cPos; + }else{ + txtarea.selectionStart=startPos+tagOpen.length; + txtarea.selectionEnd=startPos+tagOpen.length+myText.length; + } + txtarea.scrollTop=scrollTop; + // All others + } else { + var copy_alertText=alertText; + var re1=new RegExp("\\$1","g"); + var re2=new RegExp("\\$2","g"); + copy_alertText=copy_alertText.replace(re1,sampleText); + copy_alertText=copy_alertText.replace(re2,tagOpen+sampleText+tagClose); + var text; + if (sampleText) { + text=prompt(copy_alertText); + } else { + text=""; + } + if(!text) { text=sampleText;} + text=tagOpen+text+tagClose; + //append to the end + txtarea.value += "\n"+text; + + // in Safari this causes scrolling + if(!is_safari) { + txtarea.focus(); + } + + } + // reposition cursor if possible + if (txtarea.createTextRange) txtarea.caretPos = document.selection.createRange().duplicate(); +} + + +/* + * Insert the selected filename and close the window + * + * @see http://www.alexking.org/index.php?content=software/javascript/content.php + */ +function mediaSelect(file){ + insertAtCarret(opener.document.editform.wikitext,'{{'+file+'}}'); + window.close(); +} + +/* + * Insert the given value at the current cursor position + * + * @see http://www.alexking.org/index.php?content=software/javascript/content.php + */ +function insertAtCarret(field,value){ + //IE support + if (document.selection) { + field.focus(); + if(opener == null){ + sel = document.selection.createRange(); + }else{ + sel = opener.document.selection.createRange(); + } + sel.text = value; + //MOZILLA/NETSCAPE support + }else if (field.selectionStart || field.selectionStart == '0') { + var startPos = field.selectionStart; + var endPos = field.selectionEnd; + var scrollTop = field.scrollTop; + field.value = field.value.substring(0, startPos) + + value + + field.value.substring(endPos, field.value.length); + + field.focus(); + var cPos=startPos+(value.length); + field.selectionStart=cPos; + field.selectionEnd=cPos; + field.scrollTop=scrollTop; + } else { + field.value += "\n"+value; + } + // reposition cursor if possible + if (field.createTextRange) field.caretPos = document.selection.createRange().duplicate(); +} + +/** + * For the upload Dialog. Prefills the wikiname. + */ +function suggestWikiname(){ + var file = document.upload.upload.value; + + file = file.substr(file.lastIndexOf('/')+1); + file = file.substr(file.lastIndexOf('\\')+1); + + document.upload.id.value = file; +} + +/** + * This prints the switch to toggle the Table of Contents + */ +function showTocToggle(show,hide) { + if(document.getElementById) { + document.writeln(''); + } +} + +/** + * This toggles the visibility of the Table of Contents + */ +function toggleToc() { + var toc = document.getElementById('tocinside'); + var showlink=document.getElementById('showlink'); + var hidelink=document.getElementById('hidelink'); + if(toc.style.display == 'none') { + toc.style.display = tocWas; + hidelink.style.display=''; + showlink.style.display='none'; + } else { + tocWas = toc.style.display; + toc.style.display = 'none'; + hidelink.style.display='none'; + showlink.style.display=''; + + } +} + +/** + * Sizecontrol inspired by TikiWiki. This displays the buttons. + */ +function showSizeCtl(){ + if(document.getElementById) { + var textarea = document.getElementById('wikitext'); + var hgt = getCookie('DokuWikisizeCtl'); + if(hgt == null){ + textarea.style.height = '300px'; + }else{ + textarea.style.height = hgt; + } + document.writeln(''); + document.writeln(''); + } +} + +/** + * This sets the vertical size of the editbox + */ +function sizeCtl(val){ + var textarea = document.getElementById('wikitext'); + var height = parseInt(textarea.style.height.substr(0,textarea.style.height.length-2)); + height += val; + textarea.style.height = height+'px'; + + var now = new Date(); + fixDate(now); + now.setTime(now.getTime() + 365 * 24 * 60 * 60 * 1000); //expire in a year + setCookie('DokuWikisizeCtl',textarea.style.height,now); +} + + +/** + * global var used for not saved yet warning + */ +var textChanged = false; + +function svchk(){ + if(textChanged){ + return confirm(notSavedYet); + }else{ + return true; + } +} + +/** + * global variable for the locktimer + */ +var locktimerID; + +/** + * This starts a timer to remind the user of an expiring lock + * Accepts the delay in seconds and a text to display. + */ +function init_locktimer(delay,txt){ + txt = escapeQuotes(txt); + locktimerID = self.setTimeout("locktimer('"+txt+"')", delay*1000); +} + +/** + * This stops the timer and displays a message about the expiring lock + */ +function locktimer(txt){ + clearTimeout(locktimerID); + alert(txt); +} + +/* + * This sets a cookie by JavaScript + * + * @see http://www.webreference.com/js/column8/functions.html + */ +function setCookie(name, value, expires, path, domain, secure) { + var curCookie = name + "=" + escape(value) + + ((expires) ? "; expires=" + expires.toGMTString() : "") + + ((path) ? "; path=" + path : "") + + ((domain) ? "; domain=" + domain : "") + + ((secure) ? "; secure" : ""); + document.cookie = curCookie; +} + +/* + * This reads a cookie by JavaScript + * + * @see http://www.webreference.com/js/column8/functions.html + */ +function getCookie(name) { + var dc = document.cookie; + var prefix = name + "="; + var begin = dc.indexOf("; " + prefix); + if (begin == -1) { + begin = dc.indexOf(prefix); + if (begin != 0) return null; + } else + begin += 2; + var end = document.cookie.indexOf(";", begin); + if (end == -1) + end = dc.length; + return unescape(dc.substring(begin + prefix.length, end)); +} + +/* + * This is needed for the cookie functions + * + * @see http://www.webreference.com/js/column8/functions.html + */ +function fixDate(date) { + var base = new Date(0); + var skew = base.getTime(); + if (skew > 0) + date.setTime(date.getTime() - skew); +} + +/* + * This enables/disables checkboxes for acl-administration + * + * @author Frank Schubert + */ +function checkAclLevel(){ + if(document.getElementById) { + var scope = document.getElementById('acl_scope').value; + + //check for namespace + if( (scope.indexOf(":*") > 0) || (scope == "*") ){ + document.getElementsByName('acl_checkbox[4]')[0].disabled=false; + document.getElementsByName('acl_checkbox[8]')[0].disabled=false; + }else{ + document.getElementsByName('acl_checkbox[4]')[0].checked=false; + document.getElementsByName('acl_checkbox[8]')[0].checked=false; + + document.getElementsByName('acl_checkbox[4]')[0].disabled=true; + document.getElementsByName('acl_checkbox[8]')[0].disabled=true; + } + } +} diff --git a/lib/scripts/tw-sack.js b/lib/scripts/tw-sack.js new file mode 100644 index 000000000..8a9d12746 --- /dev/null +++ b/lib/scripts/tw-sack.js @@ -0,0 +1,95 @@ +// ====== Simple Ajax Code Kit ======= +// code by Gregory Wild-Smith (c)2005 +// http://twilightuniverse.com +// If you use this code please keep this credit intact. +// A link or email would be nice, but is not required. +// v1.01 + +function sack(file){ + this.AjaxFailedAlert = "Your browser doesn't support the extended functionality of this website, and therefore you have have an experience that differs from the intended one.\n"; + this.requestFile = file; + this.method = "POST"; + this.URLString = ""; + this.encodeURIString = true; + this.execute = false; + + this.onLoading = function() { }; + this.onLoaded = function() { }; + this.onInteractive = function() { }; + this.onCompletion = function() { }; + + this.createAJAX = function() { + try { + this.xmlhttp = new ActiveXObject("Msxml2.XMLHTTP"); + } catch (e) { + try { + this.xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); + } catch (oc) { + this.xmlhttp = null; + } + } + if(!this.xmlhttp && typeof XMLHttpRequest != "undefined") + this.xmlhttp = new XMLHttpRequest(); + if (!this.xmlhttp){ + // no XMLHttpRequest support, so no AJAX. + this.failed = true; + } + }; + + this.encodeURLString = function(string){ + varArray = string.split('&'); + for (i = 0; i < varArray.length; i++){ + urlVars = varArray[i].split('='); + if (urlVars[0].indexOf('amp;') != -1){ + urlVars[0] = urlVars[0].substring(4); + } + urlVars[0] = encodeURIComponent(urlVars[0]); + urlVars[1] = encodeURIComponent(urlVars[1]); + varArray[i] = urlVars.join("="); + } + return varArray.join('&'); + } + + this.runResponse = function(){ + eval(this.response); + } + + this.runAJAX = function(urlstring){ + if (urlstring){ this.URLString = urlstring; } + if (this.element) { this.elementObj = document.getElementById(this.element); } + if (this.xmlhttp) { + var self = this; // wierd fix for odd behavior where "this" wouldn't work in the readystate function. + this.xmlhttp.open(this.method, this.requestFile ,true); + if (this.method == "POST" && this.xmlhttp.setRequestHeader) { + this.xmlhttp.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded') + } + if (this.encodeURIString){ this.URLString = this.encodeURLString(this.URLString); } + this.xmlhttp.send(this.URLString); + this.xmlhttp.onreadystatechange = function() { + switch (self.xmlhttp.readyState){ + case 1: // Loading. + self.onLoading(); + break; + case 2: // Loaded. + self.onLoaded(); + break; + case 3: // Interactive - is called every 4096 bytes.. pretty much just tells you it's downloading data. + self.onInteractive(); + break; + case 4: // Completed. + self.response = self.xmlhttp.responseText; + self.responseXML = self.xmlhttp.responseXML; + self.onCompletion(); + if(self.execute){ self.runResponse(); } + if (self.elementObj) { + self.elementObj.innerHTML = self.response; + } + break; + } + }; + } + }; +this.createAJAX(); +//if(this.failed && this.AjaxFailedAlert){ alert(this.AjaxFailedAlert); } +} +//Setup VIM: ex: et ts=2 enc=utf-8 : diff --git a/lib/styles/feed.css b/lib/styles/feed.css new file mode 100644 index 000000000..0fcc222cd --- /dev/null +++ b/lib/styles/feed.css @@ -0,0 +1,63 @@ +rss channel, feed, RDF { + font: 80% "Lucida Grande", Verdana, Lucida, Helvetica, Arial, sans-serif; + background-color: White; + color: Black; + margin: 0; + padding: 0; +} + + +link, description, language, managingEditor, copyright, lastBuildDate, date, +pubDate, generator, webMaster, ttl, docs, tagline, author, copyright, +generator, content, created, issued, modified, subject, id, format, creator, +category { + display: none; +} + +item link, entry id { + display: block; + color:#436976; + text-decoration:underline; +} + +channel title, feed title { + display: block; + font-size:200%; + font-weight:bolder; + color:#436976; + text-decoration:none; + border-bottom: 20px solid #dee7ec; +} + +:root:before, :root:before { + content: "This data file is meant to be read in a XML feed reader. See document source." +} + +item, entry { + display: block; + margin: 1em 180px 1em 1em; + border-bottom: 1px solid #8cacbb; + padding-bottom: 1em; +} + +item title, entry title { + display: block; + background: transparent none; + border: 0px solid #ffffff; + padding: 0; + color: #222; + font-size: 1.4em; + font-weight: bold; +} + +item pubDate, entry modified, item date { + display: inline; + color: #AAA; + font: 1em trebuchet ms, arial, helvetica, sans-serif; +} + +item description, entry summary { + display: block; + clear: both; + padding-top: 0.5em; +} diff --git a/lib/styles/style.css b/lib/styles/style.css new file mode 100644 index 000000000..ff9bdf3ce --- /dev/null +++ b/lib/styles/style.css @@ -0,0 +1,44 @@ +div.clearer {clear: both; line-height: 0; height: 0;} + +div.error{ + background: #ff6666 url(../images/error.png) 0.5em 0px no-repeat; + font-size: 90%; + margin: 0px; + padding-left: 3em; +} + +div.info{ + background: #ffff66 url(../images/info.png) 0.5em 0px no-repeat; + font-size: 90%; + margin: 0; + padding-left: 3em; +} + +div.success{ + background: #66ff66 url(../images/thumbup.gif) 0.5em 0px no-repeat; + font-size: 90%; + margin: 0; + padding-left: 3em; +} + +/* syntax highlighting code */ +.code .br0 { color: #66cc66; } +.code .co1 { color: #808080; font-style: italic; } +.code .co2 { color: #808080; font-style: italic; } +.code .coMULTI { color: #808080; font-style: italic; } +.code .es0 { color: #000099; font-weight: bold; } +.code .kw1 { color: #b1b100; } +.code .kw2 { color: #000000; font-weight: bold; } +.code .kw3 { color: #000066; } +.code .kw4 { color: #993333; } +.code .kw5 { color: #0000ff; } +.code .me0 { color: #006600; } +.code .nu0 { color: #cc66cc; } +.code .re0 { color: #0000ff; } +.code .re1 { color: #0000ff; } +.code .re2 { color: #0000ff; } +.code .re4 { color: #009999; } +.code .sc0 { color: #00bbdd; } +.code .sc1 { color: #ddbb00; } +.code .sc2 { color: #009900; } +.code .st0 { color: #ff0000; } diff --git a/lib/tpl/default/design.css b/lib/tpl/default/design.css new file mode 100644 index 000000000..14c419df4 --- /dev/null +++ b/lib/tpl/default/design.css @@ -0,0 +1,642 @@ +/** + * Design elements for default Template + * + * @author Andreas Gohr + * @author Anika Henke + */ + +/* -------------- general elements --------------- */ + +body { + font: 80% "Lucida Grande", Verdana, Lucida, Helvetica, Arial, sans-serif; + background-color: White; + color: Black; + margin: 0; + padding: 0; +} + +/* the document */ +div.page { + margin-top: 4px; + margin-left: 1em; + margin-right: 2em; + text-align: justify; +} + +table { + font-size: 100%; + padding:0; + margin:0; +} + +tr,td,th {padding:0; margin:0;} + +img {border:0} + +p {padding:0; margin: 0 0 1.0em 0;} + +hr { + border: 0px; + border-top: 1px solid #8cacbb; + text-align:center; + height: 0px; +} + +div.nothing { + text-align:center; + margin: 2em; +} + +/* ---------------- forms ------------------------ */ + +form { + border: none; + margin: 0; + display: inline; +} + +label { + display: block; + text-align: right; + font-weight: bold; +} + +label.simple { + text-align: left; + font-weight: normal; +} + +label input.edit { + width: 50%; +} + +fieldset { + width: 300px; + text-align: center; + border: 1px solid #8cacbb; + padding: 0.5em; +} + +textarea.edit { + font-family:monospace; + border: 1px solid #8cacbb; + color: Black; + background-color: white; + font-size:14px; + padding: 3px; + width:100%; +} + +input.edit,select.edit { + font-size: 100%; + border: 1px solid #8cacbb; + height: 22px !important; + max-height: 22px !important; + min-height: 22px !important; + color: Black; + background-color: white; + vertical-align: middle; + padding: 1px; + display: inline; +} + +input.missing { + font-size: 100%; + border: 1px solid #8cacbb; + height: 22px !important; + max-height: 22px !important; + min-height: 22px !important; + color: Black; + background-color: #ffcccc; + vertical-align: middle; + padding: 1px; + display: inline; +} + +/* --------- buttons ------------------- */ + + +input.button { + border: 1px solid #8cacbb; + color: Black; + background-color: white; + vertical-align: middle; + text-decoration:none; + font-size: 100%; + cursor: pointer; + height: 22px !important; + max-height: 22px !important; + min-height: 22px !important; + margin: 1px; + display: inline; +} + +div.secedit input.button { + border: 1px solid #8cacbb; + color: Black; + background-color: white; + vertical-align: middle; + text-decoration:none; + margin: 0px; + padding: 0px; + font-size: 10px; + cursor: pointer; + height: 15px; + max-height: 15px !important; + min-height: 15px !important; + float:right; + display: inline; +} + +/* ----------- page navigator ------------- */ + +div.pagenav { + margin-top:1em; +} + +div.pagenav-prev { + text-align:right; + float:left; + width:50% +} + +div.pagenav-prev input.button { + margin-right:5px; +} + +div.pagenav-next { + text-align:left; + float:right; + width:50% +} + +div.pagenav-next input.button { + margin-left:5px; +} + +/* --------------- Links ------------------ */ + +a { + color:#436976; + text-decoration:none; +} +a:hover { + color:#000000; + text-decoration:underline; +} + +/* external link */ +a.urlextern{ + background: transparent url(images/link_icon.gif) 0px 1px no-repeat; + padding: 1px 0px 1px 16px; + color:#436976; + text-decoration:none; +} +a.urlextern:visited { + color:Purple; +} +a.urlextern:hover { + text-decoration:underline; +} + +/* windows share */ +a.windows{ + background: transparent url(images/windows.gif) 0px 1px no-repeat; + padding: 1px 0px 1px 16px; + color:#436976; + text-decoration:none; +} +a.windows:visited { + color:Purple; +} +a.windows:hover { + text-decoration:underline; +} + +/* interwiki link */ +a.interwiki{ + background: transparent url(images/interwiki.png) 0px 1px no-repeat; + padding-left: 16px; + color:#436976; + text-decoration:none; +} +a.interwiki:visited { + color:Purple; +} +a.interwiki:hover { + text-decoration:underline; +} + +/* link to some embedded media */ +a.media { + color:#436976; + text-decoration:none; +} +a.media:hover { + color:#436976; + text-decoration:underline +} + +/* email link */ +a.mail { + background: transparent url(images/mail_icon.gif) 0px 1px no-repeat; + padding: 1px 0px 1px 16px; + color:#436976; + text-decoration:none; +} +a.mail:hover { + text-decoration:underline; +} + +/* existing wikipage */ +a.wikilink1:link { color:#009900; text-decoration:none } +a.wikilink1:visited { color:#009900; text-decoration:none } +a.wikilink1:hover { color:#009900; text-decoration:underline } + +/* not existing wikipage */ +a.wikilink2:link { color:#FF3300; text-decoration:none } +a.wikilink2:visited { color:#FF3300; text-decoration:none } +a.wikilink2:hover { color:#FF3300; text-decoration:underline } + + +/* ------------- Page elements ----------------- */ + +div.preview{ + background:#f7f9fa; + margin-left:2em; + padding: 4px; + border: 1px dashed #000000; +} + +div.breadcrumbs{ + background-color: #f5f5f5; + font-size:80%; + color: #666666; + padding-left: 4px; +} + +span.user{ + color: #cccccc; + font-size: 90%; +} + +/* embedded images */ +img.media { + margin: 3px; +} + +img.medialeft { + border: 0; + float: left; + margin: 0 1.5em 0 0; +} + +img.mediaright { + border: 0; + float: right; + margin: 0 0 0 1.5em; +} + +img.mediacenter { + border: 0; + display: block; + margin-left: auto; + margin-right: auto; +} + +acronym { + cursor: help; + border-bottom: 1px dotted #000; +} + +/* general headline setup */ +h1, h2, h3, h4, h5 { + color: Black; + background-color: transparent; + font-family: "Lucida Grande", Verdana, Lucida, Helvetica, Arial, sans-serif; + font-size: 100%; + font-weight: normal; + margin-left: 0; + margin-right: 0; + margin-top: 0; + margin-bottom: 1em; + padding-left: 0; + padding-right: 0; + padding-top: 0.5em; + padding-bottom: 0; + border-bottom: 1px solid #8cacbb; + clear: left; +} + +/* special headlines */ +h1 {font-size: 160%; margin-left: 0px; font-weight: bold;} +h2 {font-size: 150%; margin-left: 20px;} +h3 {font-size: 140%; margin-left: 40px; border-bottom: none; font-weight: bold;} +h4 {font-size: 120%; margin-left: 60px; border-bottom: none; font-weight: bold;} +h5 {font-size: 100%; margin-left: 80px; border-bottom: none; font-weight: bold;} + +/* indent different sections */ +div.level1 {margin-left: 3px;} +div.level2 {margin-left: 23px;} +div.level3 {margin-left: 43px;} +div.level4 {margin-left: 63px;} +div.level5 {margin-left: 83px;} + +/* unordered lists */ +ul { + line-height: 1.5em; + list-style-type: square; + margin: 0 0 0.5em 1.5em; + padding: 0; + list-style-image: url(images/bullet.gif); +} + +/* ordered lists */ +ol { + line-height: 1.5em; + margin: 0 0 0.5em 1.5em; + padding: 0; + color: #638c9c; + font-weight: bold; + list-style-image: none; +} + +/* the list items overriding the ol definition */ +span.li { + color: #000000; + font-weight: normal; +} + +ol {list-style-type: decimal} +ol ol {list-style-type: upper-roman} +ol ol ol {list-style-type: lower-alpha} +ol ol ol ol {list-style-type: lower-greek} + +li.open { + list-style-image: url(images/open.gif); +} + +li.closed { + list-style-image: url(images/closed.gif); +} + +blockquote { + border-left: 2px solid #8cacbb; + padding-left: 3px; + margin-left: 0; +} + +/* code blocks by indention */ +pre.pre { + font-size: 120%; + padding: 0.5em; + border: 1px dashed #8cacbb; + color: Black; + background-color: #f7f9fa; + overflow: auto; +} + +/* code blocks by code tag */ +pre.code { + font-size: 120%; + padding: 0.5em; + border: 1px dashed #8cacbb; + color: Black; + background-color: #f7f9fa; + overflow: auto; +} + +/* inline code words */ +code { + font-size: 120%; +} + +/* code blocks by file tag */ +pre.file { + font-size: 120%; + padding: 0.5em; + border: 1px dashed #8cacbb; + color: Black; + background-color: #dee7ec; + overflow: auto; +} + +/* inline tables */ +table.inline { + background-color: #ffffff; + border-spacing: 0px; + border-collapse: collapse; +} + +table.inline th { + padding: 3px; + border: 1px solid #8cacbb; + background-color: #dee7ec; +} + +table.inline td { + padding: 3px; + border: 1px solid #8cacbb; +} + +.leftalign{ + text-align: left; +} + +.centeralign{ + text-align: center; +} + +.rightalign{ + text-align: right; +} + +/* ---------- table of contents ------------------- */ + +div.toc { + margin-left: 2em; + margin-top: 1.2em; + margin-bottom: 0; + float:right; + width: 200px; + font-size: 80%; + clear:both; +} + +div.tocheader { + padding: 3px; + border: 1px solid #8cacbb; + background-color: #dee7ec; + text-align: left; + font-weight:bold; + margin-bottom: 2px; +} + +div.toctoggle { + float:right; + margin-top:0.3em; + margin-right:3px; +} + +div.toctoggle img { + width:0.8em; + height:0.8em; +} + +#tocinside { + border: 1px solid #8cacbb; + background-color: #ffffff; + text-align: left; + padding-top: 0.5em; + padding-bottom: 0.7em; +} + +ul.toc { + list-style-type: none; + list-style-image: none; + line-height: 1.2em; + margin: 0; + padding: 0; + padding-left: 1em; +} + +ul.toc li { + background: transparent url(images/tocdot2.gif) 0 0.6em no-repeat; + padding-left:0.4em; +} + +ul.toc li.clear { + background-image: none; + padding-left:0.4em; +} + +a.toc { + color: #436976; + text-decoration:none; +} + +a.toc:hover { + color: #000000; + text-decoration:underline; +} + +/* ---------------------------- Diff rendering --------------------------*/ +table.diff { background:white; } +td.diff-blockheader {font-weight:bold} +td.diff-header { + border-bottom: 1px solid #8cacbb; + font-size:120%; +} +td.diff-addedline { + background:#ddffdd; + font-family: monospace; + font-size: 100%; +} +td.diff-deletedline { + background:#ffffbb; + font-family: monospace; + font-size: 100%; +} +td.diff-context { + background:#f7f9fa; + font-family: monospace; + font-size: 100%; +} +span.diffchange { color: red; } + +/* --------------------- footnotes -------------------------------- */ + +div.footnotes{ + clear:both; + border-top: 1px solid #8cacbb; + padding-left: 1em; + margin-top: 1em; +} + +div.fn{ + font-size:90%; +} + +a.fn_top{ + vertical-align:super; + font-size:80%; +} + +a.fn_bot{ + vertical-align:super; + font-size:80%; + font-weight:bold; +} + + +/* --------------- search result formating --------------- */ +.search_result{ + margin-bottom: 6px; + padding-left: 30px; + padding-right: 10px; +} + +.search_snippet{ + color: #999999; + font-size: 12px; + margin-left: 20px; +} + +.search_sep{ + color: #000000; +} + +.search_hit{ + color: #000000; + background: #FFFF99; +} + +div.search_quickresult{ + margin-bottom: 15px; + padding-bottom: 5px; + border-bottom: 1px dashed #8cacbb; + margin-left: 30px; + padding-right: 10px; +} + +div.search_quickhits { + margin-left: 1em; + float:left; + background: transparent url(images/bullet.gif) 0px 1px no-repeat; + padding: 1px 0px 1px 8px; + width: 30%; +} + +/* ------------------ Additional ---------------------- */ +.footerinc a img { + opacity: 0.5; +} + +.footerinc a:hover img { + opacity: 1; +} + +/* ---- Admin --- */ + +div.acladmin label { + text-align: left; + font-weight: normal; + display: inline; +} + +div.acladmin table{ + margin-left: 10%; + width: 80%; +} + +/* ---------- AJAX quicksearch ----------- */ + +div.ajax_qsearch { + position:absolute; + right:225px;; + text-align:left; + width: 200px; + background-color: #ff9; + opacity: 0.9; + display:none; +} diff --git a/lib/tpl/default/footer.html b/lib/tpl/default/footer.html new file mode 100644 index 000000000..577bb3b3c --- /dev/null +++ b/lib/tpl/default/footer.html @@ -0,0 +1,56 @@ + + +
+ Recent changes RSS feed + + Creative Commons License + + Donate + + Powered by PHP + + Valid XHTML 1.0 + + Valid CSS + + Driven by DokuWiki + + + + + +
diff --git a/lib/tpl/default/images/bullet.gif b/lib/tpl/default/images/bullet.gif new file mode 100644 index 000000000..b43de48a4 Binary files /dev/null and b/lib/tpl/default/images/bullet.gif differ diff --git a/lib/tpl/default/images/button-cc.gif b/lib/tpl/default/images/button-cc.gif new file mode 100644 index 000000000..5861d637f Binary files /dev/null and b/lib/tpl/default/images/button-cc.gif differ diff --git a/lib/tpl/default/images/button-css.png b/lib/tpl/default/images/button-css.png new file mode 100644 index 000000000..706325e1c Binary files /dev/null and b/lib/tpl/default/images/button-css.png differ diff --git a/lib/tpl/default/images/button-donate.gif b/lib/tpl/default/images/button-donate.gif new file mode 100644 index 000000000..ec682c6b1 Binary files /dev/null and b/lib/tpl/default/images/button-donate.gif differ diff --git a/lib/tpl/default/images/button-dw.png b/lib/tpl/default/images/button-dw.png new file mode 100644 index 000000000..39d5f56a9 Binary files /dev/null and b/lib/tpl/default/images/button-dw.png differ diff --git a/lib/tpl/default/images/button-php.gif b/lib/tpl/default/images/button-php.gif new file mode 100644 index 000000000..28f329aaa Binary files /dev/null and b/lib/tpl/default/images/button-php.gif differ diff --git a/lib/tpl/default/images/button-rss.png b/lib/tpl/default/images/button-rss.png new file mode 100644 index 000000000..b036f7152 Binary files /dev/null and b/lib/tpl/default/images/button-rss.png differ diff --git a/lib/tpl/default/images/button-xhtml.png b/lib/tpl/default/images/button-xhtml.png new file mode 100644 index 000000000..ec686442c Binary files /dev/null and b/lib/tpl/default/images/button-xhtml.png differ diff --git a/lib/tpl/default/images/closed.gif b/lib/tpl/default/images/closed.gif new file mode 100644 index 000000000..8414d4d69 Binary files /dev/null and b/lib/tpl/default/images/closed.gif differ diff --git a/lib/tpl/default/images/interwiki.png b/lib/tpl/default/images/interwiki.png new file mode 100644 index 000000000..73d6f8d39 Binary files /dev/null and b/lib/tpl/default/images/interwiki.png differ diff --git a/lib/tpl/default/images/link_icon.gif b/lib/tpl/default/images/link_icon.gif new file mode 100644 index 000000000..815ccb1b1 Binary files /dev/null and b/lib/tpl/default/images/link_icon.gif differ diff --git a/lib/tpl/default/images/mail_icon.gif b/lib/tpl/default/images/mail_icon.gif new file mode 100644 index 000000000..50a87a9a0 Binary files /dev/null and b/lib/tpl/default/images/mail_icon.gif differ diff --git a/lib/tpl/default/images/open.gif b/lib/tpl/default/images/open.gif new file mode 100644 index 000000000..f5d5c7e56 Binary files /dev/null and b/lib/tpl/default/images/open.gif differ diff --git a/lib/tpl/default/images/tocdot2.gif b/lib/tpl/default/images/tocdot2.gif new file mode 100644 index 000000000..3d39c2e73 Binary files /dev/null and b/lib/tpl/default/images/tocdot2.gif differ diff --git a/lib/tpl/default/images/windows.gif b/lib/tpl/default/images/windows.gif new file mode 100644 index 000000000..4f12acce1 Binary files /dev/null and b/lib/tpl/default/images/windows.gif differ diff --git a/lib/tpl/default/layout.css b/lib/tpl/default/layout.css new file mode 100644 index 000000000..fea7c58ab --- /dev/null +++ b/lib/tpl/default/layout.css @@ -0,0 +1,109 @@ +/** + * Tableless Layout for default template + * + * @author Andreas Gohr + * @author moraes + */ + + +/* -------------- top row --------------- */ +.header { + height:35px; + padding:3px 0 2px 2px; +} + +.pagename { + height:25px; + float:left; + font-size:200%; + font-weight:bolder; + color:#DEE7EC; + text-align:left; + vertical-align:middle; + padding:1px 0 0 1px; +} + +.pagename a:link, .pagename a:visited { + color:#436976; + text-decoration:none; +} + +.pagename a:hover, .pagename a:active { + color:#FF9933; +} + +.logo { + float:right; + font-size:220%; + font-weight:bolder; + text-align:right; + vertical-align:middle; +} + +.logo a:link, .logo a:visited, .logo a:hover, .logo a:active { + color:#dee7ec; + text-decoration:none; + font-variant:small-caps; + letter-spacing:2pt; +} + +/* --------------- top and bottom bar ---------------- */ +.bar { + height:25px; + border-top:1px solid #8CACBB; + border-bottom:1px solid #8CACBB; + background:#DEE7EC; + padding:2px; + margin:0; + clear: both; +} + +.bar-left { + float:left; +} + +.bar-right { + float:right; + text-align:right; +} + +#bar_bottom { + margin-bottom:3px; +} + +/* ------------- File Metadata ----------------------- */ + +div.meta { + clear: both; + margin-top: 1em; + color:#436976; + font-size:70%; +} + +div.meta div.user { + float:left; +} + +div.meta div.doc{ + text-align:right; +} + +/* --------------- Media Selection ----------------- */ + +div.uploadform { + margin-top: 0.5em; + border-top: 1px solid #8cacbb; +} + +.mediaselect-left { + float:left; + padding: 0.5em; + width:30%; +} + +.mediaselect-right { + float:right; + border-left: 1px solid #8cacbb; + padding: 0.5em; + width:65%; +} diff --git a/lib/tpl/default/main.php b/lib/tpl/default/main.php new file mode 100644 index 000000000..28ad48f6f --- /dev/null +++ b/lib/tpl/default/main.php @@ -0,0 +1,129 @@ + + + */ +?> + + + <?=$ID?> [<?=hsc($conf['title'])?>] + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+ [[]] +
+ +
+ + + +
+
+ + +
+ +
+ +   +
+
+ + + + + +
+ + + + +
+ + + +
+ +
 
+ + + +
+ +
+
+ +
+
+ +
+
+ + + +
+
+ + +
+
+ + + +   +
+
+ +
+ +
+ + + diff --git a/lib/tpl/default/media.php b/lib/tpl/default/media.php new file mode 100644 index 000000000..507717463 --- /dev/null +++ b/lib/tpl/default/media.php @@ -0,0 +1,61 @@ + + + */ +?> + + + <?=hsc($lang['mediaselect'])?> [<?=hsc($conf['title'])?>] + + + + + + + + + + + + +
+ + +

+ +
+ +
+ + + +
+ +
+ + +
+ +
+
+ +
+ +
+ diff --git a/lib/tpl/default/print.css b/lib/tpl/default/print.css new file mode 100644 index 000000000..77c82a580 --- /dev/null +++ b/lib/tpl/default/print.css @@ -0,0 +1,223 @@ + +body { + font: 12pt "Lucida Grande", Verdana, Lucida, Helvetica, Arial, sans-serif; + background-color: White; + color: Black; +} + +table { + font-size: 100%; + padding:0; + margin:0; +} + +tr,td,th {padding:0; margin:0;} + +img {border:0} + +a { + color:#000000; + text-decoration:none; +} + + +div.meta { + clear:both; + margin-top: 1em; + font-size:70%; + text-align:right; +} + +div.breadcrumbs{ + display:none; +} + +div.secedit{ + display:none; +} + +/* --------------------- Text formating -------------------------------- */ + +/* external link */ +a.urlextern:after { + content: " [" attr(href) "]"; + font-size: 90%; +} + +/* interwiki link */ +a.interwiki:after { + content: " [" attr(href) "]"; + font-size: 90%; +} + +/* email link */ +a.mail:after { + content: " [" attr(href) "]"; + font-size: 90%; +} + +/* existing wikilink */ +a.wikilink1 {text-decoration:underline } + +/* the document */ +div.page { + text-align: justify; +} + +/* general headline setup */ +h1, h2, h3, h4, h5 { + color: Black; + background-color: transparent; + font-family: "Lucida Grande", Verdana, Lucida, Helvetica, Arial, sans-serif; + font-size: 100%; + font-weight: normal; + margin-left: 0; + margin-right: 0; + margin-top: 0; + margin-bottom: 1em; + padding-left: 0; + padding-right: 0; + padding-top: 0.5em; + padding-bottom: 0; + border-bottom: 1px solid #000000; + clear:left; +} + +/* special headlines */ +h1 {font-size: 160%; font-weight: bold;} +h2 {font-size: 150%; } +h3 {font-size: 140%; border-bottom: none; font-weight: bold;} +h4 {font-size: 120%; border-bottom: none; font-weight: bold;} +h5 {font-size: 100%; border-bottom: none; font-weight: bold;} + +/* embedded images */ +img.media { + margin: 3px; +} + +img.medialeft { + border: 0; + float: left; + margin: 0 1.5em 0 0; +} + +img.mediaright { + border: 0; + float: right; + margin: 0 0 0 1.5em; +} + +/* unordered lists */ +ul { + line-height: 1.5em; + list-style-type: square; + margin: 0 0 1.0em 1.5em; + padding: 0; + +} + +/* ordered lists */ +ol { + line-height: 1.5em; + margin: 0 0 1.0em 1.5em; + padding: 0; + font-weight: bold; +} + +/* the list items overriding the ol definition */ +span.li { + font-weight: normal; +} + +/* code blocks by indention */ +pre.pre { + font-size: 8pt; + padding: 0.5em; + border: 1px dashed #000000; + color: Black; + overflow: visible; +} + +/* code blocks by code tag */ +pre.code { + font-size: 8pt; + padding: 0.5em; + border: 1px dashed #000000; + color: Black; + overflow: visible; +} + +/* inline code words */ +code { + font-size: 120%; +} + +/* code blocks by file tag */ +pre.file { + font-size: 8pt; + padding: 0.5em; + border: 1px dotted #000000; + color: Black; + overflow: visible; +} + +/* footnotes */ +div.footnotes{ + clear:both; + border-top: 1px solid #000000; + padding-left: 1em; + margin-top: 1em; +} + +div.fn{ + font-size:90%; +} + +a.fn_top{ + vertical-align:super; + font-size:80%; +} + +a.fn_bot{ + vertical-align:super; + font-size:80%; + font-weight:bold; +} + +acronym{ + border: 0; +} + +/* ---------- inline tables ------------------- */ + +table.inline { + font-size: 80%; + background-color: #ffffff; + border-spacing: 0px; + border-collapse: collapse; +} + +table.inline th { + padding: 3px; + border: 1px solid #000000; + border-bottom: 2px solid #000000; +} + +table.inline td { + padding: 3px; + border: 1px solid #000000; +} + +.leftalign{ + text-align: left; +} + +.centeralign{ + text-align: center; +} + +.rightalign{ + text-align: right; +} + +.toc, .footerinc, .header, .bar, .user {display:none} diff --git a/lib/tpl/default/rtl.css b/lib/tpl/default/rtl.css new file mode 100644 index 000000000..9a8294774 --- /dev/null +++ b/lib/tpl/default/rtl.css @@ -0,0 +1,111 @@ +/** + * Layout and dedsign corrections for right-to-left languages + * + * @author Andreas Gohr + * @author Dotan Kamber + */ + +.bar-left { + float: right; + text-align: right; +} + +.bar-right { + float: left; + text-align: left; +} + +.pagename { + float: right; + text-align: right; +} + +.logo { + float: left; + text-align: left; +} + +label { + text-align: left; +} + +label.simple { + text-align: right; +} + +div.meta div.user { + float: right +} + +div.meta div.doc{ + text-align: left; +} + +/* ------------------ Design corrections --------------------------------- */ + +ul,ol { + margin: 0.5em 1.5em 0.5em 0; +} + +a.urlextern,a.interwiki,a.windows{ + /* should work but dosn't - so we just disable icons here*/ + /* + background-position: right 1px; + padding-right: 16px; + */ + background-image: none !important; + padding: 0; +} + +div.secedit input.button { + float: left; +} + +/* headlines */ +h1, h2, h3, h4, h5 { + clear: right; +} + +/* special headlines */ +h1 {margin-left: 0px; margin-right: 0px;} +h2 {margin-left: 0px; margin-right: 20px;} +h3 {margin-left: 0px; margin-right: 40px;} +h4 {margin-left: 0px; margin-right: 60px;} +h5 {margin-left: 0px; margin-right: 80px;} + +/* indent different sections */ +div.level1 {margin-left: 0px; margin-right: 3px;} +div.level2 {margin-left: 0px; margin-right: 23px;} +div.level3 {margin-left: 0px; margin-right: 43px;} +div.level4 {margin-left: 0px; margin-right: 63px;} +div.level5 {margin-left: 0px; margin-right: 83px;} + +/* TOC control */ +div.toc { + float: left; + margin-left: 0; + margin-right: 2em; +} + +div.tocheader { + text-align: right; +} + +#tocinside { + text-align: right; +} + +ul.toc { + padding: 0; + padding-right: 1em; +} + +ul.toc li { + background-position: right 0.6em; + padding-right:0.4em; +} + +ul.toc li.clear { + padding-right:0.4em; +} + -- cgit v1.2.3