In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-02 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
Editor to share with you the use of PHPCMS, I believe that most people do not know much about it, so share this article for your reference, I hope you will learn a lot after reading this article, let's go to know it!
Comment call:
{php $comment_tag = pc_base::load_app_class ("comment_tag", "comment"); $comment_total = $comment_tag- > count (array ('commentid'= >' content_'.$ v [catid].'-. $v [id].'-. $modelid);} comment: {if $comment_total} {else} 0 {/ if}
Recommended bit calls:
{pc:content action= "position" posid= "2" moreinfo= "1" catid= "$catid" order= "listorder DESC" num= "1"} {loop $data $r} {/ loop} {/ pc}
Click-through call:
The list page calls:
{php $db = pc_base::load_model ('hits_model'); $_ r = $db- > get_one (array (' hitsid'= > 'cripty.conversation modelid.conversation modelid.r [id])); $views = $_ r [views];} {$views}
The content page calls:
Hit:
Total number of judgments
{if $n==count ($dat)} class= "friendly-border" {/ if}
One article on the news and the next one shows
Previous post: {$previous_ page [title]} next post: {$next_ page [title]}
Phpcms grouping
Array_chunk ($data (array), 10 (there are several numbers in each group)) {pc:content action= "lists" moreinfo= "1" catid= "17" num= "20" order= "id ASC"} {php $da=array_chunk (several per group is displayed);} {loop $da $d} {php $iTunes 1 } {loop $d $r}! [] ({$r [thumb]})
{$r [title]}
{php $iTunes;} {/ loop}
{/ loop} {/ pc}
/ / number of words intercepted
{str_cut ($r [description], 102 description.')} {str_cut (strip_tags ($r [content]), 300, "...")} / / the intercept text strip_tags () function strips the tags of HTML, XML, and PHP from the string.
Add favorites, set home page
Join the collection and set it as the home page
Add anchor point
{$r [url]} # n {$r [id]} {$r [url]} & # area {$n}
Time difference
{php $now = strtotime ("now")} {date
Get the current column
{php $arrid=$r [catid]} {$CATEGORYS [$arrid] [catname]}
Get the current column parent column
{$CATEGORYS [$CATEGORYS [$arrid] [parentid]] [catname]}
Current location call:
{catpos ($catid)}
Phpcms is called from the specified article.
{pc:content action= "lists" catid= "10" order= "id DESC LIMIT 1 authoring 4MB -" num= "4"} / / so that you can call the data from the second item. There are two numbers in order= "id DESC LIMIT 1 and 4," the first number 1 indicates that it is called from Article 2, and the second number 4 indicates that a total of 4 items are called. If it is changed to order= "id DESC LIMIT 0jin4muri -", then it means that the call starts from Article 1, and a total of 4 items are called. If it is changed to order= "id DESC LIMIT 2jin4 talk -", then it means that the call starts from Article 3, and a total of 4 items are called. The column specifies the number of displays (phpcms is called from the specified article) 1While-> displays {php $data = array_slice ($data,1) from the second;} {pc:content action= "category" catid= "$catid" num= "5" siteid= "$siteid" order= "listorder ASC,id ASC"} {php $data = array_slice ($data,1) {loop $data $r} {if $cat==$catid} {$r [catname]} {else} {/ if} {/ loop} {/ pc}
Return to the superior
{$CATEGORYS [$catid] [url]} return to the previous level
Related articles
{pc:content action= "relation" relation= "$relation" catid= "$catid" num= "5" keywords= "$rs [keywords]"} {loop $data $r} {$[inputtime]} ({date ('Ymurm data dente dharma [inputtime])}) {/ loop} {/ pc}
Call multi-graph
{loop string2array ($r ['pics']) $v}
Call advertisement
{php $banner=getads (11); $istat1;} {loop $banner`status` = 99 ") {if $banner`status` = 99"); / / when the current page is the first post: click the previous page to still display the first if (empty ($previous_page)) {$previous_page = $this- > db- > get_one ("`catid` ='$catid' AND `id` ='$id' AND `status` = 99",'*','id DESC') } / / when the current page is the last post: click the next one to still display the last if (empty ($next_page)) {$next_page = $this- > db- > get_one ("`catid` ='$catid' AND `id` ='$id' AND `status` = 99");} call: previous: {$previous_ page [title]} next: {$next_ page [title]}
Mobile station call column picture
{$TYPE [$typeid] [image]}
Column secondary display
{pc:content action= "category" catid= "0" order= "listorder DESC" $siteid "num=" 7 "} {loop $data $r} {pc:content action=" category "catid=" $r [catid] "num=" 8 "siteid=" $siteid "order=" listorder DESC "return=" dat "} {loop $dat $v} {$v [catname]} {/ loop} {/ pc}
{/ loop} {/ pc}
Download the model
{pc:content action= "lists" catid= "$catid" num= "15" order= "id DESC" page= "$page" moreinfo= "1"} {loop $data $r} {php $xiazai = string2array ($r ['downfiles']) } {loop $xiazai $b} {$r [title]} [{date ('Ymurm Hdate') {str_cut (strip_tags ($r [content]))} {/ loop} {/ loop} {/ pc}
Judge odd and even numbers
{$n}. {if $n% 2 if 0} even {else} odd {/ if}
The above is all the contents of this article "how to use PHPCMS". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 269
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.