记录生活 学习SEO优化 | 他日若遂凌云志 敢笑黄巢不丈夫
>>Home > 学习笔记 > phpcms > phpcms多图模型调用

phpcms多图模型调用

Tags: | | 作者:海天无影

PHPCMS内容页多图模型的调用方法,可以用于在内容页得到文章的图片数组,生成单独文章页中图片的幻灯片形式。

最近正在玩phpcms,正在仿一个企业站,刚开始玩phpcms所以就把看到的好的运用记录下来。本来想试试盛大麦库的PC端记录的,可惜要邀请码……很是郁闷,算了,就用博客记录了,效果也差不多。

完了几天phpcms,发现phpcms的确很强大,模型、模块、标签这几个用起来,一个网站差不多就成了。呵呵,不过运用方法还要慢慢研究学习了。

今天就先记录下这个phpcms多图模型的调用方法。

1、首先创建多图模型,这个就不用多说了。(字段名可随便写,调用的时候不需要)最好位置比较前,这样缩略图模型就可以直接用多图的第一张生成了。

2、在内容页需要地方,调用多图模型:

{loop $array_images $k $r}
{if $k<5}
<a target="_blank" href="{$array_images[$k][filepath]}"><img
src="{thumb($r[filepath], 130, 90)}" alt="{if
$array_images[$k][description]}{$array_images[$k][description]}{/if}"
width="130" height="90" /></a>
{/if}
{/loop}<br />
<a href="more_pic.php?contentid={$contentid}"
target="_blank">更多{$title}图片</a>

k为图片数量,if判断设置输出多少张图片。

more_pic.php?contentid={$contentid}是链接的文章多图片的展示页,自行取舍。图片展示页模板more_pic.html。

日志信息 »

该日志于2011-01-20 12:50由 海天无影 发表在phpcms分类下, 你可以发表评论。除了可以将这个日志以保留源地址及作者的情况下转载到你的网站或博客,还可以通过RSS 2.0订阅这个日志的所有评论。

