Temperature Font Size in Newer Themes

Tweaks to Weather Harvest
19 Apr '07 Thu Apr 19, 2007 21:35    
Site Admin  

Posten Temperature Font Size in Newer Themes

You may have noticed that the font size of the temperature value in the WeatherHarvest block has dropped back to normal text size. Reason is WeatherHarvest uses the now almost deprecated font number system (font-size=8). Problem is that many of the newer themes use px-based CSS font sizing for better control, and don't even bother to set the base font-size value, thus 8 doesn't relate to anything.

Here's the cure. In /modules/WeatherHarvest/d_config.php find around line 1,244:

    $return_string .= sprintf( "<td align=\"$iconalign\"><font size=\"".$fontsize."\">%s</font>", $tempString );

and change it to:

    $return_string .= sprintf( "<td align=\"$iconalign\"><span style=\"font-size:".$fontsize."px;font-weight:bold;\">%s</span>", $tempString );

Also to get the WeatherHarvest S, M, L font sizes back into their approximate original sizes, you will want to also find, around lines 677, 682, 686, these 3 lines:

	  $fontsize = "8";

$fontsize = "10";

$fontsize = "12";

and bump them up to:

	  $fontsize = "16";

$fontsize = "20";

$fontsize = "24";

Of course now that the size is px-based, you can set it to any font size you want.

layingback's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)

2.6.32 / 1.3 - 2.4 / 5.5 - 5.6 / 5.4 - 5.5 / 9.4

Link  QR 
Share this Druckbare Version  facebook   google+   linkedin   twitthis  
Show more ...

Forenzugangskontrolle - Du kannst keine Beiträge in dieses Forum schreiben.
Du kannst auf Beiträge in diesem Forum nicht antworten.
Du kannst deine Beiträge in diesem Forum nicht bearbeiten.
Du kannst deine Beiträge in diesem Forum nicht löschen.
Du kannst an Umfragen in diesem Forum nicht mitmachen.
Du kannst keine Dateien anhängen.
Du kannst Dateien herunterladen.