vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4.x Template Modifications (https://vborg.vbsupport.ru/forumdisplay.php?f=246)
-   -   Mini Mods - Time below the avatar (user Local Time) (https://vborg.vbsupport.ru/showthread.php?t=238149)

filosofo@vodafo 03-12-2010 10:00 PM

Time below the avatar (user Local Time)
 
1 Attachment(s)
That makes this mod?
building the script timer that already have vbulletin so we run and show the result below the avatar
Thus each user shows local time which chosen in your profile according to your time zone. (User Local Time).
Installation:
The installation is very easy, we agree to ACP <> language and phrases <> manage phrases <> new making phrase
Code:


type of phrase: postbit
product: vbulletin
variable name: all_times_are_gmt_x_time_now_is_y
text: <font size="4" color="black"><b>GMT{1} | {2}</b></font>

save
Now we are going to styles and templates
Choose the style to modify
and edit the template postbit
Find in the template:
Code:

<div class="userinfo<vb:if condition="!$show['avatar']">_noavatar</vb:if>">
  <div class="contact">
    <vb:if condition="$show['avatar']">
    <a class="postuseravatarlink" href="{vb:link member, {vb:raw post}}" title="{vb:rawphrase {vb:raw post['onlinestatusphrase']}, {vb:raw post.username}}">
      <vb:if condition="$post.avatarurl">
      <img src="{vb:raw post.avatarurl}" alt="{vb:rawphrase xs_avatar, {vb:raw post.username}}" />
      <vb:else />
      <img src="{vb:stylevar imgdir_misc}/unknown.gif" />
      </vb:if>
    </a>
    </vb:if>

Add below:
Code:


<!--TAB HORA-->
<vb:if condition="$show['dst_correction']">
 <!-- auto DST correction code -->
  <form action="profile.php?do=dst" method="post" name="dstform">
  <input type="hidden" name="s" value="{vb:raw session.sessionhash}" />
  <input type="hidden" name="securitytoken" value="{vb:raw bbuserinfo.securitytoken}" />
  <input type="hidden" name="do" value="dst" />
  </form>
  <script type="text/javascript">
  <!--
  var tzOffset = {vb:raw bbuserinfo.timezoneoffset} + {vb:raw bbuserinfo.dstonoff};
  var utcOffset = new Date().getTimezoneOffset() / 60;
  if (Math.abs(tzOffset + utcOffset) == 1)
  { // Dst offset is 1 so its changed
    document.forms.dstform.submit();
  }
  //-->
  </script>
  <!-- / auto DST correction code -->
 </vb:if>
<div class="eti_postbit">   
<div id="footer_time" class="shade footer_time">{vb:rawphrase all_times_are_gmt_x_time_now_is_y}</div>
 </div>
<!--TAB HORA END-->

save
----------------------------------------------------------------------------------
in the template postbit_legacy:
To find:
Code:

<vb:if condition="$show['avatar']">
 
            <div class="eti_postbit"=a class="postuseravatar" href="{vb:link member, {vb:raw post}}" title="{vb:rawphrase {vb:raw post['onlinestatusphrase']}, {vb:raw post.username}}">
            <center>   
<img src="{vb:raw post.avatarurl}" alt="{vb:rawphrase xs_avatar, {vb:raw post.username}}" title="{vb:rawphrase xs_avatar, {vb:raw post.username}}" />
</center>
            </a>
            </div></vb:if>

Add below:
Code:


<!--TAB HORA-->
<vb:if condition="$show['dst_correction']">
 <!-- auto DST correction code -->
  <form action="profile.php?do=dst" method="post" name="dstform">
  <input type="hidden" name="s" value="{vb:raw session.sessionhash}" />
  <input type="hidden" name="securitytoken" value="{vb:raw bbuserinfo.securitytoken}" />
  <input type="hidden" name="do" value="dst" />
  </form>
  <script type="text/javascript">
  <!--
  var tzOffset = {vb:raw bbuserinfo.timezoneoffset} + {vb:raw bbuserinfo.dstonoff};
  var utcOffset = new Date().getTimezoneOffset() / 60;
  if (Math.abs(tzOffset + utcOffset) == 1)
  { // Dst offset is 1 so its changed
    document.forms.dstform.submit();
  }
  //-->
  </script>
  <!-- / auto DST correction code -->
 </vb:if>
<div class="eti_postbit">   
<div id="footer_time" class="shade footer_time">{vb:rawphrase all_times_are_gmt_x_time_now_is_y}</div>
 </div>
<!--TAB HORA END-->

save
enjoy it.
Please Mark as Installed

Charlie98902 03-13-2010 12:05 PM

Is military time or 24 hour time the only way or can you use 12 hour time?

filosofo@vodafo 03-13-2010 02:35 PM

The format is the default forum administrator and can be 24 or am/pm system. The users can determine his time zone, but the format 24 or am/pm only administrator because it uses the Forum script.

Dr.osamA 03-17-2010 03:29 AM

installed

thanxxx man
keep it up

shadowquest1 04-18-2011 03:30 PM

thanks i try it out

Boofo 04-18-2011 04:02 PM

You guys did know about this mod, correct?

https://vborg.vbsupport.ru/showthread.php?t=243379


All times are GMT. The time now is 12:50 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01433 seconds
  • Memory Usage 1,735KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (5)bbcode_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (6)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete