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)

parabat 05-03-2007 09:08 AM

Quote:

Originally Posted by newhere (Post 1226184)
Either way (with your code or with mine), I get a horizontal scroll bar when someone posts a shout which is too long.

Just as a side.. the scrollbar appears in IE6 & IE7 (without a long posting), but not in Firefox.

-PB

jessej 06-01-2007 06:13 AM

Quote:

Originally Posted by Terminatoronly (Post 1237219)
when i installed it i didnt get any time with the shout how can i add the time ???

same here.

i hope someone will answer cause i had it on v2.0, and i really want it on v2.1. :)

thanks- and this is a GREAT hack.

CMGU 11-03-2007 10:32 PM

i canĀ“t change somebody help me

oz_moses 06-04-2008 12:14 AM

Cheers for the mods, much appreciated

CMGU, perhaps if you ask a question you might find help more forthcoming.

oz_moses 06-04-2008 12:38 AM

Ok, here's my customisations for anyone who's interested. These changes to the replaceDates function do the following
  • Droped the seconds - the shouts are displayed in order anyway, my users don't care if a shout was 3 or 49 seconds ago
  • Changed the date format to dd-mon , easier to read, all months are 3 letters helps keep it aligned at the month turnover.

Code:

// replaces <date> tags
function replaceDates(s) {
        var ret = "";
        var matches = s.match(/<date>\d+<\/date>/g);
        var months=['Jan','Feb','Mar','Apr','May','Jun','Jul','Aug', 'Sep','Oct','Nov','Dec'];

        for(var i = 0; matches != null && i < matches.length; i++) {

        var utc = matches[i].match(/\d+/);
        var date = new Date(utc * 1000);
       
        ret = ret + s.substr(0, s.indexOf(matches[i]));
        ret = ret + (
                        date.getDate() + "-" +
                        months[date.getMonth()]) + " " +
                        ((date.getHours() < 10) ? " " : "") +
                                date.getHours() + ":" +
                        ((date.getMinutes() < 10) ? "0" : "") +
                                date.getMinutes() + " ";

                s = s.substr(s.indexOf(matches[i]) + matches[i].length);
            }
            ret = ret + s;
            return ret;
}


oz_moses 06-04-2008 12:41 AM

Quote:

Originally Posted by jessej (Post 1258818)
same here.

i hope someone will answer cause i had it on v2.0, and i really want it on v2.1. :)

thanks- and this is a GREAT hack.

I found that changes aren't rendered until you make a new shout... so just shout!

oz_moses 06-04-2008 12:46 AM

Quote:

Originally Posted by parabat (Post 1240461)
Just as a side.. the scrollbar appears in IE6 & IE7 (without a long posting), but not in Firefox.

-PB

I noticed the horizontal scroll initially in IE6, it was on all the time.

I made an edit in forumhome_vbshout template to chang the table width to 95% as per the original hack which seems to have fixed it.
Code:

Shouts.innerHTML = '<table cellpadding="1" cellspacing="0" border="0" width="95%" align="left">' + formatMe + '</table>'
seems to be working in IE6 and IE7. Haven't tested Firefox yet...


All times are GMT. The time now is 02:43 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.01218 seconds
  • Memory Usage 1,737KB
  • 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
  • (2)bbcode_code_printable
  • (4)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (7)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