Welcome to Geeklog, Anonymous Thursday, March 28 2024 @ 06:00 am EDT

Geeklog Forums

Time + Weather


Status: offline

trampoline

Forum User
Full Member
Registered: 02/24/06
Posts: 392
Ok so now I have a world time block using this code.... in lib-custom.php
Text Formatted Code

/**
My Time Block
**/
function phpblock_showtimes() {  
$result = '';
$dhar = strtotime("+270 minutes");
$new = strtotime("-5 hours");
$lossa = strtotime("-8 hours");
$lhasa = strtotime("+7 hours");
$time_new = date("D jS.  H:i" , $new);
$time_london = date("D jS.  H:i");
$time_dharam = date("D jS.  H:i" , $dhar);
$time_lossa = date("D jS.  H:i" , $lossa);
$time_lhasa = date("D jS.  H:i" , $lhasa);

$newname ='New York';
$lonname ='London';
$daram ='Dharamsala';
$lossan ='Los Angeles';
$lhasan ='Lhasa';

$result = $daram .  ' - ' . $time_dharam . '<br>';
$result .='<br>';
$result .= $lhasan .  ' - ' . $time_lhasa . '<br>';
$result .='<br>';
$result .= $lonname .  ' - ' . $time_london . ' <br>';
$result .='<br>';
$result .=  $newname .  ' - ' . $time_new . '<br>';
$result .='<br>';
$result .= $lossan .  ' - ' . $time_lossa . '<br>';
return $result;
}
 


And a weather block using this.... in php block
Text Formatted Code

<div class="block-box-left">
<h2 id="weatherAddon">Weather</h2>
<div id="weatherContainer">
<embed id="weatherId0" width="120" height="60" type="application/x-shockwave-flash" pluginspace="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" wmode="transparent" src="http://netwx.accuweather.com/netWx-V25.swf?zipcode=ASI|CN|CH029|LHASA|&customtheme=&theme=5&metric=1&target=_self&lang=uk&url=&video=&category="/>
<embed id="weatherId1" width="120" height="60" type="application/x-shockwave-flash" pluginspace="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" wmode="transparent" src="http://netwx.accuweather.com/netWx-V25.swf?zipcode=ASI|IN|IN014|DHARAMSALA|&customtheme=&theme=5&metric=1&target=_self&lang=uk&url=&video=&category="/>
<embed id="weatherId2" width="120" height="60" type="application/x-shockwave-flash" pluginspace="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" wmode="transparent" src="http://netwx.accuweather.com/netWx-V25.swf?zipcode=ASI|IN|IN010|NEW DELHI|&customtheme=&theme=5&metric=1&target=_self&lang=uk&url=&video=&category="/>
</div>
</div>
 

Both work fine...
however......
I would like to combine them both.....
any idea's ?
 Quote

All times are EDT. The time is now 06:00 am.

  • Normal Topic
  • Sticky Topic
  • Locked Topic
  • New Post
  • Sticky Topic W/ New Post
  • Locked Topic W/ New Post
  •  View Anonymous Posts
  •  Able to post
  •  Filtered HTML Allowed
  •  Censored Content