![]() |
![]() |
![]() |
||||
Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact us. |
![]() ![]() |
|
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed. |
|
Thread Tools |
![]() |
#1 |
Confirmed User
Join Date: Jun 2002
Posts: 48
|
PHP guys - help, please
Good morning board. As if I wasn't bald enough already, I'm trying to modify my blogs and coming across a problem...
At the moment I have a lot of posts with thumbnail images that, when clicked, just are linked to themselves i.e. bringing up that image in a new window. What I'm after is a way of modifing wordpress so that when the image is clicked, the clicker gets sent to a specific URL. I have found the regex that selects the <a href... through to the /a> and can change it but I need a way to keep the <img src...> the same. Allegedly the code below in your template can be used to remove the img src - can it be modified to change the a href but keep the img src? PHP Code:
Cheers M. |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#2 |
Confirmed User
Industry Role:
Join Date: Nov 2005
Posts: 8,170
|
You can play with '<a href="([^"]+)">([^<]+)<\/a>' and see what you can do with it. Too tired/lazy to code it up.
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#3 |
So Fucking What
Industry Role:
Join Date: Jul 2006
Posts: 17,189
|
so you want us to help you remove all the "link codes" in your images ... neat
__________________
best host: Webair | best sponsor: Kink | best coder: 688218966 | Go Fuck Yourself ![]() |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#4 |
So Fucking What
Industry Role:
Join Date: Jul 2006
Posts: 17,189
|
__________________
best host: Webair | best sponsor: Kink | best coder: 688218966 | Go Fuck Yourself ![]() |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#5 |
Confirmed User
Join Date: Jun 2002
Posts: 48
|
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#6 | |
Confirmed User
Join Date: Feb 2002
Location: ICQ: 251425 Fr/Au/Ca
Posts: 6,863
|
Quote:
![]() |
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#7 |
So Fucking What
Industry Role:
Join Date: Jul 2006
Posts: 17,189
|
__________________
best host: Webair | best sponsor: Kink | best coder: 688218966 | Go Fuck Yourself ![]() |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#8 |
Confirmed User
Industry Role:
Join Date: Nov 2005
Posts: 8,170
|
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#9 | |
So Fucking What
Industry Role:
Join Date: Jul 2006
Posts: 17,189
|
Quote:
![]()
__________________
best host: Webair | best sponsor: Kink | best coder: 688218966 | Go Fuck Yourself ![]() |
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#10 |
So Fucking What
Industry Role:
Join Date: Jul 2006
Posts: 17,189
|
I mean, It's such a forgiving environment ... why wouldn't you pull some bullshit code and pisson'em like that.
It's a great place for friends and shit. Cool, yeah
__________________
best host: Webair | best sponsor: Kink | best coder: 688218966 | Go Fuck Yourself ![]() |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#11 |
So Fucking What
Industry Role:
Join Date: Jul 2006
Posts: 17,189
|
__________________
best host: Webair | best sponsor: Kink | best coder: 688218966 | Go Fuck Yourself ![]() |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#13 |
Confirmed User
Join Date: Feb 2002
Location: ICQ: 251425 Fr/Au/Ca
Posts: 6,863
|
I was passing through at 4:30AM - just felt obligated to point out that the regex posted was very weak.
Now, the regex posted by fris is a hell of a lot better - it actually copes with real world scenarios. I'm sorry if you don't like me pointing out what strikes me as non-optimised code. Rubbing each other's nuts helps noone ;) |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#14 |
ICQ: 197-556-237
Join Date: Jun 2003
Location: BRASIL !!!
Posts: 57,559
|
Bump for php coders
__________________
I'm just a newbie. |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#15 |
Too lazy to set a custom title
Join Date: Dec 2006
Posts: 23,400
|
It does feel really good however.
![]()
__________________
i like waffles |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#16 |
Confirmed User
Join Date: Feb 2002
Location: ICQ: 251425 Fr/Au/Ca
Posts: 6,863
|
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#17 |
Confirmed User
Join Date: Aug 2008
Posts: 3,223
|
Mmmm... interesting!
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#18 |
Chafed.
Join Date: May 2002
Location: Face Down in Pussy
Posts: 18,041
|
regex gives me heartburn and I only fuck with it while on the clock.
![]() |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#19 |
Confirmed User
Join Date: Jun 2002
Posts: 48
|
Thanks Fris - it worked a treat and is much appreciated. And thanks for all for helping out (even FartFly!)
M. |
![]() |
![]() ![]() ![]() ![]() ![]() |