AutoCAD 3DMAX C语言 Pro/E UG JAVA编程 PHP编程 Maya动画 Matlab应用 Android
Photoshop Word Excel flash VB编程 VC编程 Coreldraw SolidWorks A Designer Unity3D
 首页 > PHP编程

phpcms代码标签

51自学网 2016-09-26 http://www.wanshiok.com
网站首页 <index.html>代码要加在
{pc:content action="category" catid="0" num="25" siteid="$siteid" order="listorder ASC"}

<li><a href="{siteurl($siteid)}">网站首页</a></li>
             {loop $data $r}
<li><a href="{$r[url]}">{$r[catname]}</a></li>
 {/loop}
{/pc}    

头部代码:(关键字)
<title>{if isset($SEO['title']) && !empty($SEO['title'])}{$SEO['title']}{/if}{$SEO['site_title']}</title>
<meta name="keywords" content="{$SEO['keyword']}">
<meta name="description" content="{$SEO['description']}">

碎片代码:{pc:block pos="index_block"}

联系我们页面和about页面 中文字代码:{$content}
文字上的标题代码:{$CATEGORYS[$catid][catname]}

{str_cut($r[catname],60)}  // str_cut  控制标题字数,$r[catname]  大类(分类标题名称)//
{$r[title]}  小类产品标题名称

Show_pictuer.html 页面中产品图片标题 {$title}

导航链接   :
{pc:content action="category" catid="0" num="25" siteid="$siteid" order="listorder ASC"}
    {loop $data $r}
        <li><a href="{$r[url]}">{$r[catname]}</a></li>
    {/loop}
{/pc}  

新闻列表,产品名称列表:
 一、
{pc:content  action="lists" catid="3" order="id DESC" num="7"}
    {loop $data $r}
        <a href="{$r[url]}">{str_cut($r[title],60)}</a><br />
    {/loop}
{/pc}
新闻列表添加时间的显示代码:
<li><span class="date">{date('y-m-d',$r[inputtime])}</span></li>

二、
{pc:content  action="lists" catid="3" order="id DESC" num="7"}
    {loop $data $r}
        <li> <a href="#{$r[url]}">{str_cut($r[title],60)}</a></li>
    {/loop}
{/pc}  

左栏目列表 :    

{pc:content  action="category" catid="7" num="25"}            
    {loop $data $r}            
        <li><a title="{$r[catname]}" href="{$r[url]}">{$r[catname]}1111</a></li>            
    {/loop}
{/pc}

有图片列表:    
{pc:content action="lists" catid="$catid" num="12" order="id DESC" page="$page"}       
    <ul class="photo-list picbig">            
    {loop $data $r}            
    <li style="width:169px">            
    <div class="img-wrap">            
    <a href="{$r[url]}"><img src="{thumb($r[thumb],150,112)}" width="150" height="112" alt="{$r[title]}"/></a>        
    </div>            
    <span style="color:{$r[style]}">{str_cut($r[title],28)}22222</span>            
    </li>            
    {/loop}        
    </ul>
    <div class="pages clear"><span>产品数量:</span>{$pages}</div>    
{/pc}

//catid="$catid"  “”中的内容可更改成具体数字。  //order="id DESC"  降序//

公司简介代码:<div class="company">{pc:block pos="index_block_1"}{/pc}</div>    


//*****************************************.//
Category.html------------------------------------文章分列表页面(新闻列表页面)
List.html-------------------------------------------文章分类页面
Show.html------------------------------------------文章展示页面

category_picture.html------------------------------产品中心页面
list_picture.html-------------------------------------产品分类页
show_picture.html-----------------------------------产品图片展示页面


产品展示中心,图片列表代码:
{pc:content  action="lists" catid="6"  }  
    {loop $info $v}
        <li><img src="{thumb($v[thumb],150,112)}" width="150" height="90" alt="{$v[title]}"><h5>
            <a href="{$v['url']}">{$v[title]}</a></h5>
        </li>
    {/loop}    
{/pc}

