Hi guys!
I'm working in PHPBB 3.0.2 and I'd like to create a BB Code that gives one thumbnail image on mouseover and the larger version in a popup window like Lightbox 2, Ajax, or the likes.
It's a linux server.
Thanks for the help!
-Free
Edit: At some point in the future, it would be nice if, when clicked, the image appears on one side and any updated text information can appear on the other side. Much of the pictures' corresponding information changes quarterly and we would like to be able to keep up with it. Thanks again!
16 5573 hsriat 1,654
Recognized Expert Top Contributor
Why don't you use the lightbox itself?
The following goes inside the header on a normal webpage. Which file and directory do I put this in? - <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"></script>
This part goes in the existing stylesheet, but where do I find the stylesheet? We've got ten or twelve different styles - I hope I do not need to edit each style. (If so, I expect it would be simplest to make an include statement in each and point to one file. Within that one file write all the includes and necessary directory information for the Lightbox 2 files) - <link rel="stylesheet" href="css/lightbox.css" type="text/css" media="screen" />
Also, I believe this is the code to Lightbox the file: - <a href="images/{SIMPLETEXT1}.jpg" rel="lightbox[{SIMPLETEXT2}]">{SIMPLETEXT1}</a>
I don't mind editing the code to get what I want (lack of next and previous arrows, etc), but this is my first foray into anything SQLish. I feel quite lost on where to put the files and what exactly my point of reference is for the directories.
Also, it appears to me many of the files I would normally edit are missing or hidden. I believe I have full access within my FTP client, so I think they're simply not there.
hsriat 1,654
Recognized Expert Top Contributor
I suppose this should be working, as you are doing exactly as what told by the creator of that lightbox in that how to use page. What's the problem now?
I suppose this should be working, as you are doing exactly as what told by the creator of that lightbox in that how to use page. What's the problem now?
Yeah, I get *what* I'm supposed to do, but I don't understand *where* these inserts need to go.
hsriat 1,654
Recognized Expert Top Contributor
Yeah, I get *what* I'm supposed to do, but I don't understand *where* these inserts need to go.
First three need to be inside the head tag, and the hyperlink needs to be where your image is (inside the body tag).
First three need to be inside the head tag, and the hyperlink needs to be where your image is (inside the body tag).
Of which file though? I'm working in a PHPBB forum. I don't have a simple webpage that I can edit those lines in.
Here's a picture to help clarify. hsriat 1,654
Recognized Expert Top Contributor
make a 'js' and a 'css' folder in your root folder and place the js files and css files in them respectively.
Ok, I tried adding the following to the overall_header.html of the forum style I'm using. - <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"></script>
And then I appended the code from the Lightbox CSS to the style's own CSS file.
In the BBCode I put the following (customized for the website)
BB Code: - [lightbox2]{TEXT}[/lightbox2]
HTML Replacement Code: - <a href="http://www.website.com/pics/{TEXT}.jpg" rel="lightbox[set]" title="{TEXT}">{TEXT}</a>
Now when I post [lightbox2]sample[/lightbox2] it gives me the sample.jpg in a whole different page.
I suspect the root of this is addressed on Lightbox's Support page where it states - It doesn't work at all. The image opens up in a new page. What's wrong?
-
This is commonly caused by a conflict between scripts. Check your body tag and look for an onload attribute. Example:
-
<body onload="MM_preloadImages(‘/images/menu_on.gif’)…;">
-
A quick fix to this problem is to append the initLightbox() to the onload attribute as so:
-
<body onload="MM_preloadImages(‘/images/menu_on.gif’)…;initLightbox()">
Unfortunately, I haven't found a conflict source. I've since downloaded the entire forum to search more thoroughly, but I haven't turned up anything yet.
hsriat 1,654
Recognized Expert Top Contributor
I'm sure you are doing some small mistake somewhere. Do you have any test page so that I may have a look at it?
Sent you the information in a private message. Thank you!
hsriat 1,654
Recognized Expert Top Contributor
The problem is actually not a JavaScript problem but a PHP one. You would need to change the viewtopic.php and/or viewtopic_body.html (inside the style folder) files since you have to add those three lines of <script> to the header of the page it.
While I'm looking into your problem, I'll ask some other PHP expert to help you out.
Regards
Came across a PHPBB forum with Lightbox working. Sent you the information in a PM.
pbmods 5,821
Recognized Expert Expert
Subscribing. I will be in San Antonio this weekend, but I will take a look when I get back.
Ok, I'm thoroughly confused at this point.
I ran a search for the head tag in the 610nm style:
overall_header.html
simple_header.html
ucp_pm_viewmessage_print.html
viewtopic_print.html
I input the above three lines of script into overall_header.html and simple_header.html, then upload each file to the webhost.
When I view the page source of a topic with the BB Code, the three lines of script do not appear at all.
ucp refers to the User Control Panel, and I do know adding the script lines to viewtopic_print.html does not change anything.
At this point, I'm not sure which file to edit, but I'm leaning towards 'body' rather than 'header' files, even if it means including a head tag.
As always, I'll keep you guys posted.
As far as I can tell, it's an issue with the 610nm style itself. When I follow the directions and place the three script lines where they are supposed to go, they don't actually go in the head tag.
I'm still plugging at it though.
Hi there,
I am trying to get lightbox 2.04 to work in phpbb 3.0.2 as well and I also configured it with Garage 2.
www.mx5cartalk.com
I have made a directory called lb under my phpbb directory. My lb directory contains the css, js and image directories. It does everything it should when I run the demo file called index.html, the image does just what it should and opens up in a window that has been darkened and clicking outside of the image or on the x exits which is normal.
But when I run it in phpbb I get an error when I insert it into the styles/prosilver/template/overall_header.html file. The css file is fine and so are two of the js files, the lightbox.js file is the one that shows as an error....
Anyone...
Sign in to post your reply or Sign up for a free account.
Similar topics |
by: Martha |
last post by:
When I move my mouse over a hyperlink component, the hyperlink does not
change color.
How do I change the color of a hyperlink when the mouse goes over the
hyperlink?
or
Change the color of a...
|
by: wazoo |
last post by:
I'm hoping someone here might help me with this.
I'm putting the finishing touches on my intranet web app, and I'm adding
some simple JavaScript to my VB.Net Webforms.
This works:...
|
by: BobRoyAce |
last post by:
I am brand new to ASP.NET and am now required to take over maintenance of a
..NET/C# web application. On one of the pages I'm working on there is a
DataGrid which has multiple columns. One of the...
|
by: Patrick.O.Ige |
last post by:
I want to have a rollover image on an hyperlink inside a Repeater control
but when i run the page i get
"Image1 is undefined"
Any ideas?
I have a Hyperlink and an Image control in a repeater...
|
by: mjryan |
last post by:
Any idea why this code would not fire?
btnMakePmt.Attributes.Add("onMouseOver",
"this.src='img\\MakePmt_nav2_over.jpg'")
btnMakePmt.Attributes.Add("onMouseOut",...
| |
by: Nathan Sokalski |
last post by:
I have several System.Web.UI.WebControls.HyperLink Controls which I want to
display as rollover images. I know how to make these manually using the <a>
and <img> tags or the <a> tag and a...
|
by: Mat |
last post by:
How do you modify the color of an hyperlink when your mouse go over it?
<asp:HyperLink
|
by: news |
last post by:
Hello,
I have a webpage with some hyperlink within a button. The problem is that
some of my hyperlink is shorter that others and therefore the user must
navigate to the hyperlink to click on the...
|
by: ADezii |
last post by:
Recently, there have been several questions and much confusion concerning the Topic of Hyperlinks. Specifically, Users wanted to know how to retrieve a File Name from a FileDialog Box, copy the Name...
|
by: Silgd1 |
last post by:
Hey All....
I am creating web page using Netbeans 6.0. I use A jspf (java server page fragment) that is included in most of the other pages. There are several hyperlinks on the jspf that...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
| |
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The...
| |
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |