[Linpha-cvs] SF.net SVN: linpha: [4811] trunk/misc/design
Status: Inactive
Brought to you by:
bzrudi
From: <fan...@us...> - 2008-01-15 22:22:17
|
Revision: 4811 http://linpha.svn.sourceforge.net/linpha/?rev=4811&view=rev Author: fangehrn Date: 2008-01-15 14:22:11 -0800 (Tue, 15 Jan 2008) Log Message: ----------- doing some tests with html strict and utf8 Added Paths: ----------- trunk/misc/design/1current/ trunk/misc/design/1current/colorsettings.php trunk/misc/design/1current/csshover.htc trunk/misc/design/1current/expand.gif trunk/misc/design/1current/func.watermark.php trunk/misc/design/1current/global.css trunk/misc/design/1current/home.css trunk/misc/design/1current/index.php trunk/misc/design/1current/roundcorners.php trunk/misc/design/2strictutf8/ trunk/misc/design/2strictutf8/Linpha2.html trunk/misc/design/2strictutf8/colorsettings.php trunk/misc/design/2strictutf8/csshover.htc trunk/misc/design/2strictutf8/expand.gif trunk/misc/design/2strictutf8/func.watermark.php trunk/misc/design/2strictutf8/global.css trunk/misc/design/2strictutf8/home.css trunk/misc/design/2strictutf8/index.php trunk/misc/design/2strictutf8/index2.php trunk/misc/design/2strictutf8/index3.php trunk/misc/design/2strictutf8/roundcorners.php trunk/misc/design/download.png trunk/misc/design/print.png trunk/misc/design/slideshow.png trunk/misc/design/thumb1.gif trunk/misc/design/thumb2.gif trunk/misc/design/thumb3.gif Added: trunk/misc/design/1current/colorsettings.php =================================================================== --- trunk/misc/design/1current/colorsettings.php (rev 0) +++ trunk/misc/design/1current/colorsettings.php 2008-01-15 22:22:11 UTC (rev 4811) @@ -0,0 +1,70 @@ +<?php +header("Content-Type: text/css"); + +/** + * force caching in browser + * works in firefox and internet explorer + */ +Header("Last-Modified: " . gmdate("D, d M Y H:i:s",mktime (0,0,0,1,1,2000)) . " GMT"); // Date in the past +Header("Expires: Mon, 26 Jul 2100 05:00:00 GMT"); // In other words... never expire the image +Header("Cache-Control: max-age=10000000, s-maxage=1000000, proxy-revalidate, must-revalidate"); + + +/* + * Created on 26.10.2006 + * + * To change the template for this generated file go to + * Window - Preferences - PHPeclipse - PHP - Code Templates + */ +?> + +/** + * background color + * #linDivThumbNavi amd #divSlideshowControlsInner used in view_img.html.php + */ + body { + background-color: #<?php echo $_GET['bodybg']; ?>; + } + + #linDivMainOuter, #linDivMetaStaticOuter, #linDivNavigationOuter, /*.linButton,*/ #linDivThumbnaviOuter, #linDivSlideshowControls, .roundAlphabottomInner, .linBackground { + background-color: #<?php echo $_GET['bg']; ?>; + } + +/** + * font color + */ + body, #linDivMenu ul a, #linDivMenu ul span, #linDivMenu ul div { + color: #<?php echo $_GET['font']; ?>; + } + +/** + * albums color + */ + .linDivFolder { + background-color: #<?php echo $_GET['albumsbg']; ?>; + } + +/** + * link/form colors + */ + a:link, a:visited /*, .linButton*/ { + color: #<?php echo $_GET['links']; ?>; + } + a:hover /*, .linButton:hover*/ { + color: #<?php echo $_GET['linkshover']; ?>; + } + + .linForms { + background-color: #<?php echo $_GET['fieldscolor']; ?>; + border: 1px solid grey; + } + +/** + * menu + */ + #linDivMenu ul a:hover, #linDivMenu ul span:hover { + background: #bbbbbb; + } + #linDivMenu ul ul, .linInputMenu { + background-color: #eeeeee; + } Added: trunk/misc/design/1current/csshover.htc =================================================================== --- trunk/misc/design/1current/csshover.htc (rev 0) +++ trunk/misc/design/1current/csshover.htc 2008-01-15 22:22:11 UTC (rev 4811) @@ -0,0 +1,120 @@ +<attach event="ondocumentready" handler="parseStylesheets" /> +<script> +/** + * Whatever:hover - V1.42.060206 - hover & active + * ------------------------------------------------------------ + * (c) 2005 - Peter Nederlof + * Peterned - http://www.xs4all.nl/~peterned/ + * License - http://creativecommons.org/licenses/LGPL/2.1/ + * + * Whatever:hover is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * Whatever:hover is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * Credits and thanks to: + * Arnoud Berendsen, Martin Reurings, Robert Hanson + * + * howto: body { behavior:url("csshover.htc"); } + * ------------------------------------------------------------ + */ + +var csshoverReg = /(^|\s)(([^a]([^ ]+)?)|(a([^#.][^ ]+)+)):(hover|active)/i, +currentSheet, doc = window.document, hoverEvents = [], activators = { + onhover:{on:'onmouseover', off:'onmouseout'}, + onactive:{on:'onmousedown', off:'onmouseup'} +} + +function parseStylesheets() { + if(!/MSIE (5|6)/.test(navigator.userAgent)) return; + window.attachEvent('onunload', unhookHoverEvents); + var sheets = doc.styleSheets, l = sheets.length; + for(var i=0; i<l; i++) + parseStylesheet(sheets[i]); +} + function parseStylesheet(sheet) { + if(sheet.imports) { + try { + var imports = sheet.imports, l = imports.length; + for(var i=0; i<l; i++) parseStylesheet(sheet.imports[i]); + } catch(securityException){} + } + + try { + var rules = (currentSheet = sheet).rules, l = rules.length; + for(var j=0; j<l; j++) parseCSSRule(rules[j]); + } catch(securityException){} + } + + function parseCSSRule(rule) { + var select = rule.selectorText, style = rule.style.cssText; + if(!csshoverReg.test(select) || !style) return; + + var pseudo = select.replace(/[^:]+:([a-z-]+).*/i, 'on$1'); + var newSelect = select.replace(/(\.([a-z0-9_-]+):[a-z]+)|(:[a-z]+)/gi, '.$2' + pseudo); + var className = (/\.([a-z0-9_-]*on(hover|active))/i).exec(newSelect)[1]; + var affected = select.replace(/:(hover|active).*$/, ''); + var elements = getElementsBySelect(affected); + if(elements.length == 0) return; + + currentSheet.addRule(newSelect, style); + for(var i=0; i<elements.length; i++) + new HoverElement(elements[i], className, activators[pseudo]); + } + +function HoverElement(node, className, events) { + if(!node.hovers) node.hovers = {}; + if(node.hovers[className]) return; + node.hovers[className] = true; + hookHoverEvent(node, events.on, function() { node.className += ' ' + className; }); + hookHoverEvent(node, events.off, function() { node.className = node.className.replace(new RegExp('\\s+'+className, 'g'),''); }); +} + function hookHoverEvent(node, type, handler) { + node.attachEvent(type, handler); + hoverEvents[hoverEvents.length] = { + node:node, type:type, handler:handler + }; + } + + function unhookHoverEvents() { + for(var e,i=0; i<hoverEvents.length; i++) { + e = hoverEvents[i]; + e.node.detachEvent(e.type, e.handler); + } + } + +function getElementsBySelect(rule) { + var parts, nodes = [doc]; + parts = rule.split(' '); + for(var i=0; i<parts.length; i++) { + nodes = getSelectedNodes(parts[i], nodes); + } return nodes; +} + function getSelectedNodes(select, elements) { + var result, node, nodes = []; + var identify = (/\#([a-z0-9_-]+)/i).exec(select); + if(identify) { + var element = doc.getElementById(identify[1]); + return element? [element]:nodes; + } + + var classname = (/\.([a-z0-9_-]+)/i).exec(select); + var tagName = select.replace(/(\.|\#|\:)[a-z0-9_-]+/i, ''); + var classReg = classname? new RegExp('\\b' + classname[1] + '\\b'):false; + for(var i=0; i<elements.length; i++) { + result = tagName? elements[i].all.tags(tagName):elements[i].all; + for(var j=0; j<result.length; j++) { + node = result[j]; + if(classReg && !classReg.test(node.className)) continue; + nodes[nodes.length] = node; + } + } + + return nodes; + } +</script> \ No newline at end of file Added: trunk/misc/design/1current/expand.gif =================================================================== (Binary files differ) Property changes on: trunk/misc/design/1current/expand.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/misc/design/1current/func.watermark.php =================================================================== --- trunk/misc/design/1current/func.watermark.php (rev 0) +++ trunk/misc/design/1current/func.watermark.php 2008-01-15 22:22:11 UTC (rev 4811) @@ -0,0 +1,547 @@ +<?php +/* +* Copyright (c) 2004 Heiko Rutenbeck <bz...@tu...> +* +* This program is free software; you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation; either version 2 of the License, or +* (at your option) any later version. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program; if not, write to the Free Software +* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +*/ + +if(!defined('LINPHA_DIR')) { exit(1); } + +class LinWatermark +{ + +/** +* @author flo +* @todo adapt from linpha1 +*/ +function needWatermark($imgid) +{ + if( $GLOBALS['linpha']->sql->config->value['plugins_active_wm'] + && $GLOBALS['linpha']->sql->config->value['plugins_wm_active'] + && !check_permissions('watermark',$imgid) ) + { + return true; + } else { + return false; + } +} + +/** + * returns array with all the configs and the default values, they are only defined here + */ +function getWatermarkArray() +{ + return array ( + 'wm_active' => "0", + 'wm_watermark' => "0", + 'wm_text' => "Copyright 2007", + 'wm_font' => "", + 'wm_fontsize' => "20", + 'wm_fontcolor' => "white", + 'wm_align' => "southwest", + 'wm_horizontal' => "0", + 'wm_vertical' => "0", + 'wm_enable_shadow' => "1", + 'wm_shadow_size' => "1", + 'wm_shadow_fontsize' => "20", + 'wm_shadow_color' => "black", + 'wm_enable_rectangle' => "1", + 'wm_rectangle_color' => "darkgrey", + 'wm_height' => "30", + 'wm_width' => "145", + 'wm_img_img' => "", + 'wm_dissolve' => "75%", + 'wm_resize' => "30" + ); +} + +function readWatermark() +{ + $arr_config = LinWatermark::getWatermarkArray(); + while(list($name,$value) = each($arr_config) ) + { + $arr_read[$name] = $GLOBALS['linpha']->sql->config->value['plugins_'.$name]; + } + return $arr_read; +} + +function updateWatermark() +{ + $arr_config = LinWatermark::getWatermarkArray(); + while(list($name,$value) = each($arr_config) ) + { + $GLOBALS['linpha']->sql->config->updateConfig($name,$_POST[$name]); + } +} + +/** + * restore watermark settings to initial settings or to examples + */ +function restoreWatermark() +{ + global $wm_restore_to; + + $arr_config = LinWatermark::getWatermarkArray(); + switch($_POST['setdefault']) + { + case 'initial': + break; + case 'settings1': + $arr_config['wm_watermark'] = 1; + $arr_config['wm_text'] = "(C) 2004 linpha.sf.net"; + $arr_config['wm_fontsize'] = "10"; + $arr_config['wm_fontcolor'] = "white"; + $arr_config['wm_align'] = "south"; + $arr_config['wm_horizontal'] = "0"; + $arr_config['wm_vertical'] = "0"; + $arr_config['wm_enable_rectangle'] = "1"; + $arr_config['wm_rectangle_color'] = "darkgrey"; + $arr_config['wm_enable_shadow'] = "2"; + $arr_config['wm_height'] = "20"; + $arr_config['wm_width'] = "2000"; + $arr_config['wm_resize'] = "no"; + break; + case 'settings2': + $arr_config['wm_watermark'] = 2; + $arr_config['wm_dissolve'] = "65%"; + $arr_config['wm_align'] = "southwest"; + $arr_config['wm_img_img'] = "linpha.png"; + $arr_config['wm_horizontal'] = "10"; + $arr_config['wm_vertical'] = "10"; + $arr_config['wm_resize'] = "30"; + + break; + case 'settings3': // maybe better for gd lib than for convert + $arr_config['wm_watermark'] = 1; + $arr_config['wm_dissolve'] = "100%"; + $arr_config['wm_align'] = "southwest"; + $arr_config['wm_text'] = "(C) 2004 linpha.sf.net"; + $arr_config['wm_fontsize'] = "20"; + $arr_config['wm_fontcolor'] = "white"; + $arr_config['wm_horizontal'] = "0"; + $arr_config['wm_vertical'] = "0"; + $arr_config['wm_enable_rectangle'] = "1"; + $arr_config['wm_rectangle_color'] = "darkgrey"; + $arr_config['wm_enable_shadow'] = "1"; + $arr_config['wm_shadow_size'] = "5"; + $arr_config['wm_shadow_fontsize'] = "2"; + $arr_config['wm_height'] = "30"; + $arr_config['wm_width'] = "260"; + $arr_config['wm_resize'] = "no"; + break; + } + while(list($name,$value) = each($arr_config) ) + { + $GLOBALS['linpha']->sql->config->updateConfig($name,$value); + } +} + +/** + * calcs the new height and width of the resized watermark + * $w, $h: size of the big image + * $org_width, $org_height: size of the watermark rectangle/image + * $resize: resize factor in percent + * + */ +function wmArrResized($w,$h,$org_width,$org_height,$resize) +{ + $arr_resized['w'] = round($w * $resize/100); + $arr_resized['h'] = round($h * $resize/100); + + $no_increase = 0; + $array = LinImage::scaleToFit($org_height,$org_width,$arr_resized['h'],$arr_resized['w'],$no_increase); + + //error_log('w: '.$w.' h: '.$h.' arr_resized_w: '.$arr_resized['w'].' arr_resized_h: '.$arr_resized['h']. + // ' org_w: '.$org_width.' org_h: '.$org_height.' scaleToFit w: '.$array['w'].' h: '.$array['h']); + + return $array; +} + +/** + * list with many available colors + * http://mail.gnu.org/archive/html/emacs-diffs/2002-06/msg00158.html + * @uses getRgbFromAll() + */ +static $Colors = array( + 'aliceblue'=>'#f0f8ff', + 'antiquewhite'=>'#faebd7', + 'aquamarine'=>'#7fffd4', + 'azure'=>'#f0ffff', + 'beige'=>'#f5f5dc', + 'bisque'=>'#ffe4c4', + 'black'=>'#000000', + 'blanchedalmond'=>'#ffebcd', + 'blue'=>'#0000ff', + 'blueviolet'=>'#8a2be2', + 'brown'=>'#a52a2a', + 'burlywood'=>'#deb887', + 'cadetblue'=>'#5f9ea0', + 'chartreuse'=>'#7fff00', + 'chocolate'=>'#d2691e', + 'coral'=>'#ff7f50', + 'cornflowerblue'=>'#6495ed', + 'cornsilk'=>'#fff8dc', + 'cyan'=>'#00ffff', + 'darkblue'=>'#00008b', + 'darkcyan'=>'#008b8b', + 'darkgoldenrod'=>'#b886011', + 'darkgray'=>'#a9a9a9', + 'darkgreen'=>'#006400', + 'darkgrey'=>'#a9a9a9', + 'darkkhaki'=>'#bdb76b', + 'darkmagenta'=>'#8b008b', + 'darkolivegreen'=>'#556b2f', + 'darkorange'=>'#ff8c00', + 'darkorchid'=>'#9932cc', + 'darkred'=>'#8b0000', + 'darksalmon'=>'#e9967a', + 'darkseagreen'=>'#8fbc8f', + 'darkslateblue'=>'#483d8b', + 'darkslategray'=>'#2f4f4f', + 'darkslategrey'=>'#2f4f4f', + 'darkturquoise'=>'#00ced1', + 'darkviolet'=>'#9400d3', + 'deeppink'=>'#ff1493', + 'deepskyblue'=>'#00bfff', + 'dimgray'=>'#696969', + 'dimgrey'=>'#696969', + 'dodgerblue'=>'#1e90ff', + 'firebrick'=>'#b22222', + 'floralwhite'=>'#fffaf0', + 'forestgreen'=>'#228b22', + 'gainsboro'=>'#dcdcdc', + 'ghostwhite'=>'#f8f8ff', + 'gold'=>'#ffd700', + 'goldenrod'=>'#daa520', + 'gray'=>'#bebebe', + 'green'=>'#00ff00', + 'greenyellow'=>'#adff2f', + 'honeydew'=>'#f0fff0', + 'hotpink'=>'#ff69b4', + 'indianred'=>'#cd5c5c', + 'ivory'=>'#fffff0', + 'khaki'=>'#f0e68c', + 'lavender'=>'#e6e6fa', + 'lavenderblush'=>'#fff0f5', + 'lawngreen'=>'#7cfc00', + 'lemonchiffon'=>'#fffacd', + 'lightblue'=>'#add8e6', + 'lightcoral'=>'#f08080', + 'lightcyan'=>'#e0ffff', + 'lightgoldenrod'=>'#eedd82', + 'lightgoldenrodyellow'=>'#fafad2', + 'lightgray'=>'#d3d3d3', + 'lightgreen'=>'#90ee90', + 'lightgrey'=>'#d3d3d3', + 'lightpink'=>'#ffb6c1', + 'lightred'=>'#ffc8c8', + 'lightsalmon'=>'#ffa07a', + 'lightseagreen'=>'#20b2aa', + 'lightskyblue'=>'#87cefa', + 'lightslateblue'=>'#8470ff', + 'lightslategray'=>'#778899', + 'lightsteelblue'=>'#b0c4de', + 'lightyellow'=>'#ffffe0', + 'limegreen'=>'#32cd32', + 'linen'=>'#faf0e6', + 'magenta'=>'#ff00ff', + 'maroon'=>'#b03060', + 'mediumaquamarine'=>'#66cdaa', + 'mediumblue'=>'#0000cd', + 'mediumorchid'=>'#ba55d3', + 'mediumpurple'=>'#9370db', + 'mediumseagreen'=>'#3cb371', + 'mediumslateblue'=>'#7b68ee', + 'mediumspringgreen'=>'#00fa9a', + 'mediumturquoise'=>'#48d1cc', + 'mediumvioletred'=>'#c71585', + 'midnightblue'=>'#191970', + 'mintcream'=>'#f5fffa', + 'mistyrose'=>'#ffe4e1', + 'moccasin'=>'#ffe4b5', + 'navajowhite'=>'#ffdead', + 'navy'=>'#000080', + 'navyblue'=>'#000080', + 'oldlace'=>'#fdf5e6', + 'olivedrab'=>'#6b8e23', + 'orange'=>'#ffa500', + 'orangered'=>'#ff4500', + 'orchid'=>'#da70d6', + 'palegoldenrod'=>'#eee8aa', + 'palegreen'=>'#98fb98', + 'paleturquoise'=>'#afeeee', + 'palevioletred'=>'#db7093', + 'papayawhip'=>'#ffefd5', + 'peachpuff'=>'#ffdab9', + 'peru'=>'#cd853f', + 'pink'=>'#ffc0cb', + 'plum'=>'#dda0dd', + 'powderblue'=>'#b0e0e6', + 'purple'=>'#a020f0', + 'red'=>'#ff0000', + 'rosybrown'=>'#bc8f8f', + 'royalblue'=>'#4169e1', + 'saddlebrown'=>'#8b4513', + 'salmon'=>'#fa8072', + 'sandybrown'=>'#f4a460', + 'seagreen'=>'#2e8b57', + 'seashell'=>'#fff5ee', + 'sienna'=>'#a0522d', + 'skyblue'=>'#87ceeb', + 'slateblue'=>'#6a5acd', + 'slategray'=>'#708090', + 'slategrey'=>'#708090', + 'snow'=>'#fffafa', + 'springgreen'=>'#00ff7f', + 'steelblue'=>'#4682b4', + 'tan'=>'#d2b48c', + 'thistle'=>'#d8bfd8', + 'tomato'=>'#ff6347', + 'turquoise'=>'#40e0d0', + 'violet'=>'#ee82ee', + 'violetred'=>'#d02090', + 'wheat'=>'#f5deb3', + 'white'=>'#ffffff', + 'yellow'=>'#ffff00', + 'yellowgreen'=>'#9acd32' +); + +/** + * not used anymore + */ +function getHtmlColorFromRgb($r,$g,$b) +{ + if(strlen(dechex($r))==1) { + $r = '0'.$r; + } else { + $r = dechex($r); + } + if(strlen(dechex($g))==1) { + $g = '0'.$g; + } else { + $g = dechex($g); + } + if(strlen(dechex($b))==1) { + $b = '0'.$b; + } else { + $b = dechex($b); + } + + return '#'.$r.$g.$b; +} + +/** + * used to check if it is a valid html color + * @uses isHtmlColor() + */ +function everyCharIsHex($string) +{ + for($i=0;$i<strlen($string);$i++) + { + $char = substr($string,$i,1); + $valid_color = false; + + if($char == "0") { // zero makes problems... '== 0' and '== "0"' is not the same... + $valid_color = true; + } + for($n=1;$n<=9;$n++) + { + if($char == $n) { + $valid_color = true; + } + } + + for($n='a';$n<='f';$n++) + { + if($char === $n) { + $valid_color = true; + } + } + + for($n='A';$n<='F';$n++) + { + if($char === $n) { + $valid_color = true; + } + } + if(!$valid_color) { + return 0; + } + } + return 1; +} + +/** + * used to check if it is a valid html color + * @uses getRgbFromAll() + */ +function isHtmlColor($string) +{ + switch(strlen($string)) + { + case 6: + if(LinWatermark::everyCharIsHex($string)) { + return 1; + } + break; + case 7: + if(substr($string,0,1)=="#") { + if(LinWatermark::everyCharIsHex(substr($string,1,6))) { + return 1; + } + } + break; + } + return 0; +} + +/** + * converts a html color to an array with the rgb values + * it doesn't matter if the html color is '#00FF00' or '00FF00' + * @uses getRgbFromAll() + */ +function getRgbFromHtml($string) +{ + switch(strlen($string)) + { + case 6: + break; + case 7: + $string = substr($string,1,6); + break; + } + $r_hex = substr($string,0,2); + $g_hex = substr($string,2,2); + $b_hex = substr($string,4,2); + $arr['r'] = hexdec($r_hex); + $arr['g'] = hexdec($g_hex); + $arr['b'] = hexdec($b_hex); + return $arr; +} + +/** + * returns an array with the rgb values + * it doesn't matter if the argument is 'darkblue', '#00FF55' or '00FF55' + * if it isn't a correct color, the color (0,0,0) is returned + * + * @uses watermark_gd() + */ +function getRgbFromAll($string) +{ + if( isset( LinWatermark::$Colors[$string]) ) + { + return LinWatermark::getRgbFromHtml( LinWatermark::$Colors[$string] ); + } + elseif(LinWatermark::isHtmlColor($string) ) + { + return LinWatermark::getRgbFromHtml( $string ); + } + else + { + array('r'=>0,'g'=>0,'b'=>0); + } +} + +/** + * return html color without '#' + * + * used in linpha2 - admin - settings_layout + */ +function getHtmlFromAll($string) +{ + if(LinWatermark::isHtmlColor($string)) + { + if(substr($string,0,1)=="#") + { + return substr($string,1,6); + } + else + { + return $string; + } + } + else + { + if( isset( LinWatermark::$Colors[$string]) ) + { + return substr(LinWatermark::$Colors[$string],1,6); + } + else + { + return 'ffffff'; + } + } +} + +/** + * @uses watermark_gd() + * calcs the position in pixel with a given align + * src_w, src_h: width and height from the textfield (or the small watermark image) + * dst_w, dst_h: width and height from the image + * pos_x, pos_y: additional adjust for the image + * + */ +function calcAlign($align, $src_w, $src_h, $dst_w, $dst_h, $pos_x, $pos_y) +{ + + switch($align) + { + case "center": + $arr_pos['x'] = ($dst_w-$src_w)/2+($pos_x); + $arr_pos['y'] = ($dst_h-$src_h)/2+($pos_y); + break; + case "east": + $arr_pos['x'] = $dst_w-$src_w+($pos_x); + $arr_pos['y'] = ($dst_h-$src_h)/2+($pos_y); + break; + case "west": + $arr_pos['x'] = $pos_x; + $arr_pos['y'] = ($dst_h-$src_h)/2+($pos_y); + break; + case "north": + $arr_pos['x'] = ($dst_w-$src_w)/2+($pos_x); + $arr_pos['y'] = $pos_y; + break; + case "south": + $arr_pos['x'] = ($dst_w-$src_w)/2+($pos_x); + $arr_pos['y'] = $dst_h-$src_h+($pos_y); + break; + case "northeast": + $arr_pos['x'] = $dst_w-$src_w+($pos_x); + $arr_pos['y'] = $pos_y; + break; + case "northwest": + $arr_pos['x'] = $pos_x; + $arr_pos['y'] = $pos_y; + break; + case "southwest": + $arr_pos['x'] = $pos_x; + $arr_pos['y'] = $dst_h-$src_h+($pos_y); + break; + case "southeast": + $arr_pos['x'] = $dst_w-$src_w+($pos_x); + $arr_pos['y'] = $dst_h-$src_h+($pos_y); + break; + default: + $arr_pos['x'] = $pos_x; + $arr_pos['y'] = $pos_y; + break; + + } + return $arr_pos; +} + +} +?> \ No newline at end of file Added: trunk/misc/design/1current/global.css =================================================================== --- trunk/misc/design/1current/global.css (rev 0) +++ trunk/misc/design/1current/global.css 2008-01-15 22:22:11 UTC (rev 4811) @@ -0,0 +1,343 @@ +<!-- +/** + * common definitions + * All 'em' calculations are based on 1 px = 0.0626em + */ + + #linBody { + font-family: arial, helvetica, sans-serif; + margin: 10px; + padding: 0px; + } + + + h1.linStyle { + font-size: 1.5em; + font-family: Verdana, Arial, Helvetica, sans-serif; + margin: 0px; + margin-top: 0px; + margin-bottom: 5px; + padding: 0px; + } + + h2.linStyle { + font-size: 1.2em; + font-family: Verdana, Arial, Helvetica, sans-serif; + margin: 0px; + margin-top: 0px; + margin-bottom: 5px; + padding: 0px; + } + + /** + * link button + */ + .linButton { + /*cursor: pointer; + border: 0; + font-size: 0.8em; + text-decoration: underline;*/ + } + + +/** + * title + */ + #linDivTitle + { + margin: 0; + margin-bottom: 20px; + margin-left: 90px; + + font-size: 2em; + } + #linDivTitle a:link, #linDivTitle a:visited, #linDivTitle a:hover + { + color: #444444; + text-decoration: none; + } + #linDivTitle a:hover + { + text-decoration: underline; + } + +/** + * navigation + */ + #linDivNavigationOuter { + margin: 0; + margin-bottom: 10px; + padding: 0; + } + #linDivNavigation + { + margin: 0; + padding: 5px; + } + +/** + * main + */ + #linDivMainOuter { + margin: 0; + padding: 0; + } + #linDivMain { + margin: 0; + padding: 0px; + padding-left: 10px; + padding-right: 10px; + } + +/** + * syslog + */ + #linDivSyslog { + position: absolute; + left: 15px; + top: 15px; + width: auto; + + z-index: 10; + + margin: 0; + padding: 5px; + + border: 1px solid #FFD500; + background-color: #FFFF81; + } + + #linDivSyslogClose { + position: absolute; + right: 0; + top: 0; + + z-index: 10; + + margin: 0; + padding: 0; + + background-color: #ffd5ee; + border: 1px solid #f09; + } + /** + * popup + */ + .linPopupWindow { + position: absolute; + top: 130px; + left: 40px; + width: 500px; + + background-color: #d4d0c8; + border: 2px outset grey; + + } + .linPopupTitleBar { + width: 100%; + height: 20px; + + background-color: #1e397b; + border-bottom: 1px solid black; + } + .linPopupClose { + position: absolute; + right: 0; + top: 0; + height: 20px; + width: 20px; + /*padding-left: 5px; + padding-right: 5px;*/ + + font-weight: bold; + /*background-color: #d4d0c8;*/ + + } + .linPopupCloseButton { + margin: 0; + padding: 0; + height: 20px; + width: 20px; + } + .linPopupText { + height: 350px; + + overflow: auto; + + padding: 5px; + } + +/** + * folder (used in home view, and maybe as subfolders) + * background-color and border-color are set in colorsettings.php + */ + .linDivFolder { + margin: 2px; + margin-left: 15px; + margin-bottom: 15px; + padding: 0; + + width: 700px; + } + + .linDivThumbnail { + height: 140px; + float: left; + } + + .linImgFolderThumbnail { + margin: 0; + margin-left: 20px; + margin-right: 30px; + margin-top: 5px; + padding: 0; + + width: 130px; + height: 130px; + + border: 0; + } + + .linDivFolderText { + margin: 0; + padding: 5px; + } + + .linDivFolderComment { + overflow: auto; + max-height: 300px; + + margin: 0; + margin-top: 10px; + margin-bottom: 10px; + padding: 0; + + /* word-wrap: break-word; fix ie to force width, but creates warnings in firefox !!! */ + } + + +/** + * menu + */ + #linDivMenu { + margin: 0; + padding: 0; + + width: 100%; + float: left; + } + + /** + * icons + */ + #linDivMenu div { + margin: 0; + margin-left: 5px; + margin-right: 5px; + padding: 0; + float: left; + } + #linDivMenu div a { + margin: 0; + padding: 0; + float: left; + } + + /** + * first level elements + */ + #linDivMenu ul { + list-style: none; + + margin: 0; + margin-left: 5px; + margin-right: 5px; + padding: 0; + + width: auto; + float: left; + + border-top: 1px solid #000000; + + white-space: nowrap; + } + #linDivMenu ul a, #linDivMenu ul span, #linDivMenu ul div { + display: block; + + margin: 0; + padding-left: 10px; + padding-right: 10px; + padding-top: 2px; + padding-bottom: 2px; + + text-align: center; + text-decoration: none; + + } + #linDivMenu ul span { + background: url(./expand.gif) no-repeat 100% 100%; + } + + + /** + * second and more level elements + */ + #linDivMenu ul ul { + position: absolute; + z-index: 500; + + border: 0; + + /** + * relativ to parent element! be careful + */ + margin: 0; + padding: 0; + font-size: 1em; + + } + #linDivMenu ul ul a, #linDivMenu ul ul span, #linDivMenu ul ul div { + margin: 0; + padding-left: 5px; + padding-right: 15px; + padding-top: 2px; + padding-bottom: 2px; + + border-width: 1px; + border-style: solid; + border-color: #ccc #888 #555 #bbb; + text-align: left; + } + + /** + * third stage, switch to horizontal menu entries + */ + #linDivMenu ul ul ul { + position: absolute; + top: 0; + left: 100%; + } + + + /** + * the most important thing + * enable/disable submenus + */ + #linDivMenu ul ul, + #linDivMenu ul li:hover ul ul, + #linDivMenu ul ul li:hover ul ul + {display: none;} + + #linDivMenu ul li:hover ul, + #linDivMenu ul ul li:hover ul, + #linDivMenu ul ul ul li:hover ul + {display: block;} + + #linDivMenu li {position: relative;} + + +/** + * end menu + */ + +--> \ No newline at end of file Added: trunk/misc/design/1current/home.css =================================================================== --- trunk/misc/design/1current/home.css (rev 0) +++ trunk/misc/design/1current/home.css 2008-01-15 22:22:11 UTC (rev 4811) @@ -0,0 +1,18 @@ + +hr.linStyle { + clear: both; +} + +.linDivRandomimg, .linDivNewimg { + float: left; + margin-left: 40px; +} + +.linImgRandomimg, .linImgNewimg { + border: 0; +} + +.linDivFolder a +{ + text-decoration: none; +} \ No newline at end of file Added: trunk/misc/design/1current/index.php =================================================================== --- trunk/misc/design/1current/index.php (rev 0) +++ trunk/misc/design/1current/index.php 2008-01-15 22:22:11 UTC (rev 4811) @@ -0,0 +1,242 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> +<html> +<head> +<title>Linpha 2.0</title> + +<!-- css includes --> + +<link rel='stylesheet' href='./colorsettings.php?bg=87CEFA&bodybg=DDDDDD&font=000000&albumsbg=D5FCF4&links=005388&linkshover=666666&fieldscolor=CCCCCC' type='text/css'> +<link rel='stylesheet' href='./global.css' type='text/css'> +<link rel='stylesheet' href='./home.css' type='text/css'> + + <!--[if IE]> + <style type="text/css" media="screen"> + #menu ul { width: 1em; } /* this will be a *min* width */ + #menu ul ul { width: 12em; } + #menu ul li { float: left; width: 100%; } + body { behavior: url(./csshover.htc); font-size: 100%; } + #menu ul li a { height: 1%; } + #menu a, #menu span { font: bold 0.7em/1.4em arial, helvetica, sans-serif; } + </style> + <![endif]--> + +</head> + + +<body id="linBody"> + +<!-- syslog --> +<div id="linDivSyslog" style="display: none;"> + <div id="linDivSyslogClose"><a href="javascript:myLinGlobal.closeSyslog();">X</a></div> + <b>Linpha Syslog:</b><br /> + <div id="linDivSyslogText"></div> +</div> + + +<!-- title/navigation --> + +<div id="linDivTitle">Linpha 2.0 :: <a href="/linpha2/?&linCat=alb&linId=0">></a> </div> + + +<!-- menu --> +<div id="linDivMenu"> + <ul style="margin-left: 50px;"> + <li><a href="/linpha2/?&linCat=alb">Home</a></li> + </ul> + <ul> + <li><span>Suche </span> + <ul> + <li><a href="/linpha2/?&linCat=search">Extended Search</a></li> + <li> + <div> + <form method="GET" action="/linpha2/?&linCat=search"> + <input type="text" class="linForms" name="search_text" value="" /> + <input type="hidden" name="button[meta][all]" value="1" /> + + <input type="hidden" name="cmd" value="search" /> + <input type="hidden" name="linCat" value="search" /> + <input type="submit" name="submit" class="linButton linInputMenu" value="Suche" /> + </form> + </div> + </li> + </ul> + </li> + </ul> + <ul> + <li> + <span>Login </span> + <ul id="linMenuLogin"> + <li> + <div> + <form action="" method="POST" onsubmit="new Ajax.Updater('linDivMenu', LINPHA_CLIENT + '/?linCat=ajax&reloadmenu&linId='+IdCurrent, {method: 'post', asynchronous:true, parameters:Form.serialize(this), evalScripts:true}); return false;"> + <!-- login infos --> + <br /> + <label for="linFormUsername" style="display: block; float: left; width: 80px;">Username: </label><input style="width: 105px;" class="linForms" type="text" name="username" value="" id="linFormUsername" /><br /> + <label for="linFormPassword" style="display: block; float: left; width: 80px;">Password: </label><input style="width: 105px;" class="linForms" type="password" name="password" value="" id="linFormPassword" /><br /> + <input type="checkbox" name="rememberme" value="true" id="linFormCheckboxRemember" /><label for="linFormCheckboxRemember">Remember Me</label> <input type="hidden" name="cmd" value="login" /> + <input type="submit" name="submit" class="linButton linInputMenu" value="Login" /><br /><br /> + <div style="font-size: smaller; border: 0px;">Um sich anmelden zu können, müssen Cookies aktiviert sein.</div> + </form> + </div> + </li> + </ul> + </li> + </ul> + <ul> + <li><span>More </span> + <ul id="linMenuMore"> + <li><span>Basket </span> + <ul> + <li><a href="/linpha2/?&linCat=alb&linId=4&admin_cmd=basket_add_all">Add All To Basket</a></li> + + <li><a href="/linpha2/?&linCat=alb&linId=4&view=basket">Switch To Basket View</a></li> + <li><a href="/linpha2/?&linCat=basket">Open Basket (0 Images)</a></li> + </ul> + </li> + <li><span>Ansicht </span> + <ul> + <li><span>Sort </span> + + <ul> + <li><a href="/linpha2/?&linCat=alb&linId=4&order_by=Name Asc">Name Asc</a></li> + <li><a href="/linpha2/?&linCat=alb&linId=4&order_by=Name Desc">Name Desc</a></li> + <li><a href="/linpha2/?&linCat=alb&linId=4&order_by=Date Asc">Date Asc</a></li> + <li><a href="/linpha2/?&linCat=alb&linId=4&order_by=Date Desc">Date Desc</a></li> + </ul> + </li> + + <li><span>Ansicht </span> + <ul> + <li><a href="/linpha2/?&linCat=alb&linId=4&view=thumb">Normal</a></li> + <li><a href="/linpha2/?&linCat=alb&linId=4&view=thumbdetail">Detail</a></li> + </ul> + </li> + <li><span>Thumb Size </span> + + <ul> + <li><a href="javascript:myLinThumbnails.setTnSize(50)">50 Pixel</a></li> + <li><a href="javascript:myLinThumbnails.setTnSize(75)">75 Pixel</a></li> + <li><a href="javascript:myLinThumbnails.setTnSize(100)">100 Pixel</a></li> + <li><a href="javascript:myLinThumbnails.setTnSize(150)">150 Pixel</a></li> + <li><a href="javascript:myLinThumbnails.setTnSize(200)">200 Pixel</a></li> + + <li><a href="javascript:myLinThumbnails.setTnSize(250)">250 Pixel</a></li> + <li><a href="javascript:myLinThumbnails.setTnSize(300)">300 Pixel</a></li> + <li><a href="javascript:myLinThumbnails.setTnSize(400)">400 Pixel</a></li> + <li><a href="javascript:myLinThumbnails.setTnSize(500)">500 Pixel</a></li> + </ul> + </li> + <li><span>Thumb Nr </span> + + <ul> + <li><a href="javascript:myLinThumbnails.setNrImages('auto')">auto</a></li> + <li><a href="javascript:myLinThumbnails.setNrImages('10')">10</a></li> + <li><a href="javascript:myLinThumbnails.setNrImages('25')">25</a></li> + <li><a href="javascript:myLinThumbnails.setNrImages('50')">50</a></li> + <li><a href="javascript:myLinThumbnails.setNrImages('100')">100</a></li> + + <li><a href="javascript:myLinThumbnails.setNrImages('200')">200</a></li> + <li><a href="javascript:myLinThumbnails.setNrImages('all')">all</a></li> + </ul> + </li> + </ul> + </li> + </ul> + </li> + </ul> + <!-- icons --> + <div> + <a href="javascript:myLinThumbnails.loadSlideshow()"><img src="../slideshow.png" border="0" title="Play Slideshow" /></a> + </div> +</div> + +<div style="clear: both;"></div> +<!-- end menu --> + + +<div id="linDivMainOuter"> + <div style="background: url(./roundcorners.php?color=87CEFA&bgcolor=DDDDDD&size=15&align=tr) no-repeat top right;"> + <img src="./roundcorners.php?color=87CEFA&bgcolor=DDDDDD&size=15&align=tl" alt="" width="15" height="15" /> + </div> + + <div id="linDivMain"> + + <h1 class="linStyle">Willkommen</h1>Hi, this is the home of "The PHP Photo Archive" <a href="http://linpha.sf.net">aka LinPHA</a>.<br /> <br /> + + + <!-- Random Images --> + + <!-- New Images --> + + <!-- Browse by Date --> + + <!-- Albums --> + <hr class="linStyle" /> + + <h2>Test Zeichenkodierung</h2> + \xC4\xD6\xDC \xE4\xF6\xFC \xE9\xE8\xE0 $\xA3\x80@\xA2\xB0\xA7 + + <br /><br /> + + <h1 class="linStyle">Alben</h1> + + <div class="linDivFolder"> + <div style="background: url(./roundcorners.php?color=D5FCF4&bgcolor=87CEFA&size=15&align=tr) no-repeat top right;"> + <img src="./roundcorners.php?color=D5FCF4&bgcolor=87CEFA&size=15&align=tl" alt="" width="15" height="15" /> + </div> + <div class="linDivThumbnail"> + <a href="/linpha2/?&linCat=alb&linId=4"><img class="linImgFolderThumbnail" src="../thumb1.gif" alt="thumbnail_album" /></a> + </div> + <div class="linDivFolderText"> + <h2 class="linStyle"><a href="/linpha2/?&linCat=alb&linId=4">2005.05.14-16 Barcelona</a></h2> + Di 25. Dez 2007 19:08:13<br />0 Fotos<br /> + </div> + <div style="clear: both;"></div> + <div style="background: url(./roundcorners.php?color=D5FCF4&bgcolor=87CEFA&size=15&align=br) no-repeat top right;"> + <img src="./roundcorners.php?color=D5FCF4&bgcolor=87CEFA&size=15&align=bl" alt="" width="15" height="15" /> + </div> + </div> + + <div class="linDivFolder"> + <div style="background: url(./roundcorners.php?color=D5FCF4&bgcolor=87CEFA&size=15&align=tr) no-repeat top right;"> + <img src="./roundcorners.php?color=D5FCF4&bgcolor=87CEFA&size=15&align=tl" alt="" width="15" height="15" /> + </div> + <div class="linDivThumbnail"> + <a href="/linpha2/?&linCat=alb&linId=4"><img class="linImgFolderThumbnail" src="../thumb2.gif" alt="thumbnail_album" /></a> + </div> + <div class="linDivFolderText"> + <h2 class="linStyle"><a href="/linpha2/?&linCat=alb&linId=4">2007.07-14-28 Fuerteventura</a></h2> + Di 25. Dez 2007 19:08:13<br />0 Fotos<br /> + </div> + <div style="clear: both;"></div> + <div style="background: url(./roundcorners.php?color=D5FCF4&bgcolor=87CEFA&size=15&align=br) no-repeat top right;"> + <img src="./roundcorners.php?color=D5FCF4&bgcolor=87CEFA&size=15&align=bl" alt="" width="15" height="15" /> + </div> + </div> + + <div class="linDivFolder"> + <div style="background: url(./roundcorners.php?color=D5FCF4&bgcolor=87CEFA&size=15&align=tr) no-repeat top right;"> + <img src="./roundcorners.php?color=D5FCF4&bgcolor=87CEFA&size=15&align=tl" alt="" width="15" height="15" /> + </div> + <div class="linDivThumbnail"> + <a href="/linpha2/?&linCat=alb&linId=4"><img class="linImgFolderThumbnail" src="../thumb3.gif" alt="thumbnail_album" /></a> + </div> + <div class="linDivFolderText"> + <h2 class="linStyle"><a href="/linpha2/?&linCat=alb&linId=4">2007.12.15-16 Skifahren Samnaun</a></h2> + Di 25. Dez 2007 19:08:13<br />0 Fotos<br /> + </div> + <div style="clear: both;"></div> + <div style="background: url(./roundcorners.php?color=D5FCF4&bgcolor=87CEFA&size=15&align=br) no-repeat top right;"> + <img src="./roundcorners.php?color=D5FCF4&bgcolor=87CEFA&size=15&align=bl" alt="" width="15" height="15" /> + </div> + </div> + + </div> + + <div style="background: url(./roundcorners.php?color=87CEFA&bgcolor=DDDDDD&size=15&align=br) no-repeat top right;"> + <img src="./roundcorners.php?color=87CEFA&bgcolor=DDDDDD&size=15&align=bl" alt="" width="15" height="15" /> + </div> +</div> +</body> +</html> + Added: trunk/misc/design/1current/roundcorners.php =================================================================== --- trunk/misc/design/1current/roundcorners.php (rev 0) +++ trunk/misc/design/1current/roundcorners.php 2008-01-15 22:22:11 UTC (rev 4811) @@ -0,0 +1,87 @@ +<?php +if(!defined('LINPHA_DIR')) { define('LINPHA_DIR','../..'); } + +include_once( './func.watermark.php' ); + +if(!isset($_GET['color'])) +{ + $_GET['color'] = 'orange'; +} + +if(!isset($_GET['bgcolor'])) +{ + $_GET['bgcolor'] = 'white'; +} + +if(!isset($_GET['align'])) +{ + $_GET['align'] = 'tl'; +} + +if(!isset($_GET['size'])) +{ + $size = 15; +} +else +{ + $size = $_GET['size']; +} + +switch($_GET['align']) +{ +case 'tl': $cx = $size; $cy = $size; $workaround = 0; break; +case 'tr': $cx = -1; $cy = $size; $workaround = 0; break; +case 'bl': $cx = $size; $cy = 0; $workaround = 1; break; +case 'br': $cx = -1; $cy = -1; $workaround = 1; break; +} + +// create image +$image = imagecreatetruecolor($size, $size); + +// create colors +$rgb = LinWatermark::getRgbFromAll($_GET['color']); +$color = imagecolorallocate($image, $rgb['r'], $rgb['g'], $rgb['b']); + +if(isset($_GET['alpha'])) +{ + imageAlphaBlending($image, false); + imageSaveAlpha($image, true); + $bgcolor = imagecolorallocatealpha($image, 0, 0, 0, 127); +} +else +{ + $rgb = LinWatermark::getRgbFromAll($_GET['bgcolor']); + $bgcolor = imagecolorallocate($image, $rgb['r'], $rgb['g'], $rgb['b']); +} + +// fill image with background color +imagefill($image, 0, 0, $bgcolor); + + +// draw circly +imagefilledellipse($image, $cx, $cy, ($size*2), ($size*2), $color); + +// workaround +if($workaround) +{ + imageline($image, 0, 0, $size-1, 0, $color ); +} + +// flush image +Header('Content-type: image/png'); + +/** + * force caching in browser + * works in firefox and internet explorer + */ +Header("Last-Modified: " . gmdate("D, d M Y H:i:s",mktime (0,0,0,1,1,2000)) . " GMT"); // Date in the past +Header("Expires: Mon, 26 Jul 2100 05:00:00 GMT"); // In other words... never expire the image +Header("Cache-Control: max-age=10000000, s-maxage=1000000, proxy-revalidate, must-revalidate"); + + + +imagepng($image); +imagedestroy($image); + + +?> \ No newline at end of file Added: trunk/misc/design/2strictutf8/Linpha2.html =================================================================== --- trunk/misc/design/2strictutf8/Linpha2.html (rev 0) +++ trunk/misc/design/2strictutf8/Linpha2.html 2008-01-15 22:22:11 UTC (rev 4811) @@ -0,0 +1,246 @@ +<?xml version="1.0" encoding="utf-8"?> +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> +<head> +<meta http-equiv="content-type" content="text/html; charset=UTF-8"> + +<title>Linpha 2.0</title> + +<!-- css includes --> + +<link rel='stylesheet' href='./colorsettings.php?bg=87CEFA&bodybg=DDDDDD&font=000000&albumsbg=D5FCF4&links=005388&linkshover=666666&fieldscolor=CCCCCC' type='text/css'> +<link rel='stylesheet' href='./global.css' type='text/css'> +<link rel='stylesheet' href='./home.css' type='text/css'> + + <!--[if IE]> + <style type="text/css" media="screen"> + #menu ul { width: 1em; } /* this will be a *min* width */ + #menu ul ul { width: 12em; } + #menu ul li { float: left; width: 100%; } + body { behavior: url(./csshover.htc); font-size: 100%; } + #menu ul li a { height: 1%; } + #menu a, #menu span { font: bold 0.7em/1.4em arial, helvetica, sans-serif; } + </style> + <![endif]--> + +</head> + + +<body id="linBody"> + +<!-- syslog --> +<div id="linDivSyslog" style="display: none;"> + <div id="linDivSyslogClose"><a href="javascript:myLinGlobal.closeSyslog();">X</a></div> + <b>Linpha Syslog:</b><br /> + <div id="linDivSyslogText"></div> +</div> + + +<!-- title/navigation --> + +<div id="linDivTitle">Linpha 2.0 :: <a href="/linpha2/?&linCat=alb&linId=0">></a> </div> + + +<!-- menu --> +<div id="linDivMenu"> + <ul style="margin-left: 50px;"> + <li><a href="/linpha2/?&linCat=alb">Home</a></li> + </ul> + <ul> + <li><span>Suche </span> + <ul> + <li><a href="/linpha2/?&linCat=search">Extended Search</a></li> + <li> + <div> + <form method="GET" action="/linpha2/?&linCat=search"> + <input type="text" class="linForms" name="search_text" value="" /> + <input type="hidden" name="button[meta][all]" value="1" /> + + <input type="hidden" name="cmd" value="search" /> + <input type="hidden" name="linCat" value="search" /> + <input type="submit" name="submit" class="linButton linInputMenu" value="Suche" /> + </form> + </div> + </li> + </ul> + </li> + </ul> + <ul> + <li> + <span>Login </span> + <ul id="linMenuLogin"> + <li> + <div> + <form action="" method="POST" onsubmit="new Ajax.Updater('linDivMenu', LINPHA_CLIENT + '/?linCat=ajax&reloadmenu&linId='+IdCurrent, {method: 'post', asynchronous:true, parameters:Form.serialize(this), evalScripts:true}); return false;"> + <!-- login infos --> + <br /> + <label for="linFormUsername" style="display: block; float: left; width: 80px;">Username: </label><input style="width: 105px;" class="linForms" type="text" name="username" value="" id="linFormUsername" /><br /> + <label for="linFormPassword" style="display: block; float: left; width: 80px;">Password: </label><input style="width: 105px;" class="linForms" type="password" name="password" value="" id="linFormPassword" /><br /> + <input type="checkbox" name="rememberme" value="true" id="linFormCheckboxRemember" /><label for="linFormCheckboxRemember">Remember Me</label> <input type="hidden" name="cmd" value="login" /> + <input type="submit" name="submit" class="linButton linInputMenu" value="Login" /><br /><br /> + <div style="font-size: smaller; border: 0px;">Um sich anmelden zu können, müssen Cookies aktiviert sein.</div> + </form> + </div> + </li> + </ul> + </li> + </ul> + <ul> + <li><span>More </span> + <ul id="linMenuMore"> + <li><span>Basket </span> + <ul> + <li><a href="/linpha2/?&linCat=alb&linId=4&admin_cmd=basket_add_all">Add All To Basket</a></li> + + <li><a href="/linpha2/?&linCat=alb&linId=4&view=basket">Switch To Basket View</a></li> + <li><a href="/linpha2/?&linCat=basket">Open Basket (0 Images)</a></li> + </ul> + </li> + <li><span>Ansicht </span> + <ul> + <li><span>Sort </span> + + <ul> + <li><a href="/linpha2/?&linCat=alb&linId=4&order_by=Name Asc">Name Asc</a></li> + <li><a href="/linpha2/?&linCat=alb&linId=4&order_by=Name Desc">Name Desc</a></li> + <li><a href="/linpha2/?&linCat=alb&linId=4&order_by=Date Asc">Date Asc</a></li> + <li><a href="/linpha2/?&linCat=alb&linId=4&order_by=Date Desc">Date Desc</a></li> + </ul> + </li> + + <li><span>Ansicht </span> + <ul> + <li><a href="/linpha2/?&linCat=alb&linId=4&view=thumb">Normal</a></li> + <li><a href="/linpha2/?&linCat=alb&linId=4&view=thumbdetail">Detail</a></li> + </ul> + </li> + <li><span>Thumb Size </span> + + <ul> + <li><a href="javascript:myLinThumbnails.setTnSize(50)">50 Pixel</a></li> + <li><a href="javascript:myLinThumbnails.setTnSize(75)">75 Pixel</a></li> + <li><a href="javascript:myLinThumbnails.setTnSize(100)">100 Pixel</a></li> + <li><a href="javascript:myLinThumbnails.setTnSize(150)">150 Pixel</a></li> + <li><a href="javascript:myLinThumbnails.setTnSize(200)">200 Pixel</a></li> + + <li><a href="javascript:myLinThumbnails.setTnSize(250)">250 Pixel</a></li> + <li><a href="javascript:myLinThumbnails.setTnSize(300)">300 Pixel</a></li> + <li><a href="javascript:myLinThumbnails.setTnSize(400)">400 Pixel</a></li> + <li><a href="javascript:myLinThumbnails.setTnSize(500)">500 Pixel</a></li> + </ul> + </li> + <li><span>Thumb Nr </span> + + <ul> + <li><a href="javascript:myLinThumbnails.setNrImages('auto')">auto</a></li> + <li><a href="javascript:myLinThumbnails.setNrImages('10')">10</a></li> + <li><a href="javascript:myLinThumbnails.setNrImages('25')">25</a></li> + <li><a href="javascript:myLinThumbnails.setNrImages('50')">50</a></li> + <li><a href="javascript:myLinThumbnails.setNrImages('100')">100</a></li> + + <li><a href="javascript:myLinThumbnails.setNrImages('200')">200</a></li> + <li><a href="javascript:myLinThumbnails.setNrImages('all')">all</a></li> + </ul> + </li> + </ul> + </li> + </ul> + </li> + </ul> + <!-- icons --> + <div> + <a href="javascript:myLinThumbnails.loadSlideshow()"><img src="./slideshow.png" border="0" title="Play Slideshow" /></a> + </div> +</div> + +<div style="clear: both;"></div> +<!-- end menu --> + + +<div id="linDivMainOuter"> + <div style="background: url(./roundcorners.php?color=87CEFA&bgcolor=DDDDDD&size=15&align=tr) no-repeat top right;"> + <img src="./roundcorners.php?color=87CEFA&bgcolor=DDDDDD&size=15&align=tl" alt="" width="15" height="15" /> + </div> + + <div id="linDivMain"> + + <h1 class="linStyle">Willkommen</h1>Hi, this is the home of "The PHP Photo Archive" <a href="http://linpha.sf.net">aka LinPHA</a>.<br /> <br /> + + + <!-- Random Images --> + + <!-- New Images --> + + <!-- Browse by Date --> + + <!-- Albums --> + <hr class="linStyle" /> + + <h2>Test Zeichenkodierung</h2> + \xC4\xD6\xDC \xE4\xF6\xFC \xE9\xE8\xE0 $\xA3\x80@\xA2\xB0\xA7 + + <br /><br /> + + <h1 class="linStyle">Alben</h1> + + <div class="linDivFolder"> + <div style="background: url(./roundcorners.php?color=D5FCF4&bgcolor=87CEFA&size=15&align=tr) no-repeat top right;"> + <img src="./roundcorners.php?color=D5FCF4&bgcolor=87CEFA&size=15&align=tl" alt="" width="15" height="15" /> + </div> + <div class="linDivThumbnail"> + <a href="/linpha2/?&linCat=alb&linId=4"><img class="linImgFolderThumbnail" src="./thumb1.gif" alt="thumbnail_album" /></a> + </div> + <div class="linDivFolderText"> + <h2 class="linStyle"><a href="/linpha2/?&linCat=alb&linId=4">2005.05.14-16 Barcelona</a></h2> + Di 25. Dez 2007 19:08:13<br />0 Fotos<br /> + </div> + <div style="clear: both;"></div> + <div style="background: url(./roundcorners.php?color=D5FCF4&bgcolor=87CEFA&size=15&align=br) no-repeat top right;"> + <img src="./roundcorners.php?color=D5FCF4&bgcolor=87CEFA&size=15&align=bl" alt="" width="15" height="15" /> + </div> + </div> + + <div class="linDivFolder"> + <div style="background: url(./roundcorners.php?color=D5FCF4&bgcolor=87CEFA&size=15&align=tr) no-repeat top right;"> + <img src="./roundcorners.php?color=D5FCF4&bgcolor=87CEFA&size=15&align=tl" alt="" width="15" height="15" /> + </div> + <div class="linDivThumbnail"> + <a href="/linpha2/?&linCat=alb&linId=4"><img class="linImgFolderThumbnail" src="./thumb2.gif" alt="thumbnail_album" /></a> + </div> + <div class="linDivFolderText"> + <h2 class="linStyle"><a href="/linpha2/?&linCat=alb&linId=4">2007.07-14-28 Fuerteventura</a></h2> + Di 25. Dez 2007 19:08:13<br />0 Fotos<br /> + </div> + <div style="clear: both;"></div> + <div style="background: url(./roundcorners.php?color=D5FCF4&bgcolor=87CEFA&size=15&align=br) no-repeat top right;"> + <img src="./roundcorners.php?color=D5FCF4&bgcolor=87CEFA&size=15&align=bl" alt="" width="15" height="15" /> + </div> + </div> + + <div class="linDivFolder"> + <div style="background: url(./roundcorners.php?color=D5FCF4&bgcolor=87CEFA&size=15&align=tr) no-repeat top right;"> + <img src="./roundcorners.php?color=D5FCF4&bgcolor=87CEFA&size=15&align=tl" alt="" width="15" height="15" /> + </div> + <div class="linDivThumbnail"> + <a href="/linpha2/?&linCat=alb&linId=4"><img class="linImgFolderThumbnail" src="./thumb3.gif" alt="thumbnail_album" /></a> + </div> + <div class="linDivFolderText"> + <h2 class="linStyle"><a href="/linpha2/?&linCat=alb&linId=4">2007.12.15-16 Skifahren Samnaun</a></h2> + Di 25. Dez 2007 19:08:13<br />0 Fotos<br /> + </div> + <div style="clear: both;"></div> + <div style="background: url(./roundcorners.php?color=D5FCF4&bgcolor=87CEFA&size=15&align=br) no-repeat top right;"> + <img src="./roundcorners.php?color=D5FCF4&bgcolor=87CEFA&size=15&align=bl" alt="" width="15" height="15" /> + </div> + </div> + + </div> + + <div style="background: url(./roundcorners.php?color=87CEFA&bgcolor=DDDDDD&size=15&align=br) no-repeat top right;"> + <img src="./roundcorners.php?color=87CEFA&bgcolor=DDDDDD&size=15&align=bl" alt="" width="15" height="15" /> + </div> +</div> +</body> +</html> + Added: trunk/misc/design/2strictutf8/colorsettings.php =================================================================== --- trunk/misc/design/2strictutf8/colorsettings.php (rev 0) +++ trunk/misc/design/2strictutf8/colorsettings.php 2008-01-15 22:22:11 UTC (rev 4811) @@ -0,0 +1,70 @@ +<?php +header("Content-Type: text/css"); + +/** + * force caching in browser + * works in firefox and internet explorer + */ +Header("Last-Modified: " . gmdate("D, d M Y H:i:s",mktime (0,0,0,1,1,2000)) . " GMT"); // Date in the past +Header("Expires: Mon, 26 Jul 2100 05:00:00 GMT"); // In other words... never expire the image +Header("Cache-Control: max-age=10000000, s-maxage=1000000, proxy-revalidate, must-revalidate"); + + +/* + * Created on 26.10.2006 + * + * To change the template for this generated file go to + * Window - Preferences - PHPeclipse - PHP - Code Templates + */ +?> + +/** + * background color + * #linDivThumbNavi amd #divSlideshowControlsInner used in view_img.html.php + */ + body { + background-color: #<?php echo $_GET['bodybg']; ?>; + } + + #linDivMainOuter, #linDivMetaStaticOuter, #linDivNavigationOuter, /*.linButton,*/ #linDivThumbnaviOuter, #linDivSlideshowControls, .roundAlphabottomInner, .linBackground { + background-color: #<?php echo $_GET['bg']; ?>; + } + +/** + * font color + */ + body, #linDivMenu ul a, #linDivMenu ul span, #linDivMenu ul div { + color: #<?php echo $_GET['font']; ?>; + } + +/** + * albums color + */ + .linDivFolder { + background-color: #<?php echo $_GET['albumsbg']; ?>; + } + +/** + * link/form colors + */ + a:link, a:visited /*, .linButton*/ { + color: #<?php echo $_GET['links']; ?>; + } + a:hover /*, .linButton:hover*/ { + color: #<?php echo $_GET['linkshover']; ?>; + } + + .linForms { + background-color: #<?php echo $_GET['fieldscolor']; ?>; + border: 1px solid grey; + } + +/** + * menu + */ + #linDivMenu ul a:hover, #linDivMenu ul span:hover { + background: #bbbbbb; + } + #linDivMenu ul ul, .linInputMenu { + background-color: #eeeeee; + } Added: trunk/misc/design/2strictutf8/csshover.htc =================================================================== --- trunk/misc/design/2strictutf8/csshover.htc (rev 0) +++ trunk/misc/design/2strictutf8/csshover.htc 2008-01-15 22:22:11 UTC (rev 4811) @@ -0,0 +1,120 @@ +<attach event="ondocumentready" handler="parseStylesheets" /> +<script> +/** + * Whatever:hover - V1.42.060206 - hover & active + * ------------------------------------------------------------ + * (c) 2005 - Peter Nederlof + * Peterned - http://www.xs4all.nl/~peterned/ + * License - http://creativecommons.org/licenses/LGPL/2.1/ + * + * Whatever:hover is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * Whatever:hover is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * Credits and thanks to: + * Arnoud Berendsen, Martin Reurings, Robert Hanson + * + * howto: body { behavior:url("csshover.htc"); } + * ------------------------------------------------------------ + */ + +var csshoverReg = /(^|\s)(([^a]([^ ]+)?)|(a([^#.][^ ]+)+)):(hover|active)/i, +currentSheet, doc = window.document, hoverEvents = [], activators = { + onhover:{on:'onmouseover', off:'onmouseout'}, + onactive:{on:'onmousedown', off:'onmouseup'} +} + +function parseStylesheets() { + if(!/MSIE (5|6)/.test(navigator.userAgent)) return; + window.attachEvent('onunload', unhookHoverEvents); + var sheets = doc.styleSheets, l = sheets.length; + for(var i=0; i<l; i++) + parseStylesheet(sheets[i]); +} + function parseStylesheet(sheet) { + if(sheet.imports) { + try { + var imports = sheet.imports, l = imports.length; + for(var i=0; i<l; i++) parseStylesheet(sheet.imports[i]); + } catch(securityException){} + } + + try { + var rules = (currentSheet = sheet).rules, l = rules.length; + for(var j=0; j<l; j++) parseCSSRule(rules[j]); + } catch(securityException){} + } + + function parseCSSRule(rule) { + var select = rule.selectorText, style = rule.style.cssText; + if(!csshoverReg.test(select) || !style) return; + + var pseudo = select.replace(/[^:]+:([a-z-]+).*/i, 'on$1'); + var newSelect = select.replace(/(\.([a-z0-9_-]+):[a-z]+)|(:[a-z]+)/gi, '.$2' + pseudo); + var className = (/\.([a-z0-9_-]*on(hover|active))/i).exec(newSelect)[1]; + var affected = select.replace(/:(hover|active).*$/, ''); + var elements = getElementsBySelect(affected); + if(elements.length == 0) return; + + currentSheet.addRule(newSelect, style); + for(var i=0; i<elements.length; i++) + new HoverElement(elements[i], className, activators[pseudo]); + } + +function HoverElement(node, className, events) { + if(!node.hovers) node.hovers = {}; + if(node.hovers[className]) return; + node.hovers[className] = true; + hookHoverEvent(node, events.on, function() { node.className += ' ' + className; }); + hookHoverEvent(node, events.off, function() { node.className = node.className.replace(new RegExp('\\s+'+className, 'g'),''); }); +} + function hookHoverEvent(node, type, handler) { + node.attachEvent(type, handler); + hoverEvents[hoverEvents.length] = { + node:node, type:type, handler:handler + }; + } + + function unhookHoverEvents() { + for(var e,i=0; i<hoverEvents.length; i++) { + e = hoverEvents[i]; + e.node.detachEvent(e.type, e.handler); + } + } + +function getElementsBySelect(rule) { + var parts, nodes = [doc]; + parts = rule.split(' '); + for(var i=0; i<parts.length; i++) { + nodes = getSelectedNodes(parts[i], nodes); + } return nodes; +} + function getSelectedNodes(select, elements) { + var result, node, nodes = []; + var identify = (/\#([a-z0-9_-]+)/i).exec(select); + if(identify) { + var element = doc.getElementById(identify[1]); + return element? [element]:nodes; + } + + var classname = (/\.([a-z0-9_-]+)/i).exec(select); + var tagName = select.replace(/(\.|\#|\:)[a-z0-9_-]+/i, ''); + var classReg = classname? new RegExp('\\b' + classname[1] + '\\b'):false; + for(var i=0; i<elements.length; i++) { + result = tagName? elements[i].all.tags(tagName):elements[i].all; + for(var j=0; j<result.length; j++) { + node = result[j]; + if(classReg && !classReg.test(node.className)) continue; + nodes[nodes.length] = node; + } + } + + return nodes; + } +</script> \ No newline at end of file Added: trunk/misc/design/2strictutf8/expand.gif =================================================================== (Binary files differ) Property changes on: trunk/misc/design/2strictutf8/expand.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/misc/design/2strictutf8/func.watermark.php =================================================================== --- trunk/misc/design/2strictutf8/func.watermark.php (rev 0) +++ trunk/misc/design/2strictutf8/func.watermark.php 2008-01-15 22:22:11 UTC (rev 4811) @@ -0,0 +1,547 @@ +<?php +/* +* Copyright (c) 2004 Heiko Rutenbeck <bz...@tu...> +* +* This program is free software; you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation; either version 2 of the License, or +* (at your option) any later version. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program; if not, write to the Free Software +* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +*/ + +if(!defined('LINPHA_DIR')) { exit(1); } + +class LinWatermark +{ + +/** +* @author flo +* @todo adapt from linpha1 +*/ +function needWatermark($imgid) +{ + if( $GLOBALS['linpha']->sql->config->value['plugins_active_wm'] + && $GLOBALS['linpha']->sql->config->value['plugins_wm_active'] + && !check_permissions('watermark',$imgid) ) + { + return true; + } else { + return false; + } +} + +/** + * returns array with all the configs and the default values, they are only defined here + */ +function getWatermarkArray() +{ + return array ( + 'wm_active' => "0", + 'wm_watermark' => "0", + 'wm_text' => "Copyright 2007", + 'wm_font' => "", + 'wm_fontsize' => "20", + 'wm_fontc... [truncated message content] |