inherit
First Contributor
66253
0
Mar 18, 2024 11:09:20 GMT -8
aRMY83
2,925
December 2005
army83
|
Post by aRMY83 on Jan 2, 2014 11:50:16 GMT -8
Thought I'd share what I came across the other day when doing a search for "Blink".
Let us do a simple "Member is Online" in the Mini-Profile to blink.
Place this code in your Global Footer:
<script type="text/javascript"> function blink() { var blinks = document.getElementsByTagName('blink'); for (var i = blinks.length - 1; i >= 0; i--) { var s = blinks[i]; s.style.visibility = (s.style.visibility === 'visible') ? 'hidden' : 'visible'; } window.setTimeout(blink, 1000); } if (document.addEventListener) document.addEventListener("DOMContentLoaded", blink, false); else if (window.addEventListener) window.addEventListener("load", blink, false); else if (window.attachEvent) window.attachEvent("onload", blink); else window.onload = blink; </script>
Change window.setTimeout(blink, 1000); for the rate of blinking. The lower the number, the faster the blink rate. Default = 1000
Now to have "Member is Online" blink:
Go to Admin > Structure > Layout Templates > Mini-Profile
and look for (line 27 or so)
{if $[user.is_online]}<br /><span class="italic">Member is Online</span>{/if}
and place this:
<blink> just before Member
and this </blink> right after Online
so it will now look like this:
{if $[user.is_online]}<br /><span class="italic"><blink>Member is Online</blink>{/if}
If you would like to see an example, then place this:
<center><font size="3" color="#00ff00"><blink>Text to blink here</blink></font></center><br />
in your global or main header.
|
|
inherit
First Contributor
66253
0
Mar 18, 2024 11:09:20 GMT -8
aRMY83
2,925
December 2005
army83
|
Post by aRMY83 on Jan 3, 2014 6:28:21 GMT -8
Hello jrryanThey do work somewhat identical, but the best way to explain it is this: The blink element is a non-standard presentational HTML element that indicates to a user agent (generally a web browser) that the page author intends the content of the element to blink (that is, alternate between being visible and invisible). and pulsate is to make a text link glow/pulsate continuously while staying visible. I'm sure others may have a better definition of blink vs. pulsate (coding terms) and if so, please input. To get a better feel of the difference, take a look here: Test SiteThe white "Gender" is blinking and the red "I am offline" is pulsating. Will keep this link for all to view until 10 January 2014 in which it then will be closed for viewing. Thanks on the "congrats on that code".
|
|
inherit
169146
0
Apr 7, 2024 5:23:13 GMT -8
Forever Sunshine
Fingerprints don't fade from the lives we touch. Great love & great achievement involve great risk.
1,743
July 2011
foreversunshine
|
Post by Forever Sunshine on Mar 12, 2014 11:19:28 GMT -8
I would love to have this for just the notifications bubble but am unsure how to accomplish this.
Can anyone help please?
Thanks
|
|
inherit
I need a new CT, thinking.... [insert Jeopardy theme song here]
110769
0
Aug 21, 2021 0:07:21 GMT -8
Tumbleweed
20,825
September 2007
tumbleweed
|
Post by Tumbleweed on Mar 13, 2014 6:36:16 GMT -8
I would love to have this for just the notifications bubble but am unsure how to accomplish this. Can anyone help please? Thanks Well, I got this far. I can get it to pulsate (sorry, not blink) but then it disappears and I'm really crappy at jquery/javascript so not sure how to make it return to it's original state. IT does returns after every newly loaded page so it could be a good thing if you really don't want those showing all the time and a bad thing if you do. In the global headers: <script> $(document).ready(function() { $( ".tip-holder" ).toggle( "pulsate" ); }); </script> However, this will pulsate until the messages/notifications tip goes away when you read message, check notifications: <script> $(document).ready(function() { $( ".tip-holder" ).toggle( "pulsate",{ times:3000 }, 500 ); }); </script> I'm trying to get it to pulsate a color but no luck so far. Oh, forgot to say, only tested in Chrome.
|
|
inherit
169146
0
Apr 7, 2024 5:23:13 GMT -8
Forever Sunshine
Fingerprints don't fade from the lives we touch. Great love & great achievement involve great risk.
1,743
July 2011
foreversunshine
|
Post by Forever Sunshine on Mar 13, 2014 7:44:50 GMT -8
Tumbleweed thanks so much for attempting it. Pulsating is what I want really; not blinking. So the second one in your post is the one to use for pulsating the little notifications bubbles? It makes sense the bubble will only pulsate when visible. I'm not too worried about color. But wouldn't it be just a matter of picking a color in the Visual Editor? I can't remember if that's where I saw it.
|
|
inherit
I need a new CT, thinking.... [insert Jeopardy theme song here]
110769
0
Aug 21, 2021 0:07:21 GMT -8
Tumbleweed
20,825
September 2007
tumbleweed
|
Post by Tumbleweed on Mar 13, 2014 11:43:02 GMT -8
Tumbleweed thanks so much for attempting it. Pulsating is what I want really; not blinking. So the second one in your post is the one to use for pulsating the little notifications bubbles? It makes sense the bubble will only pulsate when visible. I'm not too worried about color. But wouldn't it be just a matter of picking a color in the Visual Editor? I can't remember if that's where I saw it. They both pulsate the bubbles. The first one does it a few times and then the bubble vanishes until you refresh the page or click on a board or something. Then it comes back, pulsates a few times and goes away again. Of course if you take action and read your pm's/notifications it won't appear again. The second one pulsates all the time until you take action to look at your notifications/pm's. So it will pulsate for eternity until you take care look at the pm's/notifications. And whichever code you decide on, goes in your global headers. The color thing, I just thought it would be cool, when it pulsates, it would change color. I was just doing that more for the sake of just figuring out how to do it.
|
|
inherit
169146
0
Apr 7, 2024 5:23:13 GMT -8
Forever Sunshine
Fingerprints don't fade from the lives we touch. Great love & great achievement involve great risk.
1,743
July 2011
foreversunshine
|
Post by Forever Sunshine on Mar 13, 2014 11:45:43 GMT -8
Tumbleweed that would be pretty cool if it pulsated different colors. If you continue to work on it and figure it out, tag me please. If not, no big deal on my end. Thank you so much for your effort.
|
|
inherit
169267
0
Nov 27, 2024 17:55:05 GMT -8
Mike
Praise God Almighty!
1,534
July 2011
riccetts
|
Post by Mike on Mar 15, 2014 20:25:13 GMT -8
aRMY83, Thanks for the code. I want the new icon to blink for new threads. How would I do that? Edit:Never mind army83 got with it
|
|