[Scummvm-cvs-logs] SF.net SVN: scummvm: [27088] web/trunk
fingolfin at users.sourceforge.net
fingolfin at users.sourceforge.net
Tue Jun 5 00:03:22 CEST 2007
Revision: 27088
http://scummvm.svn.sourceforge.net/scummvm/?rev=27088&view=rev
Author: fingolfin
Date: 2007-06-04 15:03:22 -0700 (Mon, 04 Jun 2007)
Log Message:
-----------
Small enhancement to screenshot windows on website: Use the window title of the screenshot viewer to display some info about the shot (does *not* yet work for the front page display, though :-/)
Modified Paths:
--------------
web/trunk/include/screenshots.php
web/trunk/index.php
web/trunk/screenshots.js
web/trunk/screenshots.php
Modified: web/trunk/include/screenshots.php
===================================================================
--- web/trunk/include/screenshots.php 2007-06-04 22:02:35 UTC (rev 27087)
+++ web/trunk/include/screenshots.php 2007-06-04 22:03:22 UTC (rev 27088)
@@ -17,6 +17,11 @@
return screenshot_thumb_path($t1[0]);
}
+function screenshot_caption ($id) {
+ global $file_root;
+ return implode("", file($file_root."/screenshots/scummvm_".$id.".txt"));
+}
+
function getScr($n) {
global $categories;
global $scrcatnums;
@@ -56,12 +61,7 @@
return "scummvm_{$categories[$cat0]->_catnum}_{$categories[$cat0]->_list[$cat1]['catnum']}_{$cat2}.jpg";
}
-function screenshot_caption ($id) {
- global $file_root;
- return implode("", file($file_root."/screenshots/scummvm_".$id.".txt"));
-}
-
// Grab list of images from screenshot dir
// and loop through them and add to $screenshots array
$screenshots = array();
Modified: web/trunk/index.php
===================================================================
--- web/trunk/index.php 2007-06-04 22:02:35 UTC (rev 27087)
+++ web/trunk/index.php 2007-06-04 22:03:22 UTC (rev 27088)
@@ -127,7 +127,7 @@
<tr><td>
<!-- We use a height of 483 instead of 480 to workaround something which
appears to be a bug in Mozilla? -->
- <a href="javascript:openWin('./screenshots/big'+getScr(i_jn)+'.png','scummvm',640,483);"
+ <a href="javascript:openWin('./screenshots/big'+getScr(i_jn)+'.png','Screenshot Viewer',640,483);"
onMouseOver="window.status='Click to View Full Size Image';return true;"
onMouseOut="window.status='';return true;"><img
<?php
Modified: web/trunk/screenshots.js
===================================================================
--- web/trunk/screenshots.js 2007-06-04 22:02:35 UTC (rev 27087)
+++ web/trunk/screenshots.js 2007-06-04 22:03:22 UTC (rev 27088)
@@ -2,7 +2,7 @@
myWindow = window.open("",nameOfWindow,"menubar=no,scrollbars=no,status=no,width="+width+",height="+height);
myWindow.document.open();
myWindow.document.write('<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">\n')
- myWindow.document.write('<html><head><title>Screenshot Viewer</title><link rel="stylesheet" href="style.css" type="text/css"></head>')
- myWindow.document.write('<body><a href="javascript:self.close();"><img src="'+ fileToOpen +'"></a></body></html>');
+ myWindow.document.write('<html><head><title>'+ nameOfWindow +'</title><link rel="stylesheet" href="style.css" type="text/css"></head>')
+ myWindow.document.write('<body onClick="javascript:self.close();"><img src="'+ fileToOpen +'"></body></html>');
myWindow.document.close();
}
Modified: web/trunk/screenshots.php
===================================================================
--- web/trunk/screenshots.php 2007-06-04 22:02:35 UTC (rev 27087)
+++ web/trunk/screenshots.php 2007-06-04 22:03:22 UTC (rev 27088)
@@ -66,7 +66,10 @@
<tr><td width=280 height=37 colspan=4><img src="<?=$file_root?>/images/rs-top.png" alt=""></td></tr>
<tr><td width=17 height=10 colspan=2><img src="<?=$file_root?>/images/rs-top-left.png" alt=""></td><td rowspan=2 width=256 height=192>
<?php
- echo "<a href=\"javascript:openWin('$file_root/screenshots/{$screenshots[$randImg]}','scummvm',640,483);\"\n";
+ $t = explode("scummvm_", $screenshots[$randImg]);
+ $t1 = explode(".", $t[1]);
+
+ echo "<a href=\"javascript:openWin('$file_root/screenshots/{$screenshots[$randImg]}','Screenshot:" . screenshot_caption($t1[0]) ."',640,483);\"\n";
echo " onMouseOver=\"window.status='Click to View Full Size Image';return true;\"\n";
echo " onMouseOut=\"window.status='';return true;\">";
echo '<img align=right src="'.screenshot_thumb_from_full($screenshots[$randImg]).'" alt="Random Screenshot"';
@@ -125,7 +128,7 @@
// display image
echo html_frame_td(
'<table cellpadding="0" cellspacing="0"><tr><td align="center">'.
- "<a href=\"javascript:openWin('./screenshots/bigscummvm_$image.png','scummvm',640,483);\">".
+ "<a href=\"javascript:openWin('./screenshots/bigscummvm_$image.png','Screenshot: " . screenshot_caption($image) . "',640,483);\">".
'<img src="'.screenshot_thumb_path($image).'" '.
'width="'.$thumb_w.'" height="'.$thumb_h.'" alt="Screenshot '.$c.'"></a>'.
'</td></tr><tr><td align="center">'.
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list