I have done a few customizations already according to what our members preferred for the block. One example moving the updated time to be above the details link instead of up top. Also removed the English, metric choices only showing details, since our location in the Mid-west only deals with English units.

I have been tinkering at request of members of the club, to try and get just the temp read out to display more predominantly. I have gotten real close but I have given up for the night in favor of rest. Here is the code I put in to get as close as possible to get the outside of the tag prior to the temp readout, and have close behind it. Here is the final HTML output: Temp:

and here is the PHP code:

if ((string)$display_fields['temp'] == 'temp') {
$block_content .= "

Temp:

";
}

That has so far for me, produced the best result, however it still won't show the temp when I have it in this format, as you can see and just prior to

creating failure or the wrong code. Looking for some possible guidance in this area, as I am a little familiar but not a professional to this. I don't know what you need to know about our server, but PHP 5.2.6, Apache/2.2.8 (Fedora), D6.6.

Matthew

Comments

the1who’s picture

I wish I could edit that once posted, HTML output:

<tr>
<td>Temp:</td>
<td>
<strong>
<id="temp"/>
</strong>
</td>
</tr>

PHP:

      if ((string)$display_fields['temp'] == 'temp') {
        $block_content .= "<tr><td>Temp:<td><strong> <id=\"temp\"></tr>";
	  }
ppicazo’s picture

Assigned: Unassigned » ppicazo

Contact me via email, ppicazo@gmail.com and I will try my best to help you with a customization of the module.

ppicazo’s picture

Status: Active » Fixed

Issue has been resolved.

It should be noted that any text or markup inside the weather data table cells will be overwritten by the JavaScript:

if (document.getElementById("temp")) { document.getElementById("temp").innerHTML = temp_f + " F"; }

Therefore the style information should be put in a style tag as an attribute of the table cells or rows as shown below.

Incorrect, "<strong></strong>" tags will be over written by the above Javascript:

$block_content .= "<tr><td>Temp:</td><td id=\"temp\"><strong></strong></td></tr>";

Correct, nothing in the innerHTML of the weather data table cells (td elements with id of "temp", "dewpoint", etc):

$block_content .= "<tr><td>Temp:</td><td id=\"temp\" style=\"font-weight:bold;\"></td></tr>";

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.