产品列表页面和新闻列表页面:
  新闻list.html:
{pc:content action="lists" catid="$catid" order="id DESC" num="7" page="$page"}
    {loop $data $r}            
        <tr>
            <td class="title"><span class="catalog">{$r[catname]}</span>
            <a href="{$r[url]}" title="{$r[title]}" style="">
            <span class="style1"> {str_cut($r[title],60)} </span>   </a></td>
            <td>{date('y-m-d',$r[inputtime])}</td>
        </tr>
    {/loop}

产品list-picture.html:
{pc:content action="lists" catid="$catid" num="12" order="id DESC" page="$page"}  
{loop $data $r}


面包屑导航
<a href="{siteurl($siteid)}">首页</a><span>{catpos($catid)} </span> </div>

<h2>{$catname}</h2>
// ***********************//
{catpos($catid)} 当前位置链接名称(面包屑导航:显示两名称),//{siteurl($siteid)} 站点根目录//
                
IE6 margin值兼容代码:margin-right:10px !important;*margin-right:5px;

{str_cut($r[catname],60)}  // str_cut  控制标题字数,$r[catname]  大类(分类标题名称)//
{$r[title]}  小类产品标题名称


产品中心页面 提取下属分类列表样式
<div id="plist">
{pc:content action="lists" catid="$catid" num="1" moreinfo="1" order="id DESC" page="$pages"}
{loop $data $n $r}
         
<div style="width:690px;background:#f7f7f7;padding:4px;"><h2><a href="{$r[url]}">{$r[title]}</a></h2>
<span style="float:right;font-size:14px; font-weight:bold; "><a href="{$r[url]}" title="{$r[title]}" target="_blank" style="color:#F00; text-decoration:underline"> 浏览模式</a></span>
</div>    

<ul class="photo-list picbig">
    {loop string2array($r['pictureurls']) $pic_k $v}
    <li style="width:169px">
    <div class="img-wrap">            
    <a href="{$r[url]}" title="{$r[title]}" target="_blank"> <img src="{$v[url]}" alt="{$v[alt]} width="150" height="112" /></a>            
    </div>
    <span style=" text-align:center; font-size:12px;  "><a href="{$r[url]}" title="{$r[title]}" target="_blank"> {$r[title]}</a></span>
    </li>
    {/loop}
</ul>             
{/loop}
</div>        
        </div>
      </div>
      <div class="context">
    <div class="pages clear"><span>产品数量:</span>{$pages}</div>
{/pc}    
</div>

首页调用黄页产品带图片怎么调用?   
(产品列表)
<div class="box generic">
    <div class="title"><strong>产品推荐</strong> </div>
    <ul class="content news-photo picbig clear">               
        {pc:get sql="SELECT * FROM phpcms_yp_product order by id desc"  num="15"  return="data"  cache="3600"}
            {loop $data $r}
            <li>

            <div class="img-wrap">
            <a title="" href="{$r[url]}" target="_blank">
            <img title="{$r[title]}" src="{$r[thumb]}" style="height: 85px; width: 61px;"></a>
            </div>
            <a title="{$r[title]}" href="{$r[url]}">{str_cut($r[title],20)}</a>
            </li>
            {/loop}
        {/pc}
    </ul>
</div>


添加滚动文字代码
上下滚动
        <MARQUEE onmouseover=this.stop() style="PADDING-RIGHT: 5pt; PADDING-LEFT: 5pt"
onmouseout=this.start() scrollAmount=1 scrollDelay=50 direction=up height=122>
              滚动内容         
                </MARQUEE>

向右滚动代码
<MARQUEE onmouseover=this.stop() style="PADDING-RIGHT: 5pt; PADDING-LEFT: 5pt"
onmouseout=this.start() scrollAmount=1 scrollDelay=50 direction=left height=20>
               滚动内容
                  </MARQUEE>

分页样式代码 :
<p style=" margin:20px; line-height:20px;">
       {$content}
<p></p> <br />
<strong>上一篇:</strong><a href="{$previous_page[url]}">{$previous_page[title]}</a><br />
<strong>下一篇:</strong><a href="{$next_page[url]}">{$next_page[title]}</a>
</p>


说明
:本教程来源互联网或网友上传或出版商,仅为学习研究或媒体推广,wanshiok.com不保证资料的完整性。
 
上一篇:PHPCMS v9安全防范教程  下一篇:PHPCMS创建模块开发流程