Welcome Guest ( Log In | Register )

5 Pages V   1 2 3 > »   
Reply to this topicStart new topic
> Chat Module Enhancement, bottom up option, improved sound & more
habman
post Dec 16 2006, 04:23 PM
Post #1


Veteran
***

Group: Members
Posts: 1948
Joined: 29-August 05
From: Leamington ON, Canada
Member No.: 3058

2009 MFL: 31589 , 24836


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.myfantasyleague.com/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.

CODE
<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.
CODE
<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/
Go to the top of the page
 
+Quote Post
turnit643
post Dec 21 2006, 01:19 PM
Post #2


Member
**

Group: Members
Posts: 17
Joined: 19-December 06
Member No.: 5057



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.
Go to the top of the page
 
+Quote Post
habman
post Dec 21 2006, 02:37 PM
Post #3


Veteran
***

Group: Members
Posts: 1948
Joined: 29-August 05
From: Leamington ON, Canada
Member No.: 3058

2009 MFL: 31589 , 24836


QUOTE (turnit643 @ Dec 21 2006, 02: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.


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/
Go to the top of the page
 
+Quote Post
turnit643
post Dec 21 2006, 03:36 PM
Post #4


Member
**

Group: Members
Posts: 17
Joined: 19-December 06
Member No.: 5057



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.
Go to the top of the page
 
+Quote Post
tpal70
post Jan 19 2007, 11:27 PM
Post #5


Veteran
***

Group: Members
Posts: 50
Joined: 13-September 06
Member No.: 4851



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
Go to the top of the page
 
+Quote Post
habman
post Jan 20 2007, 09:01 AM
Post #6


Veteran
***

Group: Members
Posts: 1948
Joined: 29-August 05
From: Leamington ON, Canada
Member No.: 3058

2009 MFL: 31589 , 24836


QUOTE (tpal70 @ Jan 20 2007, 12:27 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/
Go to the top of the page
 
+Quote Post
Fengshui
post Feb 16 2007, 02:12 PM
Post #7


Veteran
***

Group: Members
Posts: 78
Joined: 15-December 06
Member No.: 5053



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.myfantasyleague.com/2006/home/73342.

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

Thanks for any help you can provide.
Go to the top of the page
 
+Quote Post
Fengshui
post Feb 21 2007, 08:29 AM
Post #8


Veteran
***

Group: Members
Posts: 78
Joined: 15-December 06
Member No.: 5053



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.gif
Go to the top of the page
 
+Quote Post
Bluetooth
post Jun 18 2007, 05:33 PM
Post #9


Veteran
***

Group: Members
Posts: 53
Joined: 7-September 04
Member No.: 1499



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.
Go to the top of the page
 
+Quote Post
bonscott
post Aug 8 2007, 09:17 AM
Post #10


Veteran
***

Group: Members
Posts: 4718
Joined: 22-February 04
Member No.: 31

2009 MFL: 33218


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.


--------------------
Scott

All Rosters code: http://sidelineleagues.com/forums/index.php?showtopic=18864
Custom CSS upload: http://sidelineleagues.com/forums/index.php?showtopic=15112

Do *NOT* look at the boxscores on nfl.com They are known to be unreliable and rarely updated. You should be looking at the GameBook for the game for the most "official" stats that are available to the public.

Also as noted live scoring on MFL is not official and often defensive stats are delayed. Once the final stats are out early Tuesday after the Monday night game then see what happens.
Go to the top of the page
 
+Quote Post
habman
post Aug 8 2007, 09:29 AM
Post #11


Veteran
***

Group: Members
Posts: 1948
Joined: 29-August 05
From: Leamington ON, Canada
Member No.: 3058

2009 MFL: 31589 , 24836


QUOTE (bonscott @ Aug 8 2007, 11: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.



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/
Go to the top of the page
 
+Quote Post
bonscott
post Aug 8 2007, 09:36 AM
Post #12


Veteran
***

Group: Members
Posts: 4718
Joined: 22-February 04
Member No.: 31

2009 MFL: 33218


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.


--------------------
Scott

All Rosters code: http://sidelineleagues.com/forums/index.php?showtopic=18864
Custom CSS upload: http://sidelineleagues.com/forums/index.php?showtopic=15112

Do *NOT* look at the boxscores on nfl.com They are known to be unreliable and rarely updated. You should be looking at the GameBook for the game for the most "official" stats that are available to the public.

Also as noted live scoring on MFL is not official and often defensive stats are delayed. Once the final stats are out early Tuesday after the Monday night game then see what happens.
Go to the top of the page
 
+Quote Post
bonscott
post Aug 9 2007, 09:01 AM
Post #13


Veteran
***

Group: Members
Posts: 4718
Joined: 22-February 04
Member No.: 31

2009 MFL: 33218


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.


--------------------
Scott

All Rosters code: http://sidelineleagues.com/forums/index.php?showtopic=18864
Custom CSS upload: http://sidelineleagues.com/forums/index.php?showtopic=15112

Do *NOT* look at the boxscores on nfl.com They are known to be unreliable and rarely updated. You should be looking at the GameBook for the game for the most "official" stats that are available to the public.

Also as noted live scoring on MFL is not official and often defensive stats are delayed. Once the final stats are out early Tuesday after the Monday night game then see what happens.
Go to the top of the page
 
+Quote Post
habman
post Aug 9 2007, 01:28 PM
Post #14


Veteran
***

Group: Members
Posts: 1948
Joined: 29-August 05
From: Leamington ON, Canada
Member No.: 3058

2009 MFL: 31589 , 24836


QUOTE (bonscott @ Aug 9 2007, 11: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.


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


--------------------
My MFL scripts . . . . . . . . http://www.habman.com/mfl/
Go to the top of the page
 
+Quote Post
DKups
post Aug 9 2007, 03:00 PM
Post #15


Veteran
***

Group: Members
Posts: 196
Joined: 23-August 06
From: Ontario, Canada
Member No.: 4641



QUOTE (habman @ Aug 9 2007, 01:28 PM) *
QUOTE (bonscott @ Aug 9 2007, 11: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.


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 <|=-
Go to the top of the page
 
+Quote Post

5 Pages V   1 2 3 > » 
Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



Lo-Fi Version Time is now: 3rd September 2010 - 11:50 PM