|
Post by rhondairv on Nov 9, 2010 22:13:46 GMT -8
I installed this and sometimes it works and sometimes not. Sometimes i can do a few in a row and sometimes just 1. If i do more than 1 in a post all the slideshows are exactly the same even though the links are diff. When i did 3 posts in a row with different slideshows suddenly all 3 posts had the same slideshow. I get this error a lot when i try to do more than 1 ... Is there something in the code not working exactly right or ya think it's a PB thing all on it's own? Here is a link if you want to test it.... s153.photobucket.com/albums/s240/EmoteCrazy/PogoHookUp/ALL%20BADGES/Hookup%20Holiday%20Badges/?action=view¤t=dc0bd38a.pbwOr if you need a few here is a link. The albums to the left all have a slideshow (1st image on each page) s153.photobucket.com/albums/s240/EmoteCrazy/PogoHookUp/ALL%20BADGES/<script type="text/javascript"><!-- /* Photobucket Slide Show UBBC Tag By !ErInUkI_bOx! Thanks to SubDevo for helping with the parsing! Not in any way calling Photobucket our own Do not redistribute or call your own */ if(document.postForm) { document.postForm.color.parentNode.innerHTML+='<a href="javascript:add(\'[photobucket]\',\'[/photobucket]\')"><img src="http://i29.tinypic.com/2a6qtu1.png" border="0" /></a>'; }
//Replacement Portion if(pb_action.match(/(calendar|pm|pre)view|search2|display/i)){ var td = document.getElementsByTagName('td'); var matCH=/\[photobucket\](.+?)\[\/photobucket\]/gi; for(l=0;l<td.length;l++){ if (td[l].width=="80%"&&td[l].innerHTML.match(matCH)) { var slideshowU = RegExp.$1; if(slideshowU.indexOf(".pbw")!=-1){ var ns=slideshowU.replace("s","w"),nx=ns.split(".com"),start=nx[0]+".com"; slideshowU=start+"/pbwidget.swf?pbwurl="+escape(start+nx[1].split("?")[0]+nx[1].split("=")[2]); }else{ var ns=slideshowU.replace("s","feed"),nx=encodeURIComponent(ns.slice(0,ns.indexOf("?"))+"feed.rss"); slideshowU='http://static.pbsrc.com/flash/rss_slideshow.swf" flashvars="rssFeed='+nx; } td[l].innerHTML = td[l].innerHTML.replace(matCH, '<div style="width:480px; text-align: center;"><embed type="application/x-shockwave-flash" wmode="transparent" src="'+slideshowU+'" height="270" width="480"><a href="http://photobucket.com/slideshows" target="_blank"><img src="http://pic.photobucket.com/slideshows/btn.gif" style="float:left;border-width: 0;" ></a></div>'); } } } //--></script> I could really use this code if you could work you magic on it. ;D
|
|
|
Post by Wormopolis on Nov 9, 2010 22:25:11 GMT -8
criminy.. Imma gonna have to break this one down. but it looks like it does a global replace on all the slideshows in each post with the first match it finds.
its going to need to be changed up. let me check with iPokemon to make sure they dont want to handle that themsleves.
|
|
|
Post by rhondairv on Nov 9, 2010 22:35:38 GMT -8
ok
|
|
|
Post by Wormopolis on Nov 13, 2010 14:04:47 GMT -8
iPokemon said I could have a go at it. I will work on this today.
|
|
|
Post by rhondairv on Nov 14, 2010 7:43:09 GMT -8
Thanks wormo
|
|
|
Post by Wormopolis on Nov 14, 2010 16:15:32 GMT -8
<script type="text/javascript"> <!-- /* Photobucket Slide Show UBBC Tag By !ErInUkI_bOx! Thanks to SubDevo for helping with the parsing! Not in any way calling Photobucket our own Do not redistribute or call your own mods by wormo */
if (true) {
if(document.postForm) { document.postForm.color.parentNode.innerHTML+='<a href="javascript:add(\'[photobucket]\',\'[/photobucket]\')"><img src="http://i29.tinypic.com/2a6qtu1.png" border="0" /></a>'; }
//Replacement Portion if(pb_action.match(/(calendar|pm|pre)view|search2|display/i)){ var td = document.getElementsByTagName('td'); var matCH=/\[photobucket\](.+?)\[\/photobucket\]/gi; for(l=0;l<td.length;l++){ if (td[l].width=="80%"&&td[l].innerHTML.match(matCH)) { td[l].innerHTML = td[l].innerHTML.replace(matCH, function pbsld_replace(imp, extrct) { var slideshowU = extrct; if(slideshowU.indexOf(".pbw")!=-1){ var ns=slideshowU.replace(/\s+?/,'').replace("s","w"),nx=ns.split(".com"),start=nx[0]+".com"; slideshowU=start+"/pbwidget.swf?pbwurl="+escape(start+nx[1].split("?")[0]+nx[1].split("=")[2]); }else{ var ns=slideshowU.replace("s","feed"),nx=encodeURIComponent(ns.slice(0,ns.indexOf("?"))+"feed.rss"); slideshowU='http://static.pbsrc.com/flash/rss_slideshow.swf" flashvars="rssFeed='+nx; } return '<div style="width:480px; text-align: center;"><embed type="application/x-shockwave-flash" wmode="transparent" src="'+slideshowU+'" height="270" width="480"><a href="http://photobucket.com/slideshows" target="_blank"><img src="http://pic.photobucket.com/slideshows/btn.gif" style="float:left;border-width: 0;" ></a></div>' }); } } }
}
//--> </script>
give that a shot.
|
|
|
Post by rhondairv on Nov 14, 2010 18:26:53 GMT -8
this is what i get if i try one or many I tried placing it in many different places in the footer.
|
|
|
Post by Wormopolis on Nov 14, 2010 23:33:38 GMT -8
can you put one of those in this thread itself and I will apply the code to just this thread for testing?
|
|
|
Post by rhondairv on Nov 15, 2010 6:11:30 GMT -8
|
|
|
Post by Wormopolis on Nov 15, 2010 13:23:18 GMT -8
your URLs are too long. PB breaks up any word that goes for 70 characters without a space. you need to be LESS organized and not have so many nested folders in your photobucket account in order to get a shorter URL.
I think THAt might actually be what is stopping the code from working.
|
|
|
Post by Wormopolis on Nov 15, 2010 14:38:15 GMT -8
actually hold on.. I think I can get around that.
|
|
|
Post by Wormopolis on Nov 15, 2010 14:40:55 GMT -8
how does that look? like its supposed to?
|
|
|
Post by rhondairv on Nov 17, 2010 14:03:24 GMT -8
Well, i see it here but when i copied the code this time i no longer have the icon for it and the previous test post i made still does not work.
|
|
|
Post by Wormopolis on Nov 17, 2010 18:31:53 GMT -8
I had not updtaed the code in the post yet. I wanted to make sure what I was seeing was what it was supposed to look like.
try now.
|
|
|
Post by rhondairv on Nov 17, 2010 19:12:11 GMT -8
This is just strange. Before i had the PB icon to click on and could get at least one slide show to work. Now i have nothing. You have it working here so idk what's up.
|
|