msvod v9 标签调用 发布时间:2017-11-29 18:03:06  

调用二级栏目

{pc:content action="category" siteid="$siteid" num="15" order="list order"}

    {loop $data $r}

       <li><a title="" href="{$r}">{$r[catname]}</a></li>

    {/loop}

{/pc}


{pc:content action="category" catid="7" num="20" order="listorder"}

     {loop $data $r}

        <a href="{$r[url]}" target="_blank" title="{$r[title]}">{$r[catname]}</a>

     {/loop}

{/pc}


判断当前栏目是否存在子栏目

{if $v[child]==1}

XXX

{else}

XXX

{/if}

 

调用文章列表

{pc:content action="lists" catid="25" num="8" order="id desc"}

    {loop $data $r}

         <li><a href="{$r[url]}" target="_blank" title="{$r[title]}">{$r[title]}</a></li>

    {/loop}

{/pc}

 

带缩略图

{pc:content action="lists" catid="20" order="id desc" num="6"}

     {loop $data $r}

         <div>

             <h4><a href="{$r[url]}" target="_blank" title="{$r[title]}">

             <img src="{thumb($r['thumb'],111,139)}" alt="{$r[title]}" width="" height=""  border="0"></a></h4>

             <p><a href="{$r[url]}" target="_blank" title="{$r[title]}">{$r[title]}</a></p>

         </div>

     {/loop}

{/pc}

 

调用推荐位

{pc:content action="position" posid="2" order="listorder" num="1"}

    {loop $data $r}

        <div><a href="{$r[url]}" target="_blank" title="{$r[title]}">{$r[title]}</a></div>

        <div> <img src="statics/dimages/2010111758232601.jpg">{str_cut($r[description],106)}

        <div style="clear:both;"></div>

        </div>

        <div><a href="{$r[url]}" target="_blank" title=""><img src="statics/dimages/abobtn.jpg"></a></div>

    {/loop}

{/pc}

 

sql方法调用

{pc:get sql="SELECT * FROM ms_news WHERE catid <= 50 and catid >= 1  order by id DESC" return="data" num="6" start="0"  }

            {loop $data $r}

               <li><a href="{$r[url]}" target="_blank" title="{$r[title]}">{str_cut($r[title],35,'')}</a><span>[{date('Y-m-d',$r[inputtime])}]</span></li>

            {/loop}

{/pc}

 

调用相关文章

{pc:content action="relation" relation="$relation" catid="2" num="5" keywords="$rs[keywords]"}

{loop $data $r}

{$r[title]}

{/loop}

{/pc}

 

内容页相关文章的点击量

{pc:content action="lists" catid="$catid" num="10" order="id DESC" page="$page"}

    {loop $data $r}

       <p>

       <li><a href="{$r[url]}" target="_blank"><img src="/NanJing454/statics/nimages/next1.png" /> {str_cut($r[title], 57)}</a>{php $h_md=pc_base::load_model('hits_model');$get_db=$h_md->get_one(array('hitsid'=>"c-".$modelid."-".$r[id]));$views=$get_db[views];}

         点击量:{$views} </li>

       </p>

    {/loop}

{/pc}

 

全站最新文章

{pc:content action="newcontent" order="8" num="7"}

    {loop $data $r}

       <li>[{$CATEGORYS[$r[catid]][catname]}]<a href="{$r['url']}">{str_cut($r['title'],28)}</a></li>

    {/loop}

{/pc}

 

合作机构

{pc:link action="type_list" linktype="1" siteid="$siteid" typeid="53" num="16" order="listorder DESC"}

     {loop $data $r}

             <img src="{$r['logo']}" border="0" />

     {/loop}

{/pc}

 

友情链接

{pc:link  action="type_list" siteid="$siteid"  typeid="53" order="listorder DESC" num="60" return="dat"}

   {loop $dat $v}

        <a href="{$v[url]}" target="_blank" title="{$v[name]}">{$v[name]}</a>

   {/loop}

{/pc}

 

{date('Y-m-d',$r[inputtime])}

{str_cut($r[title],30,'')}



列表页调父栏目子栏目

{php $arrchildid = $CATEGORYS[$CAT[parentid]][catid]}

{pc …  catid="$arrchildid"}


内页时间

{date('Y-m-d',strtotime($inputtime))}


导航条

当前位置 &gt;<a href="{siteurl($siteid)}"> 首页 </a>><font color="#6C4833"> {catpos($catid)} {$title}</font>

上一篇:<a href="{$previous_page[url]}">{str_cut($previous_page[title], 30)}</a>

下一篇:<a href="{$next_page[url]}">{str_cut($next_page[title], 30)}</a>

时间:date('Y-m-d',$r[inputtime])}

 <script type="text/javascript" src="{JS_PATH}jquery.min.js"></script>





内容页调取浏览次数

</span><span id="hits"><script language="JavaScript" src="{APP_PATH}api.php?op=count&id={$id}&modelid={$modelid}"></script></span>

 

列表页调取浏览次数

{php $db = pc_base::load_model(‘hits_model’); $_r = $db->get_one(array(‘hitsid’=>’c-’.$modelid.’-’.$r[id])); $views = $_r[views]; }

点击:{$views}


列表页调关键词

{php $keywords=explode(' ', $r['keywords'])}

                                 {loop $keywords $keyword}

                                      <a href="{APP_PATH}index.php?m=content&c=tag&catid={$catid}&tag={urlencode($keyword)}">{$keyword}</a> 

                                  {/loop}


内页调关键词

{loop $keywords $keyword}<a href="{APP_PATH}index.php?m=content&c=tag&catid={$catid}&tag={urlencode($keyword)}">{$keyword}</a>        

{/loop}

加载附表 moreinfo="1"


js获取时间

<script>

var x = new Date();

   var shijian = x.toLocaleString().substring(0,10) ;

   document.write(shijian);

</script>

 

调用单网页

{pc:get sql="SELECT * FROM MSVOD_page w he re catid=16" cache="3600" return="data"}

   {loop $data $r}

     <div id="Article">

           <h1>{$r[title]}</h1>

       <div>

               {$r[content]}

       </div>

   </div>

    {/loop}

 {/pc}

 

栏目页循环栏目

{loop subcat($catid) $v}

           {php if($v['type']!=0) continue;}

           <div>

             <div>

               <h5><em></em> {$v[catname]}</h5>

               <a href="{$v[url]}">更多</a></div>

             <ul>

               {pc:content action="lists" catid="$v[catid]" num="4" order="id DESC"}

               {loop $data $r}

               <li><span><a href="{$r[url]}">{$r[title]} </a></span><em>{date('Y-m-d',$r[inputtime])}</em></li>

               {/loop}

               {/pc}

             </ul>

           </div>

           {$j++}

           {php if ($j>=7) break;}

  {/loop}


上一篇:msvodv9栏目名调用方法

下一篇:采集模块使用方法