[TH] Member's Local Time [Deleted]

@Waindigo: I know that if anyone wants something, such as the above, they should discuss toward contributing. However, as I said in the PC from a while ago, I don't have the funds. So, how easy would it be to do one of two things myself?

  • Add an individual local date field.
  • Add a hover tooltip showing the date like what XenForo uses for times. For example, if I were to hover over "A moment ago" on this post, I would see Apr 26, 2014 at 12:30 PM."
I'm wondering what you mean by 'local date field'? Isn't this what this add-on does? For the hover tooltip you just need to use the right class and xen:datetime and it should work, this is an example of where XenForo does it:
Code:
    <dd class="muted"><a{xen:if '{$visitor.user_id}', ' href="{xen:link posts, $thread.lastPostInfo}" title="{xen:phrase go_to_last_message}"'} class="dateTime"><xen:datetime time="$thread.lastPostInfo.post_date" /></a></dd>
 
I'm wondering what you mean by 'local date field'? Isn't this what this add-on does? For the hover tooltip you just need to use the right class and xen:datetime and it should work, this is an example of where XenForo does it:
Code:
    <dd class="muted"><a{xen:if '{$visitor.user_id}', ' href="{xen:link posts, $thread.lastPostInfo}" title="{xen:phrase go_to_last_message}"'} class="dateTime"><xen:datetime time="$thread.lastPostInfo.post_date" /></a></dd>

Everywhere your add-on appears (message user info box, profiles, member cards), there is only a local time field, not a local date field as well. Have a look at my profile here, for example.

I'll give that a try. Which template would it be? :)
 
Everywhere your add-on appears (message user info box, profiles, member cards), there is only a local time field, not a local date field as well. Have a look at my profile here, for example.

I'll give that a try. Which template would it be? :)
Ok, now I see what you are on about! You can do this in a number of ways, details on datetime formats can be found here:
http://uk1.php.net/manual/en/function.date.php
This information can be used where we have called XenForo_Locale::$time, the second variable is $format and we just used the default you would want to use something like "Y-m-d H:i:s"
 
Ok, now I see what you are on about! You can do this in a number of ways, details on datetime formats can be found here:
http://uk1.php.net/manual/en/function.date.php
This information can be used where we have called XenForo_Locale::$time, the second variable is $format and we just used the default you would want to use something like "Y-m-d H:i:s"

Thanks, man. (y)

I'll have to have our coding admin take a look next time he's on since this is his area of expertise. We'd want to edit the waindigo_local_time_memberlocaltime and waindigo_local_time_post_memberlocaltime templates, correct, just to make to sure?
 
Thanks, man. (y)

I'll have to have our coding admin take a look next time he's on since this is his area of expertise. We'd want to edit the waindigo_local_time_memberlocaltime and waindigo_local_time_post_memberlocaltime templates, correct, just to make to sure?
Templates aren't what you need to change, it's done a bit differently to how XF do it. You will need to look at the file Waindigo_MemberLocalTime_Listener_TemplateHook. To add a tooltip value simply add another value in this file and call it in the templates and it will function as required.
 
Templates aren't what you need to change, it's done a bit differently to how XF do it. You will need to look at the file Waindigo_MemberLocalTime_Listener_TemplateHook. To add a tooltip value simply add another value in this file and call it in the templates and it will function as required.

Okey-doke. I'll wait for Nights or Mike to get on, then. They know about this stuff.
 
Okey-doke. I'll wait for Nights or Mike to get on, then. They know about this stuff.
He will need to look at this bit specifically:
Code:
XenForo_Locale::time(XenForo_Application::$time, null, null, $this->_hookParams['user']['timezone'])
 
Thank you for this add-on. I like it. I do have a question.

As you can see in the image. Last year, I moved everything from the sidebar into the information page.
Except i am unable to move the local time into the information tab. So my question is:


How can i move it from the sidebar to the information tab

Sidebar.webp


I tried to move it myself. I copied both codes in

waindigo_local_time_memberlocaltime
waindigo_local_time_post_memberlocaltime


and put it inside the member_view template inside the xen: phrase about. As you can see in the following image it worked. Except only the words "Local Time:" appear. The actuall time is missing.


localtime.webp


What did i do wrong?
 
Last edited:
The only way i could get it working was by adding

<dl> <xen:hook name="member_view_info_block"></xen:hook></dl> to the member_view template


it works now ^ ^
 
@serverguy, if you'd like us to add this as a proper option to the add-on, please PM us to discuss contributing. It should only be a small job.
 
Looks like a minor clash with PostRatings, I'm sure if you play around with the css for 5 minutes it's an easy problem to solve.

Bumping this Jon, just a heads up but the problem is you're not wrapping the contents inside a <dl>, it's not a problem with post ratings. Template: waindigo_local_time_memberlocaltime
 
A suggestion, @Jon W:

Have the Show author local time option under Style Properties > Message Elements > Settings unchecked (disabled) by default to match the core XenForo elements.

:)

Edit: In addition, it would be nice to have style properties instead of a global option regarding the display of the local time on member profiles and member cards.
 
Last edited:
Top Bottom