Welcome to Geeklog Friday, December 15 2017 @ 03:27 am EST


Status: offline

trampoline

Forum User
Full Member
Registered: 24/02/2006
Posts: 392
Ok so now I have a world time block using this code.... in lib-custom.php
PHP 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
PHP 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 ?

All times are EST. The time is now 03:27 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