Viewing 14 replies - 31 through 44 (of 44 total)
  • Hey Cindy
    Sorry I didn’t see your post, I didn’t realise the thread sneaked onto another page.

    About adding the custom fields to NextGEN, it’s probably possible, but not without hacking the core NextGEN files (meaning you cant upgrade easily).

    brydave

    (@brydave)

    Hi again,

    I just thought I’d post a solution I may have found for using the links in a specific gallery.

    So the problem I encountered was that, I wanted to use NG gallery for my galleries with a modal window. However, I also wanted a few specific galleries where the images would link to a page, but not open a modal window – just take you to the desired url.

    To do this I followed Shauno’s instructions here and edited his instructions here to have rel=”nobox” in the link like so:
    <a rel="nobox" href="<?php echo $image->ngg_custom_fields["custom link"]; ?>" title="<?php echo $image->description ?>" <?php echo $image->thumbcode ?>

    Then in the template pages I just used:
    <?php echo do_shortcode('[nggallery id=x template=customlinks]'); ?>
    noting the earlier problem stated here

    Anyways, I don’t know if this is the best way to do this, but it worked for me. I was going to go nuts if I had to recreate my galleries so hopefully this will help someone out!

    you can see what I mean at my website: brydave.com/portfolio
    Just click on the “everything” button at the bottom. A modal gallery will pop up and the images will direct you to a page. On that page you can still click on the thumbnails on the original page for shadowbox images.

    (oh, the website is still in the process of being completed if you’re viewing it when I posted this)

    ka81

    (@ka81)

    thanks for the hack.
    it works when i place [nggallery id=6 ] to publication. thumbnail link to custom added link.

    but, i also have a NextGEN Widget and there thumbnails still link to their fullsize pictures.

    is there any solution please?

    Thanks very much. Worked like a charm.

    Just as bakingandbooks:

    I have implemented all the suggestions you made but still the thumbnails are linking to the post preview page. I disabled the JS effects, installed the Next Gen custom fields plugin and edited line 42 of gallery.php and gallery-caption.php. Still no luck though – the gallery displays as if I hadn’t made any changes at all, with thumbnails linking to post preview page. I’m using [nggallery id=1] to call my gallery…
    And the urls seems to be ok…

    Any help?

    Forget about it, it worked. ??

    Hey shauno, just wanted to say thanks for this bit of code! Really helps. I’d like to post these instructions on my site as a How-To — with credit to you obviously. Do you have a website I should link to, or do you just want me to link to your plugin or WordPress profile?

    Shauno, thanks for the solution but I have the same problem as Ka81 above (widget). My theme is Atahualpa. Any thoughts?

    Hey Shauno,

    thanks for this awesome plugin! It works fine if I use the gallery.php as my template, but I really can’t figure out how to use it with the gallery-carousel.php template.

    I found this here:

    The first problem, is that NextGEN Smooth Gallery doesn’t seem to care about the unique image id, but we need it. So, to solve that you need to change line 102 of nggSmoothSharedFunctions.php from the blank line it is now, to this:
    $aux[“pid”] = $picture->pid;

    So I guess this is also meant for the carousel template. If so, where exactly do I have to put:

    $aux["pid"] = $picture->pid;

    in there? If I’m wrong, what might be the problem, that no link URL appears on the image?

    Here is the part, I changed in gallery-carousel.php so far:

    <div class=”ngg-galleryoverview”>

    <div class="pic"><a href="<?php echo $image->ngg_custom_fields["Link"]; ?>" target="_blank"><img title="<?php echo $current->alttext ?>" alt="<?php echo $current->alttext ?>" src="<?php echo $current->url; ?>" /></a></div>

    I really appreciate your help!

    Solved the problem.

    Instead of using: $image->ngg_custom_fields[“Link”]
    use: $current->ngg_custom_fields[“Link”]

    Is it possible to remove the “PicLens” link in the gallery?

    never mind, found it.

    really silly questions, but where do I place the target=”_blank” so my links open in new pages?

    got it figured out! In case anyone else needs help with the code, this is what you do – place target=”_blank” right after the <a and before the href= like this:

    < a target=”_blank” href=” <?php echo $image-> ngg_custom_fields

Viewing 14 replies - 31 through 44 (of 44 total)
  • The topic ‘[Plugin: NextGEN Gallery] Is it possible to specify url links in thumbnails?’ is closed to new replies.