Google Calendar
Posted: 20. May 2012 00:59
I have an idea for a mod I want to implement. I know PHP well enough, but still trying to get used to PHPBB and Board3.
I want to use Google's iframe code in a block to show a Google calendar, but I need to change the ctz= in the iframe url based on the user's timezone.
So I am thinking in the mod I will need a class with something like:
if ($user->user_timezone == '0.00') $usertz = "Europe%2FLondon";
elseif ($user->user_timezone == '-1.00') $usertz = "Atlantic%2FAzores";
elseif ($user->user_timezone == '-2.00') $usertz = "America%2FNoronha";
....
else $usertz = 'Some default seting';
Set the template variable to equal $usertz
The create the template file with iframe code and my variable (ctz={USERTZ})
I want this to be a block I can put on the Board3 Portal
Any tips as to where to look on how to do this?
I want to use Google's iframe code in a block to show a Google calendar, but I need to change the ctz= in the iframe url based on the user's timezone.
So I am thinking in the mod I will need a class with something like:
if ($user->user_timezone == '0.00') $usertz = "Europe%2FLondon";
elseif ($user->user_timezone == '-1.00') $usertz = "Atlantic%2FAzores";
elseif ($user->user_timezone == '-2.00') $usertz = "America%2FNoronha";
....
else $usertz = 'Some default seting';
Set the template variable to equal $usertz
The create the template file with iframe code and my variable (ctz={USERTZ})
I want this to be a block I can put on the Board3 Portal
Any tips as to where to look on how to do this?