Dedecms basic code version for AD setting

Source: Internet
Author: User

1. At the end of each article in the article, click the advertisement position above the top,

The size of this position is 658*60 658 length. Do not change the height of 60.
Ad code development here --houtai -- templates-- templates -- article_article.htm Content Page Template -- modify -- see a lot of code
Find the following code .........
<Small> time: </small> {dede: field. pubdate function = "MyDate ('Y-m-d H: I ', @ me)"/} <small> Source: </small> {dede: field. source/} <small> author: </small> {dede: field. writer/} <small> CLICK: </small> <script src = "{dede: field name = 'phpurl'/}/count. php? View = yes & aid = {dede: field name = 'id'/} & mid = {dede: field name = 'mid '/} "type = 'text/javascript' language =" javascript "> </script> Times </div> <! -/Info->
{Dede: field. description runphp = 'yes '}
If (@ me <> ") @ me = '<div class =" intro ">'. @ me. '</div> ';
{/Dede: field. description}
<Div class = "content">
{Dede: field. body /}
</Div> <! -/Content->
{Dede: myad name = 'wenzhang '/}
<Div class = "dede_pages">
<Ul class = "pagelist">
{Dede: pagebreak /}
Probably after the time-source-author. See </div> <! -/Content->
After that, put your ad code in the lower line and click Save. As in my example above: </div> <! -/Content->
{Dede: myad name = 'wenzhang '/}

2. The advertisement position on the right side of the homepage, below the sidebar, and above the voting survey. This location is 250*250

Put the advertising code in the navigation bar. The following figure shows the template.ap-southeast-inc.html homepage template. Modify the template. Check the following code, find the word "vote", and put your code in the voting investigation line. The following example shows the Code:
{Dede: myad name = 'celan '/}
<Dt> <strong> voting </strong> </dt>

3. Change the member part into an advertisement

First, we will remove the original member content and locate the Code <a href = "#" _ for = "uc_member"> member </a> and <dd id = "uc_member">
<Div id = "_ userlogin">
<Div class = "userlogin">
<Form name = "userlogin" action = "{dede: global. pai_memberurl/}/index_do.php" method = "POST">
<Input type = "hidden" name = "fmdo" value = "login"/>
<Input type = "hidden" name = "dopost" value = "login"/>
<Input type = "hidden" name = "keeptime" value = "604800"/>
<Div class = "fb"> <span> User name: </span>
<Input type = "text" name = "userid" size = "20" class = "ipt-txt"/>
</Div>
<Div class = "fb"> <span> password: </span>
<Input type = "password" name = "pwd" size = "20" class = "ipt-txt"/>
</Div>
<Div class = "fb"> <span> Verification Code: </span>
<Input type = "text" name = "vdcode" size = "8" class = "ipt-txt"/>

</Div>
<Div class = "submit">
<Button type = "submit" class = "btn-1"> login </button>
<A href = "{dede: global. cmd_memberurl/}/index_do.php? Fmdo = user & dopost = regnew "> register an account </a> <a href =" {dede: global. Alibaba _memberurl/}/resetpassword. php "> forgot password? </A>
</Div>
</Form>
</Div>
</Div>
<! --/Userlogin -->
<Script language = "javascript" type = "text/javascript"> CheckLogin (); </script>
<Div class = "latestlogin"> <strong> recently logged-on member </strong>
<Ul class = "e7">
{Dede: memberlist row = 6 signlen = 30}
<Li> <a href = "[field: spaceurl/]" target = "_ blank"> [field: uname/] </a> </li>
{/Dede: memberlist}
</Ul>
</Div>
<! --/Latestlogin -->
</Dd>
<! --/Uc_member -->
First, change "member" in <a href = "#" _ for = "uc_member"> member </a> to "sponsor link" or "advertisement ".

Then create an advertisement. Here I won't get the advertisement code {dede: myad name = 'uccenter'/} use the following code to replace the long red code <dd id = "uc_member" ">
<Div align = "center" ">{dede: myad name = 'uccenter'/} </">
</Dd ">
"> <! --/Uc_member -->
Save the update.

4. Add an advertisement at the top of the search tag at the bottom of the homepage menu bar.
The size of this place is best placed in the navigation bar advertisement. The size is the best of 950*90, and the length is 950. The size of 90 can be changed. I put text advertisements in this place. You can put pictures in the navigation bar.
The Advertising Code is placed here. The following figure shows the template: Template -- template management -enter head.htm list page header template [modify] -- click Modify -- view page code-find the following
</Div>
{Dede: myad name = 'wenzi '/}
<! -/Nav->
<Div class = "search">
<Div class = "w960 center">
Put your advertisement code in <! -/Nav->
Above <div class = "search">, as shown in my example, you can.

5. Add the logo at the top of the homepage to the right of the logo
The size on the top of the homepage is 480*60, so the advertisement image size is also 480*60.
Go directly to the background module-Advertisement Management-now there is an advertisement (this is the advertisement that comes with the System) -- click "change"-"normal display content"-"Put your advertisement code into normal display content"-click "OK" below.
This advertisement code can be seen here. Backend --template-manage template-enter head.htm list page header template [modify] -- click Modify -- view page code-
The seventh line in the code
"{Dede: myad name = 'topbanner '/} is the advertisement code, that is, the advertisement code at the top of the homepage.

6. Text ads under the homepage and channel "image information"
Advertising method:
Find the following code on the homepage and templates of each channel:
<! --/Picnews -->
<Div class = "listbox">
{Dede: channelartlist}
Text ads are adjusted and placed here
<Dl class = "tbox">

PS: in the background, you can adjust the code of the advertising space first.

7. Under the hotspot content in the article page, the advertisement position is a square advertisement position below the hotspot content in the sidebar:
The advertisement size is 250*250. The advertisement cannot be larger than 250*250. If it is smaller, it can be displayed. It is not normal if it is bigger.
The following is the advertisement code:
Ad code development here --houtai -- templates-- templates -- article_article.htm Content Page Template -- modify -- see a lot of code
Find the following code: the last five lines and the sixth line .........
</Div>
{Dede: myad name = 'celan1 ′/}
</Div> <! -/Pright->
</Div>
{Dede: include filename1_footer.htm "/}
<! -/Footer->
In </div> <! -/Pright-> put your ad code above, as shown in my example:
{Dede: myad name = 'celan1 ′/}
</Div> <! -/Pright->

8. In each article, open the template \ templets \ default \ article_article.htm.
Find
<Div class = "content">
Put the code here
{Dede: field. body /}

The code is:
<SPAN style = "FLOAT: left">
{Dede: myad name = 'huanraoguanggao '/}
</SPAN>

Note: {dede: myad name = 'huanraoguanggao '/} is the DEDE code, that is, the advertisement code added in the background, which can be text, images, and so on.

9. Advertisement above the link

Add an advertisement at the top of the link. Long advertisement above the link.
First, the location of this location is 658*60 length 658 cannot be changed, it is smaller than 658, it can be higher, it cannot be all displayed. The height of 60 can be any, 70 high 80 high 90 high 100 high can be. Now go to the background-module-Advertisement Management-Add a new advertisement-enter relevant data as required-enter the required data and click OK-go back to Advertisement Management-copy the newly added code (that is {dede: myad name = *****/}
Put this advertising code here-backend-templates--w.templates-enter index.html homepage template-Modify-see the following code
Find .......................
<! -/Listbox->
{Dede: myad name = 'shouye1 ′/}
</Div>
<! -/Pleft->
<Div class = "pright">
<Div class = "usercenter">
<Dl class = "tbox">
<Dt> <strong> Interaction Center </strong> <span class = "label"> <a href = "#" _ for = "uc_digg"> step on ............... .......
Text, put your copied ad code in <! -/Listbox->
The following line is enough. The preceding example is as follows.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.