WordPress.org

Ready to get started?Download WordPress

Forums

NextGEN Custom Fields
[resolved] Custom field http:// links not working (19 posts)

  1. littleowlinlove
    Member
    Posted 1 year ago #

    I am using NextGen Gallery and just upgraded to 2.0.7. I set up the thumbnails in one of my galleries to link to another website (using NextGen Custom Fields and adding http:// address in the field). After changing some of the css coding it all worked fine.

    However, following the update to the new version the links now do not work. I am using NextGen Custom Fields version 1.2.2.

    Does anyone know how to get the custom field links working again?

    Thank you.

    http://wordpress.org/plugins/nextgen-gallery-custom-fields/

  2. shauno
    Member
    Plugin Author

    Posted 1 year ago #

    Hi littleowlinlove

    NGG v2 has completely redone the templating engine, so the Custom Field docs are now wrong. I will update them when I find some time to go through all the new NGG options and find the correlating templates.

    For now though, when inserting the gallery into your page, if you have the "NextGEN Basic Thumbnails" layout selected, and NO template selected under the "Customize Display Settings", the gallery will use the /nextgen-gallery/products/photocrati_nextgen/modules/nextgen_basic_gallery/templates/thumbnails/index.php template.

    You also need to use the API <?php echo nggcf_get_field($image->pid, "Link Field Name Here"); ?> (obviously change "Link Field Name Here" to the actual name of your custom field) to show the custom field, as the normal method no longer works in NGG v2.

    I will try to get the documentation for NGG Custom Fields updated soon.

  3. triskennoel
    Member
    Posted 1 year ago #

    Hi littleowlinlove,

    Can you tell me what you did in CSS coz im trying to link each image on different pages..
    Thankz...

    Hi shauno,

    I add custom fields naming link and put the link page into that but I cannot see why it is not working.. I need to ask you were did you put that <?php echo nggcf_get_field($image->pid, "Link Field Name Here"); ?>???
    Thankz..

  4. shauno
    Member
    Plugin Author

    Posted 1 year ago #

    Please read the post above yours triskennoel, it explains what file to add it to quite clearly.

  5. triskennoel
    Member
    Posted 1 year ago #

    Im sorry men, Im new to this..
    I really needed help..

    Is it on pid, "Link Field Name Here"); ?>"><img src="">

  6. triskennoel
    Member
    Posted 1 year ago #

    sorry my fault,,,,

    is it inside <(A) (HREF) ="(??)"><(/A)>

  7. shauno
    Member
    Plugin Author

    Posted 1 year ago #

    If you want the custom field to be the image link, then yes, change the <a href="">.

  8. andrewsjosh
    Member
    Posted 1 year ago #

    Thanks for the info, shauno! I've got it working on the default template as you outline. Any idea of the file location I should edit to do the same for the gallery-caption.php template? This new file architecture is a labyrinth.

  9. andrewsjosh
    Member
    Posted 1 year ago #

    I found it!
    gallery-caption.php template is located here:
    /wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/ngglegacy/view/gallery-caption.php

  10. chris3DiB
    Member
    Posted 1 year ago #

    pfffffffffffffff.... hard to understand for a non-programmer. So we yearningly await the new NGGCF version

  11. shauno
    Member
    Plugin Author

    Posted 1 year ago #

    Hi chris3DiB

    There is no immediate plan for a new NGG CF version, as the current one works just fine (for image fields at least) with NGG v2. The problem everyone seems to be having, is that the new templating system in NGG v2 is much more complicated than the old version, so people are struggling to find the correct gallery templates to insert their custom fields.
    There isn't very much I can do about that. You need to ask NGG for clearer docs on what templates get used under what conditions.

    Or, you can do what I do. After adding an NGG gallery to the page, I go and view the page source. I then search through the NGG codebase looking for a random class or piece of markup that was outputted by the gallery on the page (eg the ngg-gallery-thumbnail-box class). If there is more than 1 result, I add random text to the top of the templates until I see the text outputted on my page. Then I know what template is being used. Tada.

  12. chris3DiB
    Member
    Posted 1 year ago #

    puh, could you please explain where I could find the NGG Codebase ...

  13. shauno
    Member
    Plugin Author

    Posted 1 year ago #

    In the plugins directory.

  14. littleowlinlove
    Member
    Posted 11 months ago #

    Yay! Now that I've had some time to read all the posts I have updated the coding and it's working! Phew!!! I had a lot riding on this working so thank you so much for responding to my query.

    So excited!

  15. littleowlinlove
    Member
    Posted 11 months ago #

    One other quick question... can you tell me how to remove the thumbnail border in the new version?

    Thanks :)

  16. shauno
    Member
    Plugin Author

    Posted 11 months ago #

    I don't have a test install handy right now, but my bet is it's just CSS. Override the style in your theme's CSS.

  17. fufimaki
    Member
    Posted 2 months ago #

    Hi shauno,

    I have done the changes on code and is working now, but the page I am linking per image is showing on a pop up, how do I disable the pop up so the page would open normally.

    Please see the page and click on any image.
    http://studiohpplus.com.serv11.temphostspace.com/proyectos/

    Thanks!

  18. shauno
    Member
    Plugin Author

    Posted 2 months ago #

    Remove the <?php echo $effect_code ?>> line from the gallery template to stop the lightbox popup.

  19. fufimaki
    Member
    Posted 2 months ago #

    Hi shauno,

    I have removed it but it still showing as pop up

    <div class="ngg-gallery-thumbnail">
                <a>pid, "Link"); ?>"
                   title="<?php echo esc_attr($image->description)?>"
                   data-src="<?php echo esc_attr($storage->get_image_url($image)); ?>"
                   data-thumbnail="<?php echo esc_attr($storage->get_image_url($image, 'thumb')); ?>"
                   data-image-id="<?php echo esc_attr($image->{$image->id_field}); ?>"
                   data-title="<?php echo esc_attr($image->alttext); ?>"
                   data-description="<?php echo esc_attr(stripslashes($image->description)); ?>"
                    <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, TRUE))?>"
                        width="<?php echo esc_attr($thumb_size['width'])?>"
                        height="<?php echo esc_attr($thumb_size['height'])?>"
                        style="max-width:none;"
                    />
                </a>
            </div>

    Thanks

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic