NextGEN Scroll Gallery
how to display a custom field (7 posts)

  1. marfer
    Posted 4 years ago #

    hi, I need to display the title and description, plus some custom fields that i've added with the "nextgen custom fields" plugin.
    I managed to make it display the title and description, but can't find the way to show the custom fields. Any suggestions?
    for example, if i add this call to ../plugins/nextgen-gallery/view/imagebrowser.php it works. <? Php echo $ image-> ngg_custom_fields ["your_custom_field_name"];?>


  2. marfer
    Posted 4 years ago #

    i figured it out extrapolating Shauno's explanation for smooth gallery

    It's easy... you´ve to add $aux["pid"] = $picture->pid; on nggScrollGallery (around line 195) and then add nggcf_get_field($picture["pid"], "custom link") next to stripslashes($picture["title"]) (around line 278) , and that's it! :)

  3. shauno
    Posted 4 years ago #

    Nicely done on figuring it out yourself. Glad the plugin helps you in some way.

    [ Signature moderated. ]

  4. Rockz0r
    Posted 4 years ago #

    Hey guys,

    I know I´m late but I can´t find "stripslashes($picture["title"])" on any line, and wanna use Custom fields to on the Scroll Gallery=/

  5. Rockz0r
    Posted 4 years ago #

    Well I added

    			$final = array();
    			foreach($pictures as $picture) {
    			$aux = array();
    			$aux["pid"] = $picture->pid;//added here
    			$aux["title"] = stripslashes($picture->alttext);

    there... but where to add the nggcf_get_field($picture["pid"], "custom link") ???

  6. Rockz0r
    Posted 4 years ago #

    sry guys got it, didnt checked that i use v2.0 of Scrollgallery :(

    Here the code with my customfield called "Gencode"

    foreach($pictures as $picture) {
     $getInformation = array();
     $getInformation["pid"]   = $picture->pid;
     $getInformation["title"] = stripslashes($picture->alttext); // $picture->alttext;
     $getInformation["desc"]  = $picture->description;
     $afterimg .='<div>'.nggcf_get_field($picture["pid"],"Gencode").'</div>';
     $afterimg .= '</div>';
  7. sylviamaan
    Posted 3 years ago #

    Hi, I see Marfer managed to display title and description. Marfer, how did you do that? I tried some things in nggScrollGallery.php, but no effect till now. Please can you or anyone else help me? Thanks in advance, Sylvia

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • NextGEN Scroll Gallery
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic