±êÇ©Ä£°å˵Ã÷: ÄÚÈÝÁ´½Ó:{$r.url} ÄÚÈݱêÌâ:{$r.title}
±êÌâͼƬ:{$r.thumb|thumb=###,219,135,1}
ÆäÖÐ |thumb=###,219,135,1ΪÓÃthumbº¯Êý´¦Àí±êÌâͼƬ###Ϊµ±Ç°ÖµÔÚº¯ÊýÖеÄλÖÃ, ºóÃæÈý¸öÖµ·Ö±ðÉèÖÃΪËõÂÔͼµÄ¿í¶È,¸ß¶È,ÊÇ·ñ×Ô¶¯²Ã¼ô(1Ϊ×Ô¶¯²Ã¼ô0Ϊ²»²Ã¼ô)
{$r.title|str_cut=###,15} str_cut=###,15 £¬15ΪÉèÖñêÌâ½ØÈ¡15¸ö×Ö·û str_cut=###,15,... ºóÃæ¿É¼Ó½ØÈ¡ºó׺
{$r.createtime|toDate=###,'Y-m-d H:i:s'} toDate=###,'Y-m-d H:i:s'Ϊ¸ñʽ»¯Ê±¼ä
YP:link|ÓÑÇéÁ´½Ó
ʵÀý£º
typeid=\ΪÓÑÇéÁ´½ÓËùÓÐÀà±ðID
linktype=\ÉèÖõ÷ÓÃʲôÀàÐ͵ÄÁ´½Ó 1ΪÎÄ×ÖÁ´½Ó.2ΪͼƬÁ´½Ó id = \¶¨ÒåÊý¾Ý²éѯµÄ½á¹û´æ·Å±äÁ¿ key = \·µ»ØÊý¾ÝÖ÷¼ü±äÁ¿Ãû³Æ order = 'id desc';ÅÅÐò·½Ê½
limit =\µ÷ÓÃÌõÊý ĬÈÏ10Ìõ
`id` int(11) unsigned NOT NULL AUTO_INCREMENT, //Á´½Óid `status` tinyint(1) unsigned NOT NULL DEFAULT '1', //Á´½Ó״̬ `listorder` int(10) unsigned NOT NULL DEFAULT '0', //ÅÅÐòÖµ `createtime` int(11) unsigned NOT NULL DEFAULT '0', //´´½¨Ê±¼ä `name` varchar(50) NOT NULL DEFAULT '', //ÍøÕ¾Ãû³Æ `logo` varchar(80) NOT NULL DEFAULT '', //ÍøÕ¾logo `siteurl` varchar(150) NOT NULL DEFAULT '', //ÍøÕ¾µØÖ· `typeid` smallint(5) unsigned NOT NULL, //ÓÑÇéÁ´½Ó·ÖÀà `linktype` tinyint(1) unsigned NOT NULL DEFAULT '1',//Á´½ÓÀàÐÍ `siteinfo` mediumtext NOT NULL, //ÍøÕ¾¼ò½é
YP:catpos|Ãæ°üÏü
ʵÀý£º
catid=\µ±Ç°À¸Ä¿ID space=\¸÷À¸Ä¿Ö®Ç°µÄ·Ö¸î·û YP:block|ËéƬ ʵÀý£º pos=\ËéƬ±êʶ YP:flash|»ÃµÆƬ(Ò»°ã¶¼²»ÓÃ×Ô´øµÄ»ÃµÆ£¬¶øÓÃsql±êÇ©¶ÁÈ¡) ʵÀý£º flashid=\»ÃµÆƬid YP:db|ÍⲿÊý¾ÝÔ´ ʵÀý£º < YP:db dbname=\ where fid=2 order by dateline desc\ < li>< a href=\< /YP:db> ²ÎÊý˵Ã÷£º dbname=\Êý¾ÝÔ´Ãû³Æ sql=\²éѯÓï¾ä IFÅжϱêÇ© 2.1Õýʽ°æ {if $catid==1} ÐÂÎÅÀ¸Ä¿ {elseif $catid==2} ²úÆ·À¸Ä¿ {else} ͼƬÀ¸Ä¿ {/if} 2.1Õýʽ°æ֮ǰµÄ°æ±¾ÓÃÒÔϸñʽ ʵÀý£º {if: $catid==1} ÐÂÎÅÀ¸Ä¿ {elseif: $catid==2} ²úÆ·À¸Ä¿ {else:/} ͼƬÀ¸Ä¿ {if:/} ʹÓÃ˵Ã÷£º if±êÇ©µÄ if:ºóÃ涼ÓÐÒ»¸öðºÅ, Èç¹û¾õµÃÉÏÃæµÄ±êÇ©¶¼ÎÞ·¨Âú×ãÌõ¼þÅжÏÒªÇóµÄ»°£¬ Ò²¿ÉÒÔʹÓÃÔÉúphp´úÂë»òÕßPHP±êÇ©À´Ö±½ÓÊéд´úÂë¡£ if($catid==1){ echo 'ÐÂÎÅ'; }elseif($catid==2){ echo '²úÆ·'; }else{ echo 'ÆäËû' } ?> Volist±êÇ© Volist±êÇ©ÊÇThinkPHPµÄ×Ô´ø±êÇ©¡£ ʵÀý£º ²ÎÊý˵Ã÷£º name=\ÊôÐÔ±íʾģ°å¸³ÖµµÄ±äÁ¿Ãû³Æ id=\±íʾµ±Ç°µÄÑ»·±äÁ¿£¬¿ÉÒÔËæÒâÖ¸¶¨£¬µ«È·±£²»ÒªºÍnameÊôÐÔ³åÍ» YP:subcat|×ÓÀ¸Ä¿ catid=\Ϊ¶¨ÒåÈ¡À¸Ä¿idΪ8µÄËùÓÐ×ÓÀ¸Ä¿ self=\Ϊ1ʱͬʱÔÚ½á¹ûÖмÓÈë±¾ÉíÀ¸Ä¿Êý¾Ý,Ϊ0ΪֻȡÆäËùÓÐ×ÓÀ¸Ä¿ key=\¶¨ÒåÊý¾Ý½á¹û¼üÖµÃû³Æ id=\¶¨ÒåÊý¾Ý²éѯµÄ½á¹û´æ·Å±äÁ¿Ãû³Æ ±êÇ©Ä£°åÖпÉÒÔʹÓõÄÀ¸Ä¿×ֶΠidÀ¸Ä¿id, catnameÀ¸Ä¿Ãû³Æ, catdirÀ¸Ä¿Ä¿Â¼, parentdir¸¸Ä¿Â¼, parentid¸¸À¸Ä¿id, moduleidÄ£ÐÍid, moduleÄ£ÐͱíÃû, arrparentidËùÓи¸À¸Ä¿, arrchildidËùÓÐ×ÓÀ¸Ä¿, typeÀ¸Ä¿ÀàÐÍ, titleÀ¸Ä¿Ò³seo±êÌâ, keywordsÀ¸Ä¿Ò³¹Ø¼ü´Ê, descriptionÀ¸Ä¿Ò³¼ò½é, listorderÅÅÐò, ishtmlÊÇ·ñÉú³Éhtml, ismenuµ¼º½ÏÔʾ, hitsµã»÷´ÎÊý, imageÀ¸Ä¿Í¼Æ¬, childÊÇ·ñÖÕ¼¶À¸Ä¿, urlÀ¸Ä¿urlµØÖ·, template_listÀ¸Ä¿Áбíҳģ°å, template_showÀ¸Ä¿ÄÚÈÝҳģ°å, pagesizeÀ¸Ä¿·ÖÒ³ÌõÊý, readgroupÀ¸Ä¿ÔĶÁȨÏÞ, listtypeÀ¸Ä¿ÊÇ·ñʹÓ÷âÃæÄ£°å, langËùÊôÓïÑÔ, urlruleidÀ¸Ä¿url¹æÔòid, presentpointͶ¸å½±Àø, chargepointĬÈÏÊÕ·ÑÖµ, paytypeĬÈÏÊÕ·ÑÀàÐÍ, repeatchargedaysÖظ´ÊÕ·ÑÌìÊý, postgroupÔÊÐíͶ¸å»áÔ±×é, YP:nav|µ¼º½±êÇ© ʵÀý£º id=\ΪulµÄcss¶¨ÒåµÄIDÃû³Æ. catid=\Ϊµ÷ÓÃÒ»¼¶À¸Ä¿µ¼º½; level=\Ϊ¹²µ÷ÓÃ3¼¶À¸Ä¿; bcid=\µ÷ÓôóÀ¸Ä¿ÏÂËùÓÐ×ÓÀ¸Ä¿ class=\ ÑùʽÃû³Æ enhome=\ µ¼º½ÊÇ·ñͬʱÏÔʾӢÎĵÄÃû³ÆֵΪÊ×Ò³ÏÔʾµÄµÄÃû³ÆÀý£ºhome home=\ÍøÕ¾Ê×Ò³\ÖÐÎĵ¼º½ÏÔʾÊ×Ò³µÄÎÄ×Ö