21条评论▼点击进行评论


  1. Warning: copy(/home/wwwroot/haitian/blog/avatar/e79b68291d7cca7f06d4a71c11c1607a.jpg): failed to open stream: Permission denied in /home/wwwroot/haitian/blog/wp-content/themes/prowerV3.1/functions.php on line 169
    回复

    phpcms的确很强大 但是网上可用的模板太少了 自己不太会做模板 就没太研究过它


    • Warning: copy(/home/wwwroot/haitian/blog/avatar/3d58c5baea42043cdd0f012c22cfd774.jpg): failed to open stream: Permission denied in /home/wwwroot/haitian/blog/wp-content/themes/prowerV3.1/functions.php on line 169
      回复

      呵呵 模板 仿呗


  2. Warning: copy(/home/wwwroot/haitian/blog/avatar/d94967b298c3fcfed3f8e5a6c5181f42.jpg): failed to open stream: Permission denied in /home/wwwroot/haitian/blog/wp-content/themes/prowerV3.1/functions.php on line 169
    回复

    海天又研究起这个来了啊


    • Warning: copy(/home/wwwroot/haitian/blog/avatar/3d58c5baea42043cdd0f012c22cfd774.jpg): failed to open stream: Permission denied in /home/wwwroot/haitian/blog/wp-content/themes/prowerV3.1/functions.php on line 169
      回复

      额 是啊 最近好多事啊


  3. Warning: copy(/home/wwwroot/haitian/blog/avatar/57403a5d86f4a993f16c854e4e3c4165.jpg): failed to open stream: Permission denied in /home/wwwroot/haitian/blog/wp-content/themes/prowerV3.1/functions.php on line 169
    回复

    学习了


  4. Warning: copy(/home/wwwroot/haitian/blog/avatar/dcaa3b50ec35e14119ffca8a35693273.jpg): failed to open stream: Permission denied in /home/wwwroot/haitian/blog/wp-content/themes/prowerV3.1/functions.php on line 169
    回复

    没玩过phpcms。。。
    也没时间
    呵呵


    • Warning: copy(/home/wwwroot/haitian/blog/avatar/3d58c5baea42043cdd0f012c22cfd774.jpg): failed to open stream: Permission denied in /home/wwwroot/haitian/blog/wp-content/themes/prowerV3.1/functions.php on line 169
      回复

      呵呵 我也是才学的


  5. Warning: copy(/home/wwwroot/haitian/blog/avatar/12b9ca311887d0c56ef18c36e8dd5fbd.jpg): failed to open stream: Permission denied in /home/wwwroot/haitian/blog/wp-content/themes/prowerV3.1/functions.php on line 169
    回复

    phpcms这个东西挺好玩的


    • Warning: copy(/home/wwwroot/haitian/blog/avatar/3d58c5baea42043cdd0f012c22cfd774.jpg): failed to open stream: Permission denied in /home/wwwroot/haitian/blog/wp-content/themes/prowerV3.1/functions.php on line 169
      回复

      恩 的确很强大~


  6. Warning: copy(/home/wwwroot/haitian/blog/avatar/49ca679cb38873e4d6fa159c4768a53e.jpg): failed to open stream: Permission denied in /home/wwwroot/haitian/blog/wp-content/themes/prowerV3.1/functions.php on line 169
    回复

    好好折腾,日后必成大器


    • Warning: copy(/home/wwwroot/haitian/blog/avatar/3d58c5baea42043cdd0f012c22cfd774.jpg): failed to open stream: Permission denied in /home/wwwroot/haitian/blog/wp-content/themes/prowerV3.1/functions.php on line 169
      回复

      额 大器是成不了什么的
      呵呵 网站到是能做做


  7. Warning: copy(/home/wwwroot/haitian/blog/avatar/32771531dda6fb833937f8a89d24553e.jpg): failed to open stream: Permission denied in /home/wwwroot/haitian/blog/wp-content/themes/prowerV3.1/functions.php on line 169
    回复

    还没看明白这是什么的说 :shock:


    • Warning: copy(/home/wwwroot/haitian/blog/avatar/3d58c5baea42043cdd0f012c22cfd774.jpg): failed to open stream: Permission denied in /home/wwwroot/haitian/blog/wp-content/themes/prowerV3.1/functions.php on line 169
      回复

      额 你玩玩phpcms就知道到底什么回事了 呵呵


  8. Warning: copy(/home/wwwroot/haitian/blog/avatar/fad14a832ca37404b8e610f4179d0be0.jpg): failed to open stream: Permission denied in /home/wwwroot/haitian/blog/wp-content/themes/prowerV3.1/functions.php on line 169
    回复

    这个很费时间啊 我是没时间哈哈


    • Warning: copy(/home/wwwroot/haitian/blog/avatar/3d58c5baea42043cdd0f012c22cfd774.jpg): failed to open stream: Permission denied in /home/wwwroot/haitian/blog/wp-content/themes/prowerV3.1/functions.php on line 169
      回复

      额 我现在也没工作了,这个就是我的工作了……


  9. Warning: copy(/home/wwwroot/haitian/blog/avatar/c338dbe71bccbcc6c35befd199894fbf.jpg): failed to open stream: Permission denied in /home/wwwroot/haitian/blog/wp-content/themes/prowerV3.1/functions.php on line 169
    回复

    海天 PR更新了。。哈哈 你的2了。。


    • Warning: copy(/home/wwwroot/haitian/blog/avatar/3d58c5baea42043cdd0f012c22cfd774.jpg): failed to open stream: Permission denied in /home/wwwroot/haitian/blog/wp-content/themes/prowerV3.1/functions.php on line 169
      回复

      恩 是啊 多亏你提醒我才看的 呵呵


  10. Warning: copy(/home/wwwroot/haitian/blog/avatar/e657612476777faf50d5f28627975291.jpg): failed to open stream: Permission denied in /home/wwwroot/haitian/blog/wp-content/themes/prowerV3.1/functions.php on line 169
    回复

    嗯,很强大的CMS系统。我也有研究过


    • Warning: copy(/home/wwwroot/haitian/blog/avatar/3d58c5baea42043cdd0f012c22cfd774.jpg): failed to open stream: Permission denied in /home/wwwroot/haitian/blog/wp-content/themes/prowerV3.1/functions.php on line 169
      回复

      呵呵 你比我还久没动静啊 貌似


  11. Warning: copy(/home/wwwroot/haitian/blog/avatar/244714b7504e1a40f3d2c71ffb4c8877.jpg): failed to open stream: Permission denied in /home/wwwroot/haitian/blog/wp-content/themes/prowerV3.1/functions.php on line 169
    回复

    :roll: 不折腾WP么~~改行折腾phpcms~ :lol:


    • Warning: copy(/home/wwwroot/haitian/blog/avatar/3d58c5baea42043cdd0f012c22cfd774.jpg): failed to open stream: Permission denied in /home/wwwroot/haitian/blog/wp-content/themes/prowerV3.1/functions.php on line 169
      回复

      额 用phpcms做网站


  12. Warning: copy(/home/wwwroot/haitian/blog/avatar/e5a2128fe5dbfa7c55ac78442853916d.jpg): failed to open stream: Permission denied in /home/wwwroot/haitian/blog/wp-content/themes/prowerV3.1/functions.php on line 169
    回复

    都是些草根牛人,日后必有出息啊,加油


    • Warning: copy(/home/wwwroot/haitian/blog/avatar/3d58c5baea42043cdd0f012c22cfd774.jpg): failed to open stream: Permission denied in /home/wwwroot/haitian/blog/wp-content/themes/prowerV3.1/functions.php on line 169
      回复

      额 我还不算牛人 呵呵 一起加油


  13. Warning: copy(/home/wwwroot/haitian/blog/avatar/bf12d703481f992fb051334a04f27c7b.jpg): failed to open stream: Permission denied in /home/wwwroot/haitian/blog/wp-content/themes/prowerV3.1/functions.php on line 169
    回复

    :mrgreen: 我只用过DEDECMS~


    • Warning: copy(/home/wwwroot/haitian/blog/avatar/3d58c5baea42043cdd0f012c22cfd774.jpg): failed to open stream: Permission denied in /home/wwwroot/haitian/blog/wp-content/themes/prowerV3.1/functions.php on line 169
      回复

      额 本来也是看中dede的但后来看网上都说 dede数据量大了就不行了
      然后看phpcms也很不错 呵呵


  14. Warning: copy(/home/wwwroot/haitian/blog/avatar/39e15fb57dceeaf6b13d33b10bd74c2f.jpg): failed to open stream: Permission denied in /home/wwwroot/haitian/blog/wp-content/themes/prowerV3.1/functions.php on line 169
    回复

    竟然玩phpcms去了?


    • Warning: copy(/home/wwwroot/haitian/blog/avatar/3d58c5baea42043cdd0f012c22cfd774.jpg): failed to open stream: Permission denied in /home/wwwroot/haitian/blog/wp-content/themes/prowerV3.1/functions.php on line 169
      回复

      额 是啊 做网站 呵呵


  15. Warning: copy(/home/wwwroot/haitian/blog/avatar/4e75606e4bed8d3f2e929c0329259ba9.jpg): failed to open stream: Permission denied in /home/wwwroot/haitian/blog/wp-content/themes/prowerV3.1/functions.php on line 169
    回复

    感觉挺有用的 :razz:


  16. Warning: copy(/home/wwwroot/haitian/blog/avatar/deb5601da04fabd47d3dfabd8d8d8700.jpg): failed to open stream: Permission denied in /home/wwwroot/haitian/blog/wp-content/themes/prowerV3.1/functions.php on line 169
    回复

    你怎么玩这么高深的程序呀!


  17. Warning: copy(/home/wwwroot/haitian/blog/avatar/8a696fb2b60f79867e39e7803303fc7a.jpg): failed to open stream: Permission denied in /home/wwwroot/haitian/blog/wp-content/themes/prowerV3.1/functions.php on line 169
    回复

    老兄 你怎么又折腾其phpcms了,我那几天也粗略地看了一下,配置还是蛮复杂的。


    • Warning: copy(/home/wwwroot/haitian/blog/avatar/3d58c5baea42043cdd0f012c22cfd774.jpg): failed to open stream: Permission denied in /home/wwwroot/haitian/blog/wp-content/themes/prowerV3.1/functions.php on line 169
      回复

      额 做网站 呵呵
      我感觉phpcms蛮强大的啊


  18. Warning: copy(/home/wwwroot/haitian/blog/avatar/f9e72272c18aac966f11cd15c9735dc6.jpg): failed to open stream: Permission denied in /home/wwwroot/haitian/blog/wp-content/themes/prowerV3.1/functions.php on line 169
    回复

    看啊可能、、、、、、、、、、、


  19. Warning: copy(/home/wwwroot/haitian/blog/avatar/5e29ff2eb17b2447c034c302eff3a6e1.jpg): failed to open stream: Permission denied in /home/wwwroot/haitian/blog/wp-content/themes/prowerV3.1/functions.php on line 169
    回复

    phpcms 跟 dede 比怎么样 我正想学 dede 的访站 以前学过 新云(asp) 的


    • Warning: copy(/home/wwwroot/haitian/blog/avatar/3d58c5baea42043cdd0f012c22cfd774.jpg): failed to open stream: Permission denied in /home/wwwroot/haitian/blog/wp-content/themes/prowerV3.1/functions.php on line 169
      回复

      据说数据量多了的dede就不行了
      我看看phpcms功能也不错 就选的phpcms


  20. Warning: copy(/home/wwwroot/haitian/blog/avatar/6908bd2f289eb0a53aaf2263acf508d1.jpg): failed to open stream: Permission denied in /home/wwwroot/haitian/blog/wp-content/themes/prowerV3.1/functions.php on line 169
    回复

    这个没玩过,当时安了这个,但是由于空间不支持,所以没完啦 :cry:


  21. Warning: copy(/home/wwwroot/haitian/blog/avatar/f723b1e6f2201f20a37005c93e6deb41.jpg): failed to open stream: Permission denied in /home/wwwroot/haitian/blog/wp-content/themes/prowerV3.1/functions.php on line 169
    回复

    ;-) 我正在用phpcms作门户站呢!作乱了、、、、好苦逼啊


    • Warning: copy(/home/wwwroot/haitian/blog/avatar/3d58c5baea42043cdd0f012c22cfd774.jpg): failed to open stream: Permission denied in /home/wwwroot/haitian/blog/wp-content/themes/prowerV3.1/functions.php on line 169
      回复

      呵呵 不过phpcms还是很好用的~

icon_wink.gif icon_neutral.gif icon_mad.gif icon_twisted.gif icon_smile.gif icon_eek.gif icon_sad.gif icon_rolleyes.gif icon_razz.gif icon_redface.gif icon_surprised.gif icon_mrgreen.gif icon_lol.gif icon_idea.gif icon_biggrin.gif icon_evil.gif icon_cry.gif icon_cool.gif icon_arrow.gif icon_confused.gif icon_question.gif icon_exclaim.gif 

« wordpress判断文章中是否有图片 PR回归 »