(插件:Wordpress NextGen Gallery)如何在nextgen图库视图中显示图库描述?

时间:2012-03-12 20:54:29

标签: plugins wordpress-plugin galleryview nextgen-gallery

我正在尝试调整NextGen Gallery插件,特别是文件nextgen-gallery / view / gallery.php,以便在我查看图库时实现显示图库描述。

所以,在这个文件中,我添加了以下几行:

    ....
    <?php if (!defined ('ABSPATH')) die ('No direct access allowed'); ?>
    <?php if (!empty ($gallery)) : ?>

    <?php /** Lots of stuff added here by Mpampirina  **/ ?>
    <p> You are here: <a class="Link" href="<?php echo get_permalink(); ?>">
        <?php the_title(); ?></a> &gt;
        <?php $album = nggdb::find_album( get_query_var('album') ); ?> 
        <?php echo $album->name ?> &gt; <?php echo $gallery->title ?>
    </p>

    <div class="ngg-description">
        <p>Here I want to add the gallery description text. So I try with: 
            <?php echo $gallery->gallerydesc ?> . Also I try with: 
            <?php echo $gallery->galdesc ?> . 
            I get no description, whatsoever...
        </p> 
    </div>
    <?php /** End of stuff added by Mpampirina **/ ?>

    <div class="ngg-galleryoverview" id="<?php echo $gallery->anchor ?>">
    ...

这是输出: gallery view without description http://dl.dropbox.com/u/14103014/ngg%20-%20gal_no_descr.png

画廊描述当然不是空的。在“管理图库”菜单中添加了文字: description text in admin pages http://dl.dropbox.com/u/14103014/ngg%20-%20desc_text_in_admin.png

那么,有没有人可以看到我做错了什么,或者可能指向另一个我可能错过的问题页面?这将是非常有帮助的! :-) 提前谢谢

1 个答案:

答案 0 :(得分:2)

我刚刚处理了同样的问题...

$gallery->description