Changeset 491 for trunk/plog-functions.php
- Timestamp:
- 01/21/08 17:20:22 (12 months ago)
- Files:
-
- 1 modified
-
trunk/plog-functions.php (modified) (25 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/plog-functions.php
r490 r491 10 10 $row = get_collection_by_id($id); 11 11 12 $breadcrumbs = ' <a accesskey="/" href="'.$config["baseurl"].'"> Collections</a> » <b>' . SmartStripSlashes($row["name"]) . '</b>';13 if ($GLOBALS['plogger_mode'] == "slideshow") $breadcrumbs .= ' » Slideshow';12 $breadcrumbs = ' <a accesskey="/" href="'.$config["baseurl"].'">' . plog_tr('Collections') . '</a> » <b>' . SmartStripSlashes($row["name"]) . '</b>'; 13 if ($GLOBALS['plogger_mode'] == "slideshow") $breadcrumbs .= ' » ' . plog_tr('Slideshow'); 14 14 15 15 break; … … 27 27 if ($GLOBALS['plogger_mode'] == "slideshow") { 28 28 29 $breadcrumbs = ' <a href="'.$config["baseurl"].'"> Collections</a> » ' . $collection_link . ' » ' . '<a href="'.$album_link.'">'.$album_name.'</a> » ' . ' <b>Slideshow</b>';29 $breadcrumbs = ' <a href="'.$config["baseurl"].'">' . plog_tr('Collections') . '</a> » ' . $collection_link . ' » ' . '<a href="'.$album_link.'">'.$album_name.'</a> » ' . ' <b>Slideshow</b>'; 30 30 } else { 31 31 32 $breadcrumbs = ' <a href="'.$config["baseurl"].'"> Collections</a> » ' . $collection_link . ' » ' . '<b>'.$album_name.'</b>';32 $breadcrumbs = ' <a href="'.$config["baseurl"].'">' . plog_tr('Collections') . '</a> » ' . $collection_link . ' » ' . '<b>'.$album_name.'</b>'; 33 33 } 34 34 … … 44 44 $row = get_collection_by_id($row["parent_id"]); 45 45 46 $collection_link = ' <a href="'.$config["baseurl"].'"> Collections</a> ' . ' » ' . '<a href="' . generate_url("collection",$row["id"]) . '">' . SmartStripSlashes($row["name"]) . '</a>';46 $collection_link = ' <a href="'.$config["baseurl"].'">' . plog_tr('Collections') . '</a> ' . ' » ' . '<a href="' . generate_url("collection",$row["id"]) . '">' . SmartStripSlashes($row["name"]) . '</a>'; 47 47 48 48 $breadcrumbs = $collection_link . ' » ' . $album_link . ' » ' . '<span id="image_name"><b>' . $picture_name.'</b></span>'; 49 49 50 if ($GLOBALS['plogger_mode'] == "slideshow") $breadcrumbs .= ' » Slideshow';50 if ($GLOBALS['plogger_mode'] == "slideshow") $breadcrumbs .= ' » ' . plog_tr('Slideshow'); 51 51 52 52 break; 53 53 case 'search': 54 $breadcrumbs = 'You searched for<b>'.htmlspecialchars($_GET["searchterms"]).'</b>.';54 $breadcrumbs = plog_tr('You searched for') . ' <b>'.htmlspecialchars($_GET["searchterms"]).'</b>.'; 55 55 break; 56 56 default: 57 $breadcrumbs = ' <b> Collections</b>';57 $breadcrumbs = ' <b>' . plog_tr('Collections') . '</b>'; 58 58 break; 59 59 } … … 68 68 69 69 $breadcrumbs = SmartStripSlashes($row["name"]); 70 if ($GLOBALS['plogger_mode'] == "slideshow") $breadcrumbs .= ' » Slideshow';70 if ($GLOBALS['plogger_mode'] == "slideshow") $breadcrumbs .= ' » ' . plog_tr('Slideshow'); 71 71 72 72 break; … … 79 79 80 80 if ($GLOBALS['plogger_mode'] == "slideshow") { 81 $breadcrumbs = SmartStripSlashes($row["name"]) . ' » ' . $album_name.' » ' . ' Slideshow';81 $breadcrumbs = SmartStripSlashes($row["name"]) . ' » ' . $album_name.' » ' . ' ' . plog_tr('Slideshow'); 82 82 } else { 83 83 $breadcrumbs = SmartStripSlashes($row["name"]) . ' » ' . $album_name; … … 115 115 116 116 $output .= '<form id="jump_menu" name="jump_menu" action="#" method="get"><div>'; 117 $output .= '<select name="jump_menu" onchange="document.location.href = this.options[this.selectedIndex].value;"><option value="#"> Jump to...</option>';117 $output .= '<select name="jump_menu" onchange="document.location.href = this.options[this.selectedIndex].value;"><option value="#">' . plog_tr('Jump to') . '...</option>'; 118 118 119 119 // 1. create a list of all albums with at least one photo … … 187 187 $table_data .= '> 188 188 <tr> 189 <td><strong> Dimensions</strong></td>189 <td><strong>' . plog_tr('Dimensions') .'</strong></td> 190 190 <td>'.$width .' x ' .$height.'</td> 191 191 </tr> 192 192 <tr> 193 <td><strong> File size</strong></td>193 <td><strong>' . plog_tr('File size') . '</strong></td> 194 194 <td>'.$size.' kbytes</td> 195 195 </tr> 196 196 <tr> 197 <td><strong> Taken on</strong></td>197 <td><strong>' . plog_tr('Taken on') . '</strong></td> 198 198 <td>'.$row["EXIF_date_taken"].'</td> 199 199 </tr> 200 200 <tr> 201 <td><strong> Camera model</strong></td>201 <td><strong>' . plog_tr('Camera model') . '</strong></td> 202 202 <td>'.$row["EXIF_camera"].'</td> 203 203 </tr> 204 204 <tr> 205 <td><strong> Shutter speed</strong></td>205 <td><strong>' . plog_tr('Shutter speed') . '</strong></td> 206 206 <td>'.$row["EXIF_shutterspeed"].'</td> 207 207 </tr> 208 208 <tr> 209 <td><strong> Focal length</strong></td>209 <td><strong>' . plog_tr('Focal length') . '</strong></td> 210 210 <td>'.$row["EXIF_focallength"].'</td> 211 211 </tr> 212 212 <tr> 213 <td><strong> Aperture</strong></td>213 <td><strong>' . plog_tr('Aperture') . '</strong></td> 214 214 <td>'.$row["EXIF_aperture"].'</td> 215 215 </tr> 216 216 </table></div>'; 217 217 } else { 218 $table_data .= '><tr><td><strong> Dimensions</strong></td><td>'.$width .' x ' .$height.'</td></tr><tr><td><strong>File size</strong></td><td>'.$size.' kbytes</td></tr><tr><td><strong>Taken on</strong></td><td>'.$row["EXIF_date_taken"].'</td></tr><tr><td><strong>Camera model</strong></td><td>'.$row["EXIF_camera"].'</td></tr><tr><td><strong>Shutter speed</strong></td><td>'.$row["EXIF_shutterspeed"].'</td></tr><tr><td><strong>Focal length</strong></td><td>'.$row["EXIF_focallength"].'</td></tr><tr><td><strong>Aperture</strong></td><td>'.$row["EXIF_aperture"].'</td></tr></table></div>';218 $table_data .= '><tr><td><strong>' . plog_tr('Dimensions') . '</strong></td><td>'.$width .' x ' .$height.'</td></tr><tr><td><strong>' . plog_tr('File size') . '</strong></td><td>'.$size.' ' . plog_tr('kbytes') . '</td></tr><tr><td><strong>' . plog_tr('Taken on') . '</strong></td><td>'.$row["EXIF_date_taken"].'</td></tr><tr><td><strong>' . plog_tr('Camera model') . '</strong></td><td>'.$row["EXIF_camera"].'</td></tr><tr><td><strong>' . plog_tr('Shutter speed') . '</strong></td><td>'.$row["EXIF_shutterspeed"].'</td></tr><tr><td><strong>' . plog_tr('Focal length') . '</strong></td><td>'.$row["EXIF_focallength"].'</td></tr><tr><td><strong>' . plog_tr('Aperture') . '</strong></td><td>'.$row["EXIF_aperture"].'</td></tr></table></div>'; 219 219 } 220 220 } … … 255 255 256 256 $fields = array( 257 'date' => 'Date Submitted',258 'date_taken' => 'Date Taken',259 'caption' => 'Caption',260 'filename' => 'Filename',261 'number_of_comments' => 'Number of Comments',257 'date' => plog_tr('Date Submitted'), 258 'date_taken' => plog_tr('Date Taken'), 259 'caption' => plog_tr('Caption'), 260 'filename' => plog_tr('Filename'), 261 'number_of_comments' => plog_tr('Number of Comments'), 262 262 ); 263 263 … … 271 271 $output .= ' 272 272 <form action="#" method="get"> 273 <span><label for="change_sortby"> Sort by:</label>273 <span><label for="change_sortby">' . plog_tr('Sort by') . ':</label> 274 274 <select id="change_sortby" name="change_sortby" 275 275 onchange="document.location.href = this.options[this.selectedIndex].value;"> … … 301 301 302 302 $orders = array( 303 'asc' => 'Ascending',304 'desc' => 'Descending',303 'asc' => plog_tr('Ascending'), 304 'desc' => plog_tr('Descending'), 305 305 ); 306 306 … … 337 337 <input type="hidden" name="level" value="search" /> 338 338 <input type="text" name="searchterms" /> 339 <input class="submit" type="submit" value=" Search" />339 <input class="submit" type="submit" value="' . plog_tr('Search') .'" /> 340 340 </div> 341 341 </form>'; … … 466 466 if (!$imgdata) { 467 467 // unknown image format, bail out 468 return false; 468 return 'graphics/thumb-video.gif'; 469 // return false; 469 470 } 470 471 … … 1102 1103 1103 1104 if (empty($config["allow_comments"])) { 1104 return array("errors" => "Comments disabled");1105 return array("errors" => plog_tr('Comments disabled')); 1105 1106 } 1106 1107 1107 1108 if (empty($author) || empty($email)) { 1108 return array("errors" => "Your comment did not post! Please fill the required fields.");1109 return array("errors" => plog_tr("Your comment did not post! Please fill the required fields.")); 1109 1110 } 1110 1111 … … 1126 1127 1127 1128 if (empty($picdata)) { 1128 return array("errors" => "Could not post comment - no such picture");1129 return array("errors" => plog_tr("Could not post comment - no such picture")); 1129 1130 } 1130 1131 1131 1132 if (empty($picdata["allow_comments"])) { 1132 return array("errors" => "Comments disabled");1133 return array("errors" => plog_tr("Comments disabled")); 1133 1134 } 1134 1135 1135 1136 if ($config["comments_moderate"] == 1) { 1136 1137 $approved = 0; 1137 $notify_msg = " (awaiting your approval)";1138 $notify_msg = " " . plog_tr('(awaiting your approval)'); 1138 1139 } else { 1139 1140 $approved = 1; … … 1210 1211 1211 1212 function is_allowed_extension($ext) { 1212 return in_array(strtolower($ext),array("jpg","gif","png","bmp")); 1213 // return in_array(strtolower($ext),array("jpg","gif","png","bmp")); 1214 return in_array(strtolower($ext),array("jpg","gif","png","bmp","mp4","wmv")); 1213 1215 } 1214 1216 … … 1649 1651 1650 1652 if ($GLOBALS['plogger_level'] != "picture" && $GLOBALS['plogger_mode'] != "slideshow" && $config["allow_dl"]) { 1651 return '<input id="download_selected_button" class="submit" type="submit" name="download_selected" value=" Download Selected" />';1653 return '<input id="download_selected_button" class="submit" type="submit" name="download_selected" value="' . plog_tr('Download Selected') . '" />'; 1652 1654 } 1653 1655 } … … 1676 1678 1677 1679 if ($GLOBALS['plogger_level'] == "picture" && $config["allow_print"]) { 1678 return '<a class="print" href="' . $config["gallery_url"] . 'plog-print.php?id='.$id.'"> Print Image</a>';1680 return '<a class="print" href="' . $config["gallery_url"] . 'plog-print.php?id='.$id.'">' . plog_tr('Print Image') . '</a>'; 1679 1681 } 1680 1682 } 1681 1683 1682 1684 function plogger_link_back () { 1683 return '<div id="link-back"><a href="http://www.plogger.org/"> Powered by Plogger!</a></div>';1685 return '<div id="link-back"><a href="http://www.plogger.org/">' . plog_tr('Powered by Plogger!') . '</a></div>'; 1684 1686 } 1685 1687 … … 1714 1716 // change the tooltip message to reflect the nature of the RSS aggregate link. 1715 1717 if ($GLOBALS['plogger_level'] != "") 1716 $rss_tooltip = "RSS 2.0 subscribe to this " .$GLOBALS["plogger_level"];1718 $rss_tooltip = plog_tr('RSS 2.0 subscribe to this') . $GLOBALS["plogger_level"]; 1717 1719 else 1718 $rss_tooltip = "RSS 2.0 subscribe to all images";1720 $rss_tooltip = plog_tr('RSS 2.0 subscribe to all images'); 1719 1721 1720 1722 1721 1723 $rss_link = plogger_rss_link(); 1722 1724 1723 $rss_tag = '<a href="'.$rss_link.'"><img id="rss-image" src="' . $config["gallery_url"] . 'graphics/rss.gif" title="'. $rss_tooltip.'" alt=" RSS 2.0 Feed"/></a>';1725 $rss_tag = '<a href="'.$rss_link.'"><img id="rss-image" src="' . $config["gallery_url"] . 'graphics/rss.gif" title="'. $rss_tooltip.'" alt="' . plog_tr('RSS 2.0 Feed') . '"/></a>'; 1724 1726 1725 1727 return $rss_tag; … … 1736 1738 if ($GLOBALS['plogger_level'] == "album") { 1737 1739 $ss_url = generate_url('album',$GLOBALS['plogger_id'],array('mode' => 'slideshow')); 1738 $ss_tag = "<a href=\"$ss_url\"> View as Slideshow</a>";1740 $ss_tag = "<a href=\"$ss_url\">" . plog_tr('View as Slideshow') . "</a>"; 1739 1741 } 1740 1742 … … 1742 1744 $ss_url = $config['baseurl'] . '?level=search&searchterms=' . htmlspecialchars($_GET['searchterms']); 1743 1745 $ss_url .= "&mode=slideshow"; 1744 $ss_tag = "<a href=\"$ss_url\"> View as Slideshow</a>";1746 $ss_tag = "<a href=\"$ss_url\">" . plog_tr('View as Slideshow') . "</a>"; 1745 1747 } 1746 1748 … … 1923 1925 1924 1926 $thumbpath = $config['basedir'] . 'thumbs/'.$prefix.$base_filename; 1925 $image_info = getimagesize($thumbpath); 1927 1928 1929 if (!is_readable($thumbpath)) { 1930 $image_info = getimagesize($config['basedir'] . 'graphics/thumb-video.gif'); 1931 } 1932 else 1933 { $image_info = getimagesize($thumbpath);} 1934 1935 // $image_info = getimagesize($thumbpath); 1926 1936 1927 1937 return $image_info; … … 1964 1974 function plogger_get_source_picture_url() { 1965 1975 global $config; 1966 return (!empty($config['allow_fullpic'])) ? $config[" gallery_url"].'images/'.SmartStripSlashes($GLOBALS["current_picture"]["path"]) : "#";1976 return (!empty($config['allow_fullpic'])) ? $config["baseurl"].'images/'.SmartStripSlashes($GLOBALS["current_picture"]["path"]) : "#"; 1967 1977 } 1968 1978 … … 2186 2196 function plogger_get_detail_link() { 2187 2197 if (!$_SESSION["plogger_details"]){ 2188 return '<a accesskey="d" href="javascript:void(0);" onclick="show_details();"> Show details</a>';2198 return '<a accesskey="d" href="javascript:void(0);" onclick="show_details();">' . plog_tr('Show details') . '</a>'; 2189 2199 } 2190 2200 else{ 2191 return '<a accesskey="d" href="javascript:void(0);" onclick="hide_details();"> Hide details</a>';2201 return '<a accesskey="d" href="javascript:void(0);" onclick="hide_details();">' . plog_tr('Hide details') . '</a>'; 2192 2202 } 2193 2203 } … … 2205 2215 2206 2216 if ($next_url) 2207 $next_link = '<a accesskey="." href="'.$next_url.'">Next »</a>'; 2217 $next_link = '<a id="next-button" accesskey="." href="'.$next_url.'">' . plog_tr('Next') . ' »</a>'; 2218 // Jumpdown: $next_link = '<a id="next-button" accesskey="." href="'.$next_url.'#next-button">' . plog_tr('Next') . ' »</a>'; 2208 2219 else 2209 2220 $next_link = ''; … … 2216 2227 2217 2228 if ($prev_url) 2218 $prev_link = '<a accesskey="," href="'.$prev_url.'">« Previous</a>'; 2229 $prev_link = '<a id="prev-button" accesskey="," href="'.$prev_url.'">« ' . plog_tr('Previous') . '</a>'; 2230 // Jumpdown: $prev_link = '<a id="prev-button" accesskey="," href="'.$prev_url.'#prev-button">« ' . plog_tr('Previous') . '</a>'; 2219 2231 else 2220 2232 $prev_link = '';
