phpcms图片频道模板制作
学习计算机和其他课程一样是需要不断练习的,下面是小编整理的phpcms图片频道模板制作,希望对大家有用,更多消息请关注应届毕业生网。
打开picture/文件,我们就会发现都是我们前面讲过很熟悉的标签,图片频道与别的频道最大的不同,就是在显示的时候默认显示的都是缩略图,也就是我们看到的这一串标签
{$picpicture(0,$channelid,$cat[catid],1,0,0,10,30,0,0,0,3,1,0,130,100,5)}
因此我们主要来讲这个标签的制作,别的顶级栏目。终极栏目的制作和文章频道都是相同的
在picture文件夹下面以tag开头的文件有4个
tag_picpicture.html 图片缩略图调用标签
tag_picturelist.html 图片标题列表调用标签
tag_slidepicpicture.html 图片幻灯片调用标签
tag_slidepicpicture-js.html 图片js效果标签模板
打开tag_picpicture.html,我们会看到
{loop $pictures $i $picture}
$i是用来判断几列的
利用这个i来和系统设置的$cols 做比较
利用他们的余数来判断是否分行
<img src='{$picture[thumb]}' alt="{$picture[alt]}" width='{$imgwidth}' height='{$imgheight}'> 这里面就是你在发布图片时候选的. 缩略图的大小
<a href='{$picture[url]}' target='_blank' title="{$picture[alt]}"[/color]>{$picture[title]}</a>
这几个分别是图片的地址 图片的提示 图片的标题
{if $descriptionlen}
<tr>
<td>{$picture[content]} <a href='{$picture[url]}' target='_blank'>详细>></a></td>
</tr>
{/if}
这一句是,如果允许显示说明,则显示具体的说明信息
在tag_picturelist.html中,显示的东西则比缩略图模板要多
{$picture[img]} 标题图片
{$picture[catname]} 所属栏目
<a href="{$picture[url]}" title="{$picture[alt]}" target="{$picture[target]}" class="tag_title_link{$picture[fonttype]}">{$picture[title]}</a> 图片标题及路径
{if $showhits}({$picture[hits]}){/if} 如果允许显示点击数,则显示点击数
{if $showauthor}[作者:{$picture[author]}]{/if} 显示作者
{if $datetype}[<span class="tag_date">{$picture[adddate]}</span>]{/if} 显示添加时间
{if $descriptionlen}{$picture[content]}{/if} 显示说明
图片内容页content.html的制作
打开这个网页
<script language=javascript type=text/javascript>
function fontZoom(size)
{
document.getElementById('{$addtime}l').style.fontSize=size 'px'
}
var pictureurl=new Array();
var picturename=new Array();
{loop $pictureurls $id $pic}
pictureurl[{$id}] = "{$pic[url]}";
picturename[{$id}] = "{$pic[name]}";
{/loop}
</script>
这个js函数是字体缩放函数
<!–图片浏览JS开始–>
<script language=JavaScript>
<!– Begin
var rotate_delay =4000; // delay in milliseconds (1000 = 1 secs)
current = 0;
function next() {
if(document.slideform.slide[current 1])
{
if(document.all){
document.images.show.style.filter="blendTrans(duration=2)"
【phpcms图片频道模板制作】相关文章:
评论
Hey just wanted to give you a quick heads up. The text in your content seem to be running off the sc
Say, you got a nice blog post. Really looking forward to read more. Keep writing. Rosalia Aloin Sawy
Tremendous issues here. I am very happy to look your article. Zonda Mervin Wayland
Major thankies for the article. Really thank you! Awesome. Cynthia Langsdon Ynez
I am truly glad to glance at this web site posts which includes lots of valuable data, thanks for pr
Enjoyed every bit of your article post. Really looking forward to read more. Great. Coral Jessey Abd
Merely wanna say that this is extremely helpful, Thanks for taking your time to write this. Nissie C
This article is really a nice one it helps new net people, who are wishing for blogging. Alexis Meir