我在许多客户端网站上使用Alex Rabe的NextGEN Gallery作为集中的图像存储库,我发现我经常需要将整个库加载到lightbox中(通过单个缩略图调用),而不需要在页面上显示多个缩略图。
因此,我可以在一个页面上有一系列四个缩略图,每个缩略图在单击时在灯箱中打开一组不同的图片。
Any idea how I could do this? Thanks.
我在许多客户端网站上使用Alex Rabe的NextGEN Gallery作为集中的图像存储库,我发现我经常需要将整个库加载到lightbox中(通过单个缩略图调用),而不需要在页面上显示多个缩略图。
因此,我可以在一个页面上有一系列四个缩略图,每个缩略图在单击时在灯箱中打开一组不同的图片。
Any idea how I could do this? Thanks.
在HTML中输出每个库的所有图像。使用锚定标记链接到每个缩略图周围的全尺寸图像。根据您喜欢使用的lightbox插件,将同一个库中的所有图像分组(通常使用rel
属性)。此时,只需隐藏每个库中的所有缩略图,但只有一个缩略图。将你的lightbox插件连接到图库。
图像已经按图库分组,因此您只需确定单个图片所属的图库(我认为是$image->galleryid
), 然后放下rel="lightbox[$gallery]"
在您的singlepic.php
模板文件。
所以,像这样的事情(在singlepic.php
下一个库模板文件:
<?php
$galleryid = $image->galleryid;
?>
<a href="<?php echo $image->imageURL ?>" title="<?php echo $image->description ?>" <?php echo $image->thumbcode ?> rel="lightbox[<?php echo $galleryid; ?>]" >
...
</a>
?>
如果不行,请告诉我,我们会解决的!截至2015年和下一代2.0。不要对此进行攻击,请使用短代码显示单个图像,然后指向灯箱:
[ngg_images gallery_ids=7 display_type=photocrati-nextgen_basic_thumbnails disable_pagination=1 images_per_page=1 show_all_in_lightbox=1 show_slideshow_link=0]
进一步documentation 和useful examples.只需将此样式添加到您的nggallery。css文件,仅显示库中的第一个图像。单击缩略图时,灯箱效果将显示所有图像。无需PHP代码:
/* For NextGen Gallery. Displays thumbnails on a page, and when you click each thumbnail opens it\'s own gallery. Normally when you insert a gallery, it displays all the thumbnails in the gallery. This hack will hide all the thumbnails except the first one. Make sure you don\'t display [show slideshow], because that will be the first child. */
div.ngg-gallery-thumbnail-box { display:none; }
div.ngg-galleryoverview div:first-child { display:block; }
我正在使用发件人。net获取电子邮件订阅列表。这个网站给了我一些信息,可以将用户的电子邮件添加到订阅列表中。我想使用WordPress ajax来实现这一点。但它返回错误400错误请求。我的代码是:文件ajax新闻脚本。js公司: jQuery(document).ready(function($){ // Perform AJAX send news on form submit $(\'form#fnews\').on(\'submit\', funct
我在许多客户端网站上使用Alex Rabe的NextGEN Gallery作为集中的图像存储库,我发现我经常需要将整个库加载到lightbox中(通过单个缩略图调用),而不需要在页面上显示多个缩略图。
因此,我可以在一个页面上有一系列四个缩略图,每个缩略图在单击时在灯箱中打开一组不同的图片。
Any idea how I could do this? Thanks.
在HTML中输出每个库的所有图像。使用锚定标记链接到每个缩略图周围的全尺寸图像。根据您喜欢使用的lightbox插件,将同一个库中的所有图像分组(通常使用rel
属性)。此时,只需隐藏每个库中的所有缩略图,但只有一个缩略图。将你的lightbox插件连接到图库。
图像已经按图库分组,因此您只需确定单个图片所属的图库(我认为是$image->galleryid
), 然后放下rel="lightbox[$gallery]"
在您的singlepic.php
模板文件。
所以,像这样的事情(在singlepic.php
下一个库模板文件:
<?php
$galleryid = $image->galleryid;
?>
<a href="<?php echo $image->imageURL ?>" title="<?php echo $image->description ?>" <?php echo $image->thumbcode ?> rel="lightbox[<?php echo $galleryid; ?>]" >
...
</a>
?>
如果不行,请告诉我,我们会解决的!截至2015年和下一代2.0。不要对此进行攻击,请使用短代码显示单个图像,然后指向灯箱:
[ngg_images gallery_ids=7 display_type=photocrati-nextgen_basic_thumbnails disable_pagination=1 images_per_page=1 show_all_in_lightbox=1 show_slideshow_link=0]
进一步documentation 和useful examples.只需将此样式添加到您的nggallery。css文件,仅显示库中的第一个图像。单击缩略图时,灯箱效果将显示所有图像。无需PHP代码:
/* For NextGen Gallery. Displays thumbnails on a page, and when you click each thumbnail opens it\'s own gallery. Normally when you insert a gallery, it displays all the thumbnails in the gallery. This hack will hide all the thumbnails except the first one. Make sure you don\'t display [show slideshow], because that will be the first child. */
div.ngg-gallery-thumbnail-box { display:none; }
div.ngg-galleryoverview div:first-child { display:block; }
我试图在WordPress中为我的评论实现Ajax,使用this tutorial. 但我在将教程中的代码集成到自己的预构建主题时遇到了问题。问题是,我要么得到一个WP错误“检测到重复注释;看来你已经说过了!”或标准500错误。以下是我得到的:下面是我对ajax的评论。js文件如下所示: * Let\'s begin with validation functions */ jQuery.extend(jQuery.fn, { /* * check i