cvs: phpweb / download-docs.php

From: Date: Thu, 02 Jan 2003 22:59:53 +0000
Subject: cvs: phpweb / download-docs.php
Groups: php.mirrors 
Request: Send a blank email to php-mirrors+get-14641@lists.php.net to get a copy of this message
goba Thu Jan 2 17:59:53 2003 EDT Modified files: /phpweb download-docs.php Log: - Small typo fix in sidebar - Only print out sizes and dates in tooltip, if not printed in displayed text (do not make HTML page bigger for nothing) - Always print out sizes and dates for the preferred language - Some XHTMLizations on printouts (<br> => <br />) Index: phpweb/download-docs.php diff -u phpweb/download-docs.php:1.44 phpweb/download-docs.php:1.45 --- phpweb/download-docs.php:1.44 Thu Jan 2 16:59:29 2003 +++ phpweb/download-docs.php Thu Jan 2 17:59:53 2003 @@ -27,7 +27,7 @@ <p> If you are using a capable browser, the file size and date will show up when you move the mouse above a link. -If you use cannot view this information, or would like to see all the +If you cannot view this information, or would like to see all the information, you can <a href="/download-docs.php?sizes=1">click here to see all the file sizes and dates</a>. </p> @@ -84,6 +84,10 @@ // Go through all possible manual languages foreach ($LANGUAGES as $langcode => $language) { + // See if current language is preferred + if ($langcode == preferred_language()) { $preflang = TRUE; } + else { $preflang = FALSE; } + // Reset files array and format counter $files = array(); $formatnum = 0; @@ -128,7 +132,7 @@ } // Highlight manual in preferred language - if ($langcode == preferred_language()) { + if ($preflang) { $bgcolor = "#ffffcc"; } else { $bgcolor = "#eeeeee"; @@ -148,17 +152,27 @@ // Format found, write out link else { - echo "<a href=\"$fileinfo[0]\" title=\" Size: $fileinfo[1]Kb\n Date: $fileinfo[2]\">$fileinfo[3]</a>"; - // Sizes required to be printed out (URL parameter) - if ($sizes) { - echo "<br><small>Size: $fileinfo[1]Kb<br>Date: $fileinfo[2]</small>"; + // Start link tag + echo "<a href=\"$fileinfo[0]\""; + + // Only print out tooltip, if explicit information is not printed + if (!$sizes && !$preflang) { + echo " title=\" Size: $fileinfo[1]Kb\n Date: $fileinfo[2]\""; + } + + // End link tag + echo ">$fileinfo[3]</a>"; + + // Sizes required to be printed out (URL parameter or preferred language) + if ($sizes || $preflang) { + echo "<br /><small>Size: $fileinfo[1]Kb<br />Date: $fileinfo[2]</small>"; } } // Quite bad looking code tweak to add a link to the extended CHM (en only!) if ($langcode == "en" && preg_match("!.chm$!", $fileinfo[0])) { - echo ', <a href="http://weblabor.hu/php-doc-chm">extended chm</a>'; + echo '<br /><a href="http://weblabor.hu/php-doc-chm">extended chm</a>'; } // End table cell

« previous php.mirrors (#14641) next »