Ticket #2923: mythweb_gallery.diff
File mythweb_gallery.diff, 50.6 KB (added by , 17 years ago) |
---|
-
modules/gallery/handler.php
diff -Naur --exclude='*.orig' --exclude='*.rej' mythweb-orig/modules/gallery/handler.php mythweb/modules/gallery/handler.php
old new 1 <?php 2 /** 3 * Handler for the Gallery module. 4 * 5 * @url $URL: http://svn.mythtv.org/svn/trunk/mythplugins/mythweb/modules/gallery/handler.php $ 6 * @date $Date: 2006-12-19 09:17:33 +0100 (Di, 19 Dez 2006) $ 7 * @version $Revision: 12295 $ 8 * @author $Author: rsiebert $ 9 * @license GPL 10 * 11 * @package MythWeb 12 * @subpackage MythGallery 13 * 14 /**/ 15 16 // Load settings functions 17 require_once 'includes/objects/Settings.php'; 18 19 // Load Gallery class 20 require_once 'includes/objects/Gallery.php'; 21 22 // Load configuration 23 loadGalleryConfig(); 24 25 // Create the gallery 26 global $gallery; 27 28 $gallery = new Gallery(); 29 30 // Print the gallery page template 31 require_once tmpl_dir.'gallery.php'; 32 33 // Exit 34 exit; 35 -
modules/gallery/includes/objects/Gallery.php
diff -Naur --exclude='*.orig' --exclude='*.rej' mythweb-orig/modules/gallery/includes/objects/Gallery.php mythweb/modules/gallery/includes/objects/Gallery.php
old new 1 <?php 2 /** 3 * Gallery Functions for the Gallery module 4 * 5 * @url $URL: http://svn.mythtv.org/svn/trunk/mythplugins/mythweb/modules/gallery/tmpl/default/gallery.php $ 6 * @date $Date: 2006-12-19 09:17:33 +0100 (Di, 19 Dez 2006) $ 7 * @version $Revision: 12295 $ 8 * @author $Author: xris $ 9 * @license GPL 10 * 11 * @package MythWeb 12 * 13 /**/ 14 15 class Gallery { 16 17 var $config; 18 19 function Gallery() { 20 // load default configuration 21 $this->config['image_path'] = $_SESSION['gallery']['image_path']; 22 $this->config['cache_path'] = $_SESSION['gallery']['cache_path']; 23 $this->config['default_viewsize'] = $_SESSION['gallery']['default_viewsize']; 24 $this->config['screen_width'] = $_SESSION['gallery']['screen_width']; 25 $this->config['viewsizes'] = $_SESSION['gallery']['viewsizes']; 26 $this->config['valid_image_files'] = $_SESSION['gallery']['valid_image_files']; 27 28 } 29 30 // ======================================================= 31 function start() { 32 33 // the current selected directory where the cached images are stored 34 $current_path = $this->getCurrentImagePath(); 35 // the path to the real images 36 $image_path = $this->config['image_path']; 37 // the filename of a selected image 38 $image_name = $this->getImageName(); 39 // the current viewsize mode 40 $image_viewsize = $this->getImageViewSize(); 41 // get the image index for the viewsize medium 42 $image_index = $this->getImageIndex(); 43 // get the contents of the folders 44 $folderList = $this->getFolderList( $current_path ); 45 // check what kind of images should be displayed 46 if ($image_viewsize == 'fullsize') { 47 // create the images if there are not yet in the directory 48 $this->makeImages( $current_path, $folderList, $image_viewsize, $image_index ); 49 // display the big image 50 $this->showFullsizeImage( $current_path, $folderList, $image_index ); 51 // there is nothing else to do 52 exit; 53 } 54 // show the horizontal navigation bar 55 $this->showGalleryHeader( $current_path, $image_viewsize, $image_index ); 56 // check if the thumbnail directory is there, if not create it 57 $this->makeDirectory( $current_path ); 58 // create the images if there are not yet in the directory 59 $this->makeImages( $current_path, $folderList, $image_viewsize, $image_index ); 60 echo '<table width="100%" cellspacing="0" cellpadding="0">'."\n". 61 '<tr>'."\n". 62 '<td class="folder_navigation">'."\n"; 63 $this->showFolderTree( $current_path, $folderList ); 64 echo '</td>'."\n". 65 '<td class="image_listing">'."\n"; 66 if ($this->onlyDirectoriesAvailable( $current_path, $folderList, $image_viewsize, $image_index ) == false ) { 67 echo '<table class="imagelist_and_navigation" cellspacing="0" cellpadding="0">'."\n". 68 '<tr>'."\n". 69 '<td>'."\n"; 70 $this->showNavigation( $current_path, $folderList, $image_viewsize, $image_index ); 71 echo '</td>'."\n". 72 '</tr>'."\n". 73 '<tr>'."\n". 74 '<td>'."\n"; 75 $this->showImages( $current_path, $folderList, $image_viewsize, $image_index ); 76 echo '</td>'."\n". 77 '</tr>'."\n". 78 '</tr>'."\n". 79 '</table>'."\n"; 80 } else { 81 echo ' '; 82 } 83 echo '</td>'."\n". 84 '</tr>'."\n". 85 '</table>'."\n"; 86 } 87 88 // ======================================================= 89 function getViewSizesList() { 90 $viewsizesList = explode(';',preg_replace('/ /','',$this->config['viewsizes'])); 91 return $viewsizesList; 92 } 93 94 95 // ======================================================= 96 function getCurrentImagePath() { 97 switch ($_SERVER['REQUEST_METHOD']) { 98 case 'GET': 99 $current_path = stripslashes($_GET['path']); 100 break; 101 case 'POST': 102 $current_path = stripslashes($_POST['path']); 103 break; 104 } 105 if (!is_dir($current_path) ) { 106 $current_path = $this->config['image_path']; 107 } 108 return $current_path; 109 } 110 111 // ======================================================= 112 function getImageViewSize() { 113 switch ($_SERVER['REQUEST_METHOD']) { 114 case 'GET': 115 $viewsize = stripslashes($_GET[viewsize]); 116 break; 117 case 'POST': 118 $viewsize = stripslashes($_POST[viewsize]); 119 break; 120 } 121 // check if the given viewsize is one of the viewsizes 122 // specified in the config. fullsize is also needed 123 if (isset($viewsize) && 124 (($viewsize == 'fullsize') || 125 in_array($viewsize, $this->getViewSizesList()))) { 126 return $viewsize; 127 } else { 128 return $this->config['default_viewsize']; 129 } 130 } 131 132 // ======================================================= 133 function getImageName() { 134 switch ($_SERVER['REQUEST_METHOD']) { 135 case 'GET': 136 $image_name = $_GET['file']; 137 break; 138 case 'POST': 139 $image_name = $_POST['file']; 140 break; 141 } 142 return $image_name; 143 } 144 145 // ======================================================= 146 function getImageIndex() { 147 if (isset($_GET['index'])) 148 return $_GET['index']; 149 return 1; 150 } 151 152 153 // ======================================================= 154 // displays the path of the choosen directories horizontally 155 // so one can navigate back 156 function showGalleryHeader( $current_path, $image_viewsize, $image_index ) { 157 echo '<table class="current_path_and_viewsize" cellspacing="0" cellpadding="0">'."\n". 158 '<tr>'."\n". 159 '<td class="current_path">'. 160 t('Current path').': '; 161 $folders = explode('/', $current_path); 162 for ($i=1; $i < count($folders); $i++) { 163 echo '<a class="header" href="'.root.'gallery/gallery.php?'.path.'='; 164 // show thefolders in the navigation bar 165 for ($j=1; $j <= $i; $j++) { 166 echo '/'.$folders[$j]; 167 } 168 echo '&'.viewsize.'='.$this->getImageViewSize().'">'. 169 $folders[$i].'</a>'."\n"; 170 // don't show the separators when there are no more subfolders 171 if ($i < (count($folders)-1)) { 172 echo ' / '; 173 } 174 } 175 // display the menu where one can shoose between small and medium images 176 echo '</td>'."\n". 177 '<td class="change_viewsize_text">'. 178 t('Switch view mode').': '. 179 '</td>'."\n". 180 '<form name="change_viewsize" method="post">'."\n". 181 '<td class="change_viewsize_selection">'."\n". 182 '<select class="change_viewsize" name="'. 183 viewsize.'" onChange="submit()" size="1">'."\n"; 184 $viewsizesList = $this->getViewSizesList(); 185 for ($i=0; $i < count($viewsizesList); $i++) { 186 echo '<option value="'.$viewsizesList[$i].'" '; 187 if ($this->getImageViewSize() == $viewsizesList[$i]) { 188 echo 'selected'; 189 } 190 $str = strtr($viewsizesList[$i], ',','x'); 191 echo '>'.$str.' '.t('Images per page').'</option>'."\n"; 192 } 193 echo '</select>'."\n". 194 '<input type="hidden" name="'.index.'" value="'.$image_index.'">'. 195 '<input type="hidden" name="'.path.'" value="'.$current_path.'">'; 196 echo '</td></form>'."\n". 197 '</tr>'."\n". 198 '</table>'."\n"; 199 } 200 201 // ======================================================= 202 function showFolderTree( $current_path, $folderList ) { 203 204 // dont go into the directory if there are not subdirs 205 if ($this->getFolderCount( $current_path, $folderList[$i]) == 0) { 206 $current_path = substr($current_path, 0, strrpos($current_path, '/')); 207 $folderList = $this->getFolderList( $current_path ); 208 } 209 // displays the directory tree and the pictures 210 echo '<table class="folder_navigation" width="100%" cellspacing="0" cellpadding="0">'."\n". 211 '<tr>'."\n". 212 '<td>'."\n"; 213 // display the directories 214 for ($i = 0; $i < count( $folderList ); $i++) { 215 // only display folders that are not hidden or special 216 if ((is_dir( $current_path.'/'.$folderList[$i] )) && 217 ($folderList[$i] != '..')){ 218 echo '<div class="folder_navigation" '. 219 'onmouseover="this.className=\'folder_navigation_active\'" '. 220 'onmouseout="this.className=\'folder_navigation\'">'; 221 $link = $this->getFolderLink( $current_path, $folderList[$i] ); 222 $folderCount = $this->getFolderCount( $current_path, $folderList[$i] ); 223 // display the folder as a link and the number of subfolder next to it 224 $this->displayFolderLink( $link, $folderList[$i], $folderCount ); 225 echo '</div>'; 226 } 227 } 228 echo '</td>'."\n". 229 '</tr>'."\n". 230 '</table>'."\n"; 231 } 232 233 // ======================================================= 234 function getFolderList( $current_path ) { 235 if ($current_path != $this->config['cache_path'] ) { 236 $folderList[] = '..'; 237 } 238 // get the image extensions 239 $extenstionList = explode(',',$this->config['valid_image_files']); 240 // get the directories and files 241 if ($dh = opendir($current_path)) { 242 while (($file = readdir($dh)) !== false) { 243 // only add the file/dir if its a directory or a file 244 // with the specified extension 245 246 if ((substr($file,0,1) != '.') && 247 (is_dir($current_path.'/'.$file)) || 248 (in_array(strtolower(substr($file,-3)), $extenstionList))) 249 { 250 $folderList[] = $file; 251 } 252 } 253 } 254 // delete the first entry when we are at the image_path 255 // to prevent from going a directory up 256 if ($current_path == $this->config['image_path']) 257 array_shift($folderList); 258 // sort the array alphabetically 259 sort($folderList); 260 return $folderList; 261 } 262 263 // ======================================================= 264 function getFolderLink( $current_path, $folder ) { 265 $link = '<a class="folderlist" href="'.root.'gallery/gallery.php?'.path.'='; 266 // display the .. directory only if there is another 267 // directory above this one. 268 if (($folder == '..') && ($current_path != $this->config['cache_path'])) { 269 $folderList = explode( '/', $current_path.'/'); 270 for( $i=1; $i < count($folderList)-2; $i++ ) { 271 $link .= '/'.$folderList[$i]; 272 } 273 } else { 274 $link .= $current_path.'/'.$folder; 275 } 276 $link .= '&'.viewsize.'='.$this->getImageViewSize().'">'; 277 return $link; 278 } 279 280 // ======================================================= 281 function displayFolderLink( $link, $folder, $folderCount ) { 282 echo '<table class="folderlink_inactive" cellspacing="0" cellpadding="0">'. 283 '<tr>'. 284 '<td align="left" width="30px">'. 285 '<img class="navigation" src="'.root.skin_dir.'/img/gallery/dir.png">'. 286 '</td>'. 287 '<td align="left" width="auto">'. 288 $link.$folder.'</a>'; 289 $this->displayFolderCount( $folderCount ); 290 echo '</td>'. 291 '</tr>'. 292 '</table>'."\n"; 293 } 294 295 // ======================================================= 296 function getFolderCount($current_path, $folder) { 297 // dont get the folder count if its the .. directory 298 if ($folder != '..') { 299 return count(glob($current_path.'/'.$folder.'/*',GLOB_ONLYDIR)); 300 } 301 } 302 303 // ======================================================= 304 // shows how many sub directories the specified folder has 305 function displayFolderCount( $folderCount ) { 306 if ($folderCount == 1) { 307 echo ' ('.$folderCount.')';// '.t('subfolder'); 308 } 309 if ($folderCount > 1) { 310 echo ' ('.$folderCount.')';// '.t('subfolders'); 311 } 312 } 313 314 315 // ======================================================= 316 // creates the directory for the thumbnails. the directory 317 // structure is identical to the one of original pictures 318 function makeDirectory( $current_path ) { 319 if (!file_exists( $this->config['cache_path'].$current_path )) { 320 // add the document root to the thumbnail directory 321 // because mkdir works with absolute paths 322 $cache_path = $_SERVER[DOCUMENT_ROOT].$this->config['cache_path']; 323 // split the directory string into separate directories 324 $folderList = explode( '/', $current_path ); 325 // go through all folder and create each one 326 for($i=1; $i < count($folderList); $i++) { 327 $cache_path .= '/'.$folderList[$i]; 328 // check if the directory is already there 329 if (!file_exists($cache_path)) { 330 mkdir ($cache_path); 331 } 332 } 333 } 334 } 335 336 // ======================================================= 337 // check if the images are there, if not create them 338 function makeImages( $current_path, $folderList, $image_viewsize, $image_index ) { 339 $path = $_SERVER[DOCUMENT_ROOT].$this->config['cache_path'].$current_path; 340 // use the image_viewsize numbers as a prefix if fullsize is not requested 341 if ( $image_viewsize != fullsize ) { 342 // only so many images will be created that will be displayed on the screen 343 $max_cols = substr($image_viewsize, 0, 1); 344 $max_rows = substr($image_viewsize, 2, 1); 345 $max_number = ($max_cols * $max_rows); 346 // the prefix that will be added to a file so that 347 // different sizes have different names 348 $file_prefix = strtr($image_viewsize, ',','_').'_'; 349 } else { 350 $max_number = 1; 351 // the prefix that will be added to a file so that 352 // different sizes have different names 353 $file_prefix = $image_viewsize.'_'; 354 } 355 // get the amount of subfolders. increase the count in the loop by these 356 // subfolders 357 $folder_count = count(glob($current_path.'/'.$folder.'/*',GLOB_ONLYDIR)); 358 for ($i = $image_index; $i < ($max_number + $image_index + $folder_count); $i++) { 359 // show the picture only if its not hidden and not a directory 360 if (!is_dir( $current_path.'/'.$folderList[$i] )) { 361 // check if there is already a thumbnail available, if not create it 362 if (!file_exists( $path.'/'.$file_prefix.$folderList[$i] )) { 363 // get the extension of the file 364 $fileParts = explode('.', $folderList[$i]); 365 $file_extension = strtolower($fileParts[count($fileParts)-1]); 366 // get image pointer 367 $image_p = null; 368 if ($file_extension == 'jpg') 369 $image_p = @imagecreatefromjpeg( $current_path.'/'.$folderList[$i] ); 370 if ($file_extension == 'png') 371 $image_p = @imagecreatefrompng( $current_path.'/'.$folderList[$i] ); 372 if ($file_extension == 'gif') 373 $image_p = @imagecreatefromgif( $current_path.'/'.$folderList[$i] ); 374 // proceed if we have an image pointer 375 if ($image_p) { 376 // get the image size for the cached images 377 $size = getimagesize( $current_path.'/'.$folderList[$i]); 378 $width = $size[0]; 379 $height = $size[1]; 380 // get the width for the choosen viewsize 381 // calculate it from the columns and rows if fullsize is not 382 // requested, otherwise use the original image size 383 if ( $image_viewsize != fullsize ) { 384 $new_width = (( $this->config['screen_width'] / $max_cols ) - 50 ); 385 // calculate new image dimensions 386 $new_height = ($height/$width) * $new_width; 387 if ( $height > $width ) { 388 $new_width = ($width/$height) * $new_height; 389 } 390 } else { 391 $new_width = $width; 392 $new_height = $height; 393 } 394 // get a new image pointer 395 $new_image_p = imagecreatetruecolor($new_width, $new_height); 396 // resample the old image to the new one 397 imagecopyresampled($new_image_p, $image_p, 0, 0, 0, 0, 398 $new_width, $new_height, $width, $height ); 399 // save the image 400 if ($file_extension == 'jpg') 401 imagejpeg($new_image_p, $path.'/'.$file_prefix.$folderList[$i] ); 402 if ($file_extension == 'png') 403 imagepng($new_image_p, $path.'/'.$file_prefix.$folderList[$i] ); 404 if ($file_extension == 'gif') 405 imagegif($new_image_p, $path.'/'.$file_prefix.$folderList[$i] ); 406 // destroy the old pointers 407 imagedestroy( $image_p ); 408 imagedestroy( $new_image_p ); 409 } 410 } 411 } 412 } 413 } 414 415 // ======================================================= 416 function showImages( $current_path, $folderList, $image_viewsize, $image_index ) { 417 418 $path = $_SERVER[DOCUMENT_ROOT].$this->config['cache_path'].$current_path; 419 // get the column and row values, display that many images in a row 420 $max_cols = substr($image_viewsize, 0, 1); 421 $max_rows = substr($image_viewsize, 2, 1); 422 // counter for the current column and row 423 $current_col = 0; 424 // the prefix that will be added to a file so that different sizes have different names 425 $file_prefix = strtr($image_viewsize, ',','_').'_'; 426 427 // get the amount of subfolders 428 $folder_count = count(glob($current_path.'/'.$folder.'/*',GLOB_ONLYDIR)); 429 // increase the index by the folder count 430 for ($i = 1; $i <= $folder_count; $i++) { 431 $image_index += 1; 432 } 433 echo '<table width="100%" cellspacing="0" cellpadding="0">'."\n". 434 '<tr>'. 435 '<td colspan="'.$max_cols.'">'. 436 ' '. 437 '</td>'. 438 '</tr>'; 439 // go through all entries in the folderList 440 for ($i = $image_index; $i < (($max_cols * $max_rows)+$image_index); $i++) { 441 if (( file_exists( $path.'/'.$file_prefix.$folderList[$i] )) && 442 ( isset($folderList[$i]) )) { 443 // if the column is zero then start a new row 444 // the specified number of images will be displayed side by side 445 if ( $current_col == 0 ) echo '<tr>'."\n"; 446 // stretch the table cells to equal size 447 echo '<td class="single_image" style="width:'; 448 // calculate the width of the cells 449 echo floor( 100 / $max_cols ); 450 echo '%;">'."\n". 451 // display the image centered and put border around it 452 '<div align="center">'."\n". 453 '<a href="'.root.'gallery/gallery.php?'. 454 path.'='.$current_path. 455 '&'.index.'='.$i. 456 '&'.viewsize.'='.fullsize. 457 '" target="blank">'."\n". 458 '<img class="single_image" src="'. 459 $this->config['cache_path'].$current_path.'/'. 460 $file_prefix.$folderList[$i].'" '. 461 'onmouseover="this.className=\'single_image_active\'" '. 462 'onmouseout="this.className=\'single_image\'">'."\n". 463 '</a>'."\n". 464 '</div>'."\n". 465 '<div align="center">'."\n". 466 // show the filename 467 $folderList[$i]."\n". 468 '</div>'."\n". 469 '</td>'."\n"; 470 // if the max number of columns are reached close the row 471 if ( $current_col == $max_cols ) echo '</tr>'."\n"; 472 // reset the column count back to zero 473 $current_col++; 474 if ( $current_col == $max_cols ) $current_col = 0; 475 } 476 } 477 echo '</table>'; 478 } 479 480 481 // ======================================================= 482 function onlyDirectoriesAvailable( $current_path, $folderList, $image_viewsize, $image_index ) { 483 $path = $_SERVER[DOCUMENT_ROOT].$this->config['cache_path'].$current_path; 484 // only so many images will be created that will be displayed on the screen 485 $max_cols = substr($image_viewsize, 0, 1); 486 $max_rows = substr($image_viewsize, 2, 1); 487 $max_number = ($max_cols * $max_rows); 488 // the prefix that will be added to a file so that different sizes have different names 489 $file_prefix = strtr($image_viewsize, ',','_').'_'; 490 491 // go through the folderList. if there are only directories in it 492 // then dont display the navigation stuff 493 $only_dirs = true; 494 for ($i = 0; $i < count($folderList); $i++) { 495 if ( file_exists( $path.'/'.$file_prefix.$folderList[$i] )) { 496 $only_dirs = false; 497 break; 498 } 499 } 500 return $only_dirs; 501 } 502 503 // ======================================================= 504 function showNavigation( $current_path, $folderList, $image_viewsize, $image_index ) { 505 $path = $_SERVER[DOCUMENT_ROOT].$this->config['cache_path'].$current_path; 506 // only so many images will be created that will be displayed on the screen 507 $max_cols = substr($image_viewsize, 0, 1); 508 $max_rows = substr($image_viewsize, 2, 1); 509 $max_number = ($max_cols * $max_rows); 510 // the prefix that will be added to a file so that different sizes have different names 511 $file_prefix = strtr($image_viewsize, ',','_').'_'; 512 513 echo '<table width="100%" cellspacing="0" cellpadding="0">'."\n". 514 '<tr>'."\n". 515 '<td class="image_navigation"> '."\n". 516 '</td>'."\n". 517 '<td class="image_navigation">'."\n"; 518 // display the goto first page link 519 if ($image_index != 1) { 520 echo '<a href="'.root.'gallery/gallery.php?'. 521 '&'.path.'='.$current_path. 522 '&'.index.'=1'. 523 '&'.viewsize.'='.$image_viewsize.'">'."\n". 524 // display the right arrow 525 '<img src="'.root.skin_dir.'/img/gallery/first_page.png">'. 526 '</a>'."\n"; 527 } else { 528 echo '<img src="'.root.skin_dir.'/img/gallery/first_page_disabled.png">'."\n"; 529 } 530 // display the previous page icon if there are more than one entries 531 if ($image_index != 1) { 532 echo '<a href="'.root.'gallery/gallery.php?'. 533 '&'.path.'='.$current_path. 534 '&'.index.'='; 535 if ($image_index < $max_number) { 536 echo 1; 537 } else { 538 echo ($image_index - $max_number); 539 } 540 echo '&'.viewsize.'='.$image_viewsize.'">'."\n". 541 // display the left arrow 542 '<img src="'.root.skin_dir.'/img/gallery/prev_page.png">'. 543 '</a>'."\n"; 544 } else { 545 echo '<img src="'.root.skin_dir.'/img/gallery/prev_page_disabled.png">'."\n"; 546 } 547 echo '</td>'."\n". 548 '<td class="image_navigation">'."\n". 549 // display an info in what page we are right now 550 '( '.$image_index.' '.t('to').' '; 551 if (($image_index + $max_number) < count($folderList)) { 552 echo ($image_index+$max_number-1); 553 } else { 554 echo (count($folderList)-1); 555 } 556 echo ' '.t('of').' '.(count($folderList)-1).' )'."\n". 557 '</td>'."\n". 558 '<td class="image_navigation">'."\n"; 559 // display the next page link 560 if (($image_index + $max_number) < count($folderList)) { 561 echo '<a href="'.root.'gallery/gallery.php?'. 562 '&'.path.'='.$current_path. 563 '&'.index.'='.($image_index + $max_number). 564 '&'.viewsize.'='.$image_viewsize.'">'."\n". 565 // display the right arrow 566 '<img src="'.root.skin_dir.'/img/gallery/next_page.png">'. 567 '</a>'."\n"; 568 } else { 569 echo '<img src="'.root.skin_dir.'/img/gallery/next_page_disabled.png">'."\n"; 570 } 571 // display the goto last page link 572 if (($image_index + $max_number) < count($folderList)) { 573 echo '<a href="'.root.'gallery/gallery.php?'. 574 '&'.path.'='.$current_path. 575 '&'.index.'='. 576 (count($folderList) - (count($folderList) % $max_number)+1). 577 '&'.viewsize.'='.$image_viewsize.'">'."\n". 578 // display the right arrow 579 '<img src="'.root.skin_dir.'/img/gallery/last_page.png">'. 580 '</a>'."\n"; 581 } else { 582 echo '<img src="'.root.skin_dir.'/img/gallery/last_page_disabled.png">'."\n"; 583 } 584 echo '</td>'."\n". 585 '<td class="image_navigation"> '."\n". 586 '</td>'."\n". 587 '</tr>'."\n". 588 '</table>'."\n"; 589 } 590 591 // ======================================================= 592 function showFullsizeImage( $current_path, $folderList, $image_index ) { 593 echo '<html>'."\n". 594 '<head>'."\n". 595 '<title>'.$folderList[$image_index].'</title>'."\n". 596 '</head>'."\n". 597 '<body>'."\n". 598 '<div>'."\n". 599 '<img src="'."\n". 600 $this->config['cache_path'].$current_path.'/'. 601 fullsize.'_'.$folderList[$image_index].'">'."\n". 602 '</div>'."\n". 603 '</body>'."\n". 604 '</html>'; 605 } 606 607 // ======================================================= 608 } -
modules/gallery/includes/objects/Settings.php
diff -Naur --exclude='*.orig' --exclude='*.rej' mythweb-orig/modules/gallery/includes/objects/Settings.php mythweb/modules/gallery/includes/objects/Settings.php
old new 1 <?php 2 /** 3 * Gallery Settings Functions 4 * 5 * @url $URL: http://svn.mythtv.org/svn/trunk/mythplugins/mythweb/modules/gallery/set_prefs.php $ 6 * @date $Date: 2006-12-19 09:17:33 +0100 (Di, 19 Dez 2006) $ 7 * @version $Revision: 12295 $ 8 * @author $Author: xris $ 9 * @license GPL 10 * 11 * @package MythWeb 12 * @subpackage Gallery 13 /**/ 14 15 // Load the available configuration from the session variable 16 // or if this one is empty then form the database 17 function loadGalleryConfig() 18 { 19 $_SESSION['gallery']['image_path'] = getGalleryImagePath(); 20 $_SESSION['gallery']['cache_path'] = getGalleryCachePath(); 21 $_SESSION['gallery']['default_viewsize'] = getGalleryDefaultViewSize(); 22 $_SESSION['gallery']['screen_width'] = getGalleryScreenWidth(); 23 $_SESSION['gallery']['viewsizes'] = getGalleryViewSizes(); 24 $_SESSION['gallery']['valid_image_files'] = getGalleryValidImageFiles(); 25 } 26 27 28 // Load all of the known mythtv frontend hosts 29 function getGalleryHostnames() 30 { 31 $Settings_Hosts = array('' => t('MythWeb Session')); 32 global $db; 33 $sh = $db->query('SELECT DISTINCT hostname FROM settings WHERE value="locale" ORDER BY hostname'); 34 35 // add all the found hosts into an array 36 while (list($host) = $sh->fetch_row()) 37 { 38 if (empty($host)) 39 continue; 40 $Settings_Hosts[$host] = $host; 41 } 42 $sh->finish(); 43 return $Settings_Hosts; 44 } 45 46 47 // update the values in the database if necessary 48 function saveGalleryConfig( $Settings_Hosts ) 49 { 50 // Make sure we have a valid host selected 51 if (!isset( $Settings_Hosts[$_SESSION['settings']['host']]) ) 52 { 53 // we have no valid host, reset the array 54 $_SESSION['settings']['host'] = reset(array_keys($Settings_Hosts)); 55 } else { 56 // we have a valid host, check if the data should be saved 57 if ($_POST['save'] && isset($_POST['host'])) 58 { 59 // Changing settings for this MythWeb session 60 if (empty($_POST['host'])) 61 { 62 // save the image path in the session variable 63 $_SESSION['gallery']['image_path'] = $_POST['image_path']; 64 $_SESSION['gallery']['cache_path'] = $_POST['cache_path']; 65 $_SESSION['gallery']['default_viewsize'] = $_POST['default_viewsize']; 66 $_SESSION['gallery']['screen_width'] = $_POST['screen_width']; 67 $_SESSION['gallery']['viewsizes'] = $_POST['viewsizes']; 68 $_SESSION['gallery']['valid_image_files'] = $_POST['valid_image_files']; 69 } else { 70 // save the settings in the database 71 // setGalleryImagePath( $_POST['image_path'], $_POST['host'] ); 72 setGalleryCachePath( $_POST['cache_path'], $_POST['host'] ); 73 setGalleryDefaultViewSize( $_POST['default_viewsize'], $_POST['host'] ); 74 setGalleryScreenWidth( $_POST['screen_width'], $_POST['host'] ); 75 setGalleryViewSizes( $_POST['viewsizes'], $_POST['host'] ); 76 setGalleryValidImageFiles( $_POST['valid_image_files'],$_POST['host'] ); 77 } 78 // Make sure the session host gets updated to the posted one. 79 $_SESSION['settings']['host'] = $_POST['host']; 80 } 81 } 82 } 83 84 // the absolute path where the images are 85 // get it from the database or the session variable 86 function getGalleryImagePath() 87 { 88 global $db; 89 if (!empty($_SESSION['settings']['host'])) { 90 $imagePath = $db->query_col('SELECT data FROM settings 91 WHERE value="GalleryDir" AND hostname=?', $_SESSION['settings']['host']); 92 } 93 94 if (!$imagePath) 95 { 96 $imagePath = _or($_SESSION['gallery']['image_path'], '/myth/gallery'); 97 } 98 99 return $imagePath; 100 } 101 102 // directory where the cached images are stored 103 // this directory is relative to the htdocs directory 104 function getGalleryCachePath() 105 { 106 global $db; 107 if (!empty($_SESSION['settings']['host'])) { 108 $cachePath = $db->query_col('SELECT data FROM settings 109 WHERE value="GalleryCachePath" AND hostname=?', $_SESSION['settings']['host']); 110 } 111 112 if (!$cachePath) 113 { 114 $cachePath = _or($_SESSION['gallery']['cache_path'], '/mythweb/data/cache'); 115 } 116 117 return $cachePath; 118 } 119 120 121 // defines the default view mode 122 // default is 4 columns and 4 rows per page 123 function getGalleryDefaultViewSize() 124 { 125 global $db; 126 if (!empty($_SESSION['settings']['host'])) { 127 $defaultViewSize = $db->query_col('SELECT data FROM settings 128 WHERE value="GalleryDefaultViewSize" AND hostname=?', $_SESSION['settings']['host']); 129 } 130 131 if (!$defaultViewSize) 132 { 133 $defaultViewSize = _or($_SESSION['gallery']['default_viewsize'], '4,3'); 134 } 135 136 return $defaultViewSize; 137 } 138 139 140 // width if the screen-200 (example 1024-200) 141 // this is needed to calculate the width of the images 142 function getGalleryScreenWidth() 143 { 144 global $db; 145 if (!empty($_SESSION['settings']['host'])) { 146 $screenWidth = $db->query_col('SELECT data FROM settings 147 WHERE value="GalleryScreenWidth" AND hostname=?', $_SESSION['settings']['host']); 148 } 149 150 if (!$screenWidth) 151 { 152 $screenWidth = _or($_SESSION['gallery']['screen_width'], '1024'); 153 } 154 155 return $screenWidth; 156 } 157 158 159 // columns and rows that are shown on one page, ; separates another mode 160 function getGalleryViewSizes() 161 { 162 global $db; 163 if (!empty($_SESSION['settings']['host'])) { 164 $viewSizes = $db->query_col('SELECT data FROM settings 165 WHERE value="GalleryViewSizes" AND hostname=?', $_SESSION['settings']['host']); 166 } 167 168 if (!$viewSizes) 169 { 170 $viewSizes = _or($_SESSION['gallery']['viewsizes'], '5,4 ; 4,4 ; 4,3 ; 3,3 ; 2,2 ; 1,1'); 171 } 172 173 return $viewSizes; 174 } 175 176 177 // image extensions that will be shown, everything else 178 // will not work, currently there four are supported 179 function getGalleryValidImageFiles() 180 { 181 global $db; 182 if (!empty($_SESSION['settings']['host'])) { 183 $validImageFiles = $db->query_col('SELECT data FROM settings 184 WHERE value="GalleryValidImageFiles" AND hostname=?', $_SESSION['settings']['host']); 185 } 186 187 if (!$validImageFiles) 188 { 189 $validImageFiles = _or($_SESSION['gallery']['valid_image_files'], 'jpg,png,gif,bmp'); 190 } 191 192 return $validImageFiles; 193 } 194 195 196 // save the image path in the database 197 //function setGalleryImagePath( $imagePath, $host ) 198 //{ 199 // global $db; 200 // $db->query('UPDATE settings SET data = ? 201 // WHERE value="GalleryDir" AND hostname=?', $imagePath, $host); 202 //} 203 204 function setGalleryCachePath( $cachePath, $host ) 205 { 206 global $db; 207 $db->query('UPDATE settings SET data = ? 208 WHERE value="GalleryCachePath" AND hostname=?', $cachePath, $host); 209 } 210 211 212 function setGalleryDefaultViewSize( $defaultViewSize, $host ) 213 { 214 global $db; 215 $db->query('UPDATE settings SET data = ? 216 WHERE value="GalleryDefaultViewSize" AND hostname=?', $defaultViewSize, $host); 217 } 218 219 220 function setGalleryScreenWidth( $screenWidth, $host ) 221 { 222 global $db; 223 $db->query('UPDATE settings SET data = ? 224 WHERE value="GalleryScreenWidth" AND hostname=?', $screenWidth, $host); 225 } 226 227 228 function setGalleryViewSizes( $viewSizes, $host ) 229 { 230 global $db; 231 $db->query('UPDATE settings SET data = ? 232 WHERE value="GalleryViewSizes" AND hostname=?', $viewSizes, $host); 233 } 234 235 236 function setGalleryValidImageFiles( $validImageFiles, $host ) 237 { 238 global $db; 239 $db->query('UPDATE settings SET data = ? 240 WHERE value="GalleryValidImageFiles" AND hostname=?', $validImageFiles, $host); 241 } 242 243 -
modules/gallery/init.php
diff -Naur --exclude='*.orig' --exclude='*.rej' mythweb-orig/modules/gallery/init.php mythweb/modules/gallery/init.php
old new 1 <?php 2 /** 3 * Initialization routines for the MythWeb Gallery module 4 * 5 * @url $URL: http://svn.mythtv.org/svn/trunk/mythplugins/mythweb/modules/gallery/init.php $ 6 * @date $Date: 2006-12-19 09:17:33 +0100 (Di, 19 Dez 2006) $ 7 * @version $Revision: 12295 $ 8 * @author $Author: rsiebert $ 9 * @license GPL 10 * 11 * @package MythWeb 12 * @subpackage Gallery 13 * 14 /**/ 15 16 // Settings options 17 $Settings['gallery'] = array('name' => t('Gallery'), 18 'choices' => array('prefs' => t('Preferences'), ), 19 'default' => 'prefs', 20 ); 21 22 // First, we should check to see that MythGallery is configured. 23 $has_gallery = $_SESSION['locale'] 24 ? true 25 : $db->query_col('SELECT COUNT(data) 26 FROM settings 27 WHERE value="locale"'); 28 29 30 31 // If gallery is enabled, add it to the list. 32 if ($has_gallery) { 33 $Modules['gallery'] = array('path' => 'gallery', 34 'sort' => 5, 35 'name' => t('Gallery'), 36 'description' => t('Local Image Gallery') 37 ); 38 } -
modules/gallery/set_prefs.php
diff -Naur --exclude='*.orig' --exclude='*.rej' mythweb-orig/modules/gallery/set_prefs.php mythweb/modules/gallery/set_prefs.php
old new 1 <?php 2 /** 3 * Gallery settings 4 * 5 * @url $URL: http://svn.mythtv.org/svn/trunk/mythplugins/mythweb/modules/gallery/set_prefs.php $ 6 * @date $Date: 2006-12-19 09:17:33 +0100 (Di, 19 Dez 2006) $ 7 * @version $Revision: 12295 $ 8 * @author $Author: xris $ 9 * @license GPL 10 * 11 * @package MythWeb 12 * @subpackage Gallery 13 /**/ 14 15 // Load functions 16 require_once 'includes/objects/Settings.php'; 17 18 // Load all of the known mythtv frontend hosts 19 $Settings_Hosts = getGalleryHostnames(); 20 21 // update the values in the database if necessary 22 saveGalleryConfig( $Settings_Hosts ); 23 loadGalleryConfig(); 24 -
modules/gallery/tmpl/default/gallery.php
diff -Naur --exclude='*.orig' --exclude='*.rej' mythweb-orig/modules/gallery/tmpl/default/gallery.php mythweb/modules/gallery/tmpl/default/gallery.php
old new 1 <?php 2 /** 3 * Display template for the Gallery module 4 * 5 * @url $URL: http://svn.mythtv.org/svn/trunk/mythplugins/mythweb/modules/gallery/tmpl/default/gallery.php $ 6 * @date $Date: 2006-12-19 09:17:33 +0100 (Di, 19 Dez 2006) $ 7 * @version $Revision: 12295 $ 8 * @author $Author: xris $ 9 * @license GPL 10 * 11 * @package MythWeb 12 * 13 /**/ 14 15 // Page title 16 $page_title = 'MythWeb - '.t('Gallery'); 17 18 // the current viewsize mode 19 $image_viewsize = $gallery->getImageViewSize(); 20 21 // If displaying full size image don't display header and footer 22 if ($image_viewsize == 'fullsize') { 23 // Print the gallery part 24 $gallery->start(); 25 } 26 else 27 { 28 // Load this page's custom stylesheet 29 $headers[] = '<link rel="stylesheet" type="text/css" href="'.root.skin_dir.'/gallery.css" />'; 30 31 // Print the page header 32 require 'modules/_shared/tmpl/'.tmpl.'/header.php'; 33 34 // Print the gallery part 35 $gallery->start(); 36 37 // Print the page footer 38 require 'modules/_shared/tmpl/'.tmpl.'/footer.php'; 39 } 40 No newline at end of file -
modules/gallery/tmpl/default/set_prefs.php
diff -Naur --exclude='*.orig' --exclude='*.rej' mythweb-orig/modules/gallery/tmpl/default/set_prefs.php mythweb/modules/gallery/tmpl/default/set_prefs.php
old new 1 <?php 2 /** 3 * Display/save MythGallery settings 4 * 5 * @url $URL: http://svn.mythtv.org/svn/trunk/mythplugins/mythweb/modules/gallery/tmpl/default/set_prefs.php $ 6 * @date $Date: 2007-01-09 07:37:34 +0100 (Di, 09 Jan 2007) $ 7 * @version $Revision: 12460 $ 8 * @author $Author: xris $ 9 * @license GPL 10 * 11 * @package MythWeb 12 * @subpackage Gallery 13 * 14 /**/ 15 16 // Display the gui for the settings 17 $galleryConfigTheme = new GalleryConfigTheme(); 18 $galleryConfigTheme->showConfig(); 19 20 class GalleryConfigTheme 21 { 22 function GalleryConfigTheme() 23 { 24 25 } 26 27 function showConfig() 28 { 29 echo '<form class="form" method="post" action="'. form_action .'">'. 30 '<input type="hidden" name="host" value="'. html_entities($_SESSION['settings']['host']) .'"/>'. 31 '<table border="0" cellspacing="0" cellpadding="0">'. 32 '<tr class="_sep">'. 33 '<td>'. 34 t('Gallery image path').': '. 35 '</td>'. 36 '<td>'. 37 '<input class="_text" type="text" name="image_path" value="'.getGalleryImagePath().'">'. 38 '</td>'. 39 '</tr>'. 40 '<tr class="_sep">'. 41 '<td>'. 42 t('Path where the thumbnails are').': '. 43 '</td>'. 44 '<td>'. 45 '<input class="_text" type="text" name="cache_path" value="'.getGalleryCachePath().'">'. 46 '</td>'. 47 '</tr>'. 48 '<tr class="_sep">'. 49 '<td>'. 50 t('Default view size').': '. 51 '</td>'. 52 '<td>'. 53 '<input class="_text" type="text" name="default_viewsize" value="'.getGalleryDefaultViewSize().'">'. 54 '</td>'. 55 '</tr>'. 56 '<tr class="_sep">'. 57 '<td>'. 58 t('Horizontal screen resolution').': '. 59 '</td>'. 60 '<td>'. 61 '<input class="_text" type="text" name="screen_width" value="'.getGalleryScreenWidth().'">'. 62 '</td>'. 63 '</tr>'. 64 '<tr class="_sep">'. 65 '<td>'. 66 t('List of available view sizes').': '. 67 '</td>'. 68 '<td>'. 69 '<input class="_text" type="text" name="viewsizes" value="'.getGalleryViewSizes().'">'. 70 '</td>'. 71 '</tr>'. 72 '<tr class="_sep">'. 73 '<td>'. 74 t('List of allowed image formats').': '. 75 '</td>'. 76 '<td>'. 77 '<input class="_text" type="text" name="valid_image_files" value="'.getGalleryValidImageFiles().'">'. 78 '</td>'. 79 '</tr>'. 80 '<tr>'. 81 '<td align="center">'. 82 '<input class="_button" type="reset" class="submit" value="'.t('Reset').'">'. 83 '</td>'. 84 '<td align="center">'. 85 '<input class="_button" type="submit" class="submit" name="save" value="'.t('Save') .'">'. 86 '</td>'. 87 '</tr>'. 88 '</table>'. 89 '</form>'; 90 } 91 } 92 93 ?> 94 No newline at end of file -
modules/gallery/tmpl/default/welcome.php
diff -Naur --exclude='*.orig' --exclude='*.rej' mythweb-orig/modules/gallery/tmpl/default/welcome.php mythweb/modules/gallery/tmpl/default/welcome.php
old new 1 <?php 2 /** 3 * Welcome page description of the Gallery module. 4 * 5 * @url $URL: http://svn.mythtv.org/svn/trunk/mythplugins/mythweb/modules/gallery/tmpl/default/welcome.php $ 6 * @date $Date: 2005-12-13 08:23:18 +0100 (Di, 13 Dez 2005) $ 7 * @version $Revision: 8252 $ 8 * @author $Author: xris $ 9 * @license GPL 10 * 11 * @package MythWeb 12 * 13 /**/ 14 15 // Open with a div and an image 16 echo '<div id="info_gallery" class="hidden">', 17 '<img src="', skin_url, '/img/gallery.png" class="module_icon" />', 18 19 // Print a basic overview of what this module does 20 t('welcome: gallery'), 21 22 // Next, print a list of possible subsectons 23 #### 24 25 // Close the div 26 "</div>\n"; 27 No newline at end of file -
modules/_shared/lang/English.lang
diff -Naur --exclude='*.orig' --exclude='*.rej' mythweb-orig/modules/_shared/lang/English.lang mythweb/modules/_shared/lang/English.lang
old new 149 149 "Current MythWeb Template" 150 150 "Current Recording" 151 151 "Current recordings" 152 "Current path" 152 153 "Currently Browsing: $1" 153 154 "Currently Recording: Edit" 154 155 "Custom" … … 166 167 "Default" 167 168 "Default MythVideo View" 168 169 "Default MythWeb Template" 170 "Default view size" 169 171 "Delete" 170 172 "delete" 171 173 "Delete $1" … … 242 244 "freqid" 243 245 "Friday" 244 246 "Frontends" 247 "Gallery" 248 "Gallery image path" 245 249 "generic_date" 246 250 %a %b %e, %Y 247 251 "generic_time" … … 265 269 "Hide" 266 270 "High" 267 271 "Home" 272 "Horizontal screen resolution" 268 273 "Host" 269 274 "Hosted by" 270 275 "Hour" … … 273 278 "Humidity" 274 279 "Ignore generic shows" 275 280 "Ignore scheduled shows" 281 "Images per page" 276 282 "IMDB" 277 283 "IMDBTYPE" 278 284 Imdb … … 331 337 "length" 332 338 "Length" 333 339 "Length (min)" 340 "List of allowed image formats" 341 "List of available view sizes" 334 342 "Listing "Jump to"" 335 343 "Listing Time Key" 336 344 "Listings" … … 381 389 "mythvideo.sort_ignores_case" 382 390 "MythWeb" 383 391 "MythWeb Defaults" 392 "MythWeb Gallery." 384 393 "MythWeb Global Defaults" 385 394 "MythWeb Session" 386 395 "MythWeb Skin" … … 409 418 "Number of shows" 410 419 "Number of Songs" 411 420 "Number of timeslots" 421 "of" 412 422 "Off" 413 423 "Only display favourite channels" 414 424 "Only match commercial-free channels" … … 427 437 "Past Month" 428 438 "Past Week" 429 439 "Past Year" 440 "Path where the thumbnails are" 430 441 "Paused" 431 442 "Pending" 432 443 "People" … … 688 699 "Subtitles Available" 689 700 "Sunday" 690 701 "Surround Sound" 702 "Switch view mode" 691 703 "Tab" 692 704 "Temp" 693 705 "The requested recording schedule has been deleted." … … 706 718 "Title Match" 707 719 "Title search" 708 720 "Title Search" 721 "to" 709 722 "Too Many" 710 723 "Top $1" 711 724 "Top Played Songs" … … 792 805 "Wednesday" 793 806 "welcome: backend_log" 794 807 Show the server logs. 808 "welcome: gallery" 809 Browse your picture collection. 795 810 "welcome: music" 796 811 Browse your music collection. 797 812 "welcome: remote" -
modules/_shared/lang/German.lang
diff -Naur --exclude='*.orig' --exclude='*.rej' mythweb-orig/modules/_shared/lang/German.lang mythweb/modules/_shared/lang/German.lang
old new 272 272 "Create Schedule" 273 273 Speichern 274 274 "Current MythWeb Template" 275 "Current path" 276 Aktueller Pfad 275 277 "Current Recording" 276 278 Aktuelle Aufnahmen 277 279 "Current recordings" … … 307 309 "Default MythVideo View" 308 310 Standard MythVideo Ansicht 309 311 "Default MythWeb Template" 312 "Default view size" 313 Standardansicht 310 314 "Delete" 311 315 Löschen 312 316 "delete" … … 446 450 "Friday" 447 451 Freitag 448 452 "Frontends" 453 "Gallery" 454 Gallerie 455 "Gallery image path" 456 Pfad der Bilder 449 457 "generic_date" 450 458 %e.%m.%Y 451 459 "generic_time" … … 485 493 "High" 486 494 Max 487 495 "Home" 496 "Horizontal screen resolution" 497 Horizontale Bildschirmauflösung 488 498 "Host" 489 499 Moderator 490 500 "Hosted by" … … 500 510 "Ignore generic shows" 501 511 "Ignore scheduled shows" 502 512 geplante Aufnahmen ignorieren 513 "Images per page" 514 Bilder pro Seite 503 515 "IMDB" 504 516 IMDB 505 517 "IMDBTYPE" … … 571 583 Dauer 572 584 "Length (min)" 573 585 Dauer (Min.) 586 "List of allowed image formats" 587 Liste der erlaubten Bildformate 588 "List of available view sizes" 589 Liste der möglichen Ansichten 574 590 "Listing "Jump to"" 575 591 TV-Programm "Gehe zu" 576 592 "Listing Time Key" … … 651 667 "MythWeb" 652 668 "MythWeb Defaults" 653 669 MythWeb Standardeinstellungen 670 "MythWeb Gallery." 671 Gallerie 654 672 "MythWeb Global Defaults" 655 673 MythWeb globale Standardeinstellungen 656 674 "MythWeb Session" … … 706 724 Anzahl Lieder 707 725 "Number of timeslots" 708 726 Anzahl der Zeitfenster 727 "of" 728 von 709 729 "Off" 710 730 "Only display favourite channels" 711 731 Nur Favoriten anzeigen … … 730 750 "Page recorded programs" 731 751 "Page Up" 732 752 Seite nach oben 753 "Path where the thumbnails are" 754 Thumbnails speichern unter 733 755 "Part $1 of $2" 734 756 Teil $1 von $2 735 757 "Past Month" … … 1111 1133 "Streaming" 1112 1134 "Sub and Desc (Empty matches)" 1113 1135 Untertitel & Beschr. (kein Ergebnis) 1136 "subfolder" 1137 Unterordner 1138 "subfolders" 1139 Unterordner 1114 1140 "Submit Search" 1115 1141 "Subtitle" 1116 1142 Untertitel … … 1124 1150 mit Untertitel 1125 1151 "Sunday" 1126 1152 Sonntag 1153 "Switch view mode" 1154 Ansichtsmodus wechseln 1127 1155 "Surround Sound" 1128 1156 Surround Ton 1129 1157 "Tab" … … 1159 1187 Titelsuche 1160 1188 "Title Search" 1161 1189 Titel Suche 1190 "to" 1191 bis 1162 1192 "Too Many" 1163 1193 zu viele 1164 1194 "Top $1" … … 1280 1310 Mittwoch 1281 1311 "welcome: backend_log" 1282 1312 Backend Log 1313 "welcome: gallery" 1314 Gallerie 1283 1315 "welcome: music" 1284 1316 Musik 1285 1317 "welcome: remote" -
modules/_shared/tmpl/default/header.php
diff -Naur --exclude='*.orig' --exclude='*.rej' mythweb-orig/modules/_shared/tmpl/default/header.php mythweb/modules/_shared/tmpl/default/header.php
old new 121 121 </a> 122 122 <?php 123 123 } 124 if ($Modules['gallery']) { 125 ?> 126 <a id="gallery_link"<?php if ($Path[0] == 'gallery') echo ' class="current_section"' ?> href="<?php echo root ?>gallery" onmouseover="return help_text('<?php echo str_replace("'", "\\'", t('MythWeb Gallery.')) ?>')" onmouseout="return help_text()"> 127 <img src="<?php echo skin_url ?>img/gallery.png" width="48" height="48" class="alpha_png" alt="MythGallery" /> 128 </a> 129 <?php 130 } 124 131 ?> 125 132 <a id="settings_link"<?php if ($Path[0] == 'settings') echo ' class="current_section"' ?> href="<?php echo root ?>settings" onmouseover="return help_text('<?php echo str_replace("'", "\\'", t('Edit MythWeb and some MythTV settings.')) ?>')" onmouseout="return help_text()"> 126 133 <img src="<?php echo skin_url ?>img/settings.png" class="alpha_png" alt="<?php echo t('Settings') ?>"> -
skins/default/gallery.css
diff -Naur --exclude='*.orig' --exclude='*.rej' mythweb-orig/skins/default/gallery.css mythweb/skins/default/gallery.css
old new 1 img { 2 border: 0px; 3 border-color: #000000; 4 } 5 6 table.current_path_and_viewsize { 7 margin-top:5px; 8 border:1px solid #626262; 9 padding:5px; 10 width:100%; 11 } 12 13 a { 14 color:#000000; 15 text-decoration:none; 16 } 17 18 a.header { 19 font-weight:bold; 20 font-style:italic; 21 } 22 23 a.folderlist { 24 font-style:italic; 25 } 26 27 td.current_path { 28 text-align:left; 29 width:auto; 30 } 31 32 td.change_viewsize_text { 33 text-align:right; 34 width:160px; 35 } 36 37 td.change_viewsize_selection { 38 text-align:right; 39 width:140px; 40 } 41 42 select.change_viewsize { 43 border:1px solid #323232; 44 background-color: #191c26; 45 color: #FFFFFF; 46 } 47 48 td.folder_navigation { 49 width:200px; 50 vertical-align:top; 51 } 52 53 table.folder_navigation { 54 margin-top:5px; 55 border:1px solid #626262; 56 padding:4px; 57 width:100%; 58 } 59 60 div.folder_navigation_active { 61 background-color: #224477; 62 border:1px solid #191c26; 63 text-align:left; 64 padding:4px; 65 } 66 67 div.folder_navigation { 68 border:1px solid #191c26; 69 text-align:left; 70 padding:4px; 71 } 72 73 td.image_listing { 74 width:auto; 75 vertical-align:top; 76 } 77 78 table.imagelist_and_navigation { 79 margin-top:5px; 80 margin-left:5px; 81 border:1px solid #626262; 82 padding:5px; 83 width:100%; 84 } 85 86 td.image_navigation { 87 text-align:center; 88 vertical-align:middle; 89 width:20%; 90 border-width: 0px; 91 } 92 93 td.single_image { 94 font-size:9pt; 95 padding:5px; 96 text-align:center; 97 } 98 99 img.single_image { 100 padding:7px; 101 border:1px solid #323232; 102 } 103 104 img.single_image_active { 105 background-color: #224477; 106 padding:7px; 107 border:1px solid #323232; 108 } 109 No newline at end of file -
skins/grey/gallery.css
diff -Naur --exclude='*.orig' --exclude='*.rej' mythweb-orig/skins/grey/gallery.css mythweb/skins/grey/gallery.css
old new 1 img { 2 border: 0px; 3 border-color: #000000; 4 } 5 6 table.current_path_and_viewsize { 7 margin-top:5px; 8 border:1px solid #626262; 9 padding:5px; 10 width:100%; 11 } 12 13 a { 14 color:#000000; 15 text-decoration:none; 16 } 17 18 a.header { 19 font-weight:bold; 20 font-style:italic; 21 } 22 23 a.folderlist { 24 font-style:italic; 25 } 26 27 td.current_path { 28 text-align:left; 29 width:auto; 30 } 31 32 td.change_viewsize_text { 33 text-align:right; 34 width:160px; 35 } 36 37 td.change_viewsize_selection { 38 text-align:right; 39 width:140px; 40 } 41 42 select.change_viewsize { 43 border:1px solid #323232; 44 background-color: #212121; 45 } 46 47 td.folder_navigation { 48 width:200px; 49 vertical-align:top; 50 } 51 52 table.folder_navigation { 53 margin-top:5px; 54 border:1px solid #626262; 55 padding:4px; 56 width:100%; 57 } 58 59 div.folder_navigation_active { 60 background-color: #626262; 61 border:1px solid #212121; 62 text-align:left; 63 padding:4px; 64 } 65 66 div.folder_navigation { 67 border:1px solid #212121; 68 text-align:left; 69 padding:4px; 70 } 71 72 td.image_listing { 73 width:auto; 74 vertical-align:top; 75 } 76 77 table.imagelist_and_navigation { 78 margin-top:5px; 79 margin-left:5px; 80 border:1px solid #626262; 81 padding:5px; 82 width:100%; 83 } 84 85 td.image_navigation { 86 text-align:center; 87 vertical-align:middle; 88 width:20%; 89 border-width: 0px; 90 } 91 92 td.single_image { 93 font-size:9pt; 94 padding:5px; 95 text-align:center; 96 } 97 98 img.single_image { 99 padding:7px; 100 border:1px solid #323232; 101 } 102 103 img.single_image_active { 104 background-color: #626262; 105 padding:7px; 106 border:1px solid #323232; 107 } 108 No newline at end of file -
skins/grey/settings.css
diff -Naur --exclude='*.orig' --exclude='*.rej' mythweb-orig/skins/grey/settings.css mythweb/skins/grey/settings.css
old new 94 94 95 95 #settings .x-host { 96 96 text-align: right; 97 border-bottom: 2px solid # eee;97 border-bottom: 2px solid #aaa; 98 98 } 99 99 100 100 /* A notification/warning */ … … 115 115 border: 2px solid #999; 116 116 border-top: none; 117 117 } 118 119 #settings ._content input._text { 120 margin: 2px; 121 padding: 2px; 122 border: 1px solid #333333; 123 } 124 125 #settings ._content input._button { 126 margin: 2px; 127 padding: 2px; 128 border: 1px solid #333333; 129 color: #DDDDDD; 130 } 131 132 #settings ._content table { 133 width: 100%; 134 } 135 #settings ._content table th, #settings ._content table td { 136 padding: .5em; 137 } 138 139 #settings ._content th, #settings ._content td { 140 text-align: right; 141 font-weight: normal; 142 white-space: nowrap; 143 } 144 145 #settings ._content tr._sep th, #settings ._content tr._sep td { 146 border-bottom: 1px solid #304943; 147 }