pingus-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Level Comment Tool - further development


From: Björn Fischer
Subject: Re: Level Comment Tool - further development
Date: Tue, 13 Apr 2004 10:35:43 +0200
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.6) Gecko/20040113


Attached is a patch that fixes these points (width is 170 instead of 120). It also changes the "playlink". Since there are only .pingus levels on the server I thought it is useless leaving a link on .xml levels (I removed the 0.6 link). The .pingus levels are supported from 0.6.1, right? If not please tell me and don't apply the patch. I'll correct this then.

Greetings

Björn


Dammit, forgot to attach the file... Here it is!
Index: Pingus/contrib/level_comment_tool/index.php
===================================================================
--- Pingus/contrib/level_comment_tool/index.php (revision 2259)
+++ Pingus/contrib/level_comment_tool/index.php (working copy)
@@ -168,13 +168,22 @@
             $celcolor = "bgcolor='#A0A0A0'";
 
           $jpg = htmlentities($c["name"]) . "/" . htmlentities($l) . ".jpg";
-          print "<td valign='top' $celcolor width='25%'><small>\n".
-            "<a href='$PHP_SELF?c=" .
-            urlencode($c["name"]) . "&l=" . urlencode($l) . "'>";
+          print "<td valign='top' $celcolor width='25%'>\n".
+            "<table border='0'>\n";
+          if ( $show_thumbs )//additional column only when thumbs are shown
+            print "<tr><td style='width:170px'>";
+          else
+            print "<tr><td style='width:0px'>";
+          print "<a href='$PHP_SELF?c=" . urlencode($c["name"]) . "&l=" . 
urlencode($l) . "'>";
           if ( $show_thumbs )
             print "<img src='http://pingus.seul.org/levels/thumb/$jpg' 
align='left' border='0'>";
-          print "" . htmlentities( $l ) . "</a>";
-
+          print "</a>\n".
+            "</td><td>\n".
+            "<small>".
+            "<a href='$PHP_SELF?c=" .
+            urlencode($c["name"]) . "&l=" . urlencode($l) . "'>".
+            urlencode($l) . "</a>\n";
+            
           if ( $cnt < 1 ) $cnt = "-";
           print " (<strong>$cnt</strong>)<br>";
           print "<em>&quot;" . htmlentities($ldata["name"]) . 
"&quot;</em><br>";
@@ -185,12 +194,17 @@
             print "<b>Not playable</b><br>";
           if ( $cnt > 0 )
             print "Rating:" . str_repeat( "*", intval($ldata["avgrating"])) . 
"<br>";
-          print " view <a href='http://pingus.seul.org/levels/50/$jpg' 
target='levelview'>half</a>" .
-            "/<a href='http://pingus.seul.org/levels/100/$jpg' 
target='levelview'>full</a> | " .
-            "play with <a href='data/levels/" . urlencode($c["name"]) . "/" . 
urlencode($l) . ".pingus'>Subversion</a>" .
+          print " view <a href='http://pingus.seul.org/levels/33/$jpg' 
target='levelview'>third</a>".
+            " / <a href='http://pingus.seul.org/levels/50/$jpg' 
target='levelview'>half</a>" .
+            " / <a href='http://pingus.seul.org/levels/100/$jpg' 
target='levelview'>full</a><br>" .
+            /*"play with <a href='data/levels/" . urlencode($c["name"]) . "/" 
. urlencode($l) . ".pingus'>Subversion</a>" .
             " / <a href='data/levels/" . urlencode($c["name"]) . "/" . 
urlencode($l) . ".xml'>0.6</a> version" .
-            "<br>";
-          print "</small></td>\n";
+            "<br>";*/
+            "<a href='data/levels/" . urlencode($c["name"]) . "/" . 
urlencode($l) . ".pingus'>play level</a>" .
+            " (requires Pingus 0.6.1 or later)".
+            "</small>\n".
+            "</td></tr></table>\n".
+            "</td>\n";
 
 
           if ($col_cnt++ == 1 )

reply via email to

[Prev in Thread] Current Thread [Next in Thread]