friendsterTalk - Friendster Forum

friendsterTalk - Friendster Forum

Welcome guest! Please Login or Register.

  • JavaScript
  •  » Flashing Text Replacing Your Google Ads / In Your Shoutout Box

#1  2008-01-08 17:06:50

andHa
» Moderator
andHa's display avatar
ﺃ ﻧﺪ
Class-S
Location: unable to locate
Registered: 2007-05-23
Posts: 4055
Reputation: 157

Flashing Text Replacing Your Google Ads / In Your Shoutout Box

:arrow:  Flashing Text Replacing Your Google Ads


var fcontent=new Array();
begintag='<div style="font: normal 12px Century Gothic; padding: 1px;">';
fcontent[0]="TEXT HERE";
fcontent[1]="TEXT HERE";
fcontent[2]="TEXT HERE";
fcontent[3]="TEXT HERE";
closetag='</div>';


//No need to edit below this line//

var delay = 1000;
var maxsteps=20;
var stepdelay=20;

var startcolor= new Array(255,255,255);
var endcolor=new Array(0,0,0);

var fwidth='150px';
var fheight='300px';

var fadelinks=1;

var ie4=document.all&&!document.getElementById;
var DOM2=document.getElementById;
var faderdelay=0;
var index=0;



function changecontent(){
  if (index>=fcontent.length)
    index=0
  if (DOM2){
    document.getElementById("14").style.color="rgb("+startcolor[0]+", "+startcolor[1]+", "+startcolor[2]+")"
    document.getElementById("14").innerHTML=begintag+fcontent[index]+closetag
    if (fadelinks)
      linkcolorchange(1);
    colorfade(1, 15);
  }
  else if (ie4)
    document.all.fscroller.innerHTML=begintag+fcontent[index]+closetag;
  index++
}



function linkcolorchange(step){
  var obj=document.getElementById("14");
  if (obj.length>0){
    for (i=0;i<obj.length;i++)
      obj[i].style.color=getstepcolor(step);
  }
}

var fadecounter;
function colorfade(step) {
  if(step<=maxsteps) {   
    document.getElementById("14").style.color=getstepcolor(step);
    if (fadelinks)
      linkcolorchange(step);
    step++;
    fadecounter=setTimeout("colorfade("+step+")",stepdelay);
  }else{
    clearTimeout(fadecounter);
    document.getElementById("14").style.color="rgb("+endcolor[0]+", "+endcolor[1]+", "+endcolor[2]+")";
    setTimeout("changecontent()", delay);
   
  }   
}


function getstepcolor(step) {
  var diff
  var newcolor=new Array(3);
  for(var i=0;i<3;i++) {
    diff = (startcolor[i]-endcolor[i]);
    if(diff > 0) {
      newcolor[i] = startcolor[i]-(Math.round((diff/maxsteps))*step);
    } else {
      newcolor[i] = startcolor[i]+(Math.round((Math.abs(diff)/maxsteps))*step);
    }
  }
  return ("rgb(" + newcolor[0] + ", " + newcolor[1] + ", " + newcolor[2] + ")");
}

if (ie4||DOM2)
  document.write('<div id="14" style="border:0px solid black;width:'+fwidth+';height:'+fheight+'"></div>');

if (window.addEventListener)
window.addEventListener("load", changecontent, false)
else if (window.attachEvent)
window.attachEvent("onload", changecontent)
else if (document.getElementById)
window.onload=changecontent

:arrow:  Flashing Text In Your Shoutout (thx to dracoknight09 for the idea)

var fcontent=new Array();
begintag='<div style="font: normal 12px Century Gothic; padding: 1px;">';
fcontent[0]="TEXT HERE";
fcontent[1]="TEXT HERE";
fcontent[2]="TEXT HERE";
fcontent[3]="TEXT HERE";
closetag='</div>';


//No need to edit below this line//

var delay = 1000;
var maxsteps=20;
var stepdelay=20;

var startcolor= new Array(255,255,255);
var endcolor=new Array(0,0,0);

