|
Post by Dragon on Nov 24, 2011 20:13:53 GMT -8
cloudianpublicity.com/index.cgi?action=display&board=musicvideolocations&thread=4697&page=1OJ and I were going over the design for the music and such boards, and decided that an image for the band in each thread is a good idea. In order to do this I would like to be able to put in something like what we did with the links; #1 and going upward in each thread. Then like where we had the link to image we just put in like that so the #1 or whatever changes into the image for that number in that thread. It wouldnt rely on deciding what thread its in, as the links to images didnt, just that we put in something like #1 and bam an image loads in its place there. Like before, it needs to be first post only. That should eliminate any possible issues from the image appearing where we dont want it to. What do you think Wormo? Doable ?
|
|
|
Post by Wormopolis on Nov 24, 2011 21:22:09 GMT -8
what image would replace it? as in.. you put #1 in a post, it replaces it with WHAT image? does it know which image to put in there based on the thread title?
|
|
|
Post by Dragon on Nov 24, 2011 23:29:42 GMT -8
If you can find an easier way, go with it. But the way you had it before: ['http://www.animefreak.tv/','http://img38.imageshack.us/img38/7709/cpbuttonaftv.png'],
With what you put in the post, where you want the image shown, on the left and on the right is the image link. If I put in #1 (Assuming we did it by just #1 and up) then I'd put #1 in the first thread of the Board and then go upwards in number from there. In this case #1 = i918.photobucket.com/albums/ad28/ravyoshi26/3_doord_down_bg.pngWhich would be 3 doors down in music vids, currently the first thread of the board.
|
|
|
Post by Wormopolis on Nov 25, 2011 9:45:30 GMT -8
then if you make another new thread, will #1 have a different result or will that thread get #2 put in it?
|
|
|
Post by Dragon on Nov 25, 2011 10:27:22 GMT -8
Yes you put in #2 in it. The idea is to put the number in higher order in each new thread So thread 1 : #1 thread 2: #2
and so on until all the threads are put in, and that number will continue with each new addition, each new thread equals +1#
|
|
|
Post by Wormopolis on Nov 25, 2011 10:31:51 GMT -8
and you are positive this will be faster then just putting in the image with regular UBBC tags? because either way, one would have to paste the URL to the image somewhere, be it in the post itself or in the code (which only certain people will be able to access). just seems like making a simple process into a complicated one.
|
|
|
Post by Dragon on Nov 25, 2011 10:37:09 GMT -8
From what Ive learned from doing this the problem coems up that you eventually need to change the image for whatever reason. This idea puts the image links to be changed as you will in the footers, all in one place. If we simply posted it in it would be one image per thread in the first post and youd have to go through and change every single image in every first post of the threads for over 4000 threads. Simply put: it fixes an eventual problem and puts the timing to make the post as the same. Also since were just putting in the number in each post, theoretically I could place the numebrs ahead of time, before I have the images into each post and then later added the images into the footers coding so they appear. Without disturbing the table coding The way we do the post: Use predefined template to put in the table with info and where the images will appear, and then later as you go you add in the links for each one. THEN lastly you put in the images in the footers for the board so all the links become shown as image links. Tee hee! victory! This way even someone not an admin can post the stuff in because they psot in the links through the predefined table and an admin later adds in the image coding and whuzzah completed threads by regular members additions.
|
|
|
Post by Wormopolis on Nov 25, 2011 10:42:18 GMT -8
does [#1] get used more then once or just one time for the first post of the first thread?
|
|
|
Post by Dragon on Nov 25, 2011 10:54:17 GMT -8
cloudianpublicity.com/index.cgi?board=hitmanrebornfvf&action=display&thread=6291Like there, the coding for the image is right inside the table already: thats where the #1 will go. So #1 will appear in that type of spot, where I place it, in the first post of the thread one time only. Then in the next thread we put in #2 then next we put in #3. Keeps going up each thread number. Each number #1 or #2 or whatever just gets used once and only once. That way when you put in the images like we had before you simply put in the single number for that image then the next number by the image for it and so on.
|
|
|
Post by Wormopolis on Nov 25, 2011 15:48:06 GMT -8
<script type="text/javascript"> <!-- // image substitution
var presetImageArray=new Array(); presetImageArray[1]="http://i918.photobucket.com/albums/ad28/ravyoshi26/3_doord_down_bg.png";
for (td=document.getElementsByTagName('td'), tt=0; tt<td.length; tt++) { if (td.width=='80%' && td.className.match(/windowbg/) && td.innerHTML.match(/\[#(\d+?)\]/)) { td.innerHTML= td.innerHTML.replace(/\[#(\d+?)\]/g, function(ign, refnum) { if (refnum && presetImageArray[refnum]) return ('<img src="'+ presetImageArray[refnum] +'">'); }); break; } }
//--> </script>
|
|
|
Post by Dragon on Nov 25, 2011 16:15:49 GMT -8
Eh I thought we were putting in #1 and so on ? And I assume that I can just keep going with it like that?
Trying it out now.
|
|
|
Post by Dragon on Nov 25, 2011 16:22:49 GMT -8
Im getting Diddly Wormo.
|
|
|
Post by Wormopolis on Nov 25, 2011 19:26:57 GMT -8
to keep it from accidentally replacing the wrong thing, I made the victim be
[#1]
[# + number + ]
|
|
|
Post by Dragon on Nov 25, 2011 19:35:58 GMT -8
Im not sure I understand. In the box it says: presetImageArray[1]="http://i918.photobucket.com/albums/ad28/ravyoshi26/3_doord_ down_bg.png";
it says [1] I have in #1, I tried changing it just 1, either way not happening.
|
|
|
Post by Dragon on Nov 25, 2011 19:38:19 GMT -8
presetImageArray[1]="http://i918.photobucket.com/albums/ad28/ravyoshi26/3_doord_ down_bg.png";
I put in [1], [#1], 1, #1 Nada. Bpkiss.
|
|