我正在尝试调整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> >
<?php $album = nggdb::find_album( get_query_var('album') ); ?>
<?php echo $album->name ?> > <?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
那么,有没有人可以看到我做错了什么,或者可能指向另一个我可能错过的问题页面?这将是非常有帮助的! :-) 提前谢谢
答案 0 :(得分:2)
我刚刚处理了同样的问题...
$gallery->description