diff options
author | Cecil Hugh Watson <knoppmyth@gmail.com> | 2009-09-26 01:57:08 (GMT) |
---|---|---|
committer | Cecil Hugh Watson <knoppmyth@gmail.com> | 2009-09-26 01:57:08 (GMT) |
commit | 7b29169fff9e7c624890c5edffe85def8a293136 (patch) | |
tree | 47753889faa3a2063b66d1c7e7681e703eb1b39a /abs/core/mythtv/stable/mythweb/patch | |
parent | c491dea779dac29afff3578bf8245943817c2339 (diff) | |
download | linhes_pkgbuild-7b29169fff9e7c624890c5edffe85def8a293136.zip linhes_pkgbuild-7b29169fff9e7c624890c5edffe85def8a293136.tar.gz linhes_pkgbuild-7b29169fff9e7c624890c5edffe85def8a293136.tar.bz2 |
LinHES 6.01.00
Diffstat (limited to 'abs/core/mythtv/stable/mythweb/patch')
-rw-r--r-- | abs/core/mythtv/stable/mythweb/patch/2923-mythweb-gallery-English_GB_lang.diff | 102 | ||||
-rw-r--r-- | abs/core/mythtv/stable/mythweb/patch/icons.tar.gz | bin | 0 -> 14759 bytes | |||
-rw-r--r-- | abs/core/mythtv/stable/mythweb/patch/mythweb.pl.diff | 23 | ||||
-rw-r--r-- | abs/core/mythtv/stable/mythweb/patch/mythweb_gallery_updated1.diff | 1657 |
4 files changed, 1782 insertions, 0 deletions
diff --git a/abs/core/mythtv/stable/mythweb/patch/2923-mythweb-gallery-English_GB_lang.diff b/abs/core/mythtv/stable/mythweb/patch/2923-mythweb-gallery-English_GB_lang.diff new file mode 100644 index 0000000..103fb2f --- /dev/null +++ b/abs/core/mythtv/stable/mythweb/patch/2923-mythweb-gallery-English_GB_lang.diff @@ -0,0 +1,102 @@ +Index: mythplugins/mythweb/modules/_shared/lang/English_GB.lang +=================================================================== +--- mythplugins/mythweb/modules/_shared/lang/English_GB.lang (revision 16505) ++++ mythplugins/mythweb/modules/_shared/lang/English_GB.lang (working copy) +@@ -154,6 +154,7 @@ + "Current Conditions" + "Current Recording" + "Current recordings" ++"Current path" + "Currently Browsing: $1" + "Currently Recording: Edit" + "Custom" +@@ -169,6 +170,7 @@ + Deaf Signed + "Default" + "Default MythVideo View" ++"Default view size" + "Delete" + "delete" + "Delete $1" +@@ -247,6 +249,8 @@ + "freqid" + "Friday" + "Frontends" ++"Gallery" ++"Gallery image path" + "generic_date" + %a %b %e, %Y + "generic_time" +@@ -270,12 +274,14 @@ + "Hide" + "High" + "Home" ++"Horizontal screen resolution" + "Host" + "Hosted by" + "Hour" + "Hour Format" + "hue" + "Humidity" ++"Images per page" + "IMDB" + "IMDBTYPE" + "Inactive" +@@ -334,6 +340,8 @@ + "length" + "Length" + "Length (min)" ++"List of allowed image formats" ++"List of available view sizes" + "Listing "Jump to"" + "Listing Time Key" + "Listings" +@@ -383,6 +391,7 @@ + "mythvideo.sort_ignores_case" + "MythWeb" + "MythWeb Defaults" ++"MythWeb Gallery" + "MythWeb Global Defaults" + "MythWeb Session" + "MythWeb Skin" +@@ -413,6 +422,7 @@ + "Number of shows" + "Number of Songs" + "Number of timeslots" ++"of" + "Only display favourite channels" + "Only match commercial-free channels" + "Only match HD programs" +@@ -429,6 +439,7 @@ + "Past Month" + "Past Week" + "Past Year" ++"Path where the thumbnails are" + "Paused" + "Pending" + "People" +@@ -688,6 +699,7 @@ + "Subtitles Available" + "Sunday" + "Surround Sound" ++"Switch view mode" + "Tab" + "The requested recording schedule has been deleted." + "There are no items in this Playlist!" +@@ -705,6 +717,7 @@ + "Title Match" + "Title search" + "Title Search" ++"to" + "Today" + "Tomorrow" + "Too Many" +@@ -791,6 +804,8 @@ + "Wednesday" + "welcome: backend_log" + Show the server logs. ++"welcome: gallery" ++ Browse your picture collection. + "welcome: music" + Browse your music collection. + "welcome: remote" diff --git a/abs/core/mythtv/stable/mythweb/patch/icons.tar.gz b/abs/core/mythtv/stable/mythweb/patch/icons.tar.gz Binary files differnew file mode 100644 index 0000000..691d28e --- /dev/null +++ b/abs/core/mythtv/stable/mythweb/patch/icons.tar.gz diff --git a/abs/core/mythtv/stable/mythweb/patch/mythweb.pl.diff b/abs/core/mythtv/stable/mythweb/patch/mythweb.pl.diff new file mode 100644 index 0000000..6dcbf99 --- /dev/null +++ b/abs/core/mythtv/stable/mythweb/patch/mythweb.pl.diff @@ -0,0 +1,23 @@ +*** mythweb-unpatched.pl 2009-06-02 14:55:24.011861459 -0400 +--- mythweb.pl 2009-06-02 14:56:24.386441304 -0400 +*************** +*** 49,57 **** + + # Connect to the database + END { $dbh->disconnect() if ($dbh); } +! our $dbh = DBI->connect("dbi:mysql:database=$ENV{'db_name'}:host=$ENV{'db_server'}", +! $ENV{'db_login'}, +! $ENV{'db_password'}); + unless ($dbh) { + print header(), + "Cannot connect to database: $!\n\n"; +--- 49,57 ---- + + # Connect to the database + END { $dbh->disconnect() if ($dbh); } +! our $dbh = DBI->connect("dbi:mysql:database=$ENV{'DB_NAME'}:host=$ENV{'DB_SERVER'}", +! $ENV{'DB_LOGIN'}, +! $ENV{'DB_PASSWORD'}); + unless ($dbh) { + print header(), + "Cannot connect to database: $!\n\n"; diff --git a/abs/core/mythtv/stable/mythweb/patch/mythweb_gallery_updated1.diff b/abs/core/mythtv/stable/mythweb/patch/mythweb_gallery_updated1.diff new file mode 100644 index 0000000..f683b17 --- /dev/null +++ b/abs/core/mythtv/stable/mythweb/patch/mythweb_gallery_updated1.diff @@ -0,0 +1,1657 @@ +diff -Naur ../mythweb-orig/modules/gallery/handler.php ./modules/gallery/handler.php +--- ../mythweb-orig/modules/gallery/handler.php 1969-12-31 19:00:00.000000000 -0500 ++++ ./modules/gallery/handler.php 2007-08-20 22:33:02.000000000 -0400 +@@ -0,0 +1,35 @@ ++<?php ++/** ++ * Handler for the Gallery module. ++ * ++ * @url $URL: http://svn.mythtv.org/svn/trunk/mythplugins/mythweb/modules/gallery/handler.php $ ++ * @date $Date: 2006-12-19 09:17:33 +0100 (Di, 19 Dez 2006) $ ++ * @version $Revision: 12295 $ ++ * @author $Author: rsiebert $ ++ * @license GPL ++ * ++ * @package MythWeb ++ * @subpackage MythGallery ++ * ++/**/ ++ ++// Load settings functions ++require_once 'includes/objects/Settings.php'; ++ ++// Load Gallery class ++require_once 'includes/objects/Gallery.php'; ++ ++// Load configuration ++loadGalleryConfig(); ++ ++// Create the gallery ++global $gallery; ++ ++$gallery = new Gallery(); ++ ++// Print the gallery page template ++require_once tmpl_dir.'gallery.php'; ++ ++// Exit ++exit; ++ +diff -Naur ../mythweb-orig/modules/gallery/includes/objects/Gallery.php ./modules/gallery/includes/objects/Gallery.php +--- ../mythweb-orig/modules/gallery/includes/objects/Gallery.php 1969-12-31 19:00:00.000000000 -0500 ++++ ./modules/gallery/includes/objects/Gallery.php 2007-08-20 22:27:02.000000000 -0400 +@@ -0,0 +1,608 @@ ++<?php ++/** ++ * Gallery Functions for the Gallery module ++ * ++ * @url $URL: http://svn.mythtv.org/svn/trunk/mythplugins/mythweb/modules/gallery/tmpl/default/gallery.php $ ++ * @date $Date: 2006-12-19 09:17:33 +0100 (Di, 19 Dez 2006) $ ++ * @version $Revision: 12295 $ ++ * @author $Author: xris $ ++ * @license GPL ++ * ++ * @package MythWeb ++ * ++/**/ ++ ++class Gallery { ++ ++ var $config; ++ ++ function Gallery() { ++ // load default configuration ++ $this->config['image_path'] = $_SESSION['gallery']['image_path']; ++ $this->config['cache_path'] = $_SESSION['gallery']['cache_path']; ++ $this->config['default_viewsize'] = $_SESSION['gallery']['default_viewsize']; ++ $this->config['screen_width'] = $_SESSION['gallery']['screen_width']; ++ $this->config['viewsizes'] = $_SESSION['gallery']['viewsizes']; ++ $this->config['valid_image_files'] = $_SESSION['gallery']['valid_image_files']; ++ ++ } ++ ++ // ======================================================= ++ function start() { ++ ++ // the current selected directory where the cached images are stored ++ $current_path = $this->getCurrentImagePath(); ++ // the path to the real images ++ $image_path = $this->config['image_path']; ++ // the filename of a selected image ++ $image_name = $this->getImageName(); ++ // the current viewsize mode ++ $image_viewsize = $this->getImageViewSize(); ++ // get the image index for the viewsize medium ++ $image_index = $this->getImageIndex(); ++ // get the contents of the folders ++ $folderList = $this->getFolderList( $current_path ); ++ // check what kind of images should be displayed ++ if ($image_viewsize == 'fullsize') { ++ // create the images if there are not yet in the directory ++ $this->makeImages( $current_path, $folderList, $image_viewsize, $image_index ); ++ // display the big image ++ $this->showFullsizeImage( $current_path, $folderList, $image_index ); ++ // there is nothing else to do ++ exit; ++ } ++ // show the horizontal navigation bar ++ $this->showGalleryHeader( $current_path, $image_viewsize, $image_index ); ++ // check if the thumbnail directory is there, if not create it ++ $this->makeDirectory( $current_path ); ++ // create the images if there are not yet in the directory ++ $this->makeImages( $current_path, $folderList, $image_viewsize, $image_index ); ++ echo '<table width="100%" cellspacing="0" cellpadding="0">'."\n". ++ '<tr>'."\n". ++ '<td class="folder_navigation">'."\n"; ++ $this->showFolderTree( $current_path, $folderList ); ++ echo '</td>'."\n". ++ '<td class="image_listing">'."\n"; ++ if ($this->onlyDirectoriesAvailable( $current_path, $folderList, $image_viewsize, $image_index ) == false ) { ++ echo '<table class="imagelist_and_navigation" cellspacing="0" cellpadding="0">'."\n". ++ '<tr>'."\n". ++ '<td>'."\n"; ++ $this->showNavigation( $current_path, $folderList, $image_viewsize, $image_index ); ++ echo '</td>'."\n". ++ '</tr>'."\n". ++ '<tr>'."\n". ++ '<td>'."\n"; ++ $this->showImages( $current_path, $folderList, $image_viewsize, $image_index ); ++ echo '</td>'."\n". ++ '</tr>'."\n". ++ '</tr>'."\n". ++ '</table>'."\n"; ++ } else { ++ echo ' '; ++ } ++ echo '</td>'."\n". ++ '</tr>'."\n". ++ '</table>'."\n"; ++ } ++ ++ // ======================================================= ++ function getViewSizesList() { ++ $viewsizesList = explode(';',preg_replace('/ /','',$this->config['viewsizes'])); ++ return $viewsizesList; ++ } ++ ++ ++ // ======================================================= ++ function getCurrentImagePath() { ++ switch ($_SERVER['REQUEST_METHOD']) { ++ case 'GET': ++ $current_path = stripslashes($_GET['path']); ++ break; ++ case 'POST': ++ $current_path = stripslashes($_POST['path']); ++ break; ++ } ++ if (!is_dir($current_path) ) { ++ $current_path = $this->config['image_path']; ++ } ++ return $current_path; ++ } ++ ++ // ======================================================= ++ function getImageViewSize() { ++ switch ($_SERVER['REQUEST_METHOD']) { ++ case 'GET': ++ $viewsize = stripslashes($_GET[viewsize]); ++ break; ++ case 'POST': ++ $viewsize = stripslashes($_POST[viewsize]); ++ break; ++ } ++ // check if the given viewsize is one of the viewsizes ++ // specified in the config. fullsize is also needed ++ if (isset($viewsize) && ++ (($viewsize == 'fullsize') || ++ in_array($viewsize, $this->getViewSizesList()))) { ++ return $viewsize; ++ } else { ++ return $this->config['default_viewsize']; ++ } ++ } ++ ++ // ======================================================= ++ function getImageName() { ++ switch ($_SERVER['REQUEST_METHOD']) { ++ case 'GET': ++ $image_name = $_GET['file']; ++ break; ++ case 'POST': ++ $image_name = $_POST['file']; ++ break; ++ } ++ return $image_name; ++ } ++ ++ // ======================================================= ++ function getImageIndex() { ++ if (isset($_GET['index'])) ++ return $_GET['index']; ++ return 1; ++ } ++ ++ ++ // ======================================================= ++ // displays the path of the choosen directories horizontally ++ // so one can navigate back ++ function showGalleryHeader( $current_path, $image_viewsize, $image_index ) { ++ echo '<table class="current_path_and_viewsize" cellspacing="0" cellpadding="0">'."\n". ++ '<tr>'."\n". ++ '<td class="current_path">'. ++ t('Current path').': '; ++ $folders = explode('/', $current_path); ++ for ($i=1; $i < count($folders); $i++) { ++ echo '<a class="header" href="'.root.'gallery/gallery.php?'.path.'='; ++ // show thefolders in the navigation bar ++ for ($j=1; $j <= $i; $j++) { ++ echo '/'.$folders[$j]; ++ } ++ echo '&'.viewsize.'='.$this->getImageViewSize().'">'. ++ $folders[$i].'</a>'."\n"; ++ // don't show the separators when there are no more subfolders ++ if ($i < (count($folders)-1)) { ++ echo ' / '; ++ } ++ } ++ // display the menu where one can shoose between small and medium images ++ echo '</td>'."\n". ++ '<td class="change_viewsize_text">'. ++ t('Switch view mode').': '. ++ '</td>'."\n". ++ '<form name="change_viewsize" method="post">'."\n". ++ '<td class="change_viewsize_selection">'."\n". ++ '<select class="change_viewsize" name="'. ++ viewsize.'" onChange="submit()" size="1">'."\n"; ++ $viewsizesList = $this->getViewSizesList(); ++ for ($i=0; $i < count($viewsizesList); $i++) { ++ echo '<option value="'.$viewsizesList[$i].'" '; ++ if ($this->getImageViewSize() == $viewsizesList[$i]) { ++ echo 'selected'; ++ } ++ $str = strtr($viewsizesList[$i], ',','x'); ++ echo '>'.$str.' '.t('Images per page').'</option>'."\n"; ++ } ++ echo '</select>'."\n". ++ '<input type="hidden" name="'.index.'" value="'.$image_index.'">'. ++ '<input type="hidden" name="'.path.'" value="'.$current_path.'">'; ++ echo '</td></form>'."\n". ++ '</tr>'."\n". ++ '</table>'."\n"; ++ } ++ ++ // ======================================================= ++ function showFolderTree( $current_path, $folderList ) { ++ ++ // dont go into the directory if there are not subdirs ++ if ($this->getFolderCount( $current_path, $folderList[$i]) == 0) { ++ $current_path = substr($current_path, 0, strrpos($current_path, '/')); ++ $folderList = $this->getFolderList( $current_path ); ++ } ++ // displays the directory tree and the pictures ++ echo '<table class="folder_navigation" width="100%" cellspacing="0" cellpadding="0">'."\n". ++ '<tr>'."\n". ++ '<td>'."\n"; ++ // display the directories ++ for ($i = 0; $i < count( $folderList ); $i++) { ++ // only display folders that are not hidden or special ++ if ((is_dir( $current_path.'/'.$folderList[$i] )) && ++ ($folderList[$i] != '..')){ ++ echo '<div class="folder_navigation" '. ++ 'onmouseover="this.className=\'folder_navigation_active\'" '. ++ 'onmouseout="this.className=\'folder_navigation\'">'; ++ $link = $this->getFolderLink( $current_path, $folderList[$i] ); ++ $folderCount = $this->getFolderCount( $current_path, $folderList[$i] ); ++ // display the folder as a link and the number of subfolder next to it ++ $this->displayFolderLink( $link, $folderList[$i], $folderCount ); ++ echo '</div>'; ++ } ++ } ++ echo '</td>'."\n". ++ '</tr>'."\n". ++ '</table>'."\n"; ++ } ++ ++ // ======================================================= ++ function getFolderList( $current_path ) { ++ if ($current_path != $this->config['cache_path'] ) { ++ $folderList[] = '..'; ++ } ++ // get the image extensions ++ $extenstionList = explode(',',$this->config['valid_image_files']); ++ // get the directories and files ++ if ($dh = opendir($current_path)) { ++ while (($file = readdir($dh)) !== false) { ++ // only add the file/dir if its a directory or a file ++ // with the specified extension ++ ++ if ((substr($file,0,1) != '.') && ++ (is_dir($current_path.'/'.$file)) || ++ (in_array(strtolower(substr($file,-3)), $extenstionList))) ++ { ++ $folderList[] = $file; ++ } ++ } ++ } ++ // delete the first entry when we are at the image_path ++ // to prevent from going a directory up ++ if ($current_path == $this->config['image_path']) ++ array_shift($folderList); ++ // sort the array alphabetically ++ sort($folderList); ++ return $folderList; ++ } ++ ++ // ======================================================= ++ function getFolderLink( $current_path, $folder ) { ++ $link = '<a class="folderlist" href="'.root.'gallery/gallery.php?'.path.'='; ++ // display the .. directory only if there is another ++ // directory above this one. ++ if (($folder == '..') && ($current_path != $this->config['cache_path'])) { ++ $folderList = explode( '/', $current_path.'/'); ++ for( $i=1; $i < count($folderList)-2; $i++ ) { ++ $link .= '/'.$folderList[$i]; ++ } ++ } else { ++ $link .= $current_path.'/'.$folder; ++ } ++ $link .= '&'.viewsize.'='.$this->getImageViewSize().'">'; ++ return $link; ++ } ++ ++ // ======================================================= ++ function displayFolderLink( $link, $folder, $folderCount ) { ++ echo '<table class="folderlink_inactive" cellspacing="0" cellpadding="0">'. ++ '<tr>'. ++ '<td align="left" width="30px">'. ++ '<img class="navigation" src="'.root.skin_dir.'/img/gallery/dir.png">'. ++ '</td>'. ++ '<td align="left" width="auto">'. ++ $link.$folder.'</a>'; ++ $this->displayFolderCount( $folderCount ); ++ echo '</td>'. ++ '</tr>'. ++ '</table>'."\n"; ++ } ++ ++ // ======================================================= ++ function getFolderCount($current_path, $folder) { ++ // dont get the folder count if its the .. directory ++ if ($folder != '..') { ++ return count(glob($current_path.'/'.$folder.'/*',GLOB_ONLYDIR)); ++ } ++ } ++ ++ // ======================================================= ++ // shows how many sub directories the specified folder has ++ function displayFolderCount( $folderCount ) { ++ if ($folderCount == 1) { ++ echo ' ('.$folderCount.')';// '.t('subfolder'); ++ } ++ if ($folderCount > 1) { ++ echo ' ('.$folderCount.')';// '.t('subfolders'); ++ } ++ } ++ ++ ++ // ======================================================= ++ // creates the directory for the thumbnails. the directory ++ // structure is identical to the one of original pictures ++ function makeDirectory( $current_path ) { ++ if (!file_exists( $this->config['cache_path'].$current_path )) { ++ // add the document root to the thumbnail directory ++ // because mkdir works with absolute paths ++ $cache_path = $_SERVER[DOCUMENT_ROOT].$this->config['cache_path']; ++ // split the directory string into separate directories ++ $folderList = explode( '/', $current_path ); ++ // go through all folder and create each one ++ for($i=1; $i < count($folderList); $i++) { ++ $cache_path .= '/'.$folderList[$i]; ++ // check if the directory is already there ++ if (!file_exists($cache_path)) { ++ mkdir ($cache_path); ++ } ++ } ++ } ++ } ++ ++ // ======================================================= ++ // check if the images are there, if not create them ++ function makeImages( $current_path, $folderList, $image_viewsize, $image_index ) { ++ $path = $_SERVER[DOCUMENT_ROOT].$this->config['cache_path'].$current_path; ++ // use the image_viewsize numbers as a prefix if fullsize is not requested ++ if ( $image_viewsize != fullsize ) { ++ // only so many images will be created that will be displayed on the screen ++ $max_cols = substr($image_viewsize, 0, 1); ++ $max_rows = substr($image_viewsize, 2, 1); ++ $max_number = ($max_cols * $max_rows); ++ // the prefix that will be added to a file so that ++ // different sizes have different names ++ $file_prefix = strtr($image_viewsize, ',','_').'_'; ++ } else { ++ $max_number = 1; ++ // the prefix that will be added to a file so that ++ // different sizes have different names ++ $file_prefix = $image_viewsize.'_'; ++ } ++ // get the amount of subfolders. increase the count in the loop by these ++ // subfolders ++ $folder_count = count(glob($current_path.'/'.$folder.'/*',GLOB_ONLYDIR)); ++ for ($i = $image_index; $i < ($max_number + $image_index + $folder_count); $i++) { ++ // show the picture only if its not hidden and not a directory ++ if (!is_dir( $current_path.'/'.$folderList[$i] )) { ++ // check if there is already a thumbnail available, if not create it ++ if (!file_exists( $path.'/'.$file_prefix.$folderList[$i] )) { ++ // get the extension of the file ++ $fileParts = explode('.', $folderList[$i]); ++ $file_extension = strtolower($fileParts[count($fileParts)-1]); ++ // get image pointer ++ $image_p = null; ++ if ($file_extension == 'jpg') ++ $image_p = @imagecreatefromjpeg( $current_path.'/'.$folderList[$i] ); ++ if ($file_extension == 'png') ++ $image_p = @imagecreatefrompng( $current_path.'/'.$folderList[$i] ); ++ if ($file_extension == 'gif') ++ $image_p = @imagecreatefromgif( $current_path.'/'.$folderList[$i] ); ++ // proceed if we have an image pointer ++ if ($image_p) { ++ // get the image size for the cached images ++ $size = getimagesize( $current_path.'/'.$folderList[$i]); ++ $width = $size[0]; ++ $height = $size[1]; ++ // get the width for the choosen viewsize ++ // calculate it from the columns and rows if fullsize is not ++ // requested, otherwise use the original image size ++ if ( $image_viewsize != fullsize ) { ++ $new_width = (( $this->config['screen_width'] / $max_cols ) - 50 ); ++ // calculate new image dimensions ++ $new_height = ($height/$width) * $new_width; ++ if ( $height > $width ) { ++ $new_width = ($width/$height) * $new_height; ++ } ++ } else { ++ $new_width = $width; ++ $new_height = $height; ++ } ++ // get a new image pointer ++ $new_image_p = imagecreatetruecolor($new_width, $new_height); ++ // resample the old image to the new one ++ imagecopyresampled($new_image_p, $image_p, 0, 0, 0, 0, ++ $new_width, $new_height, $width, $height ); ++ // save the image ++ if ($file_extension == 'jpg') ++ imagejpeg($new_image_p, $path.'/'.$file_prefix.$folderList[$i] ); ++ if ($file_extension == 'png') ++ imagepng($new_image_p, $path.'/'.$file_prefix.$folderList[$i] ); ++ if ($file_extension == 'gif') ++ imagegif($new_image_p, $path.'/'.$file_prefix.$folderList[$i] ); ++ // destroy the old pointers ++ imagedestroy( $image_p ); ++ imagedestroy( $new_image_p ); ++ } ++ } ++ } ++ } ++ } ++ ++ // ======================================================= ++ function showImages( $current_path, $folderList, $image_viewsize, $image_index ) { ++ ++ $path = $_SERVER[DOCUMENT_ROOT].$this->config['cache_path'].$current_path; ++ // get the column and row values, display that many images in a row ++ $max_cols = substr($image_viewsize, 0, 1); ++ $max_rows = substr($image_viewsize, 2, 1); ++ // counter for the current column and row ++ $current_col = 0; ++ // the prefix that will be added to a file so that different sizes have different names ++ $file_prefix = strtr($image_viewsize, ',','_').'_'; ++ ++ // get the amount of subfolders ++ $folder_count = count(glob($current_path.'/'.$folder.'/*',GLOB_ONLYDIR)); ++ // increase the index by the folder count ++ for ($i = 1; $i <= $folder_count; $i++) { ++ $image_index += 1; ++ } ++ echo '<table width="100%" cellspacing="0" cellpadding="0">'."\n". ++ '<tr>'. ++ '<td colspan="'.$max_cols.'">'. ++ ' '. ++ '</td>'. ++ '</tr>'; ++ // go through all entries in the folderList ++ for ($i = $image_index; $i < (($max_cols * $max_rows)+$image_index); $i++) { ++ if (( file_exists( $path.'/'.$file_prefix.$folderList[$i] )) && ++ ( isset($folderList[$i]) )) { ++ // if the column is zero then start a new row ++ // the specified number of images will be displayed side by side ++ if ( $current_col == 0 ) echo '<tr>'."\n"; ++ // stretch the table cells to equal size ++ echo '<td class="single_image" style="width:'; ++ // calculate the width of the cells ++ echo floor( 100 / $max_cols ); ++ echo '%;">'."\n". ++ // display the image centered and put border around it ++ '<div align="center">'."\n". ++ '<a href="'.root.'gallery/gallery.php?'. ++ path.'='.$current_path. ++ '&'.index.'='.$i. ++ '&'.viewsize.'='.fullsize. ++ '" target="blank">'."\n". ++ '<img class="single_image" src="'. ++ $this->config['cache_path'].$current_path.'/'. ++ $file_prefix.$folderList[$i].'" '. ++ 'onmouseover="this.className=\'single_image_active\'" '. ++ 'onmouseout="this.className=\'single_image\'">'."\n". ++ '</a>'."\n". ++ '</div>'."\n". ++ '<div align="center">'."\n". ++ // show the filename ++ $folderList[$i]."\n". ++ '</div>'."\n". ++ '</td>'."\n"; ++ // if the max number of columns are reached close the row ++ if ( $current_col == $max_cols ) echo '</tr>'."\n"; ++ // reset the column count back to zero ++ $current_col++; ++ if ( $current_col == $max_cols ) $current_col = 0; ++ } ++ } ++ echo '</table>'; ++ } ++ ++ ++ // ======================================================= ++ function onlyDirectoriesAvailable( $current_path, $folderList, $image_viewsize, $image_index ) { ++ $path = $_SERVER[DOCUMENT_ROOT].$this->config['cache_path'].$current_path; ++ // only so many images will be created that will be displayed on the screen ++ $max_cols = substr($image_viewsize, 0, 1); ++ $max_rows = substr($image_viewsize, 2, 1); ++ $max_number = ($max_cols * $max_rows); ++ // the prefix that will be added to a file so that different sizes have different names ++ $file_prefix = strtr($image_viewsize, ',','_').'_'; ++ ++ // go through the folderList. if there are only directories in it ++ // then dont display the navigation stuff ++ $only_dirs = true; ++ for ($i = 0; $i < count($folderList); $i++) { ++ if ( file_exists( $path.'/'.$file_prefix.$folderList[$i] )) { ++ $only_dirs = false; ++ break; ++ } ++ } ++ return $only_dirs; ++ } ++ ++ // ======================================================= ++ function showNavigation( $current_path, $folderList, $image_viewsize, $image_index ) { ++ $path = $_SERVER[DOCUMENT_ROOT].$this->config['cache_path'].$current_path; ++ // only so many images will be created that will be displayed on the screen ++ $max_cols = substr($image_viewsize, 0, 1); ++ $max_rows = substr($image_viewsize, 2, 1); ++ $max_number = ($max_cols * $max_rows); ++ // the prefix that will be added to a file so that different sizes have different names ++ $file_prefix = strtr($image_viewsize, ',','_').'_'; ++ ++ echo '<table width="100%" cellspacing="0" cellpadding="0">'."\n". ++ '<tr>'."\n". ++ '<td class="image_navigation"> '."\n". ++ '</td>'."\n". ++ '<td class="image_navigation">'."\n"; ++ // display the goto first page link ++ if ($image_index != 1) { ++ echo '<a href="'.root.'gallery/gallery.php?'. ++ '&'.path.'='.$current_path. ++ '&'.index.'=1'. ++ '&'.viewsize.'='.$image_viewsize.'">'."\n". ++ // display the right arrow ++ '<img src="'.root.skin_dir.'/img/gallery/first_page.png">'. ++ '</a>'."\n"; ++ } else { ++ echo '<img src="'.root.skin_dir.'/img/gallery/first_page_disabled.png">'."\n"; ++ } ++ // display the previous page icon if there are more than one entries ++ if ($image_index != 1) { ++ echo '<a href="'.root.'gallery/gallery.php?'. ++ '&'.path.'='.$current_path. ++ '&'.index.'='; ++ if ($image_index < $max_number) { ++ echo 1; ++ } else { ++ echo ($image_index - $max_number); ++ } ++ echo '&'.viewsize.'='.$image_viewsize.'">'."\n". ++ // display the left arrow ++ '<img src="'.root.skin_dir.'/img/gallery/prev_page.png">'. ++ '</a>'."\n"; ++ } else { ++ echo '<img src="'.root.skin_dir.'/img/gallery/prev_page_disabled.png">'."\n"; ++ } ++ echo '</td>'."\n". ++ '<td class="image_navigation">'."\n". ++ // display an info in what page we are right now ++ '( '.$image_index.' '.t('to').' '; ++ if (($image_index + $max_number) < count($folderList)) { ++ echo ($image_index+$max_number-1); ++ } else { ++ echo (count($folderList)-1); ++ } ++ echo ' '.t('of').' '.(count($folderList)-1).' )'."\n". ++ '</td>'."\n". ++ '<td class="image_navigation">'."\n"; ++ // display the next page link ++ if (($image_index + $max_number) < count($folderList)) { ++ echo '<a href="'.root.'gallery/gallery.php?'. ++ '&'.path.'='.$current_path. ++ '&'.index.'='.($image_index + $max_number). ++ '&'.viewsize.'='.$image_viewsize.'">'."\n". ++ // display the right arrow ++ '<img src="'.root.skin_dir.'/img/gallery/next_page.png">'. ++ '</a>'."\n"; ++ } else { ++ echo '<img src="'.root.skin_dir.'/img/gallery/next_page_disabled.png">'."\n"; ++ } ++ // display the goto last page link ++ if (($image_index + $max_number) < count($folderList)) { ++ echo '<a href="'.root.'gallery/gallery.php?'. ++ '&'.path.'='.$current_path. ++ '&'.index.'='. ++ (count($folderList) - (count($folderList) % $max_number)+1). ++ '&'.viewsize.'='.$image_viewsize.'">'."\n". ++ // display the right arrow ++ '<img src="'.root.skin_dir.'/img/gallery/last_page.png">'. ++ '</a>'."\n"; ++ } else { ++ echo '<img src="'.root.skin_dir.'/img/gallery/last_page_disabled.png">'."\n"; ++ } ++ echo '</td>'."\n". ++ '<td class="image_navigation"> '."\n". ++ '</td>'."\n". ++ '</tr>'."\n". ++ '</table>'."\n"; ++ } ++ ++ // ======================================================= ++ function showFullsizeImage( $current_path, $folderList, $image_index ) { ++ echo '<html>'."\n". ++ '<head>'."\n". ++ '<title>'.$folderList[$image_index].'</title>'."\n". ++ '</head>'."\n". ++ '<body>'."\n". ++ '<div>'."\n". ++ '<img src="'."\n". ++ $this->config['cache_path'].$current_path.'/'. ++ fullsize.'_'.$folderList[$image_index].'">'."\n". ++ '</div>'."\n". ++ '</body>'."\n". ++ '</html>'; ++ } ++ ++ // ======================================================= ++} +diff -Naur ../mythweb-orig/modules/gallery/includes/objects/Settings.php ./modules/gallery/includes/objects/Settings.php +--- ../mythweb-orig/modules/gallery/includes/objects/Settings.php 1969-12-31 19:00:00.000000000 -0500 ++++ ./modules/gallery/includes/objects/Settings.php 2007-08-20 22:28:02.000000000 -0400 +@@ -0,0 +1,243 @@ ++<?php ++/** ++ * Gallery Settings Functions ++ * ++ * @url $URL: http://svn.mythtv.org/svn/trunk/mythplugins/mythweb/modules/gallery/set_prefs.php $ ++ * @date $Date: 2006-12-19 09:17:33 +0100 (Di, 19 Dez 2006) $ ++ * @version $Revision: 12295 $ ++ * @author $Author: xris $ ++ * @license GPL ++ * ++ * @package MythWeb ++ * @subpackage Gallery ++/**/ ++ ++// Load the available configuration from the session variable ++// or if this one is empty then form the database ++function loadGalleryConfig() ++{ ++ $_SESSION['gallery']['image_path'] = getGalleryImagePath(); ++ $_SESSION['gallery']['cache_path'] = getGalleryCachePath(); ++ $_SESSION['gallery']['default_viewsize'] = getGalleryDefaultViewSize(); ++ $_SESSION['gallery']['screen_width'] = getGalleryScreenWidth(); ++ $_SESSION['gallery']['viewsizes'] = getGalleryViewSizes(); ++ $_SESSION['gallery']['valid_image_files'] = getGalleryValidImageFiles(); ++} ++ ++ ++// Load all of the known mythtv frontend hosts ++function getGalleryHostnames() ++{ ++ $Settings_Hosts = array('' => t('MythWeb Session')); ++ global $db; ++ $sh = $db->query('SELECT DISTINCT hostname FROM settings WHERE value="locale" ORDER BY hostname'); ++ ++ // add all the found hosts into an array ++ while (list($host) = $sh->fetch_row()) ++ { ++ if (empty($host)) ++ continue; ++ $Settings_Hosts[$host] = $host; ++ } ++ $sh->finish(); ++ return $Settings_Hosts; ++} ++ ++ ++// update the values in the database if necessary ++function saveGalleryConfig( $Settings_Hosts ) ++{ ++ // Make sure we have a valid host selected ++ if (!isset( $Settings_Hosts[$_SESSION['settings']['host']]) ) ++ { ++ // we have no valid host, reset the array ++ $_SESSION['settings']['host'] = reset(array_keys($Settings_Hosts)); ++ } else { ++ // we have a valid host, check if the data should be saved ++ if ($_POST['save'] && isset($_POST['host'])) ++ { ++ // Changing settings for this MythWeb session ++ if (empty($_POST['host'])) ++ { ++ // save the image path in the session variable ++ $_SESSION['gallery']['image_path'] = $_POST['image_path']; ++ $_SESSION['gallery']['cache_path'] = $_POST['cache_path']; ++ $_SESSION['gallery']['default_viewsize'] = $_POST['default_viewsize']; ++ $_SESSION['gallery']['screen_width'] = $_POST['screen_width']; ++ $_SESSION['gallery']['viewsizes'] = $_POST['viewsizes']; ++ $_SESSION['gallery']['valid_image_files'] = $_POST['valid_image_files']; ++ } else { ++ // save the settings in the database ++// setGalleryImagePath( $_POST['image_path'], $_POST['host'] ); ++ setGalleryCachePath( $_POST['cache_path'], $_POST['host'] ); ++ setGalleryDefaultViewSize( $_POST['default_viewsize'], $_POST['host'] ); ++ setGalleryScreenWidth( $_POST['screen_width'], $_POST['host'] ); ++ setGalleryViewSizes( $_POST['viewsizes'], $_POST['host'] ); ++ setGalleryValidImageFiles( $_POST['valid_image_files'],$_POST['host'] ); ++ } ++ // Make sure the session host gets updated to the posted one. ++ $_SESSION['settings']['host'] = $_POST['host']; ++ } ++ } ++} ++ ++// the absolute path where the images are ++// get it from the database or the session variable ++function getGalleryImagePath() ++{ ++ global $db; ++ if (!empty($_SESSION['settings']['host'])) { ++ $imagePath = $db->query_col('SELECT data FROM settings ++ WHERE value="GalleryDir" AND hostname=?', $_SESSION['settings']['host']); ++ } ++ ++ if (!$imagePath) ++ { ++ $imagePath = _or($_SESSION['gallery']['image_path'], '/myth/gallery'); ++ } ++ ++ return $imagePath; ++} ++ ++// directory where the cached images are stored ++// this directory is relative to the htdocs directory ++function getGalleryCachePath() ++{ ++ global $db; ++ if (!empty($_SESSION['settings']['host'])) { ++ $cachePath = $db->query_col('SELECT data FROM settings ++ WHERE value="GalleryCachePath" AND hostname=?', $_SESSION['settings']['host']); ++ } ++ ++ if (!$cachePath) ++ { ++ $cachePath = _or($_SESSION['gallery']['cache_path'], '/mythweb/data/cache'); ++ } ++ ++ return $cachePath; ++} ++ ++ ++// defines the default view mode ++// default is 4 columns and 4 rows per page ++function getGalleryDefaultViewSize() ++{ ++ global $db; ++ if (!empty($_SESSION['settings']['host'])) { ++ $defaultViewSize = $db->query_col('SELECT data FROM settings ++ WHERE value="GalleryDefaultViewSize" AND hostname=?', $_SESSION['settings']['host']); ++ } ++ ++ if (!$defaultViewSize) ++ { ++ $defaultViewSize = _or($_SESSION['gallery']['default_viewsize'], '4,3'); ++ } ++ ++ return $defaultViewSize; ++} ++ ++ ++// width if the screen-200 (example 1024-200) ++// this is needed to calculate the width of the images ++function getGalleryScreenWidth() ++{ ++ global $db; ++ if (!empty($_SESSION['settings']['host'])) { ++ $screenWidth = $db->query_col('SELECT data FROM settings ++ WHERE value="GalleryScreenWidth" AND hostname=?', $_SESSION['settings']['host']); ++ } ++ ++ if (!$screenWidth) ++ { ++ $screenWidth = _or($_SESSION['gallery']['screen_width'], '1024'); ++ } ++ ++ return $screenWidth; ++} ++ ++ ++// columns and rows that are shown on one page, ; separates another mode ++function getGalleryViewSizes() ++{ ++ global $db; ++ if (!empty($_SESSION['settings']['host'])) { ++ $viewSizes = $db->query_col('SELECT data FROM settings ++ WHERE value="GalleryViewSizes" AND hostname=?', $_SESSION['settings']['host']); ++ } ++ ++ if (!$viewSizes) ++ { ++ $viewSizes = _or($_SESSION['gallery']['viewsizes'], '5,4 ; 4,4 ; 4,3 ; 3,3 ; 2,2 ; 1,1'); ++ } ++ ++ return $viewSizes; ++} ++ ++ ++// image extensions that will be shown, everything else ++// will not work, currently there four are supported ++function getGalleryValidImageFiles() ++{ ++ global $db; ++ if (!empty($_SESSION['settings']['host'])) { ++ $validImageFiles = $db->query_col('SELECT data FROM settings ++ WHERE value="GalleryValidImageFiles" AND hostname=?', $_SESSION['settings']['host']); ++ } ++ ++ if (!$validImageFiles) ++ { ++ $validImageFiles = _or($_SESSION['gallery']['valid_image_files'], 'jpg,png,gif,bmp'); ++ } ++ ++ return $validImageFiles; ++} ++ ++ ++// save the image path in the database ++//function setGalleryImagePath( $imagePath, $host ) ++//{ ++// global $db; ++// $db->query('UPDATE settings SET data = ? ++// WHERE value="GalleryDir" AND hostname=?', $imagePath, $host); ++//} ++ ++function setGalleryCachePath( $cachePath, $host ) ++{ ++ global $db; ++ $db->query('UPDATE settings SET data = ? ++ WHERE value="GalleryCachePath" AND hostname=?', $cachePath, $host); ++} ++ ++ ++function setGalleryDefaultViewSize( $defaultViewSize, $host ) ++{ ++ global $db; ++ $db->query('UPDATE settings SET data = ? ++ WHERE value="GalleryDefaultViewSize" AND hostname=?', $defaultViewSize, $host); ++} ++ ++ ++function setGalleryScreenWidth( $screenWidth, $host ) ++{ ++ global $db; ++ $db->query('UPDATE settings SET data = ? ++ WHERE value="GalleryScreenWidth" AND hostname=?', $screenWidth, $host); ++} ++ ++ ++function setGalleryViewSizes( $viewSizes, $host ) ++{ ++ global $db; ++ $db->query('UPDATE settings SET data = ? ++ WHERE value="GalleryViewSizes" AND hostname=?', $viewSizes, $host); ++} ++ ++ ++function setGalleryValidImageFiles( $validImageFiles, $host ) ++{ ++ global $db; ++ $db->query('UPDATE settings SET data = ? ++ WHERE value="GalleryValidImageFiles" AND hostname=?', $validImageFiles, $host); ++} ++ ++ +diff -Naur ../mythweb-orig/modules/gallery/init.php ./modules/gallery/init.php +--- ../mythweb-orig/modules/gallery/init.php 1969-12-31 19:00:00.000000000 -0500 ++++ ./modules/gallery/init.php 2007-08-19 23:21:33.000000000 -0400 +@@ -0,0 +1,38 @@ ++<?php ++/** ++ * Initialization routines for the MythWeb Gallery module ++ * ++ * @url $URL: http://svn.mythtv.org/svn/trunk/mythplugins/mythweb/modules/gallery/init.php $ ++ * @date $Date: 2006-12-19 09:17:33 +0100 (Di, 19 Dez 2006) $ ++ * @version $Revision: 12295 $ ++ * @author $Author: rsiebert $ ++ * @license GPL ++ * ++ * @package MythWeb ++ * @subpackage Gallery ++ * ++/**/ ++ ++// Settings options ++ $Settings['gallery'] = array('name' => t('Gallery'), ++ 'choices' => array('prefs' => t('Preferences'), ), ++ 'default' => 'prefs', ++ ); ++ ++// First, we should check to see that MythGallery is configured. ++ $has_gallery = $_SESSION['locale'] ++ ? true ++ : $db->query_col('SELECT COUNT(data) ++ FROM settings ++ WHERE value="locale"'); ++ ++ ++ ++// If gallery is enabled, add it to the list. ++ if ($has_gallery) { ++ $Modules['gallery'] = array('path' => 'gallery', ++ 'sort' => 5, ++ 'name' => t('Gallery'), ++ 'description' => t('Local Image Gallery') ++ ); ++ } +diff -Naur ../mythweb-orig/modules/gallery/set_prefs.php ./modules/gallery/set_prefs.php +--- ../mythweb-orig/modules/gallery/set_prefs.php 1969-12-31 19:00:00.000000000 -0500 ++++ ./modules/gallery/set_prefs.php 2007-08-20 22:29:12.000000000 -0400 +@@ -0,0 +1,24 @@ ++<?php ++/** ++ * Gallery settings ++ * ++ * @url $URL: http://svn.mythtv.org/svn/trunk/mythplugins/mythweb/modules/gallery/set_prefs.php $ ++ * @date $Date: 2006-12-19 09:17:33 +0100 (Di, 19 Dez 2006) $ ++ * @version $Revision: 12295 $ ++ * @author $Author: xris $ ++ * @license GPL ++ * ++ * @package MythWeb ++ * @subpackage Gallery ++/**/ ++ ++// Load functions ++require_once 'includes/objects/Settings.php'; ++ ++// Load all of the known mythtv frontend hosts ++$Settings_Hosts = getGalleryHostnames(); ++ ++// update the values in the database if necessary ++saveGalleryConfig( $Settings_Hosts ); ++loadGalleryConfig(); ++ +diff -Naur ../mythweb-orig/modules/gallery/tmpl/default/gallery.php ./modules/gallery/tmpl/default/gallery.php +--- ../mythweb-orig/modules/gallery/tmpl/default/gallery.php 1969-12-31 19:00:00.000000000 -0500 ++++ ./modules/gallery/tmpl/default/gallery.php 2007-08-22 00:21:05.000000000 -0400 +@@ -0,0 +1,39 @@ ++<?php ++/** ++ * Display template for the Gallery module ++ * ++ * @url $URL: http://svn.mythtv.org/svn/trunk/mythplugins/mythweb/modules/gallery/tmpl/default/gallery.php $ ++ * @date $Date: 2006-12-19 09:17:33 +0100 (Di, 19 Dez 2006) $ ++ * @version $Revision: 12295 $ ++ * @author $Author: xris $ ++ * @license GPL ++ * ++ * @package MythWeb ++ * ++/**/ ++ ++// Page title ++$page_title = 'MythWeb - '.t('Gallery'); ++ ++// the current viewsize mode ++$image_viewsize = $gallery->getImageViewSize(); ++ ++// If displaying full size image don't display header and footer ++if ($image_viewsize == 'fullsize') { ++ // Print the gallery part ++ $gallery->start(); ++} ++else ++{ ++ // Load this page's custom stylesheet ++ $headers[] = '<link rel="stylesheet" type="text/css" href="'.root.skin_dir.'/gallery.css" />'; ++ ++ // Print the page header ++ require 'modules/_shared/tmpl/'.tmpl.'/header.php'; ++ ++ // Print the gallery part ++ $gallery->start(); ++ ++ // Print the page footer ++ require 'modules/_shared/tmpl/'.tmpl.'/footer.php'; ++} +\ No newline at end of file +diff -Naur ../mythweb-orig/modules/gallery/tmpl/default/set_prefs.php ./modules/gallery/tmpl/default/set_prefs.php +--- ../mythweb-orig/modules/gallery/tmpl/default/set_prefs.php 1969-12-31 19:00:00.000000000 -0500 ++++ ./modules/gallery/tmpl/default/set_prefs.php 2007-08-19 23:21:33.000000000 -0400 +@@ -0,0 +1,93 @@ ++<?php ++/** ++ * Display/save MythGallery settings ++ * ++ * @url $URL: http://svn.mythtv.org/svn/trunk/mythplugins/mythweb/modules/gallery/tmpl/default/set_prefs.php $ ++ * @date $Date: 2007-01-09 07:37:34 +0100 (Di, 09 Jan 2007) $ ++ * @version $Revision: 12460 $ ++ * @author $Author: xris $ ++ * @license GPL ++ * ++ * @package MythWeb ++ * @subpackage Gallery ++ * ++/**/ ++ ++// Display the gui for the settings ++$galleryConfigTheme = new GalleryConfigTheme(); ++$galleryConfigTheme->showConfig(); ++ ++class GalleryConfigTheme ++{ ++ function GalleryConfigTheme() ++ { ++ ++ } ++ ++ function showConfig() ++ { ++ echo '<form class="form" method="post" action="'. form_action .'">'. ++ '<input type="hidden" name="host" value="'. html_entities($_SESSION['settings']['host']) .'"/>'. ++ '<table border="0" cellspacing="0" cellpadding="0">'. ++ '<tr class="_sep">'. ++ '<td>'. ++ t('Gallery image path').': '. ++ '</td>'. ++ '<td>'. ++ '<input class="_text" type="text" name="image_path" value="'.getGalleryImagePath().'">'. ++ '</td>'. ++ '</tr>'. ++ '<tr class="_sep">'. ++ '<td>'. ++ t('Path where the thumbnails are').': '. ++ '</td>'. ++ '<td>'. ++ '<input class="_text" type="text" name="cache_path" value="'.getGalleryCachePath().'">'. ++ '</td>'. ++ '</tr>'. ++ '<tr class="_sep">'. ++ '<td>'. ++ t('Default view size').': '. ++ '</td>'. ++ '<td>'. ++ '<input class="_text" type="text" name="default_viewsize" value="'.getGalleryDefaultViewSize().'">'. ++ '</td>'. ++ '</tr>'. ++ '<tr class="_sep">'. ++ '<td>'. ++ t('Horizontal screen resolution').': '. ++ '</td>'. ++ '<td>'. ++ '<input class="_text" type="text" name="screen_width" value="'.getGalleryScreenWidth().'">'. ++ '</td>'. ++ '</tr>'. ++ '<tr class="_sep">'. ++ '<td>'. ++ t('List of available view sizes').': '. ++ '</td>'. ++ '<td>'. ++ '<input class="_text" type="text" name="viewsizes" value="'.getGalleryViewSizes().'">'. ++ '</td>'. ++ '</tr>'. ++ '<tr class="_sep">'. ++ '<td>'. ++ t('List of allowed image formats').': '. ++ '</td>'. ++ '<td>'. ++ '<input class="_text" type="text" name="valid_image_files" value="'.getGalleryValidImageFiles().'">'. ++ '</td>'. ++ '</tr>'. ++ '<tr>'. ++ '<td align="center">'. ++ '<input class="_button" type="reset" class="submit" value="'.t('Reset').'">'. ++ '</td>'. ++ '<td align="center">'. ++ '<input class="_button" type="submit" class="submit" name="save" value="'.t('Save') .'">'. ++ '</td>'. ++ '</tr>'. ++ '</table>'. ++ '</form>'; ++ } ++} ++ ++?> +\ No newline at end of file +diff -Naur ../mythweb-orig/modules/gallery/tmpl/default/welcome.php ./modules/gallery/tmpl/default/welcome.php +--- ../mythweb-orig/modules/gallery/tmpl/default/welcome.php 1969-12-31 19:00:00.000000000 -0500 ++++ ./modules/gallery/tmpl/default/welcome.php 2007-08-19 23:21:33.000000000 -0400 +@@ -0,0 +1,26 @@ ++<?php ++/** ++ * Welcome page description of the Gallery module. ++ * ++ * @url $URL: http://svn.mythtv.org/svn/trunk/mythplugins/mythweb/modules/gallery/tmpl/default/welcome.php $ ++ * @date $Date: 2005-12-13 08:23:18 +0100 (Di, 13 Dez 2005) $ ++ * @version $Revision: 8252 $ ++ * @author $Author: xris $ ++ * @license GPL ++ * ++ * @package MythWeb ++ * ++/**/ ++ ++// Open with a div and an image ++ echo '<div id="info_gallery" class="hidden">', ++ '<img src="', skin_url, '/img/gallery.png" class="module_icon" />', ++ ++// Print a basic overview of what this module does ++ t('welcome: gallery'), ++ ++// Next, print a list of possible subsectons ++ #### ++ ++// Close the div ++ "</div>\n"; +\ No newline at end of file +diff -Naur ../mythweb-orig/modules/_shared/lang/English.lang ./modules/_shared/lang/English.lang +--- ../mythweb-orig/modules/_shared/lang/English.lang 2007-08-19 23:20:01.000000000 -0400 ++++ ./modules/_shared/lang/English.lang 2007-08-19 23:26:41.000000000 -0400 +@@ -153,6 +153,7 @@ + "Create Schedule" + "Current Conditions" + "Current recordings" ++"Current path" + "Currently Browsing: $1" + "Currently Recording: Edit" + "Custom" +@@ -164,6 +165,7 @@ + "Deactivated" + "Default" + "Default MythVideo View" ++"Default view size" + "Delete" + "delete" + "Delete $1" +@@ -242,6 +244,8 @@ + "freqid" + "Friday" + "Frontends" ++"Gallery" ++"Gallery image path" + "generic_date" + %a %b %e, %Y + "generic_time" +@@ -269,6 +273,7 @@ + "Hide" + "High" + "Home" ++"Horizontal screen resolution" + "Host" + "Hosted by" + "Hosts" +@@ -276,6 +281,7 @@ + "Hour Format" + "hue" + "Humidity" ++"Images per page" + "IMDB" + "imdb rating" + "IMDBTYPE" +@@ -318,6 +324,8 @@ + "length" + "Length" + "Length (min)" ++"List of allowed image formats" ++"List of available view sizes" + "Listing "Jump to"" + "Listing Time Key" + "Listings" +@@ -367,6 +375,7 @@ + "mythvideo.sort_ignores_case" + "MythWeb" + "MythWeb Defaults" ++"MythWeb Gallery." + "MythWeb Global Defaults" + "MythWeb Session" + "MythWeb session settings" +@@ -401,6 +410,7 @@ + "Number of shows" + "Number of Songs" + "Number of timeslots" ++"of" + "Only display favourite channels" + "Only match commercial-free channels" + "Only match HD programs" +@@ -415,6 +425,7 @@ + "Past Month" + "Past Week" + "Past Year" ++"Path where the thumbnails are" + "Paused" + "Pending" + "People" +@@ -673,6 +684,7 @@ + "Subtitles Available" + "Sunday" + "Surround Sound" ++"Switch view mode" + "Tab" + "The requested recording schedule has been deleted." + "There are no items in this Playlist!" +@@ -690,6 +702,7 @@ + "Title Match" + "Title search" + "Title Search" ++"to" + "Today" + "Tomorrow" + "Too Many" +@@ -784,6 +797,8 @@ + "Wednesday" + "welcome: backend_log" + Show the server logs. ++"welcome: gallery" ++ Browse your picture collection. + "welcome: music" + Browse your music collection. + "welcome: remote" +diff -Naur ../mythweb-orig/modules/_shared/lang/German.lang ./modules/_shared/lang/German.lang +--- ../mythweb-orig/modules/_shared/lang/German.lang 2007-08-19 23:20:01.000000000 -0400 ++++ ./modules/_shared/lang/German.lang 2007-08-19 23:27:54.000000000 -0400 +@@ -209,6 +209,8 @@ + "Create a Random Mix" + "Create Schedule" + Speichern ++"Current path" ++ Aktueller Pfad + "Current Conditions" + Das aktuelle Wetter + "Current recordings" +@@ -231,6 +233,8 @@ + "Default" + Standard + "Default MythVideo View" ++"Default view size" ++ Standardansicht + "Delete" + Löschen + "delete" +@@ -343,6 +347,10 @@ + "Friday" + Freitag + "Frontends" ++"Gallery" ++ Gallerie ++"Gallery image path" ++ Pfad der Bilder + "generic_date" + %e.%m.%Y + "generic_time" +@@ -379,6 +387,8 @@ + "High" + Max + "Home" ++"Horizontal screen resolution" ++ Horizontale Bildschirmauflösung + "Host" + "Hosted by" + "Hosts" +@@ -390,6 +400,8 @@ + Farbton + "Humidity" + Luftfeuchtigkeit ++"Images per page" ++ Bilder pro Seite + "IMDB" + IMDB + "imdb rating" +@@ -438,6 +450,10 @@ + Dauer + "Length (min)" + Dauer (Min.) ++"List of allowed image formats" ++ Liste der erlaubten Bildformate ++"List of available view sizes" ++ Liste der möglichen Ansichten + "Listing "Jump to"" + TV Programm "Gehe zu" + "Listing Time Key" +@@ -502,6 +518,8 @@ + "mythvideo.sort_ignores_case" + "MythWeb" + "MythWeb Defaults" ++"MythWeb Gallery." ++ Gallerie + "MythWeb Global Defaults" + "MythWeb Session" + "MythWeb session settings" +@@ -548,6 +566,8 @@ + "Number of shows" + "Number of Songs" + "Number of timeslots" ++"of" ++ von + "Only display favourite channels" + Nur Favoriten anzeigen + "Only match commercial-free channels" +@@ -562,6 +582,8 @@ + "Override" + "Page Down" + "Page Up" ++"Path where the thumbnails are" ++ Thumbnails speichern unter + "Part $1 of $2" + Teil $1 von $2 + "Past Month" +@@ -870,6 +892,10 @@ + "Streaming" + "Sub and Desc (Empty matches)" + Untertitel & Beschr. (kein Ergebnis) ++"subfolder" ++ Unterordner ++"subfolders" ++ Unterordner + "Submit Search" + "subtitle" + "Subtitle" +@@ -882,6 +908,8 @@ + "Subtitles Available" + "Sunday" + Sonntag ++"Switch view mode" ++ Ansichtsmodus wechseln + "Surround Sound" + "Tab" + "The requested recording schedule has been deleted." +@@ -907,6 +935,8 @@ + "Title search" + "Title Search" + Titel Suche ++"to" ++ bis + "Today" + Heute + "Tomorrow" +@@ -1024,6 +1054,8 @@ + Mittwoch + "welcome: backend_log" + Backend Log ++"welcome: gallery" ++ Gallerie + "welcome: music" + Musik + "welcome: remote" +diff -Naur ../mythweb-orig/modules/_shared/tmpl/default/header.php ./modules/_shared/tmpl/default/header.php +--- ../mythweb-orig/modules/_shared/tmpl/default/header.php 2007-08-19 23:20:01.000000000 -0400 ++++ ./modules/_shared/tmpl/default/header.php 2007-08-19 23:21:33.000000000 -0400 +@@ -96,6 +96,13 @@ + </a> + <?php + } ++ if ($Modules['gallery']) { ++?> ++ <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()"> ++ <img src="<?php echo skin_url ?>img/gallery.png" width="48" height="48" class="alpha_png" alt="MythGallery" /> ++ </a> ++<?php ++ } + ?> + <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()"> + <img src="<?php echo skin_url ?>img/settings.png" width="48" height="48" class="alpha_png" alt="<?php echo t('Settings') ?>" /> +diff -Naur ../mythweb-orig/skins/default/gallery.css ./skins/default/gallery.css +--- ../mythweb-orig/skins/default/gallery.css 1969-12-31 19:00:00.000000000 -0500 ++++ ./skins/default/gallery.css 2007-08-19 23:21:33.000000000 -0400 +@@ -0,0 +1,108 @@ ++img { ++ border: 0px; ++ border-color: #000000; ++} ++ ++table.current_path_and_viewsize { ++ margin-top:5px; ++ border:1px solid #626262; ++ padding:5px; ++ width:100%; ++} ++ ++a { ++ color:#000000; ++ text-decoration:none; ++} ++ ++a.header { ++ font-weight:bold; ++ font-style:italic; ++} ++ ++a.folderlist { ++ font-style:italic; ++} ++ ++td.current_path { ++ text-align:left; ++ width:auto; ++} ++ ++td.change_viewsize_text { ++ text-align:right; ++ width:160px; ++} ++ ++td.change_viewsize_selection { ++ text-align:right; ++ width:140px; ++} ++ ++select.change_viewsize { ++ border:1px solid #323232; ++ background-color: #191c26; ++ color: #FFFFFF; ++} ++ ++td.folder_navigation { ++ width:200px; ++ vertical-align:top; ++} ++ ++table.folder_navigation { ++ margin-top:5px; ++ border:1px solid #626262; ++ padding:4px; ++ width:100%; ++} ++ ++div.folder_navigation_active { ++ background-color: #224477; ++ border:1px solid #191c26; ++ text-align:left; ++ padding:4px; ++} ++ ++div.folder_navigation { ++ border:1px solid #191c26; ++ text-align:left; ++ padding:4px; ++} ++ ++td.image_listing { ++ width:auto; ++ vertical-align:top; ++} ++ ++table.imagelist_and_navigation { ++ margin-top:5px; ++ margin-left:5px; ++ border:1px solid #626262; ++ padding:5px; ++ width:100%; ++} ++ ++td.image_navigation { ++ text-align:center; ++ vertical-align:middle; ++ width:20%; ++ border-width: 0px; ++} ++ ++td.single_image { ++ font-size:9pt; ++ padding:5px; ++ text-align:center; ++} ++ ++img.single_image { ++ padding:7px; ++ border:1px solid #323232; ++} ++ ++img.single_image_active { ++ background-color: #224477; ++ padding:7px; ++ border:1px solid #323232; ++} +\ No newline at end of file +diff -Naur ../mythweb-orig/skins/grey/gallery.css ./skins/grey/gallery.css +--- ../mythweb-orig/skins/grey/gallery.css 1969-12-31 19:00:00.000000000 -0500 ++++ ./skins/grey/gallery.css 2007-08-19 23:21:33.000000000 -0400 +@@ -0,0 +1,107 @@ ++img { ++ border: 0px; ++ border-color: #000000; ++} ++ ++table.current_path_and_viewsize { ++ margin-top:5px; ++ border:1px solid #626262; ++ padding:5px; ++ width:100%; ++} ++ ++a { ++ color:#000000; ++ text-decoration:none; ++} ++ ++a.header { ++ font-weight:bold; ++ font-style:italic; ++} ++ ++a.folderlist { ++ font-style:italic; ++} ++ ++td.current_path { ++ text-align:left; ++ width:auto; ++} ++ ++td.change_viewsize_text { ++ text-align:right; ++ width:160px; ++} ++ ++td.change_viewsize_selection { ++ text-align:right; ++ width:140px; ++} ++ ++select.change_viewsize { ++ border:1px solid #323232; ++ background-color: #212121; ++} ++ ++td.folder_navigation { ++ width:200px; ++ vertical-align:top; ++} ++ ++table.folder_navigation { ++ margin-top:5px; ++ border:1px solid #626262; ++ padding:4px; ++ width:100%; ++} ++ ++div.folder_navigation_active { ++ background-color: #626262; ++ border:1px solid #212121; ++ text-align:left; ++ padding:4px; ++} ++ ++div.folder_navigation { ++ border:1px solid #212121; ++ text-align:left; ++ padding:4px; ++} ++ ++td.image_listing { ++ width:auto; ++ vertical-align:top; ++} ++ ++table.imagelist_and_navigation { ++ margin-top:5px; ++ margin-left:5px; ++ border:1px solid #626262; ++ padding:5px; ++ width:100%; ++} ++ ++td.image_navigation { ++ text-align:center; ++ vertical-align:middle; ++ width:20%; ++ border-width: 0px; ++} ++ ++td.single_image { ++ font-size:9pt; ++ padding:5px; ++ text-align:center; ++} ++ ++img.single_image { ++ padding:7px; ++ border:1px solid #323232; ++} ++ ++img.single_image_active { ++ background-color: #626262; ++ padding:7px; ++ border:1px solid #323232; ++} +\ No newline at end of file +diff -Naur ../mythweb-orig/skins/grey/settings.css ./skins/grey/settings.css +--- ../mythweb-orig/skins/grey/settings.css 2007-08-19 23:20:00.000000000 -0400 ++++ ./skins/grey/settings.css 2007-08-19 23:21:33.000000000 -0400 +@@ -94,7 +94,7 @@ + + #settings .-host { + text-align: right; +- border-bottom: 2px solid #eee; ++ border-bottom: 2px solid #aaa; + } + + /* A notification/warning */ +@@ -115,3 +115,33 @@ + border: 2px solid #999; + border-top: none; + } ++ ++ #settings ._content input._text { ++ margin: 2px; ++ padding: 2px; ++ border: 1px solid #333333; ++ } ++ ++ #settings ._content input._button { ++ margin: 2px; ++ padding: 2px; ++ border: 1px solid #333333; ++ color: #DDDDDD; ++ } ++ ++ #settings ._content table { ++ width: 100%; ++ } ++ #settings ._content table th, #settings ._content table td { ++ padding: .5em; ++ } ++ ++ #settings ._content th, #settings ._content td { ++ text-align: right; ++ font-weight: normal; ++ white-space: nowrap; ++ } ++ ++ #settings ._content tr._sep th, #settings ._content tr._sep td { ++ border-bottom: 1px solid #304943; ++ } |