Add a magnifying glass image overlay on top of screenshot thumbnails to make it more obvious to users that clicking on the
image will allow them to see a larger version of the thumbnail
This commit is contained in:
@@ -232,3 +232,6 @@ TD.app_name { width: 150px }
|
||||
|
||||
/* Editor textarea */
|
||||
#editor { height: 25em; width:700px; }
|
||||
|
||||
/* zoom image overlay style */
|
||||
.zoom_overlay { position:relative; top:10px; left:0px; margin-left:-32px; padding:0px; }
|
||||
|
||||
BIN
images/xmag_32.png
Normal file
BIN
images/xmag_32.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.9 KiB |
@@ -546,7 +546,7 @@ class Application {
|
||||
}
|
||||
|
||||
// image
|
||||
$img = Screenshot::get_random_screenshot_img($this->iAppId);
|
||||
$img = Screenshot::get_random_screenshot_img($this->iAppId, null, false);
|
||||
echo "<tr><td align=\"center\" colspan=\"2\">$img</td></tr>\n";
|
||||
|
||||
echo " </table>\n"; /* close of name/vendor/bugs/url table */
|
||||
|
||||
@@ -360,6 +360,21 @@ class Screenshot {
|
||||
mail_appdb($sEmail, $sSubject ,$sMsg);
|
||||
}
|
||||
|
||||
function get_zoomicon_overlay()
|
||||
{
|
||||
/* if the user is using mozilla or firefox show the zoom icon over images */
|
||||
/* otherwise because IE doesn't support transparent PNGs or proper css we have to */
|
||||
/* skip it for IE */
|
||||
if(strpos($_SERVER['HTTP_USER_AGENT'], "MSIE") === false)
|
||||
{
|
||||
$sZoomIcon = '<img class="zoom_overlay" src="'.BASE.'images/xmag_32.png">';
|
||||
}
|
||||
else
|
||||
$sZoomIcon = "";
|
||||
|
||||
return $sZoomIcon;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get a random image for a particular version of an app.
|
||||
* If the version is not set, get a random app image
|
||||
@@ -407,19 +422,22 @@ class Screenshot {
|
||||
if($bFormatting)
|
||||
$sImg = html_frame_start("",'128','',2);
|
||||
|
||||
/* retrieve the url for the zoom icon overlay */
|
||||
$sZoomIcon = Screenshot::get_zoomicon_overlay();
|
||||
|
||||
/* we have screenshots */
|
||||
if(mysql_num_rows($hResult))
|
||||
{
|
||||
if($iVersionId)
|
||||
$sImg .= "<a href='screenshots.php?iAppId=$iAppId&iVersionId=$iVersionId'>$sImgFile<center>View/Submit Screenshot</center></a>";
|
||||
$sImg .= "<a href='screenshots.php?iAppId=$iAppId&iVersionId=$iVersionId'>".$sImgFile.$sZoomIcon."<center>View/Submit Screenshot</center></a>";
|
||||
else
|
||||
$sImg .= "<a href='screenshots.php?iAppId=$iAppId&iVersionId=$iVersionId'>$sImgFile<center>View Screenshot</center></a>";
|
||||
$sImg .= "<a href='screenshots.php?iAppId=$iAppId&iVersionId=$iVersionId'>".$sImgFile.$sZoomIcon."<center>View Screenshot</center></a>";
|
||||
} else if($iVersionId) /* we are asking for a specific app version but it has no screenshots */
|
||||
{
|
||||
$sImg .= "<a href='screenshots.php?iAppId=$iAppId&iVersionId=$iVersionId'>$sImgFile<center>Submit Screenshot</center></a>";
|
||||
$sImg .= "<a href='screenshots.php?iAppId=$iAppId&iVersionId=$iVersionId'>".$sImgFile.$sZoomIcon."<center>Submit Screenshot</center></a>";
|
||||
} else /* we have no screenshots and we aren't a specific version, we don't allow adding screenshots for an app */
|
||||
{
|
||||
$sImg .= $sImgFile;
|
||||
$sImg .= $sImgFile.$sZoomIcon;
|
||||
}
|
||||
|
||||
if($bFormatting)
|
||||
@@ -476,7 +494,7 @@ class Screenshot {
|
||||
'?iId='.$this->iScreenshotId.'\',\''.$sRandName.'\','.
|
||||
($this->get_screenshot_width() + 20).','.
|
||||
($this->get_screenshot_height() + 6).
|
||||
');return false;">'.$shImgSRC.'</a>';
|
||||
');return false;">'.$shImgSRC.Screenshot::get_zoomicon_overlay().'</a>';
|
||||
|
||||
// set image link based on user pref
|
||||
if ($_SESSION['current']->isLoggedIn())
|
||||
|
||||
@@ -658,7 +658,7 @@ class Version {
|
||||
echo "<tr class=\"color0\" valign=\"top\"><td><b>Maintainers Version</b></td><td>".$this->sTestedRelease."</td></tr>\n";
|
||||
|
||||
// image
|
||||
$img = Screenshot::get_random_screenshot_img($oApp->iAppId, $this->iVersionId);
|
||||
$img = Screenshot::get_random_screenshot_img($oApp->iAppId, $this->iVersionId, false);
|
||||
echo "<tr><td align=\"center\" colspan=\"2\">$img</td></tr>\n";
|
||||
|
||||
// display all maintainers of this application
|
||||
|
||||
@@ -32,6 +32,7 @@ if($aClean['sCmd'])
|
||||
// process screenshot upload
|
||||
if($aClean['sCmd'] == "screenshot_upload")
|
||||
{
|
||||
//FIXME: use a defined value here instead of just 600000
|
||||
if($_FILES['sImageFile']['size']>600000)
|
||||
{
|
||||
addmsg("Your screenshot was not accepted because it is too big. Please try to keep your screenshots under 600KB by saving games/video screenshots to jpeg and normal applications to png you might be able to achieve very good results with less bytes", "red");
|
||||
|
||||
Reference in New Issue
Block a user