473,626 Members | 3,119 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

LightBox regex, add link around images.


Hi,

I want to add a link around images to add the lighbox JS.
(http://www.huddletogether.com/projects/lightbox/)

I need to look for <img ... /and wrap a <a href=... around it.

But the regex is a bit out of my depth here.
1- How do I know the link of the image, (because I need it for the
anchor)
2- How can I tell if there is already an image around the link, (so I
don't add another)?

Thanks

FFMG
--

'webmaster forum' (http://www.httppoint.com) | 'Free Blogs'
(http://www.journalhome.com/) | 'webmaster Directory'
(http://www.webhostshunter.com/)
'Recreation Vehicle insurance'
(http://www.insurance-owl.com/other/car_rec.php) | 'Free URL
redirection service' (http://urlkick.com/)
------------------------------------------------------------------------
FFMG's Profile: http://www.httppoint.com/member.php?userid=580
View this thread: http://www.httppoint.com/showthread.php?t=23023

Message Posted via the webmaster forum http://www.httppoint.com, (Ad revenue sharing).

Dec 9 '07 #1
0 3006

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
23002
by: lawrence | last post by:
In my style sheet I've set the links like this: a:link{ text-decoration:none; } I did that for the pseudo classes and I also did that for the image tag. Yet there are still link lines around the images. Why? It's on this page:
3
3083
by: Timmy | last post by:
I'm working on a simple click-through image gallery and I have images with captions in two arrays like this: var current_value="0"; var images = new Array ("photo01.jpg", "photo02.jpg", "photo02.jpg");
2
1650
by: JKJ | last post by:
I need help with a regular expression that will pull the title and all the meta tags held in the head section of an HTML file (including the head tags). I want to exclude everything else such as link tags, script tags, etc. I have a pretty big process that pulls this stuff now using simple Regex expressions, but I know I'm not using the Regex's to their fullest. . .
6
5880
by: Martin Evans | last post by:
Sorry, yet another REGEX question. I've been struggling with trying to get a regular expression to do the following example in Python: Search and replace all instances of "sleeping" with "dead". This parrot is sleeping. Really, it is sleeping. to This parrot is dead. Really, it is dead.
3
1936
by: Bouzy | last post by:
I have been trying to put lightbox on my site I am making, but its not working. I have searched on forums and can't find exactly the same problem. When I click on my thumnail to open it abosolutly nothing happens. It just says done in my loading bar on firefox.. I think I have everything required to do it. I have the tag in the head I have a seperate css sheet thats linked to I have the link line of java stuff. I will show you my code and if you...
1
1855
by: daniel | last post by:
Hello, I have limited understanding of js (css/html is more me) and when I run into complicated problems I am left undone. The person I normally call upon is on holiday so I was wondering if I could present it here for an answer. The page in question is http://www.sunraycomfort.com.au/p-inslab.html (and will be applied to all other product pages) I am using the lightbox js (from http://huddletogether.com/projects/lightbox/) which is...
3
1982
by: R. K. Wijayaratne | last post by:
Hello everyone, I have something similar to the below and I am trying to select just the Block 1 markup/text <li><ul>...</ul></liwith the following RegEx @"<li>(.|\n)*<ul>(.|\n)*</ul>\n*</li>", however it selects all 3 blocks. Any ideas how to get around this? string section = Regex.Match(text, @"(<li>(.|\n)*<ul>(.|\n)*</ul>\n*</ li>)").Value;
8
2265
by: vanald04 | last post by:
Alright, I racked my brain all last night and can't figure out what I'm doing wrong. I've copied: <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> in my header, as well as move the files into my js folder and placed at my root.
2
3294
by: jrod11 | last post by:
I recently found a gallery (http://www.planet-source-code.com/vb/scripts/ShowCode.asp?txtCodeId=6727&lngWId=4). The image in the gallery when clicked on will open the larger image in the same window. I want to replace it with light box. I have added the lightbox javascript, but I'm no sure where to place the light box call. To call the lightbox, i have to add this:<a href="stairs.jpg" rel="lightbox">text</a> Even though this is a text...
0
8262
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8701
Oralloy
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8364
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8502
tracyyun
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7192
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5571
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4090
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2623
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1507
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.