IOD Supporter
Member Bio
Currently: Offline
Joined: January 2011
Gender: Female
Posts: 998
|
Post by JJ on Dec 16, 2011 3:08:35 GMT 1
JJ - You can add as much text as you want as it will auto wrap. It all depends on the size of the box and your font size - Trial and error ! If you put in too much text it just wont show up - you wont break it ! If you have an image of a scroll the width of the box you could put in: '<img src=" to your image.jpg" border="0" > The text you want here between the scrolls <img src="http:// URL to your image .jpg" border="0" >' Which would put a scroll above and below the text - The choice is yours ! So you can have just text - just an image - or mix the two ! It's all a bit trial and error as everybody will have different dimensions to play with. This is the post I was basing my attempt on, Speed. But I don't know if he ever tested it himself. I will give your code a try. Thanks.
|
|
IOD Supporter
Member Bio
Currently: Offline
Joined: January 2011
Gender: Female
Posts: 998
|
Post by JJ on Dec 16, 2011 3:18:41 GMT 1
Well, all frames work, Speed. But the scroll opens on it's own frame. I was trying to hang onto the personalized messge to the guest or member, but I think I might have to pass on that. I can make a graphic the size I need with the appropriate text and not have to jump through all these hoops.
I really appreciate your personal attention. It calmed me down, I was getting so frustratred. Thanks.
|
|
v5 Theme Support
Just passing through
Member Bio
Currently: Offline
Joined: April 2011
Gender: Male
Posts: 6,000
SemiTrans Signature URL - Theme id 13: http://i.imgur.com/nHnDLrx.png
Badges
|
Post by Speed on Dec 16, 2011 3:18:59 GMT 1
JJ - You can add as much text as you want as it will auto wrap. It all depends on the size of the box and your font size - Trial and error ! If you put in too much text it just wont show up - you wont break it ! If you have an image of a scroll the width of the box you could put in: '<img src=" to your image.jpg" border="0" > The text you want here between the scrolls <img src="http:// URL to your image .jpg" border="0" >' Which would put a scroll above and below the text - The choice is yours ! So you can have just text - just an image - or mix the two ! It's all a bit trial and error as everybody will have different dimensions to play with. This is the post I was basing my attempt on, Speed. But I don't know if he ever tested it himself. I will give your code a try. Thanks. It is not really "my" code JJ, LOL, I just reworked part of the code you edited to keep it from freezing. My theory was that you were putting the images and the text together and it did not like it. As for what you were trying to achieve, <i>pebble</i> will have to look it that, it maybe just a way of re entering the code to accept it.
Edit: after reading your code above that you posted while I was typing,
You are welcome
|
|
IOD Supporter
Member Bio
Currently: Offline
Joined: January 2011
Gender: Female
Posts: 998
|
Post by JJ on Dec 16, 2011 3:32:22 GMT 1
I won't give up, Speed. But I am going to move on. I'm going to fix up a couple of grapics to fill in one of those frames, might skip the other, don't know. But I adore this code, it's really spiffy and I am anxious to use it. I've been doing this for six and a half years and it's so refreshing to find something spiffy and new. I felt the same about Sub's Peekaboo side tables... genius. And so is <i>pebble</i>'s code.
Sub, you are missed.
|
|
IOD Supporter
Member Bio
Currently: Offline
Joined: March 2011
Gender: Male
Posts: 2,442
SemiTrans Signature URL - Theme id 13: http://storage.proboards.com/2815617/i/4VPN0K_NOTLnvUJjv0Dy.png
Badges
|
Post by <i>pebble</i> on Dec 16, 2011 12:54:25 GMT 1
Hi JJ (and cheers for the help Speed), I'm just passing through but I'll have some time later today and will take a look. Edit: Have a look here JJ: This is how the line should look for the image-text-image: ['<img src="http://i36.photobucket.com/albums/e31/AlsoJJ/Album3/New%20Look/11111/ScrollThree121511.png" border="0"><br />Hello '+pb_displayname+' Thanks for visiting.<br /><img src="http://i36.photobucket.com/albums/e31/AlsoJJ/Album3/New%20Look/11111/ScrollThree121511.png" border="0">','http://hootyowl.proboards.com/index.cgi','_self',6,6] , I've added a <br /> after the first image and after the text to make sure that they line up properly. Although they wrap it doesn't put everything on a new line so you need the <br /> (line break) So , yes, you can have images and text in the same line but you need to make sure everything lines up by adding the line breaks after each image/text.
|
|
v5 Theme Support
Just passing through
Member Bio
Currently: Offline
Joined: April 2011
Gender: Male
Posts: 6,000
SemiTrans Signature URL - Theme id 13: http://i.imgur.com/nHnDLrx.png
Badges
|
Post by Speed on Dec 16, 2011 15:35:57 GMT 1
Ahhhhhh yes the line breaks! I knew it had to be something simple Y/w and no problem <i>pebble</i> the code rocks!
|
|
IOD Supporter
Member Bio
Currently: Offline
Joined: January 2011
Gender: Female
Posts: 998
|
Post by JJ on Dec 16, 2011 16:23:24 GMT 1
Thank you, <i>pebble</i>. It makes perfect sense now. The graphics won't wrap like text so the code just said, "No," and put it's foot down. You actually put the new line right where I intended to put it when I finished. Thanks When I loaded the final version of the code, I copied and pasted my images from the original one you posted some days ago to the new one. I notice that in the line before the part where it changed to the two text layers that there is this snippet of code < / a >. But it is not in the newer version. What is that for? I was thinking of not using those two frames for text but didn't know what to do with that snippet if I did or if it was important. You are right, Speed Demon, the code rocks. Thanks for your help last night.
|
|
IOD Supporter
Member Bio
Currently: Offline
Joined: March 2011
Gender: Male
Posts: 2,442
SemiTrans Signature URL - Theme id 13: http://storage.proboards.com/2815617/i/4VPN0K_NOTLnvUJjv0Dy.png
Badges
|
Post by <i>pebble</i> on Dec 16, 2011 18:36:56 GMT 1
Glad it's working for you JJ. The </a> in the code Must have been left over from something I was doing and now been cleaned out ! Just delete it, it shouldn't be there.
|
|
IOD Supporter
Member Bio
Currently: Offline
Joined: January 2011
Gender: Female
Posts: 998
|
Post by JJ on Dec 16, 2011 18:41:03 GMT 1
Ok, thanks.
|
|
Deleted
Member Bio
Currently: Offline
Joined: January 1970
Gender: Undisclosed
Posts: 0
|
Post by Deleted on Dec 16, 2011 22:24:20 GMT 1
<i>pebble</i>... Absolutely GREAT! my friend and you can count on myself using this code with a new cat/board I'm working on (US Veterans theatre's) that should be online, sometime after the new year or shortly thereafter. As an example below, how do I remove this: ['And you can add some text to this as well. PHOTOS COPYRIGHT OF <i>pebble</i>',' ','_top',3,1] , so there is no linking?
|
|
IOD Supporter
Member Bio
Currently: Offline
Joined: March 2011
Gender: Male
Posts: 2,442
SemiTrans Signature URL - Theme id 13: http://storage.proboards.com/2815617/i/4VPN0K_NOTLnvUJjv0Dy.png
Badges
|
Post by <i>pebble</i> on Dec 17, 2011 16:38:42 GMT 1
Here you go aRMY, grab a copy of this new code with the link parts taken out. <style type="text/css"> #scrlbox { background-image:url('http://i1136.photobucket.com/albums/n494/<i>pebble</i>league/slideshowback.png'); border-color: #FF0000; position:relative; } #prld { display:none; } .txtscr { font-family:verdana; font-size:15; color: #FFFFFF; font-weight: bold; text-align:center; } </style>
<center> <script type="text/javascript"> /* Text Scroller / Photo Slideshow (or both) with optional scroll in/out directions, */ /* random order, preload, written by <i>pebble</i>. */ /* Feel free to use but please leave this header in tact - Do not repost.*/
var scrlrheight=120; /* height of the box */ var scrlrwidth=150; /* width of box */ var scrollbg= '#FF0000'; /* backgroundcolor of the box set image in css */ var stilltime=3500; /* pause time of the text/image in milliseconds*/ var brdr=10; /* Border size around box */ var brdrstyl='ridge'; /* border style */ var step=1; /* smoothness of effect : 1=smooth but slow */ var fxspd=15; /* Speed of effect fastest=1 : slowest=99 */ var mixmsgs=0; /* randomize images/text=1 : in order=0 */ var preld=1; /* preload images=1 : no preload=0 */
/* ['IMAGEsrcORtext','URLdestination','OPENinNEWwindowORnot',type of fxin(1-7),type of fxout(1-7)], (no comma on last entry) */
var msg=[ ['<img src="http://i1136.photobucket.com/albums/n494/<i>pebble</i>league/Antarcticadecember2005192.jpg" border="0" >',1,1] , ['<img src="http://i1136.photobucket.com/albums/n494/<i>pebble</i>league/Antarcticadecember2005191.jpg" border="0" >',7,7] , ['<img src="http://i1136.photobucket.com/albums/n494/<i>pebble</i>league/photo3.jpg" border="0">',3,3] , ['<img src="http://i1136.photobucket.com/albums/n494/<i>pebble</i>league/photo2.jpg" border="0">',4,4] , ['<img src="http://i1136.photobucket.com/albums/n494/<i>pebble</i>league/photo1.jpg" border="0">',5,5] , ['Welcome '+pb_displayname+' To <i>pebble</i>test2. Click Here To Go To <i>pebble</i>league.com',6,6] , ['And you can add some text to this as well. PHOTOS COPYRIGHT OF <i>pebble</i>',2,2] // no comma on last entry ];
/* DO NOT TOUCH ANYTHING BELOW HERE */
var clipright=0; var cliptop=0; var clipbottom=0; var clipleft=0; var msgcount=-1; var isMSIE = /*@cc_on!@*/0;
if(preld){for (i=0; i<msg.length-1;i++){ var patt=/img/gi if(msg[i][0].match(patt)){document.write('<div id="prld">'+msg[i][0]+'</div>')}}}
function fxin(){ switch(msg[msgcount][1]){ case 1: if (parseInt(document.getElementById('scrlrtext').style.top)>0) { clipbottom+=step document.getElementById('scrlrtext').style.clip="rect("+cliptop+" "+clipright+" "+clipbottom+" "+clipleft+")" document.getElementById('scrlrtext').style.top=parseInt(document.getElementById('scrlrtext').style.top)-step var timer=setTimeout("fxin()",fxspd)} else { clearTimeout(timer) var timer=setTimeout("fxout()",stilltime) } break; case 2: if ((parseInt(document.getElementById('scrlrtext').style.left))>0) { clipright+=step document.getElementById('scrlrtext').style.clip="rect("+cliptop+" "+clipright+" "+clipbottom+" "+clipleft+")" document.getElementById('scrlrtext').style.left=parseInt(document.getElementById('scrlrtext').style.left)-step var timer=setTimeout("fxin()",fxspd)} else { clearTimeout(timer) var timer=setTimeout("fxout()",stilltime) } break; case 3: if (parseInt(document.getElementById('scrlrtext').style.left)<0) { clipleft-=step document.getElementById('scrlrtext').style.clip="rect("+cliptop+" "+clipright+" "+clipbottom+" "+clipleft+")" document.getElementById('scrlrtext').style.left=parseInt(document.getElementById('scrlrtext').style.left)+step var timer=setTimeout("fxin()",fxspd)} else { clearTimeout(timer) var timer=setTimeout("fxout()",stilltime) } break; case 4: if (parseInt(document.getElementById('scrlrtext').style.top)<0) { cliptop-=step document.getElementById('scrlrtext').style.clip="rect("+cliptop+" "+clipright+" "+clipbottom+" "+clipleft+")" document.getElementById('scrlrtext').style.top=parseInt(document.getElementById('scrlrtext').style.top)+step var timer=setTimeout("fxin()",fxspd)} else { clearTimeout(timer) var timer=setTimeout("fxout()",stilltime) } break; case 5: if (cliptop>0){ cliptop-=step clipbottom+=step document.getElementById('scrlrtext').style.clip="rect("+cliptop+" "+clipright+" "+clipbottom+" "+clipleft+")" var timer=setTimeout("fxin()",fxspd)} else { clearTimeout(timer) var timer=setTimeout("fxout()",stilltime) } break; case 6: if (clipleft>0){ clipleft-=step clipright+=step document.getElementById('scrlrtext').style.clip="rect("+cliptop+" "+clipright+" "+clipbottom+" "+clipleft+")" var timer=setTimeout("fxin()",fxspd)} else { clearTimeout(timer) var timer=setTimeout("fxout()",stilltime) }break; case 7: if(cliptop>0||clipleft>0){ if (cliptop>0){ cliptop-=(step/2+(scrlrheight/scrlrwidth)) clipbottom+=(step/2+(scrlrheight/scrlrwidth))} if(clipleft>0){ clipleft-=(step/2+(scrlrwidth/scrlrheight)) clipright+=(step/2+(scrlrwidth/scrlrheight))} document.getElementById('scrlrtext').style.clip="rect("+cliptop+" "+clipright+" "+clipbottom+" "+clipleft+")" var timer=setTimeout("fxin()",fxspd)} else { clearTimeout(timer) var timer=setTimeout("fxout()",stilltime) }}}
function fxout(){ switch(msg[msgcount][2]){ case 1: if (parseInt(document.getElementById('scrlrtext').style.top)>-scrlrheight) { cliptop+=step document.getElementById('scrlrtext').style.clip="rect("+cliptop+" "+clipright+" "+clipbottom+" "+clipleft+")" document.getElementById('scrlrtext').style.top=parseInt(document.getElementById('scrlrtext').style.top)-step var timer=setTimeout("fxout()",fxspd)} else {clearTimeout(timer) nxtmsg() } break; case 3: if (parseInt(document.getElementById('scrlrtext').style.left)<scrlrwidth) { clipright-=step document.getElementById('scrlrtext').style.clip="rect("+cliptop+" "+clipright+" "+clipbottom+" "+clipleft+")" document.getElementById('scrlrtext').style.left=parseInt(document.getElementById('scrlrtext').style.left)+step var timer=setTimeout("fxout()",fxspd)} else {clearTimeout(timer) nxtmsg() }break; case 2: if (parseInt(document.getElementById('scrlrtext').style.left)>-scrlrwidth) { clipleft+=step document.getElementById('scrlrtext').style.clip="rect("+cliptop+" "+clipright+" "+clipbottom+" "+clipleft+")" document.getElementById('scrlrtext').style.left=parseInt(document.getElementById('scrlrtext').style.left)-step var timer=setTimeout("fxout()",fxspd)} else {clearTimeout(timer) nxtmsg() } break; case 4: if (parseInt(document.getElementById('scrlrtext').style.top)<scrlrheight) { clipbottom-=step document.getElementById('scrlrtext').style.clip="rect("+cliptop+" "+clipright+" "+clipbottom+" "+clipleft+")" document.getElementById('scrlrtext').style.top=parseInt(document.getElementById('scrlrtext').style.top)+step var timer=setTimeout("fxout()",fxspd)} else {clearTimeout(timer) nxtmsg() } break; case 5: if (cliptop<scrlrheight/2) { cliptop+=step clipbottom-=step document.getElementById('scrlrtext').style.clip="rect("+cliptop+" "+clipright+" "+clipbottom+" "+clipleft+")" var timer=setTimeout("fxout()",fxspd)} else {clearTimeout(timer) nxtmsg() }break; case 7: if(cliptop<scrlrheight/2||clipleft<scrlrwidth/2){ if(cliptop<scrlrheight/2){ cliptop+=(step/2+(scrlrheight/scrlrwidth)) clipbottom-=(step/2+(scrlrheight/scrlrwidth))} if(clipleft<scrlrwidth/2){ clipleft+=(step/2+(scrlrwidth/scrlrheight)) clipright-=(step/2+(scrlrwidth/scrlrheight))} document.getElementById('scrlrtext').style.clip="rect("+cliptop+" "+clipright+" "+clipbottom+" "+clipleft+")" var timer=setTimeout("fxout()",fxspd)} else {clearTimeout(timer) nxtmsg() }break; case 6: if (clipleft<scrlrwidth/2) { clipleft+=step clipright-=step document.getElementById('scrlrtext').style.clip="rect("+cliptop+" "+clipright+" "+clipbottom+" "+clipleft+")" var timer=setTimeout("fxout()",fxspd)} else {clearTimeout(timer) nxtmsg() }}}
function nxtmsg(){ clipright=0; cliptop=0; clipbottom=0; clipleft=0; document.getElementById('scrlrtext').style.top=0 document.getElementById('scrlrtext').style.left=0 msgcount++ if (msgcount>msg.length-1) {msgcount=0} if (mixmsgs){msgcount=(Math.floor(Math.random()*(msg.length)))} document.getElementById('scrlrtext').innerHTML="<table cellpadding=0 cellspacing=0><tr><td class='txtscr'>"+msg[msgcount][0]+"</td></tr></table>" if (msg[msgcount][1]==1){ clipright=scrlrwidth document.getElementById('scrlrtext').style.top=scrlrheight } else if (msg[msgcount][1]==2){ clipbottom=scrlrheight document.getElementById('scrlrtext').style.left=scrlrwidth } else if (msg[msgcount][1]==3){ clipright=scrlrwidth clipbottom=scrlrheight clipleft=scrlrwidth document.getElementById('scrlrtext').style.left=-scrlrwidth } else if (msg[msgcount][1]==5){ cliptop=scrlrheight/2 clipright=scrlrwidth clipbottom=scrlrheight/2+1 } else if (msg[msgcount][1]==6){ clipright=scrlrwidth/2+1 clipbottom=scrlrheight clipleft=scrlrwidth/2 } else if (msg[msgcount][1]==7){ cliptop=scrlrheight/2 clipright=scrlrwidth/2+1 clipbottom=scrlrheight/2 clipleft=scrlrwidth/2 } else if (msg[msgcount][1]==4){ cliptop=scrlrheight clipright=scrlrwidth clipbottom=scrlrheight document.getElementById('scrlrtext').style.top=-scrlrheight } document.getElementById('scrlrtext').style.clip="rect("+cliptop+" "+clipright+" "+clipbottom+" "+clipleft+")" fxin() } if (isMSIE) {document.write('<div id="scrlbox" style="width:'+(scrlrwidth+(2*brdr))+'px;height:'+(scrlrheight+(2*brdr))+'px;border-style:'+brdrstyl+'; border-width:'+brdr+';">')} else {document.write('<div id="scrlbox" style="width:'+(scrlrwidth)+'px;height:'+(scrlrheight)+'px;border-style:'+brdrstyl+'; border-width:'+brdr+';background-color:'+scrollbg+';">')}; document.write('<div id="scrlrtext" style="border:none;position:absolute;width:'+(scrlrwidth)+'px;height:'+scrlrheight+'px;"></div></div>') window.onload=nxtmsg </script> </center>
So this line : ['And you can add some text to this as well. PHOTOS COPYRIGHT OF <i>pebble</i>','http://www.<i>pebble</i>test.proboards.com','_top',3,1] , will now be : ['And you can add some text to this as well. PHOTOS COPYRIGHT OF <i>pebble</i>',3,1] , preview :
|
|
Deleted
Member Bio
Currently: Offline
Joined: January 1970
Gender: Undisclosed
Posts: 0
|
Post by Deleted on Dec 17, 2011 18:28:53 GMT 1
<i>pebble</i>... Thank ya sir and it's working like a charm! Cheers to ya...
|
|
IOD Supporter
Member Bio
Currently: Offline
Joined: January 2011
Gender: Female
Posts: 998
|
Post by JJ on Dec 17, 2011 23:12:34 GMT 1
<i>pebble</i>, this is the best Christmas gift I have received in a very long time. I am still messing around with the numbers 1-7 (and it's been fun) but in general, I am most pleased. I also found out that an animation would work while I was fiddling with graphics. You deserve more than a pat on the back. I do have a question. Is the "no linking" code different in the "Don't Touch" part below the top? I tried just taking out the links and being sure I had all my commas and apostrophes in the right place but it wouldn't work. But it's all good now. Take a look. jetsky.proboards.com/index.cgi
|
|
Deleted
Member Bio
Currently: Offline
Joined: January 1970
Gender: Undisclosed
Posts: 0
|
Post by Deleted on Dec 17, 2011 23:43:39 GMT 1
JJ...
Must be in the Don't Touch part, as I worked half the day yesterday, trying to figure it out. Even did as you did with the commas and apostrophes, but as you, it would not work.
Cheers...
|
|
IOD Supporter
Member Bio
Currently: Offline
Joined: January 2011
Gender: Female
Posts: 998
|
Post by JJ on Dec 17, 2011 23:48:29 GMT 1
Same here, Ron. I had all my graphics in place and was trying to do it the simple way, and also to see if I could have some link and some not link. Finally I just started over.
|
|