vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.6 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=194)
-   -   Chat Modifications - Fix vbShout Timezone problem (https://vborg.vbsupport.ru/showthread.php?t=144449)

lovelypk 04-10-2007 02:44 AM

Quote:

Originally Posted by newhere (Post 1223780)
Did you modify all the templates correctly?

working now.
12 hour clock timing will be much better though.

newhere 04-10-2007 02:45 AM

Quote:

Originally Posted by dbirosel (Post 1223771)
just looks kinda ugly. lol :P

Sorry, I have a lot of custom code on my install.
In that initial template edit, try setting font size="2" instead of size="1", or change the td attributes to otherwise match what your tables look like.

Code:

                                <td nowrap align="left" valign="top">
                                <font size="1">
                                    <date>{$Shout['time']}</date>
                                   
                                </font>
                                </td>


dbirosel 04-10-2007 02:48 AM

Thanks newhere! Loving the support so far!

newhere 04-10-2007 02:54 AM

Quote:

Originally Posted by dbirosel (Post 1223790)
Thanks newhere! Loving the support so far!

It's kind of an ugly hack around this static html nonsense. But it works. It was not acceptable to me to have no timestamp on shouts, and it was also not acceptable to have timezone constantly changing to whatever timezone of the last user posting a shout.

Tulsa 04-10-2007 02:58 AM

Thanks for this...

If anyone had the time showing before and now you've got a bunch of numbers after the date/time and before the name in the forumhome_vbshout_shout, you probably added this line to it
Code:

{$Shout['time']}
remove it to remove those numbers.

Now how to get rid of the date and just have the time...

dbirosel 04-10-2007 02:59 AM

Didn't see you answer this yet, but is it possible to change it from 24 hour to 12 hour instead? :D

newhere 04-10-2007 03:01 AM

Quote:

Originally Posted by Tulsa (Post 1223798)
Now how to get rid of the date and just have the time...

You can format the date however you want if you know a bit of javascript:
From my post above
https://vborg.vbsupport.ru/showpost....6&postcount=10

Tulsa 04-10-2007 03:06 AM

Quote:

Originally Posted by newhere (Post 1223800)
You can format the date however you want if you know a bit of javascript:
From my post above
https://vborg.vbsupport.ru/showpost....6&postcount=10

(IF) would be the key word in that line..

I can delete with the best of the them however.. :D

the date is gone.

newhere 04-10-2007 03:16 AM

Quote:

Originally Posted by dbirosel (Post 1223799)
Didn't see you answer this yet, but is it possible to change it from 24 hour to 12 hour instead? :D

for 12 hour time with brackets:

replace
Code:

                ret = ret + (date.getMonth()+1) + "/" +
                            date.getDate() + "/" +
                            date.getFullYear() + " " +
                            date.getHours() + ":" +
                            ((date.getMinutes() < 10) ? "0" : "") +
                            date.getMinutes() + ":" +
                            ((date.getSeconds() < 10) ? "0" : "") +
                            date.getSeconds() + " ";

with
Code:

                var append = "AM";
                var hour = date.getHours();
                if(hour > 12) {
                    hour = hour - 12;
                    append = "PM";
                }
                if(hour == 0) {
                    hour = 12;
                    append = "AM";
                }
                ret = ret + "[" + (date.getMonth()+1) + "/" +
                            date.getDate() + "/" +
                            date.getFullYear() + " " +
                            hour + ":" +
                            ((date.getMinutes() < 10) ? "0" : "") +
                            date.getMinutes() + " " +
                            ((date.getSeconds() < 10) ? "0" : "") +
                            date.getSeconds() + " " + append + "]";


dbirosel 04-10-2007 03:19 AM

Omg perfect!!!! Thanks alot!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!


All times are GMT. The time now is 05:55 AM.

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.01052 seconds
  • Memory Usage 1,749KB
  • 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
  • (4)bbcode_code_printable
  • (6)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete