inherit
142554
0
Jun 4, 2014 22:42:41 GMT -8
• absinthe
fallallover
39
July 2009
rocoyo
|
Post by • absinthe on Jan 4, 2011 23:27:28 GMT -8
Hi I am currently working on a lightbox script for my site lightbox site: linkmy site: link[/code][/ul] Include the Lightbox CSS file (or append your active stylesheet with the Lightbox styles). [/code][/ul] Check the CSS and make sure the referenced prevlabel.gif and nextlabel.gif files are in the right location. Also, make sure the loading.gif and closelabel.gif files as referenced near the top of the lightbox.js file are in the right location. Part 2 - ActivateAdd a rel="lightbox" attribute to any link tag to activate the lightbox. For example: <a href="images/image-1.jpg" rel="lightbox" title="my caption">image #1</a> Optional: Use the title attribute if you want to show a caption. If you have a set of related images that you would like to group, follow step one but additionally include a group name between square brackets in the rel attribute. For example: <a href="images/image-1.jpg" rel="lightbox[roadtrip]">image #1</a> <a href="images/image-2.jpg" rel="lightbox[roadtrip]">image #2</a> <a href="images/image-3.jpg" rel="lightbox[roadtrip]">image #3</a> No limits to the number of image sets per page or how many images are allowed in each set. Go nuts![/quote] My question is not how I would go about putting the codes in but could a UBBC button be created to make lightbox images for my gallery. -rocoyo
|
|
inherit
142554
0
Jun 4, 2014 22:42:41 GMT -8
• absinthe
fallallover
39
July 2009
rocoyo
|
Post by • absinthe on Jan 6, 2011 21:32:41 GMT -8
boomboombump
|
|
inherit
142554
0
Jun 4, 2014 22:42:41 GMT -8
• absinthe
fallallover
39
July 2009
rocoyo
|
Post by • absinthe on Jan 12, 2011 4:29:36 GMT -8
bumpbump powpow
|
|
inherit
The Final Cylon
31521
0
Mar 3, 2015 14:39:33 GMT -8
Trublu
Maybe the duck is in the hat.
12,323
October 2004
trublusvufan
|
Post by Trublu on Jan 12, 2011 10:27:52 GMT -8
You might get more responses in the General Programming section of the forum, do you mind if I move this there?
|
|
inherit
142554
0
Jun 4, 2014 22:42:41 GMT -8
• absinthe
fallallover
39
July 2009
rocoyo
|
Post by • absinthe on Jan 12, 2011 15:42:13 GMT -8
shoot
|
|
#00AF33
14306
0
1
Sept 8, 2023 8:54:17 GMT -8
Jordan
What is truth?
11,838
October 2003
jab2
|
Post by Jordan on Jan 12, 2011 16:55:03 GMT -8
Here's something to get you started.
Global Header
<script type="text/javascript" src="js/prototype.js"></script> <script type="text/javascript" src="js/scriptaculous.js?load=effects,builder"></script> <script type="text/javascript" src="js/lightbox.js"> <!--
var style = document.createElement("link"); style.type = "text/css"; style.rel = "stylesheet"; style.href = "css/lightbox.css"; style.media = "screen"; document.getElementsByTagName("head")[0].appendChild(style);
//--> </script>
Global Footer
<script type="text/javascript"> <!--
(function() { switch(pb_action) { case "display": { var td = document.getElementsByTagName("td");
for(var x = 6; x < td.length; x++) { if(td[x].colSpan == "3" && td[x].vAlign == "top") { td[x].innerHTML = td[x].innerHTML.replace( /\[lightbox=(.+?)\](.+?)\[\/lightbox\]/gi, '<a href="$2" rel="lightbox">$1</a>' ); } }
break; } case "post": case "modifypost": case "modifypreview": { if(document.postForm) { var buttonImage = "button.gif";
var img = document.createElement("img"); img.src = buttonImage; img.border = 0; img.alt = img.title = "Light Box"; var a = document.createElement("a"); a.href = "Javascript:add('[lightbox=Text]','[/lightbox]');"; a.appendChild(img);
document.postForm.color.parentNode.appendChild(a); }
break; } } })();
//--> </script>
|
|
inherit
142554
0
Jun 4, 2014 22:42:41 GMT -8
• absinthe
fallallover
39
July 2009
rocoyo
|
Post by • absinthe on Jan 13, 2011 1:34:46 GMT -8
that code gave me an error when I hit post, but I modified I moved the javascript source before the script type. Header:[/quote][/ul] Footer:[/quote][/ul] also the output is just a link to the image, hmmm
I essentially wish to do this:
[/quote][/ul] with a ubbc tag.[/s] yeah I don't think lightbox want's to work o.O
|
|
#00AF33
14306
0
1
Sept 8, 2023 8:54:17 GMT -8
Jordan
What is truth?
11,838
October 2003
jab2
|
Post by Jordan on Jan 13, 2011 9:03:16 GMT -8
|
|
inherit
142554
0
Jun 4, 2014 22:42:41 GMT -8
• absinthe
fallallover
39
July 2009
rocoyo
|
Post by • absinthe on Jan 20, 2011 20:28:36 GMT -8
I can never seem to get the script to work, i put in the headers and footers then when i posted it came up with an error when you posted in any board where the headers and footers applied.
then when i somehow fixed it, i do not remember how, instead of working in posts it brought up the lightbox loading page and when the image was ready it took me directly to the image source. x.x
|
|