Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

The modification method of English station made by dedecms

2025-04-06 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/02 Report--

The purpose of this article is to share with you the content of the revision method of dedecms as an English station. The editor thought it was very practical, so I shared it with you as a reference. Let's follow the editor and have a look.

How to modify the English station of dedecms?

Many domestic netizens choose to weave dreams in English stations, in fact, dream weaving is indeed very powerful, but individuals still suggest to use foreign more mature CMS or wp, but some users are used to dream weaving, and the collection is relatively easy, so I shared this article about using weaving dreams, that is, dedecms to do English stations need to change.

The first is coding:

Is to install the dede of utf-8. Then find an English template in the dede forum

After installation, take a look at the front desk. It has become an English version.

Start to make a template, you can imitate the English station to do.

There are a few points to pay attention to in template making:

1. Character set problem: charset=utf-8

two。 Fonts use Verdana, Arial, Helvetica, sans-serif. This font shows better English.

3, do not appear Chinese characters on all pages, such as full-width spaces

4. The layout and details of the page should conform to the habits of foreigners.

For example, the time format is "month-day-year", and the corresponding dede tag is: [field:pubdate function=strftime ('% mmury% dmurf% yawpjimme) /]

5.SEO details

(1) url processing of articles

As we all know, google attaches great importance to url addresses, and the same article entitled old food new tricks, if url is displayed as http://www.xxx.com/list1/20070928/5104.html, is obviously not as weighted as http://www.xxx.com/list1/old-food-new-tricks.html. Dede default generated page address is the former, how to change to the latter display type?

Go to the background and modify the article naming rules of the column. The default is: {typedir} / {Y} {M} {D} / {aid} .html

Modified to: {typedir} / {pinyin} .html I removed {Y} {M} {D}, which reduces the level of the article and is beneficial to the engine.

For more information on how to modify it, please see:

Such as the title, use dede to make the article title page display path for the title pinyin .html, for example: the article title is: what is the website, the article path display: zhanyouwangshishenmea.html, what are the benefits of this display? Shit, do I have to tell you that?

Methods:

Select: website column management, modify the advanced options of the column, article naming rules: {typedir} / {Y} {M} {D} / {aid} .html this is the default state

Modified to: {typedir} / {pinyin} .html. I think {Y} {M} {D} is useless, so it has been removed.

Update it again to see if it works.

Don't worry, Pinyin is displayed now, zhanyouwangshishenmea_1.html, but there is an extra _ 1 after it. How to get rid of this?

Modify the inc_channel_unit_function file in include and find $articleRule = str_replace ("{pinyin}", GetPinyin ($title). "_". $aid,$articleRule); remove. "_". $aid, and that's it!

If the title of the article is in English, _ will be added between the words, but adding _ in the middle of the word has no meaning to gg. It must be changed to "-". The method of modification is as follows.

Open include/inc/inc_fun_funAdmin.php

For ($isset [$pinyins [$c]) {$c = $str [$I]. $str [$iTun1]; $iTunes; if ($ishead==0) $restr. = $pinyins [$c]; else $restr. = $pinyins [$c] [0];} else $restr. = "-";} else if (eregi ("[a-z0-9]", $str [$I])) {$restr. = $str [$I];} else {$restr. = "-";}

Change

Restr. = "-"; these things

Add "-" in the middle of Pinyin

Modify include\ inc\ inc_fun_funAdmin.php

For ($if ($ishead==0) $restr. = $pinyins [$c]. "-"; if ($isclose==0) unset ($pinyins); if (substr ($restr,-1) = "-") $restr = substr ($restr,0,strlen ($restr)-1)

Red is a new addition.

(2) treatment of meta

I changed the meta of article_article.htm to:

Note that there must be a space between the labels, otherwise the latter will not work.

After this revision, the meta of each article is different.

I want to implement the meta of list_article.htm as

Thank you for reading! This is the end of the revision method of dedecms English station. I hope the above content can help you to some extent, so that you can learn more knowledge. If you think the article is good, you can share it and let more people see it.

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: 0

*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.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report