Ticket #2923: mythweb_gallery_updated.patch
File mythweb_gallery_updated.patch, 48.4 KB (added by , 17 years ago) |
---|
-
modules/gallery/handler.php
diff -Naur ../mythweb-nogallery/modules/gallery/handler.php ./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 // Print the gallery page template 17 require_once tmpl_dir.'gallery.php'; 18 19 // Exit 20 exit; 21 -
modules/gallery/init.php
diff -Naur ../mythweb-nogallery/modules/gallery/init.php ./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 ../mythweb-nogallery/modules/gallery/set_prefs.php ./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 16 // Load all of the known mythtv frontend hosts 17 $Settings_Hosts = getGalleryHostnames(); 18 19 // update the values in the database if necessary 20 saveGalleryConfig( $Settings_Hosts ); 21 loadGalleryConfig(); 22 23 24 // Load the available configuration from the session variable 25 // or if this one is empty then form the database 26 function loadGalleryConfig() 27 { 28 $_SESSION['gallery']['image_path'] = getGalleryImagePath(); 29 $_SESSION['gallery']['cache_path'] = getGalleryCachePath(); 30 $_SESSION['gallery']['default_viewsize'] = getGalleryDefaultViewSize(); 31 $_SESSION['gallery']['screen_width'] = getGalleryScreenWidth(); 32 $_SESSION['gallery']['viewsizes'] = getGalleryViewSizes(); 33 $_SESSION['gallery']['valid_image_files'] = getGalleryValidImageFiles(); 34 } 35 36 37 // Load all of the known mythtv frontend hosts 38 function getGalleryHostnames() 39 { 40 $Settings_Hosts = array('' => t('MythWeb Session')); 41 global $db; 42 $sh = $db->query('SELECT DISTINCT hostname FROM settings WHERE value="locale" ORDER BY hostname'); 43 44 // add all the found hosts into an array 45 while (list($host) = $sh->fetch_row()) 46 { 47 if (empty($host)) 48 continue; 49 $Settings_Hosts[$host] = $host; 50 } 51 $sh->finish(); 52 return $Settings_Hosts; 53 } 54 55 56 // update the values in the database if necessary 57 function saveGalleryConfig( $Settings_Hosts ) 58 { 59 // Make sure we have a valid host selected 60 if (!isset( $Settings_Hosts[$_SESSION['settings']['host']]) ) 61 { 62 // we have no valid host, reset the array 63 $_SESSION['settings']['host'] = reset(array_keys($Settings_Hosts)); 64 } else { 65 // we have a valid host, check if the data should be saved 66 if ($_POST['save'] && isset($_POST['host'])) 67 { 68 // Changing settings for this MythWeb session 69 if (empty($_POST['host'])) 70 { 71 // save the image path in the session variable 72 $_SESSION['gallery']['image_path'] = $_POST['image_path']; 73 $_SESSION['gallery']['cache_path'] = $_POST['cache_path']; 74 $_SESSION['gallery']['default_viewsize'] = $_POST['default_viewsize']; 75 $_SESSION['gallery']['screen_width'] = $_POST['screen_width']; 76 $_SESSION['gallery']['viewsizes'] = $_POST['viewsizes']; 77 $_SESSION['gallery']['valid_image_files'] = $_POST['valid_image_files']; 78 } else { 79 // save the settings in the database 80 // setGalleryImagePath( $_POST['image_path'], $_POST['host'] ); 81 setGalleryCachePath( $_POST['cache_path'], $_POST['host'] ); 82 setGalleryDefaultViewSize( $_POST['default_viewsize'], $_POST['host'] ); 83 setGalleryScreenWidth( $_POST['screen_width'], $_POST['host'] ); 84 setGalleryViewSizes( $_POST['viewsizes'], $_POST['host'] ); 85 setGalleryValidImageFiles( $_POST['valid_image_files'],$_POST['host'] ); 86 } 87 // Make sure the session host gets updated to the posted one. 88 $_SESSION['settings']['host'] = $_POST['host']; 89 } 90 } 91 } 92 93 // the absolute path where the images are 94 // get it from the database or the session variable 95 function getGalleryImagePath() 96 { 97 global $db; 98 if (!empty($_SESSION['settings']['host'])) { 99 $imagePath = $db->query_col('SELECT data FROM settings 100 WHERE value="GalleryDir" AND hostname=?', $_SESSION['settings']['host']); 101 } 102 103 if (!$imagePath) 104 { 105 $imagePath = _or($_SESSION['gallery']['image_path'], '/myth/gallery'); 106 } 107 108 return $imagePath; 109 } 110 111 // directory where the cached images are stored 112 // this directory is relative to the htdocs directory 113 function getGalleryCachePath() 114 { 115 global $db; 116 if (!empty($_SESSION['settings']['host'])) { 117 $cachePath = $db->query_col('SELECT data FROM settings 118 WHERE value="GalleryCachePath" AND hostname=?', $_SESSION['settings']['host']); 119 } 120 121 if (!$cachePath) 122 { 123 $cachePath = _or($_SESSION['gallery']['cache_path'], '/mythweb/data/cache'); 124 } 125 126 return $cachePath; 127 } 128 129 130 // defines the default view mode 131 // default is 4 columns and 4 rows per page 132 function getGalleryDefaultViewSize() 133 { 134 global $db; 135 if (!empty($_SESSION['settings']['host'])) { 136 $defaultViewSize = $db->query_col('SELECT data FROM settings 137 WHERE value="GalleryDefaultViewSize" AND hostname=?', $_SESSION['settings']['host']); 138 } 139 140 if (!$defaultViewSize) 141 { 142 $defaultViewSize = _or($_SESSION['gallery']['default_viewsize'], '4,3'); 143 } 144 145 return $defaultViewSize; 146 } 147 148 149 // width if the screen-200 (example 1024-200) 150 // this is needed to calculate the width of the images 151 function getGalleryScreenWidth() 152 { 153 global $db; 154 if (!empty($_SESSION['settings']['host'])) { 155 $screenWidth = $db->query_col('SELECT data FROM settings 156 WHERE value="GalleryScreenWidth" AND hostname=?', $_SESSION['settings']['host']); 157 } 158 159 if (!$screenWidth) 160 { 161 $screenWidth = _or($_SESSION['gallery']['screen_width'], '1024'); 162 } 163 164 return $screenWidth; 165 } 166 167 168 // columns and rows that are shown on one page, ; separates another mode 169 function getGalleryViewSizes() 170 { 171 global $db; 172 if (!empty($_SESSION['settings']['host'])) { 173 $viewSizes = $db->query_col('SELECT data FROM settings 174 WHERE value="GalleryViewSizes" AND hostname=?', $_SESSION['settings']['host']); 175 } 176 177 if (!$viewSizes) 178 { 179 $viewSizes = _or($_SESSION['gallery']['viewsizes'], '5,4 ; 4,4 ; 4,3 ; 3,3 ; 2,2 ; 1,1'); 180 } 181 182 return $viewSizes; 183 } 184 185 186 // image extensions that will be shown, everything else 187 // will not work, currently there four are supported 188 function getGalleryValidImageFiles() 189 { 190 global $db; 191 if (!empty($_SESSION['settings']['host'])) { 192 $validImageFiles = $db->query_col('SELECT data FROM settings 193 WHERE value="GalleryValidImageFiles" AND hostname=?', $_SESSION['settings']['host']); 194 } 195 196 if (!$validImageFiles) 197 { 198 $validImageFiles = _or($_SESSION['gallery']['valid_image_files'], 'jpg,png,gif,bmp'); 199 } 200 201 return $validImageFiles; 202 } 203 204 205 // save the image path in the database 206 //function setGalleryImagePath( $imagePath, $host ) 207 //{ 208 // global $db; 209 // $db->query('UPDATE settings SET data = ? 210 // WHERE value="GalleryDir" AND hostname=?', $imagePath, $host); 211 //} 212 213 function setGalleryCachePath( $cachePath, $host ) 214 { 215 global $db; 216 $db->query('UPDATE settings SET data = ? 217 WHERE value="GalleryCachePath" AND hostname=?', $cachePath, $host); 218 } 219 220 221 function setGalleryDefaultViewSize( $defaultViewSize, $host ) 222 { 223 global $db; 224 $db->query('UPDATE settings SET data = ? 225 WHERE value="GalleryDefaultViewSize" AND hostname=?', $defaultViewSize, $host); 226 } 227 228 229 function setGalleryScreenWidth( $screenWidth, $host ) 230 { 231 global $db; 232 $db->query('UPDATE settings SET data = ? 233 WHERE value="GalleryScreenWidth" AND hostname=?', $screenWidth, $host); 234 } 235 236 237 function setGalleryViewSizes( $viewSizes, $host ) 238 { 239 global $db; 240 $db->query('UPDATE settings SET data = ? 241 WHERE value="GalleryViewSizes" AND hostname=?', $viewSizes, $host); 242 } 243 244 245 function setGalleryValidImageFiles( $validImageFiles, $host ) 246 { 247 global $db; 248 $db->query('UPDATE settings SET data = ? 249 WHERE value="GalleryValidImageFiles" AND hostname=?', $validImageFiles, $host); 250 } 251 252 -
modules/gallery/tmpl/default/gallery.php
diff -Naur ../mythweb-nogallery/modules/gallery/tmpl/default/gallery.php ./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 // Load this page's custom stylesheet 19 $headers[] = '<link rel="stylesheet" type="text/css" href="'.root.skin_dir.'/gallery.css" />'; 20 21 // Print the page header 22 require 'modules/_shared/tmpl/'.tmpl.'/header.php'; 23 // require_once tmpl_dir.'set_prefs.php'; 24 25 // Print the gallery part 26 $gallery = new Gallery(); 27 $gallery->start(); 28 29 // Print the page footer 30 require 'modules/_shared/tmpl/'.tmpl.'/footer.php'; 31 32 class Gallery { 33 34 var $config; 35 36 function Gallery() { 37 38 } 39 40 41 // ======================================================= 42 function start() { 43 // load default configuration 44 $this->config['image_path'] = $_SESSION['gallery']['image_path']; 45 $this->config['cache_path'] = $_SESSION['gallery']['cache_path']; 46 $this->config['default_viewsize'] = $_SESSION['gallery']['default_viewsize']; 47 $this->config['screen_width'] = $_SESSION['gallery']['screen_width']; 48 $this->config['viewsizes'] = $_SESSION['gallery']['viewsizes']; 49 $this->config['valid_image_files'] = $_SESSION['gallery']['valid_image_files']; 50 51 // echo $this->config['image_path'] ."<br>"; 52 // echo $this->config['cache_path'] ."<br>"; 53 // echo $this->config['default_viewsize'] ."<br>"; 54 // echo $this->config['screen_width'] ."<br>"; 55 // echo $this->config['viewsizes'] ."<br>"; 56 // echo $this->config['valid_image_files'] ."<br>"; 57 58 // the current selected directory where the cached images are stored 59 $current_path = $this->getCurrentImagePath(); 60 // the path to the real images 61 $image_path = $this->config['image_path']; 62 // the filename of a selected image 63 $image_name = $this->getImageName(); 64 // the current viewsize mode 65 $image_viewsize = $this->getImageViewSize(); 66 // get the image index for the viewsize medium 67 $image_index = $this->getImageIndex(); 68 // get the contents of the folders 69 $folderList = $this->getFolderList( $current_path ); 70 // check what kind of images should be displayed 71 if ($image_viewsize == 'fullsize') { 72 // create the images if there are not yet in the directory 73 $this->makeImages( $current_path, $folderList, $image_viewsize, $image_index ); 74 // display the big image 75 $this->showFullsizeImage( $current_path, $folderList, $image_index ); 76 // there is nothing else to do 77 exit; 78 } 79 // show the horizontal navigation bar 80 $this->showGalleryHeader( $current_path, $image_viewsize, $image_index ); 81 // check if the thumbnail directory is there, if not create it 82 $this->makeDirectory( $current_path ); 83 // create the images if there are not yet in the directory 84 $this->makeImages( $current_path, $folderList, $image_viewsize, $image_index ); 85 echo '<table width="100%" cellspacing="0" cellpadding="0">'."\n". 86 '<tr>'."\n". 87 '<td class="folder_navigation">'."\n"; 88 $this->showFolderTree( $current_path, $folderList ); 89 echo '</td>'."\n". 90 '<td class="image_listing">'."\n"; 91 if ($this->onlyDirectoriesAvailable( $current_path, $folderList, $image_viewsize, $image_index ) == false ) { 92 echo '<table class="imagelist_and_navigation" cellspacing="0" cellpadding="0">'."\n". 93 '<tr>'."\n". 94 '<td>'."\n"; 95 $this->showNavigation( $current_path, $folderList, $image_viewsize, $image_index ); 96 echo '</td>'."\n". 97 '</tr>'."\n". 98 '<tr>'."\n". 99 '<td>'."\n"; 100 $this->showImages( $current_path, $folderList, $image_viewsize, $image_index ); 101 echo '</td>'."\n". 102 '</tr>'."\n". 103 '</tr>'."\n". 104 '</table>'."\n"; 105 } else { 106 echo ' '; 107 } 108 echo '</td>'."\n". 109 '</tr>'."\n". 110 '</table>'."\n"; 111 } 112 113 // ======================================================= 114 function getViewSizesList() { 115 $viewsizesList = explode(';',preg_replace('/ /','',$this->config['viewsizes'])); 116 return $viewsizesList; 117 } 118 119 120 // ======================================================= 121 function getCurrentImagePath() { 122 switch ($_SERVER['REQUEST_METHOD']) { 123 case 'GET': 124 $current_path = stripslashes($_GET['path']); 125 break; 126 case 'POST': 127 $current_path = stripslashes($_POST['path']); 128 break; 129 } 130 if (!is_dir($current_path) ) { 131 $current_path = $this->config['image_path']; 132 } 133 return $current_path; 134 } 135 136 // ======================================================= 137 function getImageViewSize() { 138 switch ($_SERVER['REQUEST_METHOD']) { 139 case 'GET': 140 $viewsize = stripslashes($_GET[viewsize]); 141 break; 142 case 'POST': 143 $viewsize = stripslashes($_POST[viewsize]); 144 break; 145 } 146 // check if the given viewsize is one of the viewsizes 147 // specified in the config. fullsize is also needed 148 if (isset($viewsize) && 149 (($viewsize == 'fullsize') || 150 in_array($viewsize, $this->getViewSizesList()))) { 151 return $viewsize; 152 } else { 153 return $this->config['default_viewsize']; 154 } 155 } 156 157 // ======================================================= 158 function getImageName() { 159 switch ($_SERVER['REQUEST_METHOD']) { 160 case 'GET': 161 $image_name = $_GET['file']; 162 break; 163 case 'POST': 164 $image_name = $_POST['file']; 165 break; 166 } 167 return $image_name; 168 } 169 170 // ======================================================= 171 function getImageIndex() { 172 if (isset($_GET['index'])) 173 return $_GET['index']; 174 return 1; 175 } 176 177 178 // ======================================================= 179 // displays the path of the choosen directories horizontally 180 // so one can navigate back 181 function showGalleryHeader( $current_path, $image_viewsize, $image_index ) { 182 echo '<table class="current_path_and_viewsize" cellspacing="0" cellpadding="0">'."\n". 183 '<tr>'."\n". 184 '<td class="current_path">'. 185 t('Current path').': '; 186 $folders = explode('/', $current_path); 187 for ($i=1; $i < count($folders); $i++) { 188 echo '<a class="header" href="'.root.'gallery/gallery.php?'.path.'='; 189 // show thefolders in the navigation bar 190 for ($j=1; $j <= $i; $j++) { 191 echo '/'.$folders[$j]; 192 } 193 echo '&'.viewsize.'='.$this->getImageViewSize().'">'. 194 $folders[$i].'</a>'."\n"; 195 // don't show the separators when there are no more subfolders 196 if ($i < (count($folders)-1)) { 197 echo ' / '; 198 } 199 } 200 // display the menu where one can shoose between small and medium images 201 echo '</td>'."\n". 202 '<td class="change_viewsize_text">'. 203 t('Switch view mode').': '. 204 '</td>'."\n". 205 '<form name="change_viewsize" method="post">'."\n". 206 '<td class="change_viewsize_selection">'."\n". 207 '<select class="change_viewsize" name="'. 208 viewsize.'" onChange="submit()" size="1">'."\n"; 209 $viewsizesList = $this->getViewSizesList(); 210 for ($i=0; $i < count($viewsizesList); $i++) { 211 echo '<option value="'.$viewsizesList[$i].'" '; 212 if ($this->getImageViewSize() == $viewsizesList[$i]) { 213 echo 'selected'; 214 } 215 $str = strtr($viewsizesList[$i], ',','x'); 216 echo '>'.$str.' '.t('Images per page').'</option>'."\n"; 217 } 218 echo '</select>'."\n". 219 '<input type="hidden" name="'.index.'" value="'.$image_index.'">'. 220 '<input type="hidden" name="'.path.'" value="'.$current_path.'">'; 221 echo '</td></form>'."\n". 222 '</tr>'."\n". 223 '</table>'."\n"; 224 } 225 226 // ======================================================= 227 function showFolderTree( $current_path, $folderList ) { 228 229 // dont go into the directory if there are not subdirs 230 if ($this->getFolderCount( $current_path, $folderList[$i]) == 0) { 231 $current_path = substr($current_path, 0, strrpos($current_path, '/')); 232 $folderList = $this->getFolderList( $current_path ); 233 } 234 // displays the directory tree and the pictures 235 echo '<table class="folder_navigation" width="100%" cellspacing="0" cellpadding="0">'."\n". 236 '<tr>'."\n". 237 '<td>'."\n"; 238 // display the directories 239 for ($i = 0; $i < count( $folderList ); $i++) { 240 // only display folders that are not hidden or special 241 if ((is_dir( $current_path.'/'.$folderList[$i] )) && 242 ($folderList[$i] != '..')){ 243 echo '<div class="folder_navigation" '. 244 'onmouseover="this.className=\'folder_navigation_active\'" '. 245 'onmouseout="this.className=\'folder_navigation\'">'; 246 $link = $this->getFolderLink( $current_path, $folderList[$i] ); 247 $folderCount = $this->getFolderCount( $current_path, $folderList[$i] ); 248 // display the folder as a link and the number of subfolder next to it 249 $this->displayFolderLink( $link, $folderList[$i], $folderCount ); 250 echo '</div>'; 251 } 252 } 253 echo '</td>'."\n". 254 '</tr>'."\n". 255 '</table>'."\n"; 256 } 257 258 // ======================================================= 259 function getFolderList( $current_path ) { 260 if ($current_path != $this->config['cache_path'] ) { 261 $folderList[] = '..'; 262 } 263 // get the image extensions 264 $extenstionList = explode(',',$this->config['valid_image_files']); 265 // get the directories and files 266 if ($dh = opendir($current_path)) { 267 while (($file = readdir($dh)) !== false) { 268 // only add the file/dir if its a directory or a file 269 // with the specified extension 270 271 if ((substr($file,0,1) != '.') && 272 (is_dir($current_path.'/'.$file)) || 273 (in_array(strtolower(substr($file,-3)), $extenstionList))) 274 { 275 $folderList[] = $file; 276 } 277 } 278 } 279 // delete the first entry when we are at the image_path 280 // to prevent from going a directory up 281 if ($current_path == $this->config['image_path']) 282 array_shift($folderList); 283 // sort the array alphabetically 284 sort($folderList); 285 return $folderList; 286 } 287 288 // ======================================================= 289 function getFolderLink( $current_path, $folder ) { 290 $link = '<a class="folderlist" href="'.root.'gallery/gallery.php?'.path.'='; 291 // display the .. directory only if there is another 292 // directory above this one. 293 if (($folder == '..') && ($current_path != $this->config['cache_path'])) { 294 $folderList = explode( '/', $current_path.'/'); 295 for( $i=1; $i < count($folderList)-2; $i++ ) { 296 $link .= '/'.$folderList[$i]; 297 } 298 } else { 299 $link .= $current_path.'/'.$folder; 300 } 301 $link .= '&'.viewsize.'='.$this->getImageViewSize().'">'; 302 return $link; 303 } 304 305 // ======================================================= 306 function displayFolderLink( $link, $folder, $folderCount ) { 307 echo '<table class="folderlink_inactive" cellspacing="0" cellpadding="0">'. 308 '<tr>'. 309 '<td align="left" width="30px">'. 310 '<img class="navigation" src="'.root.skin_dir.'/img/gallery/dir.png">'. 311 '</td>'. 312 '<td align="left" width="auto">'. 313 $link.$folder.'</a>'; 314 $this->displayFolderCount( $folderCount ); 315 echo '</td>'. 316 '</tr>'. 317 '</table>'."\n"; 318 } 319 320 // ======================================================= 321 function getFolderCount($current_path, $folder) { 322 // dont get the folder count if its the .. directory 323 if ($folder != '..') { 324 return count(glob($current_path.'/'.$folder.'/*',GLOB_ONLYDIR)); 325 } 326 } 327 328 // ======================================================= 329 // shows how many sub directories the specified folder has 330 function displayFolderCount( $folderCount ) { 331 if ($folderCount == 1) { 332 echo ' ('.$folderCount.')';// '.t('subfolder'); 333 } 334 if ($folderCount > 1) { 335 echo ' ('.$folderCount.')';// '.t('subfolders'); 336 } 337 } 338 339 340 // ======================================================= 341 // creates the directory for the thumbnails. the directory 342 // structure is identical to the one of original pictures 343 function makeDirectory( $current_path ) { 344 if (!file_exists( $this->config['cache_path'].$current_path )) { 345 // add the document root to the thumbnail directory 346 // because mkdir works with absolute paths 347 $cache_path = $_SERVER[DOCUMENT_ROOT].$this->config['cache_path']; 348 // split the directory string into separate directories 349 $folderList = explode( '/', $current_path ); 350 // go through all folder and create each one 351 for($i=1; $i < count($folderList); $i++) { 352 $cache_path .= '/'.$folderList[$i]; 353 // check if the directory is already there 354 if (!file_exists($cache_path)) { 355 mkdir ($cache_path); 356 } 357 } 358 } 359 } 360 361 // ======================================================= 362 // check if the images are there, if not create them 363 function makeImages( $current_path, $folderList, $image_viewsize, $image_index ) { 364 $path = $_SERVER[DOCUMENT_ROOT].$this->config['cache_path'].$current_path; 365 // use the image_viewsize numbers as a prefix if fullsize is not requested 366 if ( $image_viewsize != fullsize ) { 367 // only so many images will be created that will be displayed on the screen 368 $max_cols = substr($image_viewsize, 0, 1); 369 $max_rows = substr($image_viewsize, 2, 1); 370 $max_number = ($max_cols * $max_rows); 371 // the prefix that will be added to a file so that 372 // different sizes have different names 373 $file_prefix = strtr($image_viewsize, ',','_').'_'; 374 } else { 375 $max_number = 1; 376 // the prefix that will be added to a file so that 377 // different sizes have different names 378 $file_prefix = $image_viewsize.'_'; 379 } 380 // get the amount of subfolders. increase the count in the loop by these 381 // subfolders 382 $folder_count = count(glob($current_path.'/'.$folder.'/*',GLOB_ONLYDIR)); 383 for ($i = $image_index; $i < ($max_number + $image_index + $folder_count); $i++) { 384 // show the picture only if its not hidden and not a directory 385 if (!is_dir( $current_path.'/'.$folderList[$i] )) { 386 // check if there is already a thumbnail available, if not create it 387 if (!file_exists( $path.'/'.$file_prefix.$folderList[$i] )) { 388 // get the extension of the file 389 $fileParts = explode('.', $folderList[$i]); 390 $file_extension = strtolower($fileParts[count($fileParts)-1]); 391 // get image pointer 392 $image_p = null; 393 if ($file_extension == 'jpg') 394 $image_p = @imagecreatefromjpeg( $current_path.'/'.$folderList[$i] ); 395 if ($file_extension == 'png') 396 $image_p = @imagecreatefrompng( $current_path.'/'.$folderList[$i] ); 397 if ($file_extension == 'gif') 398 $image_p = @imagecreatefromgif( $current_path.'/'.$folderList[$i] ); 399 // proceed if we have an image pointer 400 if ($image_p) { 401 // get the image size for the cached images 402 $size = getimagesize( $current_path.'/'.$folderList[$i]); 403 $width = $size[0]; 404 $height = $size[1]; 405 // get the width for the choosen viewsize 406 // calculate it from the columns and rows if fullsize is not 407 // requested, otherwise use the original image size 408 if ( $image_viewsize != fullsize ) { 409 $new_width = (( $this->config['screen_width'] / $max_cols ) - 50 ); 410 // calculate new image dimensions 411 $new_height = ($height/$width) * $new_width; 412 if ( $height > $width ) { 413 $new_width = ($width/$height) * $new_height; 414 } 415 } else { 416 $new_width = $width; 417 $new_height = $height; 418 } 419 // get a new image pointer 420 $new_image_p = imagecreatetruecolor($new_width, $new_height); 421 // resample the old image to the new one 422 imagecopyresampled($new_image_p, $image_p, 0, 0, 0, 0, 423 $new_width, $new_height, $width, $height ); 424 // save the image 425 if ($file_extension == 'jpg') 426 imagejpeg($new_image_p, $path.'/'.$file_prefix.$folderList[$i] ); 427 if ($file_extension == 'png') 428 imagepng($new_image_p, $path.'/'.$file_prefix.$folderList[$i] ); 429 if ($file_extension == 'gif') 430 imagegif($new_image_p, $path.'/'.$file_prefix.$folderList[$i] ); 431 // destroy the old pointers 432 imagedestroy( $image_p ); 433 imagedestroy( $new_image_p ); 434 } 435 } 436 } 437 } 438 } 439 440 // ======================================================= 441 function showImages( $current_path, $folderList, $image_viewsize, $image_index ) { 442 443 $path = $_SERVER[DOCUMENT_ROOT].$this->config['cache_path'].$current_path; 444 // get the column and row values, display that many images in a row 445 $max_cols = substr($image_viewsize, 0, 1); 446 $max_rows = substr($image_viewsize, 2, 1); 447 // counter for the current column and row 448 $current_col = 0; 449 // the prefix that will be added to a file so that different sizes have different names 450 $file_prefix = strtr($image_viewsize, ',','_').'_'; 451 452 // get the amount of subfolders 453 $folder_count = count(glob($current_path.'/'.$folder.'/*',GLOB_ONLYDIR)); 454 // increase the index by the folder count 455 for ($i = 1; $i <= $folder_count; $i++) { 456 $image_index += 1; 457 } 458 echo '<table width="100%" cellspacing="0" cellpadding="0">'."\n". 459 '<tr>'. 460 '<td colspan="'.$max_cols.'">'. 461 ' '. 462 '</td>'. 463 '</tr>'; 464 // go through all entries in the folderList 465 for ($i = $image_index; $i < (($max_cols * $max_rows)+$image_index); $i++) { 466 if (( file_exists( $path.'/'.$file_prefix.$folderList[$i] )) && 467 ( isset($folderList[$i]) )) { 468 // if the column is zero then start a new row 469 // the specified number of images will be displayed side by side 470 if ( $current_col == 0 ) echo '<tr>'."\n"; 471 // stretch the table cells to equal size 472 echo '<td class="single_image" style="width:'; 473 // calculate the width of the cells 474 echo floor( 100 / $max_cols ); 475 echo '%;">'."\n". 476 // display the image centered and put border around it 477 '<div align="center">'."\n". 478 '<a href="'.root.'gallery/gallery.php?'. 479 path.'='.$current_path. 480 '&'.index.'='.$i. 481 '&'.viewsize.'='.fullsize. 482 '" target="blank">'."\n". 483 '<img class="single_image" src="'. 484 $this->config['cache_path'].$current_path.'/'. 485 $file_prefix.$folderList[$i].'" '. 486 'onmouseover="this.className=\'single_image_active\'" '. 487 'onmouseout="this.className=\'single_image\'">'."\n". 488 '</a>'."\n". 489 '</div>'."\n". 490 '<div align="center">'."\n". 491 // show the filename 492 $folderList[$i]."\n". 493 '</div>'."\n". 494 '</td>'."\n"; 495 // if the max number of columns are reached close the row 496 if ( $current_col == $max_cols ) echo '</tr>'."\n"; 497 // reset the column count back to zero 498 $current_col++; 499 if ( $current_col == $max_cols ) $current_col = 0; 500 } 501 } 502 echo '</table>'; 503 } 504 505 506 // ======================================================= 507 function onlyDirectoriesAvailable( $current_path, $folderList, $image_viewsize, $image_index ) { 508 $path = $_SERVER[DOCUMENT_ROOT].$this->config['cache_path'].$current_path; 509 // only so many images will be created that will be displayed on the screen 510 $max_cols = substr($image_viewsize, 0, 1); 511 $max_rows = substr($image_viewsize, 2, 1); 512 $max_number = ($max_cols * $max_rows); 513 // the prefix that will be added to a file so that different sizes have different names 514 $file_prefix = strtr($image_viewsize, ',','_').'_'; 515 516 // go through the folderList. if there are only directories in it 517 // then dont display the navigation stuff 518 $only_dirs = true; 519 for ($i = 0; $i < count($folderList); $i++) { 520 if ( file_exists( $path.'/'.$file_prefix.$folderList[$i] )) { 521 $only_dirs = false; 522 break; 523 } 524 } 525 return $only_dirs; 526 } 527 528 // ======================================================= 529 function showNavigation( $current_path, $folderList, $image_viewsize, $image_index ) { 530 $path = $_SERVER[DOCUMENT_ROOT].$this->config['cache_path'].$current_path; 531 // only so many images will be created that will be displayed on the screen 532 $max_cols = substr($image_viewsize, 0, 1); 533 $max_rows = substr($image_viewsize, 2, 1); 534 $max_number = ($max_cols * $max_rows); 535 // the prefix that will be added to a file so that different sizes have different names 536 $file_prefix = strtr($image_viewsize, ',','_').'_'; 537 538 echo '<table width="100%" cellspacing="0" cellpadding="0">'."\n". 539 '<tr>'."\n". 540 '<td class="image_navigation"> '."\n". 541 '</td>'."\n". 542 '<td class="image_navigation">'."\n"; 543 // display the goto first page link 544 if ($image_index != 1) { 545 echo '<a href="'.root.'gallery/gallery.php?'. 546 '&'.path.'='.$current_path. 547 '&'.index.'=1'. 548 '&'.viewsize.'='.$image_viewsize.'">'."\n". 549 // display the right arrow 550 '<img src="'.root.skin_dir.'/img/gallery/first_page.png">'. 551 '</a>'."\n"; 552 } else { 553 echo '<img src="'.root.skin_dir.'/img/gallery/first_page_disabled.png">'."\n"; 554 } 555 // display the previous page icon if there are more than one entries 556 if ($image_index != 1) { 557 echo '<a href="'.root.'gallery/gallery.php?'. 558 '&'.path.'='.$current_path. 559 '&'.index.'='; 560 if ($image_index < $max_number) { 561 echo 1; 562 } else { 563 echo ($image_index - $max_number); 564 } 565 echo '&'.viewsize.'='.$image_viewsize.'">'."\n". 566 // display the left arrow 567 '<img src="'.root.skin_dir.'/img/gallery/prev_page.png">'. 568 '</a>'."\n"; 569 } else { 570 echo '<img src="'.root.skin_dir.'/img/gallery/prev_page_disabled.png">'."\n"; 571 } 572 echo '</td>'."\n". 573 '<td class="image_navigation">'."\n". 574 // display an info in what page we are right now 575 '( '.$image_index.' '.t('to').' '; 576 if (($image_index + $max_number) < count($folderList)) { 577 echo ($image_index+$max_number-1); 578 } else { 579 echo (count($folderList)-1); 580 } 581 echo ' '.t('of').' '.(count($folderList)-1).' )'."\n". 582 '</td>'."\n". 583 '<td class="image_navigation">'."\n"; 584 // display the next page link 585 if (($image_index + $max_number) < count($folderList)) { 586 echo '<a href="'.root.'gallery/gallery.php?'. 587 '&'.path.'='.$current_path. 588 '&'.index.'='.($image_index + $max_number). 589 '&'.viewsize.'='.$image_viewsize.'">'."\n". 590 // display the right arrow 591 '<img src="'.root.skin_dir.'/img/gallery/next_page.png">'. 592 '</a>'."\n"; 593 } else { 594 echo '<img src="'.root.skin_dir.'/img/gallery/next_page_disabled.png">'."\n"; 595 } 596 // display the goto last page link 597 if (($image_index + $max_number) < count($folderList)) { 598 echo '<a href="'.root.'gallery/gallery.php?'. 599 '&'.path.'='.$current_path. 600 '&'.index.'='. 601 (count($folderList) - (count($folderList) % $max_number)+1). 602 '&'.viewsize.'='.$image_viewsize.'">'."\n". 603 // display the right arrow 604 '<img src="'.root.skin_dir.'/img/gallery/last_page.png">'. 605 '</a>'."\n"; 606 } else { 607 echo '<img src="'.root.skin_dir.'/img/gallery/last_page_disabled.png">'."\n"; 608 } 609 echo '</td>'."\n". 610 '<td class="image_navigation"> '."\n". 611 '</td>'."\n". 612 '</tr>'."\n". 613 '</table>'."\n"; 614 } 615 616 // ======================================================= 617 function showFullsizeImage( $current_path, $folderList, $image_index ) { 618 echo '<html>'."\n". 619 '<head>'."\n". 620 '<title>'.$folderList[$image_index].'</title>'."\n". 621 '</head>'."\n". 622 '<body>'."\n". 623 '<div>'."\n". 624 '<img src="'."\n". 625 $this->config['cache_path'].$current_path.'/'. 626 fullsize.'_'.$folderList[$image_index].'">'."\n". 627 '</div>'."\n". 628 '</body>'."\n". 629 '</html>'; 630 } 631 632 // ======================================================= 633 } -
modules/gallery/tmpl/default/set_prefs.php
diff -Naur ../mythweb-nogallery/modules/gallery/tmpl/default/set_prefs.php ./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 ../mythweb-nogallery/modules/gallery/tmpl/default/welcome.php ./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 ../mythweb-nogallery/modules/_shared/lang/English.lang ./modules/_shared/lang/English.lang
old new 153 153 "Create Schedule" 154 154 "Current Conditions" 155 155 "Current recordings" 156 "Current path" 156 157 "Currently Browsing: $1" 157 158 "Currently Recording: Edit" 158 159 "Custom" … … 164 165 "Deactivated" 165 166 "Default" 166 167 "Default MythVideo View" 168 "Default view size" 167 169 "Delete" 168 170 "delete" 169 171 "Delete $1" … … 241 243 "freqid" 242 244 "Friday" 243 245 "Frontends" 246 "Gallery" 247 "Gallery image path" 244 248 "generic_date" 245 249 %a %b %e, %Y 246 250 "generic_time" … … 268 272 "Hide" 269 273 "High" 270 274 "Home" 275 "Horizontal screen resolution" 271 276 "Host" 272 277 "Hosted by" 273 278 "Hosts" … … 275 280 "Hour Format" 276 281 "hue" 277 282 "Humidity" 283 "Images per page" 278 284 "IMDB" 279 285 "imdb rating" 280 286 "IMDBTYPE" … … 317 323 "length" 318 324 "Length" 319 325 "Length (min)" 326 "List of allowed image formats" 327 "List of available view sizes" 320 328 "Listing "Jump to"" 321 329 "Listing Time Key" 322 330 "Listings" … … 365 373 "mythvideo.sort_ignores_case" 366 374 "MythWeb" 367 375 "MythWeb Defaults" 376 "MythWeb Gallery." 368 377 "MythWeb Global Defaults" 369 378 "MythWeb Session" 370 379 "MythWeb session settings" … … 399 408 "Number of shows" 400 409 "Number of Songs" 401 410 "Number of timeslots" 411 "of" 402 412 "Only display favourite channels" 403 413 "Only match commercial-free channels" 404 414 "Only match HD programs" … … 413 423 "Past Month" 414 424 "Past Week" 415 425 "Past Year" 426 "Path where the thumbnails are" 416 427 "Paused" 417 428 "Pending" 418 429 "People" … … 669 680 "Subtitle then Description" 670 681 "Subtitled" 671 682 "Sunday" 683 "Switch view mode" 672 684 "Tab" 673 685 "The requested recording schedule has been deleted." 674 686 "There are no items in this Playlist!" … … 686 698 "Title Match" 687 699 "Title search" 688 700 "Title Search" 701 "to" 689 702 "Today" 690 703 "Tomorrow" 691 704 "Too Many" … … 780 793 "Wednesday" 781 794 "welcome: backend_log" 782 795 Show the server logs. 796 "welcome: gallery" 797 Browse your picture collection. 783 798 "welcome: music" 784 799 Browse your music collection. 785 800 "welcome: remote" -
modules/_shared/lang/German.lang
diff -Naur ../mythweb-nogallery/modules/_shared/lang/German.lang ./modules/_shared/lang/German.lang
old new 209 209 "Create a Random Mix" 210 210 "Create Schedule" 211 211 Speichern 212 "Current path" 213 Aktueller Pfad 212 214 "Current Conditions" 213 215 Das aktuelle Wetter 214 216 "Current recordings" … … 231 233 "Default" 232 234 Standard 233 235 "Default MythVideo View" 236 "Default view size" 237 Standardansicht 234 238 "Delete" 235 239 Löschen 236 240 "delete" … … 342 346 "Friday" 343 347 Freitag 344 348 "Frontends" 349 "Gallery" 350 Gallerie 351 "Gallery image path" 352 Pfad der Bilder 345 353 "generic_date" 346 354 %e.%m.%Y 347 355 "generic_time" … … 378 386 "High" 379 387 Max 380 388 "Home" 389 "Horizontal screen resolution" 390 Horizontale Bildschirmauflösung 381 391 "Host" 382 392 "Hosted by" 383 393 "Hosts" … … 389 399 Farbton 390 400 "Humidity" 391 401 Luftfeuchtigkeit 402 "Images per page" 403 Bilder pro Seite 392 404 "IMDB" 393 405 IMDB 394 406 "imdb rating" … … 437 449 Dauer 438 450 "Length (min)" 439 451 Dauer (Min.) 452 "List of allowed image formats" 453 Liste der erlaubten Bildformate 454 "List of available view sizes" 455 Liste der möglichen Ansichten 440 456 "Listing "Jump to"" 441 457 TV Programm "Gehe zu" 442 458 "Listing Time Key" … … 500 516 "mythvideo.sort_ignores_case" 501 517 "MythWeb" 502 518 "MythWeb Defaults" 519 "MythWeb Gallery." 520 Gallerie 503 521 "MythWeb Global Defaults" 504 522 "MythWeb Session" 505 523 "MythWeb session settings" … … 546 564 "Number of shows" 547 565 "Number of Songs" 548 566 "Number of timeslots" 567 "of" 568 von 549 569 "Only display favourite channels" 550 570 Nur Favoriten anzeigen 551 571 "Only match commercial-free channels" … … 560 580 "Override" 561 581 "Page Down" 562 582 "Page Up" 583 "Path where the thumbnails are" 584 Thumbnails speichern unter 563 585 "Part $1 of $2" 564 586 Teil $1 von $2 565 587 "Past Month" … … 868 890 "Streaming" 869 891 "Sub and Desc (Empty matches)" 870 892 Untertitel & Beschr. (kein Ergebnis) 893 "subfolder" 894 Unterordner 895 "subfolders" 896 Unterordner 871 897 "Submit Search" 872 898 "subtitle" 873 899 "Subtitle" … … 879 905 mit Untertitel 880 906 "Sunday" 881 907 Sonntag 908 "Switch view mode" 909 Ansichtsmodus wechseln 882 910 "Tab" 883 911 "The requested recording schedule has been deleted." 884 912 Die geplante Aufnahme wurde gelöscht. … … 903 931 "Title search" 904 932 "Title Search" 905 933 Titel Suche 934 "to" 935 bis 906 936 "Today" 907 937 Heute 908 938 "Tomorrow" … … 1020 1050 Mittwoch 1021 1051 "welcome: backend_log" 1022 1052 Backend Log 1053 "welcome: gallery" 1054 Gallerie 1023 1055 "welcome: music" 1024 1056 Musik 1025 1057 "welcome: remote" -
modules/_shared/tmpl/default/header.php
diff -Naur ../mythweb-nogallery/modules/_shared/tmpl/default/header.php ./modules/_shared/tmpl/default/header.php
old new 96 96 </a> 97 97 <?php 98 98 } 99 if ($Modules['gallery']) { 100 ?> 101 <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()"> 102 <img src="<?php echo skin_url ?>img/gallery.png" width="48" height="48" class="alpha_png" alt="MythGallery" /> 103 </a> 104 <?php 105 } 99 106 ?> 100 107 <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()"> 101 108 <img src="<?php echo skin_url ?>img/settings.png" width="48" height="48" class="alpha_png" alt="<?php echo t('Settings') ?>" /> -
skins/default/gallery.css
diff -Naur ../mythweb-nogallery/skins/default/gallery.css ./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 ../mythweb-nogallery/skins/grey/gallery.css ./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 ../mythweb-nogallery/skins/grey/settings.css ./skins/grey/settings.css
old new 94 94 95 95 #settings .-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 }