Viewing 14 replies - 1 through 14 (of 14 total)
  • Plugin Author shauno

    (@shauno)

    The forum ate your HTML, re-paste it in the code tags the forum provides

    Thread Starter imyourvalentine

    (@imyourvalentine)

    <div class="ngg-gallery-thumbnail">
    get_image_url($image))?>"
    title="<?php echo esc_attr($image->description)?>"
    data-image-id='<?php echo esc_attr($image->pid); ?>'
    <?php echo $effect_code ?>>
    <img
    title="<?php echo esc_attr($image->alttext)?>"
    alt="<?php echo esc_attr($image->alttext)?>"
    src="<?php echo esc_attr($storage->get_image_url($image, $thumbnail_size_name))?>"
    width="<?php echo esc_attr($thumb_size['width'])?>"
    height="<?php echo esc_attr($thumb_size['height'])?>"
    style="max-width:none;"
    />
    </div>
    Plugin Author shauno

    (@shauno)

    That code is still missing the <a> tag it seems. But What’s the problem? You just replace the href="" part of the URL with the custom field call if you are trying to change the image link URLs.

    Have a look at a couple of the other recent threads on the exact same question, and you should get it figured out in no time.

    Thread Starter imyourvalentine

    (@imyourvalentine)

    [Moderator Note: Please do not post in uppercase & shout at us. Post de-capped.]

    Hi! I’ve read all the solutions of every post in this website but I can’t correctly modify the php page of the thumbnail. I’m not using the template version so I read that I have to modify this file nextgen gallery > products > photocrati nextgen > modules > nextgen basic gallery > templates > thumbnails > index.php
    as I found here https://holondesign.com/nextgen-by-photocrati-gallery-thumbnails-go-to-pages/

    This is my code:

    <div class="ngg-gallery-thumbnail">
    get_image_url($image))?>"
    title="<?php echo esc_attr($image->description)?>"
    data-image-id='<?php echo esc_attr($image->pid); ?>'
    <?php echo $effect_code ?>>
    <img
    title="<?php echo esc_attr($image->alttext)?>"
    alt="<?php echo esc_attr($image->alttext)?>"
    src="<?php echo esc_attr($storage->get_image_url($image, $thumbnail_size_name))?>"
    width="<?php echo esc_attr($thumb_size['width'])?>"
    height="<?php echo esc_attr($thumb_size['height'])?>"
    style="max-width:none;"
    />
    
    </div>

    https://www.valentinadeluca.com In the page PORTFOLIO I’m creating a gallery and I want that every image of it go to an external link. How can I do it? Help me, please!

    is it fine now? if not, please explain how u have to do it because i didn’t understand. thanks shauno for the pacience

    Plugin Author shauno

    (@shauno)

    If you are using the ‘NextGEN Basic Thunbnails’ template, then you are editing the correct file. I have a pretty comprehensive list of template options from NGG here, so you can check to be sure.

    But as I mentioned in a previous post, there is no <a href> in the block of code you keep pasting. I assume that’s because you pasted it without the code tags in the forum the first time, an now keep copying it from the forum. I have used a clean example from the standard index.php template below:

    <div class="ngg-gallery-thumbnail">
        <a href="<?php echo nggcf_get_field($image->pid, 'Your URL Field Name Here'?>"
           title="<?php echo esc_attr($image->description)?>"
           data-image-id='<?php echo esc_attr($image->pid); ?>'
           <?php echo $effect_code ?>>
            <img
                title="<?php echo esc_attr($image->alttext)?>"
                alt="<?php echo esc_attr($image->alttext)?>"
                src="<?php echo esc_attr($storage->get_image_url($image, $thumbnail_size_name))?>"
                width="<?php echo esc_attr($thumb_size['width'])?>"
                height="<?php echo esc_attr($thumb_size['height'])?>"
                style="max-width:none;"
            />
        </a>
    </div>

    Obviously, you need to change “Your URL Field Name Here” on the second line to the actual name of your field.

    I hope that helps

    Thread Starter imyourvalentine

    (@imyourvalentine)

    I have to disable the lightbox effect, right? The problem is that If I’ll do it every other gallery will be affected or not?
    And one more thing: on your code you miss to close “)”. I put if after “Your URL Field Name Here” and before the ?. I also have to write this sign “; ” after closing the parenthasis?
    <a href=""<?php cho nggcf_get_field($image->pid, 'Your URL Field Name Here')?>"
    I tried your code but it doesn’t work.
    https://www.valentinadeluca.com/portfolio-3

    Plugin Author shauno

    (@shauno)

    Sorry, there was a typo in my code:

    <div class="ngg-gallery-thumbnail">
        <a href="<?php echo nggcf_get_field($image->pid, 'Your URL Field Name Here'); ?>"
           title="<?php echo esc_attr($image->description)?>"
           data-image-id='<?php echo esc_attr($image->pid); ?>'
           <?php echo $effect_code ?>>
            <img
                title="<?php echo esc_attr($image->alttext)?>"
                alt="<?php echo esc_attr($image->alttext)?>"
                src="<?php echo esc_attr($storage->get_image_url($image, $thumbnail_size_name))?>"
                width="<?php echo esc_attr($thumb_size['width'])?>"
                height="<?php echo esc_attr($thumb_size['height'])?>"
                style="max-width:none;"
            />
        </a>
    </div>

    Be sure you are editing the right template

    Thread Starter imyourvalentine

    (@imyourvalentine)

    I’m editing nextgen gallery > products > photocrati nextgen > modules > nextgen basic gallery > templates > thumbnails > index.php but It doesn’t work. Could you enter in my page to watch?
    https://www.valentinadeluca.com/portfolio-3
    The links are the images.

    I have to disable the lightbox effect, right? The problem is that It will affect the other galleries. How can resolve this?

    Plugin Author shauno

    (@shauno)

    You can remove the line of code <?php echo $effect_code ?>, I think that will disable the lightbox (make sure not to remove the closing > from the anchor tag.
    Make sure you are changing the field name on line 2 of the code I posted.

    Thread Starter imyourvalentine

    (@imyourvalentine)

    I removed the effect code but now my galleries (for example https://www.valentinadeluca.com/sara-lucia-y-paula/) dont’ work and also the links on the portfolio page continue not working.

    Plugin Author shauno

    (@shauno)

    The href="" are blank, there are no links.

    Thread Starter imyourvalentine

    (@imyourvalentine)

    How can I show you a screenshot of my gallery admin panel?

    Plugin Author shauno

    (@shauno)

    Your gallery admin panel isn’t going to show me much, it’s the href wrapping the images in your template that’s the problem.
    If you want, you can email me backend login details, and I will sort it out for you: shaunalberts AT gmail DOT com

    Thread Starter imyourvalentine

    (@imyourvalentine)

    I wrote you an email from my gmail account. Did you receive it?

Viewing 14 replies - 1 through 14 (of 14 total)
  • The topic ‘New NGG version and NGG Custom Field doesn't work. Help!’ is closed to new replies.