Provide zblog template_zblog them_wordpress template download and customization

Reprint: ytcms advanced tutorial Niu X's ytcms

Tianxing Studio 2015-02-06 23:19 course seven thousand two hundred and seventy-four 1 Comments


After reading an article, I found: Well, zblog + ytcms Really omnipotent

This article is reproduced from the official of the author "Yu Ting" of ytcms website The post bar made with zblog, Niu X. Those who are interested can look around: http://d.pugu.biz

The contents are as follows:

Traverse all classification sets:

 <!-- {foreach Category Categorys}--> <!-- {if isObject(Category)}--> <!-- {if Category.ID<>0}--> <li><a href="{$Category.Url}">{$Category.Name}</a></li> <!-- {/if}--> <!-- {/if}--> <!-- {/next}-->

Get the subcategory with classification ID 5:

 <!-- {eval ID = 5}--> <!-- {foreach Category Categorys}--> <!-- {if isObject(Category)}--> <!-- {if Category.ParentID = ID}--> <li><a href="{$Category.Url}">{$Category.Name}</a></li> <!-- {/if}--> <!-- {/if}--> <!-- {/next}-->

General header acquisition keyword describe (Note: Meta plug-in is required, and the module name to be created in YTCMS is: keywords, description):

 <!-- {eval isSingle = isNumeric("<#article/id#>")}--> <!-- {eval isCatalog = isNumeric("<#articlelist/category/id#>")}--> <!-- {if isSingle}--> <!-- {YT:Article DataSource="GetArticleModel('<#article/id#>')" Name="a"}--> <!-- {eval meta_keywords = a.Meta.GetValue("keywords")}--> <!-- {eval meta_description = a.Meta.GetValue("description")}--> <!-- {if len(meta_keywords) = 0}--> <!-- {eval meta_keywords = a.TagToName}--> <!-- {/if}--> <!-- {if len(meta_description) = 0}--> <!-- {eval meta_description = left(TransferHTML(a.Content,"[nohtml][html-format]"),75)}--> <!-- {/if}--> <!-- {/YT:Article}--> <!-- {elseif isCatalog}--> <!-- {if isObject(Categorys("<#articlelist/category/id#>"))}--> <!-- {eval meta_keywords = Categorys("<#articlelist/category/id#>").Meta.GetValue("keywords")}--> <!-- {eval meta_description = Categorys("<#articlelist/category/id#>").Meta.GetValue("description")}--> <!-- {if len(meta_keywords) = 0}--> <!-- {eval meta_keywords = Categorys("<#articlelist/category/id#>").Name}--> <!-- {/if}--> <!-- {if len(meta_description) = 0}--> <!-- {eval meta_description = Categorys("<#articlelist/category/id#>").Name}--> <!-- {/if}--> <!-- {/if}--> <!-- {else}-- > <!-- {eval meta_keywords = LoadFromFile(BlogPath&"zb_users/include/keywords.asp","utf-8")}--> <!-- {eval meta_keywords = TransferHTML(meta_keywords,"[nohtml][html-format]")}--> <!-- {eval meta_keywords = replace(replace(meta_keywords,chr(10),""),chr(13),"")}--> <!-- {eval meta_description = LoadFromFile(BlogPath&"zb_users/include/description.asp","utf-8")}--> <!-- {eval meta_description = TransferHTML(meta_description,"[nohtml][html-format]")}--> <!-- {eval meta_description = replace(replace(meta_description,chr(10),""),chr(13),"")}--> <!-- {/if}--> <meta name="description" content="{$meta_description}" /> <meta name="keywords" content="{$meta_keywords}" />

Save the data recycled by YTCMS to generate an XML file:

 <? xml version="1.0" encoding="gb2312"?> <player showDisplay="yes" showPlaylist="no" autoStart="no"> <!-- {YT:Article DataSource="GetArticleCategorys(5,'12')"}--> <song path="{$BlogHost&url}" title="{$Article.Title}"/> <!-- {/YT:Article}--> </player> <% htm = replace(htm,"{::vbcrlf}",vbcrlf) htm = replace(htm,"{::vblf}",vblf) htm = replace(htm,"{::vbcr}",vbcr) htm = TransferHTML(htm,"[html-japan]") Call SaveToFile(BlogPath&"mp3.xml",htm,"gb2312",False) %>

Get 5 articles under each category:

 <!-- {foreach Category Categorys}--> <!-- {if Category.ID<>0}--> {YT:Article DataSource="GetArticleCategorys(5,Category.ID)"} [<a href="{$Category.Url}">{$Category.Name}</a>]<a href="{$Article.Url}">{$Article.Title}</a> {/YT:Article} <!-- {/if}--> <!-- {/next}-->
Another sigh: It's really bursting

Can't find a tutorial that can solve your problem?

You can try to search or ask questions directly online. We also provide charging technical support. If you need it, you can contact us online.

Online questions Online Service

yes one Comments from netizens:

  •  A rainy night

    A rainy night Nine years ago (2015-02-28) reply

    Is this the PHP version? Come and learn. I can't understand..

welcome you Comment: Cancel Reply

 Please fill in the verification code
  • Latest articles
  • Hot article ranking
  • Most Comments
Label aggregation
  • Sign in
  • Registered account Forgot your password?
  • register
  • Already have an account? Direct login Forgot your password?
  • Social account login