var fwidth='150px';
var fheight='300px';

var fadelinks=1;

var ie4=document.all&&!document.getElementById;
var DOM2=document.getElementById;
var faderdelay=0;
var index=0;



function changecontent(){
  if (index>=fcontent.length)
    index=0
  if (DOM2){
    document.getElementById("cpShoutoutBox").style.color="rgb("+startcolor[0]+", "+startcolor[1]+", "+startcolor[2]+")"
    document.getElementById("cpShoutoutBox").innerHTML=begintag+fcontent[index]+closetag
    if (fadelinks)
      linkcolorchange(1);
    colorfade(1, 15);
  }
  else if (ie4)
    document.all.fscroller.innerHTML=begintag+fcontent[index]+closetag;
  index++
}



function linkcolorchange(step){
  var obj=document.getElementById("cpShoutoutBox");
  if (obj.length>0){
    for (i=0;i<obj.length;i++)
      obj[i].style.color=getstepcolor(step);
  }
}

var fadecounter;
function colorfade(step) {
  if(step<=maxsteps) {   
    document.getElementById("cpShoutoutBox").style.color=getstepcolor(step);
    if (fadelinks)
      linkcolorchange(step);
    step++;
    fadecounter=setTimeout("colorfade("+step+")",stepdelay);
  }else{
    clearTimeout(fadecounter);
    document.getElementById("cpShoutoutBox").style.color="rgb("+endcolor[0]+", "+endcolor[1]+", "+endcolor[2]+")";
    setTimeout("changecontent()", delay);
   
  }   
}


function getstepcolor(step) {
  var diff
  var newcolor=new Array(3);
  for(var i=0;i<3;i++) {
    diff = (startcolor[i]-endcolor[i]);
    if(diff > 0) {
      newcolor[i] = startcolor[i]-(Math.round((diff/maxsteps))*step);
    } else {
      newcolor[i] = startcolor[i]+(Math.round((Math.abs(diff)/maxsteps))*step);
    }
  }
  return ("rgb(" + newcolor[0] + ", " + newcolor[1] + ", " + newcolor[2] + ")");
}

if (ie4||DOM2)
  document.write('<div id="cpShoutoutBox" style="border:0px solid black;width:'+fwidth+';height:'+fheight+'"></div>');

if (window.addEventListener)
window.addEventListener("load", changecontent, false)
else if (window.attachEvent)
window.attachEvent("onload", changecontent)
else if (document.getElementById)
window.onload=changecontent

:arrow: u can change the font properties.
:arrow: u also can add the number of content.
e.g

fcontent[0]="TEXT HERE";
fcontent[1]="TEXT HERE";
fcontent[2]="TEXT HERE";
fcontent[3]="TEXT HERE";
fcontent[4]="TEXT HERE";
fcontent[5]="TEXT HERE";
.............

credit goes to DYNAMIC DRIVE

a little modification by me.  :D

LIVE PREVIEW

Last edited by andHa (2008-01-30 15:08:07)



mine is none of your business !

#2  2008-01-08 18:00:04

wongudik
» FriendsterNewbie
wongudik's display avatar
Location: online storage...
Registered: 2007-10-25
Posts: 71
Last visit: 2008-08-13
Reputation: 2
Friendster

Re: Flashing Text Replacing Your Google Ads / In Your Shoutout Box

:o  waaaw.... andha  :thumbsup:

any good way to hiding suck ads  :eh:


#3  2008-01-08 18:05:39

andHa
» Moderator
andHa's display avatar
ﺃ ﻧﺪ
Class-S
Location: unable to locate
Registered: 2007-05-23
Posts: 4055
Reputation: 157

Re: Flashing Text Replacing Your Google Ads / In Your Shoutout Box

:D

actually u can replace it with image too.

but, sometimes it loads too slow.



mine is none of your business !

#4  2008-01-08 18:14:59

dna765mb
» FriendsterTalker
dna765mb's display avatar
Seeing My Believing......
Class X
Location: In Darkness
Registered: 2007-12-23
Posts: 181
Last visit: Yesterday
Reputation: 3
Friendster

