DEDECMS System ad Setup code base version _php tips

Source: Internet
Author: User
Tags button type
1. At the end of each article in the article, the top of the post to step up the advertising position,

The size of this position is 658*60 658 length do not change, 60 height can be arbitrarily changed
Ad code added here--background-– template--Default template management--Find article_article.htm article content page template-– Modify-– see a lot of code
Locate 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 this word, put your ad code in a line below, click Save on it. As above my example:</div><!–/content–>
{Dede:myad name= ' Wenzhang '/}

2. The advertising position on the right side of the homepage, under the sidebar, the poll above. The size of this position is 250*250

Put the ad code there--Backstage-– template--Default template management--go to the Index.html homepage template--change--look at the following code, find the word for the poll, and put your code on the polling line, as in the following example:
{Dede:myad name= ' Celan '/}
<dt><strong> Polling Survey </strong></dt>

3. Change the membership part into an advertisement

First we dispose of the original member content to find/templets/default/index.htm file locate this code <a href= "#" _for= "Uc_member" > member </a> and &LT;DD id= "UC _member ">
<div id= "_userlogin" >
<div class= "Userlogin" >
<form name= "Userlogin" action= "{dede:global.cfg_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> username:</span>
<input type= "text" name= "userid" "size=" class= "Ipt-txt"/>
</div>
<div class= "FB" ><span> password:</span>
<input type= "password" name= "pwd" "size=" 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.cfg_memberurl/}/index_do.php?fmdo=user&dopost=regnew" > registered account </a> <a href= " {dede:global.cfg_memberurl/}/resetpassword.php > Forgot password?</a>
</div>
</form>
</div>
</div>
<!--/userlogin-->
<script language= "javascript" type= "Text/javascript" >checklogin ();</script>
<div class= "Latestlogin" > <strong> recently landed 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-->
Good to change the first <a href= "#" _for= "Uc_member" > member </a> "Member" modified to "sponsored links" or advertising class

And then create a new ad here, I'm not wordy. Get the ad code {Dede:myad name= ' uccenter '/} replace the long red code with the following code &LT;DD id= "Uc_member" >>
<div align= "center" >> {dede:myad name= ' uccenter '/} </' >>
</dd ">>
"><!--/uc_member-->
Save the update over the

4. The top of the menu bar, search tag above the ads added.
The size of this place is best to put banner ads. Size is the best 950*90, length 950 do not change, 90 height of the size can be changed. I put in this place is the text advertisement, everybody can put banner picture.
Ad code here Backstage-– template--Default template management-Enter Head.htm list page header template [Modify]--click Modify-See page code-find the following
</div>
{Dede:myad name= ' Wenzi '/}
<!–/nav–>
<div class= "Search" >
<div class= "w960 Center" >
Put your ad code in <!–/nav–>
<div class= "Search" above the >, like my example, it's OK.

5. Top of the homepage ads add the top logo to the right
The size of the top of the home page is 480*60 so the size of the advertising picture is 480*60 best.
Directly into the back-end module-advertising management-there is already an ad (this is the system's own ads)-– Click to change-– normal display content-put their own advertising code into the normal display content-– Click on the confirmation on the following.
This ad code can be seen here. Background-– template--Default template management-Enter Head.htm list page header template [Modify]--click Modify-See page code-
The seventh line in the code
"{Dede:myad name= ' Topbanner '/} is the advertising code, which is the top of the homepage."

6. Homepage and channel "picture Information" below the text advertisement
How to put advertising:
Locate the following code on the home page and each channel template:
<!--/picnews-->
<div class= "ListBox" >
{Dede:channelartlist}
Put the text ad right here.
&LT;DL class= "Tbox" >

PS: Backstage "ad management" can first adjust the advertising bit code.

7. Article page sidebar hot content below the ads position sidebar hotspot content below a square ad position:
This advertisement position size is 250*250 advertisement can not be bigger than 250*250, small can show, big is not normal.
Advertising code in the following location:
Ad code added here--background-– template--Default template management--Find article_article.htm article content page template-– Modify-– see a lot of code
Find the following code, about the fifth and sixth lines ...
</div>
{Dede:myad name= ' celan1′/}
</div><!–/pright–>
</div>
{dede:include filename= "footer.htm"/}
<!–/footer–>
Put your ad code on top of </div><!–/pright–> just like my example:
{Dede:myad name= ' celan1′/}
</div><!–/pright–>

8. Surround ads in each article, open \templets\default\article_article.htm this template
Found it
<div class= "Content" >
The code is here.
{dede:field.body/}

Where the code is:
<span style= "Float:left" >
{Dede:myad name= ' Huanraoguanggao '/}
</SPAN>

Description: {Dede:myad name= ' Huanraoguanggao '/} This section is the Dede code, is in the backstage adds the advertisement code, may be the text, the picture and so on

9. Links above the ads

Links above the ads to add methods. Friendship links the long ads above.
First of all, the location of this place is 658*60 length 658 can not be changed, smaller than 658, high will not be all shown. Height 60 can be arbitrary, 70 high 80 high 90 high 100 high all can. Now go backstage-– module--AD management--Add a new ad-– then fill in the relevant data--click OK--on back to ad management--to copy the new added code (that is, {Dede:myad name=*****/}
Put this ad code here-backstage-– template--Default template management-Go to index.html homepage template--Modify-look at the following code
Found it.......................
<!–/listbox–>
{Dede:myad name= ' shouye1′/}
</div>
<!–/pleft–>
<div class= "Pright" >
<div class= "Usercenter" >
&LT;DL class= "Tbox" >
<dt> <strong> Interactive Center </strong> <span class= "label" > <a href= "#" _for= "Uc_digg" > Step on ...... ......
Words, put your copy of the ad code into the <!–/listbox–>
The following line is OK. As the above example.

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.