Jump to content


Photo

Chat Module Enhancement


This topic has been archived. This means that you cannot reply to this topic.
64 replies to this topic

#1 habman

habman

    Veteran

  • Members
  • PipPipPip
  • 2,627 posts

Posted 16 December 2006 - 04:23 PM

My previous chat sound/alert addition was a bit "glitchy" so I while I was adding the bottom-up ability to the chat module I improved those two features.


Features:
  • Add sound to chat room when posts are made
  • Set to display bottom-up or top-down
  • Select # of posts to display
  • Alert users to the chat room
  • Alerts can be sent or received only once per browser session
  • Uses cookies so each user can set their preference and it will be set for later sessions
Check it out on my test site: http://football8.myf...2006/home/53412

Login as any franchise with the password "tester"



To include this chat first remove the chat module from you list of home page modules to display.

Now paste the following code to a home page message module and include it in your list of home page modules to display.

<script type="text/javascript">
<!--
var defaultDisplayMessages = 8;
var hideChatUtilities	  = 'false';  // either 'false' or 'true'
var defaultChatDirection   = 'up';	 // either 'up' or 'down'
var defaultChatMode		= 'in';	 // either 'off' or 'in' or 'on'
var newPostSound		   = 'http://www.habman.com/mfl/sounds/aol_receive_message.mp3';
//-->
</script>

<script language="JavaScript" type="text/javascript" src="http://www.habman.com/mfl/apps/js/habchat.js"></script>




Now to get the alert to work include the following code in a home page module that you are using as your footer. If you are not currently using a footer then just set this code as the footer.
<script language="JavaScript" type="text/javascript" src="http://www.habman.com/mfl/apps/js/habchatfooter.js"></script>

<script language="Javascript" type="text/javascript">
<!--

if (alertActive==undefined) { var alertActive='false' }
if (alertActive=='false') {
var chatAlertServerTime = currentServerTime
var chatAlertTimer=0
clearInterval(chatAlertTimer)
readMessagesForAlert(true)
} 

// -->
</script>

My MFL scripts . . . . . . . . http://www.habman.com/mfl/

#2 turnit643

turnit643

    Member

  • Members
  • PipPip
  • 17 posts

Posted 21 December 2006 - 01:19 PM

Habman, I'm new here and have been wandering through the support boards for about a week to see if a switch to MFL is something that would work for our league. I have to say I'm very impressed with the effort and skill you contribute (that also goes for the others that spend so much time answering questions and offering solutions.)

