inherit
157863
0
Nov 20, 2024 10:35:15 GMT -8
Skidjit
Hello Sweetie! :D
1,129
September 2010
skidjit
|
Post by Skidjit on Sept 21, 2010 22:13:55 GMT -8
uh oh... This is my site lovegood-lounge.proboards.com/But the threads well... there are several that I would need a banner for.. and each a different one. Here is one of the threads. lovegood-lounge.proboards.com/index.cgi?board=general&action=display&thread=11I hope this helps. OH by the way... I'll go ahead and put it in my global footer right now. (edited) It's in there... oh and by the way I'm grandpalovegood over there. (oh and I am currently having internet problems. I keep getting bumped offline. My daughter said for her the internet has been going slow all day too. So if I disapear.. it's not by choice. )
|
|
inherit
King Oligochaete
126470
0
Feb 24, 2021 12:23:15 GMT -8
Wormopolis
Stop rating plugins with 1 star that dont deserve it.
20,002
June 2008
tbserialkillers
Wormo's Mini-Profile
|
Post by Wormopolis on Sept 21, 2010 23:19:10 GMT -8
am I not understanding the request?
I was reading this as you wanted to put a tag in a thread title, and have the tag replaced with a picture - IN the thread title. Are you wanting the image at the top of the screen to be replaced?
currently in your global footer, you just have the 3 example tags I have in the code. if you make a thread with "[pizza]" in the thread title, what happens?
if you want to add more tags, just copy the first line of the array, and change the tag and the URL of the image.
|
|
inherit
157863
0
Nov 20, 2024 10:35:15 GMT -8
Skidjit
Hello Sweetie! :D
1,129
September 2010
skidjit
|
Post by Skidjit on Sept 21, 2010 23:27:26 GMT -8
Example... See where on this thread it says this up top of every post "Re: How do I install thread banners?"
This would not be words but an image. Hmm... give me a second.. I'll find an example to show you. brb.
|
|
inherit
157863
0
Nov 20, 2024 10:35:15 GMT -8
Skidjit
Hello Sweetie! :D
1,129
September 2010
skidjit
|
Post by Skidjit on Sept 21, 2010 23:32:06 GMT -8
Ok... click on this... i56.tinypic.com/iwt0kl.jpgHere is an example of a board I sometimes frequent. You can see that there are several threads with text that we can click on to open up the threads... Well, then there are three that have thread banners in place of text. We would click on the banner just like the text to open up the threads. Here is the link to THAT site.. which is not MY site. boards.harrypotter.warnerbros.com/web/forum.jspa?forumID=13=================== OH by the way... I'll go right now to try creating a thread with the [pizza] in it just to see what happens. edited.. IT worked!!! for the pizza. It's nearly 3am here for me... I'll try it with the other banners in the morning.. the tell you if I am working this as you mean for me to. THANKS sooooo much. ;D
|
|
inherit
157863
0
Nov 20, 2024 10:35:15 GMT -8
Skidjit
Hello Sweetie! :D
1,129
September 2010
skidjit
|
Post by Skidjit on Sept 22, 2010 0:40:31 GMT -8
IT Worked!!!! I just installed three new banners on threads. Now I do have one more question left.. Since I don't really know what part of this is an "array" (I feel so dumb).. the only way I could get these three banners I've mentioned to show up, was to repost the entire code again... but changing out the tag and the imageurl as you said for me to. Was this what you meant for me to do? (of course I had to change the size on this second one to 225x43.) ok.. I know I can sometimes confuse things... to simplify.. for the banners I wish to add in the future... will I need to recopy the entire code for every three banners... OR just add them in this code as a list? Still... We are Sooo Happy for what you have done for us. Thank you so much. Here... here is the rest of the pizza... I wish it were more than an image.
|
|
inherit
Official Code Helper
65613
0
1
Oct 22, 2024 1:56:19 GMT -8
Chris
"'Oops' is the sound we make when we improve"
9,023
December 2005
horace
RedBassett's Mini-Profile
|
Post by Chris on Sept 22, 2010 1:54:35 GMT -8
Nice code Wormo Skidjit: The Array in question would be this: var imgTagArray=[
- ['[pizza]', 'http://home.comcast.net/~kelkel2376/Games/GamestoMake/images/pizza.JPG'],
- ['[rock]', 'http://www.suelebeau.com/images/rock.gif'],
- ['[dog]','http://www.paulnoll.com/China/Zodiac/zodiac-dog-pic.gif']
]; //add in more tags in this array. first element is tag, second is image URL. no comma after last entry
An Array is a list and in the example above this list contains three elements (bullet listed for clarity). Each element should be separated from a neighboring element by a comma. In this particular Array the elements are themselves Arrays but that is not important to what you need just treat them as a single unit to keep it simple. To add items to the list you would add additional lines (remembering to keep neighbors separated by a comma): var imgTagArray=[
- ['[pizza]', 'http://home.comcast.net/~kelkel2376/Games/GamestoMake/images/pizza.JPG'],
- ['[rock]', 'http://www.suelebeau.com/images/rock.gif'],
- ['[dog]','http://www.paulnoll.com/China/Zodiac/zodiac-dog-pic.gif'],
- ['[sstone]', 'http://i53.tinypic.com/2w6cw81.jpg'],
- ['[burn]', 'http://i54.tinypic.com/28qqefs.gif'],
- ['[nzquiz]','http://i54.tinypic.com/10rr91i.gif']
]; //add in more tags in this array. first element is tag, second is image URL. no comma after last entry
Now what I see in your forum is two copies of the code but you should be able to move the elements from one and combine into a single Array as I demonstrated in the second example. The problem I see however is you are desiring different image sizes which the code doesn't currently support. You could set both the forced dimensions to an empty string (like so: var forceHeight="";
) so the natural dimensions of the images shine through or it shouldn't be too hard to specify forced sizes as additional elements of the Arrays themselves but I'll defer to Wormo since it is his code.
|
|
inherit
157863
0
Nov 20, 2024 10:35:15 GMT -8
Skidjit
Hello Sweetie! :D
1,129
September 2010
skidjit
|
Post by Skidjit on Sept 22, 2010 6:43:10 GMT -8
Thank you both.
EB. Ah a fellow Data fan. I was hoping I could add to the list in the manner you have shown me. I never know who might ask next for a new banner to be installed in time. I would like to keep all my banners to be about the same size.. but since I won't be the one creating all of them, I know this might not always be possible. So you say this code only supports three? I was wondering but thought it was only an example. I'll check back to see what Wormo suggests I do. Thanks.
I did go ahead and install three on my site, later today I hope to have another one up when I have time.
Thanks again.
|
|
inherit
King Oligochaete
126470
0
Feb 24, 2021 12:23:15 GMT -8
Wormopolis
Stop rating plugins with 1 star that dont deserve it.
20,002
June 2008
tbserialkillers
Wormo's Mini-Profile
|
Post by Wormopolis on Sept 22, 2010 7:22:55 GMT -8
I put the forcewidth/height in there just to make sure that images that were huge werent used or they would have weird effects in places like main page.
If you only want the pictures to show when looking at the post and have the tag just stripped everywhere else, we can just modify the code.
as for only supprting 3 tags, that is just what I typed in for examples. you just have to keep adding in more lines.
|
|
inherit
157863
0
Nov 20, 2024 10:35:15 GMT -8
Skidjit
Hello Sweetie! :D
1,129
September 2010
skidjit
|
Post by Skidjit on Sept 22, 2010 8:20:05 GMT -8
The code works just fine. I just did that, added a fourth one to the code... it worked in seconds. Weeee! ;D I know what you mean about the over sized images.. which of course I won't allow. I think 225x43 will be my customary.. I want for things to look in unison... Hopefully nothing will be much larger than that. But I still want to thank you for all you have done for us. You have made many people very happy today.
|
|
inherit
157863
0
Nov 20, 2024 10:35:15 GMT -8
Skidjit
Hello Sweetie! :D
1,129
September 2010
skidjit
|
Post by Skidjit on Sept 23, 2010 13:05:32 GMT -8
Wormo... I just want to tell you my friends are having a ball with that thread you asked me to start.. They are now all placing orders for pizza. LOL!
|
|
inherit
King Oligochaete
126470
0
Feb 24, 2021 12:23:15 GMT -8
Wormopolis
Stop rating plugins with 1 star that dont deserve it.
20,002
June 2008
tbserialkillers
Wormo's Mini-Profile
|
Post by Wormopolis on Sept 23, 2010 15:26:39 GMT -8
heh heh...
thats a first that a example input became the most popular one...
I put some thought into this as I drove from Denver to Las Vegas. It would seem that you only want the banners to show up when looking at then from the thread listing, and perhaps at the tops of posts. on the main page, or in recent posts, you would more likely want just a regular thread name to show.
The reason I put the image size restriction in there was because a large image on the main page in the "last post" coulmn would throw things asunder, but if we went with this new change, we wouldnt have to have the size restriction.
We can still put a governer size restriction in there, but if you are the one creating the images and choosing the tags we probably wouldnt need it.
With the new idea, the array changes slightly to include a text name for replacing the tag if desired. so lets say you hadd a thread called
[pizza] lovers
then you would set up the array to be like
['[pizza]','Delicious Pizza','URL to img']
on the thread listing they would see the image. on the main page and recent posts they would just see
Delicious Pizza lovers
I should be able to sneak that one out tonight.
|
|
inherit
157863
0
Nov 20, 2024 10:35:15 GMT -8
Skidjit
Hello Sweetie! :D
1,129
September 2010
skidjit
|
Post by Skidjit on Sept 23, 2010 17:17:21 GMT -8
OK.. I know what you are saying... Really, since some of these banners are things they themselves are proud of having show. (Not sure if THEY created them, or had them ordered.) I think they like them to show up on all places where you would see the title of the thread.. the places you just mentioned. Even above every post within their own threads..
I also know what you are talking about.. it is in a small way is stretching the board when that thread happens to be the last one on that board posted on. But it's hardly noticable at this point in time.. who knows about the future? The only thing I could come up with was to possibly balance it out with each board to have a banner. I really didn't want to do that since it's how other sites have done this already. Still, I thought this to be an option to me if I ever really want to. (See.. I"m so new at this sort of thing.. I have recently downloaded GIMP and need to figure out how to work it, in order for ME to create our own banners. It's time to stretch my toes and learn more of this sort of thing.)
YET.. I do have ONE member I am keeping tabs on. See we were once members of another Proboard site. She wanted so much to post over there with the rest of us.. all of her friends. Problem is she is still on dialup.. yep.. here I thought I was the last one out there to leave that behind.. So it's still fresh in my mind what she was going through. She kept getting bumped off that other site.. She wanted to post, but even sometimes lurking made loading pages to read very hard for her. She never gave up and sometimes she was able to squeeze out a post every once in a while. I did suggest for her to turn off her smilie/image options via her profile page.. and that did help her out a lot, but not entirely.
So here on MY site, I'm keeping that in mind. She's still able to view everything the way it should, smilies and all.. SO to get to what you are suggesting.. Just in case I do end up going overboard with adding too many codes, making things become slower.. which by no means do I feel I'm close to.. I'm being picky and choosy. If there ever comes a day that she might have to turn off her images/smilies on MY site.. then I knew exactly what YOU are suggesting would help her out a lot to identify the threads that have banners. She would be able to identify those threads by the words and not a tag as you call it.
So Thank you once again for giving us this option. I look forward to your next post when ever you are ready.
(and yes I have lurked THIS site to learn an awful lot from other's experiences. This is a code I would love to have for all my site members benefit.)
|
|
inherit
157863
0
Nov 20, 2024 10:35:15 GMT -8
Skidjit
Hello Sweetie! :D
1,129
September 2010
skidjit
|
Post by Skidjit on Sept 24, 2010 22:55:58 GMT -8
Ooo another question. Is there a way to click on the banner and have it take us to the last page instead of the first one of that thread? I've been looking around here and found where you responded to someone else's request and you mentioned this to add to something they did..
"change it so action=gotonewpost"
But I would not know where I should place this or if is an option. Thanks.
|
|
inherit
King Oligochaete
126470
0
Feb 24, 2021 12:23:15 GMT -8
Wormopolis
Stop rating plugins with 1 star that dont deserve it.
20,002
June 2008
tbserialkillers
Wormo's Mini-Profile
|
Post by Wormopolis on Sept 25, 2010 20:15:40 GMT -8
find this line:
lnks[blah].innerHTML=lnks[blah].innerHTML.replace(imgTagArray[tag][0], '<img height="'+forceHeight+'px" width="'+forceWidth+'px" src="'+imgTagArray[tag][1]+'" border=0>');
and right after it put,
lnks[blah].href=lnks[blah].href.replace(/action=display/,'action=gotonewpost');
|
|
inherit
157863
0
Nov 20, 2024 10:35:15 GMT -8
Skidjit
Hello Sweetie! :D
1,129
September 2010
skidjit
|
Post by Skidjit on Sept 25, 2010 22:33:23 GMT -8
So Is this correct? It should look like this: <script type="text/javascript"> <!-- // UBBC in thread titles v1.0 // by Wormopolis - www.wormocodes.com// do not repost (except on WC and PBS) - keep header intact // v1.0 image support only var forceHeight=43; var forceWidth=225; var imgTagArray=[ ['[sstone]', 'http://i53.tinypic.com/2w6cw81.jpg'], ['[burn]', 'http://i54.tinypic.com/28qqefs.gif'], ['[nzquiz]','http://i54.tinypic.com/10rr91i.gif'], ['[dw]','http://i54.tinypic.com/2nbvkw9.png'], ['[OWLNEWT]','http://i53.tinypic.com/126e2k2.jpg'], ['[hunt]','http://i54.tinypic.com/b499qu.jpg'] ]; //add in more tags in this array. first element is tag, second is image URL. no comma after last entry if (pb_action!='headersfooters2') { // scan page links to a thread title with defined tags for (tag=0; tag<imgTagArray.length; tag++) { if (document.body.innerHTML.match(imgTagArray[tag][0])) { for (lnks=document.getElementsByTagName('a'), blah=0; blah<lnks.length; blah++) { if (lnks[blah].href.match(/thread=/) && lnks[blah].innerHTML.match(imgTagArray[tag][0])) { lnks[blah].innerHTML=lnks[blah].innerHTML.replace(imgTagArray[tag][0], '<img height="'+forceHeight+'px" width="'+forceWidth+'px" src="'+imgTagArray[tag][1]+'" border=0>');lnks[blah].href=lnks[blah].href.replace(/action=display/,'action=gotonewpost'); } } for (tds=document.getElementsByTagName('td'), cl=0; cl<tds.length; cl++) { if ((tds[cl].width.match(/(55|80)%/) || tds[cl].className.match(/welcomebg/)) && tds[cl].innerHTML.match(imgTagArray[tag][0])) { tds[cl].innerHTML=tds[cl].innerHTML.replace(imgTagArray[tag][0], '<img height="'+forceHeight+'px" width="'+forceWidth+'px" src="'+imgTagArray[tag][1]+'">'); } } } } } // --> </script>
|
|