[Plugin: NextGEN Monoslideshow] using dynamic information from nextgen gallery custom fields
-
Hi everybody,
It’s been a while I’ve trying to find a way to add links to images in wordpress with this plugin.
So far, I managed to do the following:
1. installed the nextgen custom fields plugin
2. created a custom field called “Image links to”
3. Added a specific info to each picture, in this case a URL (although the field is text only)Much of it I found here: http://www.hackingethics.com/blog/2010/08/02/how-to-add-custom-fields-in-nextgen-gallery-to-give-link-on-images-of-posts-or-page/
So, my question is: now that I have this dynamic information somewhere, how to I take it to my xml.php in the monoslideshow plugin?
I tried to add the following, between the blank lines, but with no success:
if (is_array ($pictures)){ foreach ($pictures as $picture) { $description = htmlspecialchars ( strip_tags( stripslashes( nggGallery::i18n($picture->description) ) ) , ENT_QUOTES ); if (!empty($picture->alttext)) $title = stripslashes( htmlspecialchars (nggGallery::i18n($picture->alttext) , ENT_QUOTES) ); else $title = $picture->filename; $link = $image->ngg_custom_fields["Image links to"]; $path = $siteurl . '/' . $picture->path . '/' . $picture->filename; $thumbnail = $siteurl . '/' . $picture->path . '/thumbs/thumbs_' . $picture->filename; echo "\t\t<image id='$picture->pid' source='$path' title='$title' link='$link' description='$description' thumbnail='$thumbnail' />\n"; } }
I really think this is the way to go, since if I add a static adress like:
$link ='http://www.google.com'
It will indeed take me to google but from every image. I need to know what string to use so that the xml.php gets the right information – which by the way I don’t know where it comes from, if it’s a file in the nextgen gallery plugin or what…
I guess it’s just a last step to get this thing done.
Ah, the gallery is here: http://fot.lucascorato.com/category/360
Anybody?
Thanks for your time.
LUCAS
- The topic ‘[Plugin: NextGEN Monoslideshow] using dynamic information from nextgen gallery custom fields’ is closed to new replies.