That chat looks/works great. Is there a way to scroll through and see past entries? (it may not be present on that particular test page because there just aren't enough posts yet, but just wondering.)

Thanks.

#3 habman

habman

    Veteran

  • Members
  • PipPipPip
  • 2,627 posts

Posted 21 December 2006 - 02:37 PM

Habman, I'm new here and have been wandering through the support boards for about a week to see if a switch to MFL is something that would work for our league. I have to say I'm very impressed with the effort and skill you contribute (that also goes for the others that spend so much time answering questions and offering solutions.)

That chat looks/works great. Is there a way to scroll through and see past entries? (it may not be present on that particular test page because there just aren't enough posts yet, but just wondering.)

Thanks.


MFL's chat is restricted to 30 messages. I have modified the code to make it bottom-up etc. but that 30 post restriction is still there.

The test page may or may not have 30 posts but if it did have more then only the last 30 are stored.

One of the biggest selling points for MFL IMO is the ability to customize your site. No other service that I know of gives you this much flexibility to add your own tweaks to the site. Another great feature is the support Kevin, Mike and Chris provide as well as the other posters on this message board.

Hopefully we'll see you here next season.
My MFL scripts . . . . . . . . http://www.habman.com/mfl/

#4 turnit643

turnit643

    Member

  • Members
  • PipPip
  • 17 posts

Posted 21 December 2006 - 03:36 PM

Thanks for the quick response.

The customizability definitely is the most enticing aspect.

The only thing that currently worries me is the blind bidding set-up. We bid with our salary cap dollars and according to Kevin (from another thread) that isn't supported on mfl yet, so we'll just be watching this offseason to see if it's added.

Thanks again. Hopefully we'll be aboard in 2007 and I'll be able to pester you with a pile of coding questions.

#5 tpal70

tpal70

    Veteran

  • Members
  • PipPipPip
  • 58 posts

Posted 19 January 2007 - 11:27 PM

had a problem in using it on my site today. Every time someone posted a chat message, the cursor would go away and if you hit the space bar, it would take you different places on the page. I would have to put my mouse cursor back on the line and click the mouse to type a message every time. I put this in homepage message #10, is that the right spot?

Thank you

#6 habman

habman

    Veteran

  • Members
  • PipPipPip
  • 2,627 posts

Posted 20 January 2007 - 09:01 AM

had a problem in using it on my site today. Every time someone posted a chat message, the cursor would go away and if you hit the space bar, it would take you different places on the page. I would have to put my mouse cursor back on the line and click the mouse to type a message every time. I put this in homepage message #10, is that the right spot?

Thank you


When the sound plays the cursor loses focus on the text box. It requires you to click in the text box to re-establish focus. This is not ideal but this is how it is works so there is nothing screwed up in your code. I will try something later today to see if I can get this corrected.

I'll get back to you.
My MFL scripts . . . . . . . . http://www.habman.com/mfl/

#7 Fengshui

Fengshui

    Veteran

  • Members
  • PipPipPip
  • 78 posts

Posted 16 February 2007 - 02:12 PM

Can this be added into a tab? I'm using tabs and I'm a complete novice. I've been able to pick up a ton of idea's and direction from this community. I didn't even know what .css was 30 days ago and had only heard of HTML and Java so I apologize if this is a dumb question. Anyway been fighting this problem for about 3 hours now...

I attempted to add your Chat script to the first tab, League. That tab looks fine but now the data for every tab after it is pushed down to the bottom of the page.

Is this a CSS issue or a HTML issue?

Test league ID is http://football8.myf...2006/home/73342.

Actual League ID is http://football8.myf...2006/home/64747 where things look normal because I haven't added the chat script yet.

Thanks for any help you can provide.

#8 Fengshui

Fengshui

    Veteran

  • Members
  • PipPipPip
  • 78 posts

Posted 21 February 2007 - 08:29 AM

Nevemind. I did something I thought I had already tried 100 times and I guess it decided to work on the 101st try. Persistence paid off. :rolleyes:

#9 Bluetooth

Bluetooth

    Veteran

  • Members
  • PipPipPip
  • 53 posts

Posted 18 June 2007 - 05:33 PM

Can someone tell me what I have done incorrectly? When I add this code, my heading for the chat area looks nothing like my site. I don't think this is right.

#10 bonscott

bonscott

    Veteran

  • Members
  • PipPipPip
  • 7,681 posts

Posted 08 August 2007 - 09:17 AM

Thought I'd bump this up with a question.

First, what do the options for defaultChatMode do?

Second, if I want to disable the sounds, any way to do that? Maybe just remove the URL to the sound file?

EDIT: Actually I think both questions are related. I think the defaultChatMode is actually the default mode for sounds? If so then it can be turned off there.


 


#11 habman

habman

    Veteran

  • Members
  • PipPipPip
  • 2,627 posts

Posted 08 August 2007 - 09:29 AM

Thought I'd bump this up with a question.

First, what do the options for defaultChatMode do?

Second, if I want to disable the sounds, any way to do that? Maybe just remove the URL to the sound file?

EDIT: Actually I think both questions are related. I think the defaultChatMode is actually the default mode for sounds? If so then it can be turned off there.



Yes defaultChatMode refers to the sound. Probably not a very descriptive title but that's what it refers to.

If you set it to off then all sound will be off by default but each user can turn it on at their discretion if they want by clicking on the speaker icon.
My MFL scripts . . . . . . . . http://www.habman.com/mfl/

#12 bonscott

bonscott

    Veteran

  • Members
  • PipPipPip
  • 7,681 posts

Posted 08 August 2007 - 09:36 AM

Excellent. No idea how I missed this last year but I've got in on my site now for testing for this year. This should be something Kevin incorporates into MFL by default.


 


#13 bonscott

bonscott

    Veteran

  • Members
  • PipPipPip
  • 7,681 posts

Posted 09 August 2007 - 09:01 AM

I'm using the new "Huddle 2007" skin and I notice that the lines for the TD's are not showing up in the chat window. No big deal but thought I'd point it out.


 


#14 habman

habman

    Veteran

  • Members
  • PipPipPip
  • 2,627 posts

Posted 09 August 2007 - 01:28 PM

I'm using the new "Huddle 2007" skin and I notice that the lines for the TD's are not showing up in the chat window. No big deal but thought I'd point it out.


Try a CTRL-F5 and you should see a little bit of a difference.
My MFL scripts . . . . . . . . http://www.habman.com/mfl/

#15 DKups

DKups

    Veteran

  • Members
  • PipPipPip
  • 196 posts

Posted 09 August 2007 - 03:00 PM


I'm using the new "Huddle 2007" skin and I notice that the lines for the TD's are not showing up in the chat window. No big deal but thought I'd point it out.


Try a CTRL-F5 and you should see a little bit of a difference.



Question:

I'd like to change the "summon to chat room" button to allow upto 3 attempts per session, instead of 1.... is there a way to do it? Or even unlimited.... sometimes, 1 is too few, as users come and go a different times.

Regardless, great utility!
-=|>DKups <|=-