[AppDB] - Allow screenshots to be opened in a new tab

Mitchell Mebane mmebane at ev1.net
Mon Jun 27 15:05:41 CDT 2005


The current behavior of the AppDB when a thumbnail is clicked is to open 
it in a new window. This patch makes a normal click open the image in a 
new window, and an open-in-new-tab operation to work as expected.

This is my first patch, so let me know if I've done anything wrong.

Changelog:

Mitchell Mebane <mmebane at ev1.net>
 - Make screenshots openable in a new tab
-------------- next part --------------
Index: screenshots.php
===================================================================
RCS file: /home/wine/appdb/screenshots.php,v
retrieving revision 1.27
diff -u -r1.27 screenshots.php
--- screenshots.php    7 Feb 2005 23:21:33 -0000    1.27
+++ screenshots.php    27 Jun 2005 19:50:38 -0000
@@ -72,7 +72,7 @@
         $imgSRC = '<img src="appimage.php?thumbnail=true&id='.$oRow->id.'" alt="'.$oScreenshot->description.'" width="'.$oScreenshot->oThumnailImage->width.'" height="'.$oScreenshot->oThumnailImage->height.'">';
 
         // set image link based on user pref
-        $img = '<a href="javascript:openWin(\'appimage.php?id='.$oRow->id.'\',\''.$randName.'\','.$oScreenshot->oScreenshotImage->width.','.($oScreenshot->oScreenshotImage->height+4).');">'.$imgSRC.'</a>';
+        $img = '<a href="appimage.php?id='.$oRow->id.'" onclick="javascript:openWin(\'appimage.php?id='.$oRow->id.'\',\''.$randName.'\','.$oScreenshot->oScreenshotImage->width.','.($oScreenshot->oScreenshotImage->height+4).');return false;">'.$imgSRC.'</a>';
         if ($_SESSION['current']->isLoggedIn())
         {
             if ($_SESSION['current']->getpref("window:screenshot") == "no")


More information about the wine-patches mailing list