bbPress

Simple, Fast, Elegant

bbPress plugin browser »

User Timezones (0.2)

Download

Version: 0.2

Other Versions

Last Updated: 2007-2-23

Requires bbPress Version: 0.8 or higher

Compatible up to: 0.8

Author Homepage »

Plugin Homepage »

Average Rating

5 stars
4 stars
3 stars
2 stars
1 star
(7)

Your Rating

Author: Michael D Adams

This is sort of in "proof of concept" state right now. Users can specify a timezone (such as -8 or +4.5) in their profile. It does not include a more pleasant interface (like selecting 'PST' or 'Los Angeles, CA').

Any times filtered through bb_offset_time() (which include bb_post_time(), topic_time(), topic_start_time()) will be adjusted to the user's timezone.

Tags:

  1. This is pretty wicked! Considering how busy you have been, this plugin is good enough for now!

    Posted: 1 year ago #
  2. It would seem that installing this particular plugin on my site screws up my registration page:

    bb_get_user needs a numeric ID

    Quick fix I am sure, but wanted to let you know! Disabled it for now!

    Posted: 1 year ago #
  3. Trent, I believe this has been fixed in version 0.2.

    Posted: 1 year ago #
  4. codenameguzguz

    Inactive

    have a drop down menu, also when you go to "edit" have your time selected so you don't confuse other's w/ having to re-type it in. other then that, good job.

    Posted: 1 year ago #
  5. To remove the textbox and replace it with a drop down, edit user-timezones.php, replace the function extra_profile_info with:

    function extra_profile_info( $user_id ) {
    		$user_offset = $this->get_user_offset( $user_id );
    		$timezones = array(-12 => 'Baker Island Time',-11 => 'Niue Time, Samoa Standard Time',-10 => 'Hawaii-Aleutian Standard Time, Cook Island Time',-9.5 => 'Marquesas Islands Time',-9 => 'Alaska Standard Time, Gambier Island Time',-8 => 'Pacific Standard Time',-7 => 'Mountain Standard Time',-6 => 'Central Standard Time',-5 => 'Eastern Standard Time',-4 => 'Atlantic Standard Time',-3.5 => 'Newfoundland Standard Time',-3 => 'Amazon Standard Time, Central Greenland Time',-2 => 'Fernando de Noronha Time, South Georgia & the South Sandwich Islands Time',-1 => 'Azores Standard Time, Cape Verde Time, Eastern Greenland Time',0 => 'Western European Time, Greenwich Mean Time',1 => 'Central European Time, West African Time',2 => 'Eastern European Time, Central African Time',3 => 'Moscow Standard Time, Eastern African Time',3.5 => 'Iran Standard Time',4 => 'Gulf Standard Time, Samara Standard Time',4.5 => 'Afghanistan Time',5 => 'Pakistan Standard Time, Yekaterinburg Standard Time',5.5 => 'Indian Standard Time, Sri Lanka Time',5.75 => 'Nepal Time',6 => 'Bangladesh Time, Bhutan Time, Novosibirsk Standard Time',6.5 => 'Cocos Islands Time, Myanmar Time',7 => 'Indochina Time, Krasnoyarsk Standard Time',8 => 'Chinese Standard Time, Australian Western Standard Time, Irkutsk Standard Time',8.75 => 'Southeastern Western Australia Standard Time',9 => 'Japan Standard Time, Korea Standard Time, Chita Standard Time',9.5 => 'Australian Central Standard Time',10 => 'Australian Eastern Standard Time, Vladivostok Standard Time',10.5 => 'Lord Howe Standard Time',11 => 'Solomon Island Time, Magadan Standard Time',11.5 => 'Norfolk Island Time',12 => 'New Zealand Time, Fiji Time, Kamchatka Standard Time',12.75 => 'Chatham Islands Time',13 => 'Tonga Time, Phoenix Islands Time',14 => 'Line Island Time');
    	?>
    	<table>
    		<tr>
    			<th scope="row"><label for="time_offset">Time Zone:</label></th>
    			<td>
    				<select name="time_offset" id="time_offset">
    					<? foreach($timezones as $offset => $timezone):?>
    						<option value="<?=$offset;?>" <?=($user_offset==$offset)?"selected='selected'":'';?>>
    							<?php
    							if($offset>0) {
    								$utc = "[UTC + $offset]";
    							} else {
    								$utc = "[UTC - ".($offset*-1)."]";
    							}
    							echo "$utc $timezone";
    							?>
    						</option>
    					<? endforeach;?>
    				</select>
    			</td>
    		</tr>
    	</table>
    	<?php
    	}
    Posted: 1 year ago #
  6. Excellent plugin, and another that should be in the core. In fact, with punkstar's addition, it really deserves to be added to the core.

    Posted: 1 year ago #
  7. Yep, punkstar's addition was a great modification for the user-timezones plug-in. It's great! My posts now have the correct time. You should implement automatic DST in this.

    Posted: 11 months ago #
  8. itissue

    Member

    This plugin is great. Does it change the time for posts automatically or do you need to use bb_offset_time() ? I didn't use that and the time zone didn't change for the posts, so I was wondering if we needed it. If so, how and where would we apply it? It doesn't say under the Installation or Other notes.

    Posted: 7 months ago #

RSS feed for this topic

Add a Comment

You must log in to post.

Code is Poetry.