无图时显示广告怎么做有人知道吗
无图时显示广告怎么做有人知道吗,发现模版里面没有无图的判断,貌似在model里面,但加不上广告语句图片列表里默认就是所有有图片的列表,没图的不会显示
在loop里加判断 {if thumb==""}广告代码{else}有图正常显示的代码{/if}
学习了,
http://bbs.destoon.com/static/image/smiley/default/loveliness.gif
http://bbs.destoon.com/static/image/smiley/default/loveliness.gif
发现有图或者无图的判断在include\module.func.php 和script\page.js里面,而模板文件里面的if判断无图时显示广告是无效的,那么应该怎么修改源码,才能让sell无图显示广告呢?
function get_albums($item, $type = 0) {
$imgs = array();
if($type == 0) {
$nopic = DT_SKIN.'image/nopic60.gif';
$imgs[] = $item['thumb'] ? $item['thumb'] : $nopic;
$imgs[] = $item['thumb1'] ? $item['thumb1'] : $nopic;
$imgs[] = $item['thumb2'] ? $item['thumb2'] : $nopic;
} else if($type == 1) {
$nopic = DT_SKIN.'image/nopic240.gif';
$imgs[] = $item['thumb'] ? str_replace('.thumb.', '.middle.', $item['thumb']) : $nopic;
$imgs[] = $item['thumb1'] ? str_replace('.thumb.', '.middle.', $item['thumb1']) : $nopic;
$imgs[] = $item['thumb2'] ? str_replace('.thumb.', '.middle.', $item['thumb2']) : $nopic;
}
return $imgs;
}
function SAlbum(s) {
if(s.indexOf('nopic240.gif') != -1) return;
s = s.substring(0, s.length-8-ext(s).length);
$('imgshow').innerHTML = '
630){this.width=630;}"/>';
Ds('imgshow');
}
页:
[1]