Committer : r33d
CVSROOT : /cvsroot/undernet-ircu
Module : homepage
Commit time: 2005-05-20 16:58:23 UTC
Modified files:
images.php inc.php
Log message:
Added some dimension caching from jast and modified a couple of word cases in
the button names.
---------------------- diff included ----------------------
Index: homepage/images.php
diff -u homepage/images.php:1.2 homepage/images.php:1.3
--- homepage/images.php:1.2 Sat Jan 11 14:52:58 2003
+++ homepage/images.php Fri May 20 09:58:13 2005
@@ -61,6 +61,12 @@
// Output the image to the cache file and clean up
imagepng($im, $cache);
+
+ // Cache the dimensions, too
+ $dimcache = fopen("$cache.dims", "w");
+ fwrite($dimcache, "$width $height");
+ fclose($dimcache);
+
imagedestroy($im);
}
@@ -80,7 +86,15 @@
"onMouseOver=\"MM_swapImage('document.Image$imgno', ".
"'document.Image$imgno', 'button.php?text=$link&active=true', " .
"'#1')\">";
- list ($width, $height) = button_size($link, $link == $page);
+
+ // Use the dimensions cache if it exists
+ $dimname = button_filename($link, 0, $link == $page) . '.dims';
+ if (file_exists($dimname)) {
+ list ($dimfile) = file($dimname);
+ list ($width, $height) = explode(' ', $dimfile);
+ } else
+ list ($width, $height) = button_size($link, $link == $page);
+
echo "<img src=\"button.php?text=$link" .
($link == $page ? "&emph=true" : "") .
"\" width=$width height=$height " .
Index: homepage/inc.php
diff -u homepage/inc.php:1.2 homepage/inc.php:1.3
--- homepage/inc.php:1.2 Thu May 19 22:14:06 2005
+++ homepage/inc.php Fri May 20 09:58:13 2005
@@ -9,7 +9,7 @@
'title'=> 'Undernet IRCd Development',
'pos' => 'first',
'url' => 'index.php'),
- 'bugs' => array('text' => 'Reporting bugs',
+ 'bugs' => array('text' => 'Reporting Bugs',
'title'=> 'Reporting Bugs',
'url' => 'bugs.php'),
'cvs' => array('text' => 'CVS Repository',
@@ -24,7 +24,7 @@
'members' => array('text' => 'Members',
'title'=> 'Membership of coder-com',
'url' => 'members.php'),
- 'gnuworld' => array('text' => 'GNUWorld services',
+ 'gnuworld' => array('text' => 'GNUWorld Services',
'url' => 'http://gnuworld.undernet.' .
'org/'),
'project' => array('text' => 'SourceForge Project page',
----------------------- End of diff -----------------------
_______________________________________________
Patches mailing list
[email protected]
http://undernet.sbg.org/mailman/listinfo/patches