Two uses of zblog browsing statistics code

web front end six thousand four hundred and six 12 years ago (2012-05-02)

some zblog theme There is no browsing statistics. To add the zblog browsing statistics function, please add the following code:

1. Add the following code to the appropriate location of the b_article-single.html file:

 <script type="text/javascript" _ue_org_tagname="script">strBatchCount+="spn<#article/id#>=<#article/id#>,"</script>

Note: The tag shows the number of views of the current article. In the above code, the user updates the number of views of zblog, and adds 1 to the count every time the page is refreshed.

2. Add the following code in the appropriate location of the b_article-multi.html file:

 <script type="text/javascript" _ue_org_tagname="script">strBatchView+="spn<#article/id#>=<#article/id#>,"</script>

Note: The above code is only used to display the number of views, not to refresh the cumulative count with the current page. Can be added on the home page, category page and top page

3. In files such as default.html, single.html, catalog.html in the TEMPLATE directory, follow the body tag with the following code.

 <script type="text/javascript" _ue_org_tagname="script">var strBatchView=""; var strBatchInculde=""; var strBatchCount=""; </script>

Note: The above code is indispensable for zblog browsing count. Only by adding the above code can zblog browsing count work normally.

4. In the file default.html, single.html, catalog.html, etc. in the TEMPLATE directory, place the following code immediately before the/body tag.

 <script type="text/javascript" _ue_org_tagname="script"> $(document).ready(function(){ try{ var elScript = document.createElement("script"); elScript.setAttribute("language", "JavaScript"); elScript.setAttribute("src", " https://www.toyean.com/function/c_html_js. ASP ? act=batch"+unescape("%26")+"view=" + escape(strBatchView)+unescape("%26")+"inculde=" + escape(strBatchInculde)+unescape("%26")+"count=" + escape(strBatchCount)); document.getElementsByTagName("body")[0].appendChild(elScript); } catch(e){}; }); </script>

Note: The above code is indispensable for zblog browsing count. Only by adding the above code can zblog browsing count work normally.