I'm using the custom fields Mod/Hack and have displayed my User2 field on my thumbs page. I am using that field as a URL. The only thing I type in the field is the http://domain.com name and it shows up just as that. I've tried hacking the line in the includes file, but keep getting errors. As I am no PHP coder, I know this can't be too hard.
Here's what I have...
$caption .= "<br><span class=\"thumb_user2\"><a href='$rowset[key]['user2']'>" . $rowset[$key]['user2'] . "</a></span>";
Why is this not working?
Thanks!
EDITED TO ADD: SOLUTION FOUND -- SEE FINAL POST! :)
$caption .= "<br><span class=\"thumb_user2\"><a href='" . $rowset[key]['user2'] . "'>" . $rowset[$key]['user2'] . "</a></span>";
This code makes it link back to the album the particular image is in.... ???
Link to your site please.
http://www.cowgirlexpressions.com/portfolio/index.php
All I see is two albums, one with one image and the other is empty. The intermediate image displays just the picture with no other information shown. I've attached a screenshot to show what I see.
Basically, it looks like you've edited your theme so much, there isn't anything for the viewers to see except your picture.
keg,
I'm so sorry about that. I was having problems with having duplicate albums and was trying to get that fixed at the same time and in the process deleted some of the files and when they were re-added the descriptions weren't. However, I have that issue fixed, and have re-added everything to show up as I want. You can now go to that first album and see where the link in question is. It shows up fine, but if you look at the URL it points to the album instead of the actual URL that has been entered into the user2 box.
Thanks,
Ramsey
Your source code is showing this;
Quote<a href=''>http://www.runninghorses.net/</a>
As you can see the actual a href is empty, so it links to the site it is in.
Try changing the code to this;
$caption .= "<br><span class=\"thumb_user2\"><a href=" . $rowset[key]['user2'] . ">" . $rowset[$key]['user2'] . "</a></span>";
There should be quotes around the href
$caption .= "<br><span class=\"thumb_user2\"><a href='" . $rowset[key]['user2'] . "'>" . $rowset[$key]['user2'] . "</a></span>";
I posted this earlier in this thread. Did you make this change to your code when I posted it?
If Kegobeers code does not work, try this;
$caption .= "<br><span class=\"thumb_user2\"><a href=\"'{$CONFIG['user_field2_name']}'\">" . $rowset[$key]['user2'] . "</a></span>";
Hmm... Neither of those worked.... and I tried a few different variations too, but couldn't get anything to work either. Here's what I wanna know tho -- if you click on the actual image, in the next page, there is the link just like I want it. But I checked my files and couldn't seem to find where that link is created.
Just to follow up with this for those who might come across it in a search -- I *finally* figured this out on my own (and feeling SO proud because I am NO coder by any means). The correct way to make a link clickable to the proper URL in your thumbnail view is to set one of your custom fields to be the url box, and whatever field you use (I used #2 in this example), do the following:
In the functions.inc.php file, look for:
// Retrieve the data for a picture or a set of picture
function get_pic_data
And then find
// Set picture caption
After the first two $caption lines (they'll look something like:) $caption = "<span class=\"head-blue\">";
$caption .= ($rowset[$key]['title']||$rowset[$key]['hits']) ? $rowset[$key]['title'] : '';
add this:
$caption .= make_clickable($rowset[$key]['user2']);
(note: change the user2 variable to be whatever field you used for your custom fields for the url)
This will make a very easy URL clickable link displayed in your thumbnail view!
Hope that was easy to follow... ;) ;D
Thanks for coming back and posting your solution.
Joachim