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

    (@shauno)

    Have you altered the gallery template to actually use the custom field?

    Thread Starter alezev

    (@alezev)

    Hi Shauno

    Yes, I have done this too.

    In the gallery.php file I changed the line to:

    ngg_custom_fields[“custom link”]; ?>” title=”<?php echo $image->description ?>” <?php echo $image->thumbcode ?> >

    I feel really stuck as not sure what is causing this. I’d be happy to give you my logins to take a quick look if you think that might help?

    thanks mate

    Plugin Author shauno

    (@shauno)

    Is your custom field called “custom link”?

    I’m not in front of my dev machine right now, but send me the access details to shaunalberts AT gmail DOT com, and I will have a look at it a little later for you.

    Plugin Author shauno

    (@shauno)

    Just to wrap this thread up for anyone else who comes across it. They were using the shortcode [nggallery id=x template=caption], but they hadn’t made changed the ‘gallery-caption.php’ template.
    Once they changed the template, it worked as expected.

    Hi i have one doubt. i have gallery.php and gallery_customlink.php(edited as custom field). i have so many galleries to display in lightbox(it is OK).But i have someother galleries, in that images i linked to some other posts. only gallery.php is working fine wen i change code in <!– thumbnails –>. If i use [nggallery id=3 template=”gallery_customlink”] template is not working. can u please help me. Thanq.

    Plugin Author shauno

    (@shauno)

    If you have a template called “gallery_customlink.php”, then your shortcode needs to be: [nggallery id=3 template="customlink"]

    okay. i’ll try with this code.
    is file name=template name?

    Sorry, still it is opening in light box only……

    Plugin Author shauno

    (@shauno)

    Have you changed the “gallery_customlink.php” to actually use the custom field?

    Actually wen i changed the code from <a>imageURL ?>” ……….to </a><a>ngg_custom_fields[“custom link”]; ?>”…….. in nggallery/view/gallery.php it is working fine means opening the custom URL. If i copy the same code in gallery_customlink.php(everything is same as in gallery.php) and used the shortcode [nggallery id=3 template=”customlink”], then it is not working.

    Plugin Author shauno

    (@shauno)

    You need to post code in backticks, or it breaks the forum. I can’t see what you’ve done.

    Plugin Author shauno

    (@shauno)

    You need to call the template “gallery-customlink.php” (notice the hyphen, and not the underscore).
    You then call the template with the short code [nggallery id=3 template=”customlink”] (notice the template only has “customlink” in it.

    That will call the new template you have created, and it will use custom fields if you have them setup for the gallery being displayed

    template means i need to write “template name:gallery-customlink.php” in code? or simply renaming the file name? Please dont mind, can u tel me……

    ohhh ya i got it. thanq so much shauno.

Viewing 14 replies - 1 through 14 (of 14 total)
  • The topic ‘Custom field link issue’ is closed to new replies.