Re: Flashing Text Replacing Your Google Ads / In Your Shoutout Box

i will test it for my profile



NoDevil NoAngel
For
Deathly Black Parade

#5  2008-01-08 18:32:44

burnok
» FriendsterNewbie
burnok's display avatar
[we're doing it]
Location: pilipins, earth
Registered: 2007-12-10
Posts: 88
Last visit: 2008-09-10
Reputation: ~

Re: Flashing Text Replacing Your Google Ads / In Your Shoutout Box

aws....its working but it apperas at the top of my friends' box...and the google ad is still there...


The World is Too Small for My Desires

#6  2008-01-08 18:45:16

ducheszv
» Moderator
ducheszv's display avatar
[ E:// i love you ]
Class-S
Location: up there, down ere
Registered: 2007-06-01
Posts: 7565
Reputation: 296

Re: Flashing Text Replacing Your Google Ads / In Your Shoutout Box

:lol:  this is nice andha!  :D  :thumbsup:




I love you. More than I show you. More than you know. I love you so much :kiss:

#7  2008-01-08 18:48:03

andHa
» Moderator
andHa's display avatar
ﺃ ﻧﺪ
Class-S
Location: unable to locate
Registered: 2007-05-23
Posts: 4055
Reputation: 157

Re: Flashing Text Replacing Your Google Ads / In Your Shoutout Box

@ burnok

try to refresh it bro.

i tried it just now, and it was working fine in my test page.

the ads replaced by the text.

@ duchesz

thx sist.
:D
just want to share it.

Last edited by andHa (2008-01-08 18:50:21)



mine is none of your business !

#8  2008-01-08 18:52:19

wongudik
» FriendsterNewbie
wongudik's display avatar
Location: online storage...
Registered: 2007-10-25
Posts: 71
Last visit: 2008-08-13
Reputation: 2
Friendster

Re: Flashing Text Replacing Your Google Ads / In Your Shoutout Box

hmmm.. andha... i was looking  ur live preview and i see u was using css for hiding google ads right??

so how about if not using css for hiding google ads??  =|  is this still work?


but any way i very like u live preview   :P

Last edited by wongudik (2008-01-08 18:53:58)


#9  2008-01-08 18:55:25

andHa
» Moderator
andHa's display avatar
ﺃ ﻧﺪ
Class-S
Location: unable to locate
Registered: 2007-05-23
Posts: 4055
Reputation: 157

Re: Flashing Text Replacing Your Google Ads / In Your Shoutout Box

^

iap sist.

i'm using the css code for hiding ads.
but, the code will still working even u hide or not the ads.
:D

and, that is my shared layout that i've ever shared in this forum.
:D

Last edited by andHa (2008-01-08 18:56:15)



mine is none of your business !

#10  2008-01-08 19:17:50

burnok
» FriendsterNewbie
burnok's display avatar
[we're doing it]
Location: pilipins, earth
Registered: 2007-12-10
Posts: 88
Last visit: 2008-09-10
Reputation: ~

Re: Flashing Text Replacing Your Google Ads / In Your Shoutout Box

sir! its working....thanks! cool code....lol... :thumbsup:  :thumbsup:


The World is Too Small for My Desires

#11  2008-01-08 19:18:09

AFZULNIZAM
» Moderator
AFZULNIZAM's display avatar
.White Protector.
Location: Kuala Lumpur
Registered: 2007-09-14
Posts: 6125
Reputation: 308

Re: Flashing Text Replacing Your Google Ads / In Your Shoutout Box

hoho....nice code...bagus-bagus :thumbsup:

Last edited by AFZULNIZAM (2008-05-15 03:18:06)



click image above to join wp group :penguin:
Copyright © 2002–2008

#12  2008-01-08 19:43:50

kamille01
» Banned
kamille01's display avatar
i'm a newbie
Location: bantay ilocos-sur
Registered: 2007-12-13
Posts: 55
Last visit: 2008-01-08
Reputation: -1
???

Re: Flashing Text Replacing Your Google Ads / In Your Shoutout Box

wow!! i'll try dis Later!!  =)

#13  2008-01-09 05:56:35

j0hnc3na
» FriendsterAddict
j0hnc3na's display avatar
U Cant See Me!!!
Location: The Squared Circle
Registered: 2007-09-29
Posts: 377
Last visit: Yesterday
Reputation: 3
Friendster

Re: Flashing Text Replacing Your Google Ads / In Your Shoutout Box

how come i cant see it in the preview profile?




Read the rules or be WARNED...
much worst , be
BANNED...

#14  2008-01-09 10:12:28

jhoncy201
» FriendsterTalker
jhoncy201's display avatar
Visions sumtyms Illusions
Registered: 2007-12-18
Posts: 156
Last visit: Yesterday
Reputation: ~
Friendster

Re: Flashing Text Replacing Your Google Ads / In Your Shoutout Box

wew!.. thankz for sharing  :D


NOTHING!!

#15  2008-01-09 10:27:29

Lordheinz
» Banned
^ trashed
Registered: 2007-06-26
Posts: 5178
Last visit: 2008-09-11
Reputation: 242

Re: Flashing Text Replacing Your Google Ads / In Your Shoutout Box

This one is cool bro...but i couldnt see any flashing object or words..only the friendster logo..
i like your css anyway! cheers!

Last edited by lordheinz (2008-01-09 10:36:02)


Thank you so much FRIENDSTERTALK...

#16  2008-01-09 11:02:01

sahabat.peterpan
» SuperFriendster
sahabat.peterpan's display avatar
Rockstars
Registered: 2007-10-31
Posts: 8431
Reputation: 58

Re: Flashing Text Replacing Your Google Ads / In Your Shoutout Box

thanks 4 share!  :thumbsup:


#17  2008-01-09 11:05:55

andHa
» Moderator
andHa's display avatar
ﺃ ﻧﺪ
Class-S
Location: unable to locate
Registered: 2007-05-23
Posts: 4055
Reputation: 157

Re: Flashing Text Replacing Your Google Ads / In Your Shoutout Box

@ jOhnc3na & lordheinz

just refresh, if u can't see it.
i saw my shared profile just now.
here is the screenshot  :thumbsdown:



:D

Last edited by andHa (2008-01-09 11:07:20)



mine is none of your business !

#18  2008-01-09 11:09:18

itsmekristalyn
» FriendsterTalker
itsmekristalyn's display avatar
im friendly..
Location: Philippines
Registered: 2007-10-04
Posts: 181
Last visit: 2008-03-22
Reputation: ~
Friendster

Re: Flashing Text Replacing Your Google Ads / In Your Shoutout Box

tnx 4 sharing..

#19  2008-01-09 11:13:43

dale
» Moderator
dale's display avatar
Clique Mee
Location: G.Lagro.subd.
Registered: 2007-05-24
Posts: 7196
Last visit: 2008-11-29
Reputation: 67
Friendster

Re: Flashing Text Replacing Your Google Ads / In Your Shoutout Box

thanks! andha!! :cool:


#20  2008-01-09 11:57:29

fullyalive
» FriendsterAddict
fullyalive's display avatar
hacking itu apa kk?
Location: in the EyeOfStorm
Registered: 2008-01-02
Posts: 308
Last visit: Yesterday
Reputation: 1

Re: Flashing Text Replacing Your Google Ads / In Your Shoutout Box

how if we want to change the font with a pic ??


____________________________
keep skatin' die or exist     
____________________________

  • JavaScript
  •  » Flashing Text Replacing Your Google Ads / In Your Shoutout Box

Search Friendstertalk

Board footer

FriendsterTalk is not affiliated with Friendster.com
Copyright © 2002–2008 PunBB

[ 28 queries - 2.442 second ]

Pay Per Click Ads by pay per click advertising by Kontera

FriendsterTalk.com x

Welcome to FriendsterTalk! You'll need to login in order to fully use all the features and view all the sections of this site.

Please register if you're not yet a member. =)