View Single Post
  #46 (permalink)  
Old 02-06-2008, 09:45 PM
Koshin's Avatar
Koshin Koshin is offline
Casual Pligger
 
Join Date: Jan 2008
Posts: 34
Thanks: 1
Thanked 0 Times in 0 Posts
HI there.

can anyone help me in implimenting this ad placement, the first code (728x90) works fine for me except that it repeats the page twice, u see the news or story twice and thats not right, i have only thus far 6 stories and i set the number to 10 before it goes to page 2, so not sure if that is why its doing this but what i want is the add to appear after every 5 posts so twice per page.

and the side bar one or 200x200 doesnt work for me coz i cant find what you said find, here is my code in bothe cases im using the Yget template on 9.9.0 version.

here is my first code, pligg.tpl

PHP Code:
                        {config_load file="/languages/lang_".$pligg_language.".conf"}
<!
DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<
html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">

    <
head>
        {include 
file="meta.tpl"}
    
        <
link rel="stylesheet" type="text/css" href="{$my_pligg_base}/templates/{$the_template}/css/main.css" media="screen" />

        {if 
$Voting_Method eq 2}
            <
style type="text/css" media="screen">    
                .
top {literal}{{/literal}padding:0 0 0 5px;margin-left:-0px;{literal}}{/literal}
                .
news-submitted {literal}{{/literal}font-size:85%;margin-bottom:3px;color:#999999; {literal}}{/literal}
                
.news-body-text {literal}{{/literal}margin:10px 0px 0px 0pxfont-size:96%;{literal}}{/literal}
                .
news-details {literal}{{/literal}margin:0;font-size:85%;{literal}}{/literal}
            </
style>
            <
link rel="stylesheet" type="text/css" href="{$my_pligg_base}/templates/{$the_template}/css/star_rating/star.css" media="screen" />
        {/if}

        {* 
this is an IE6 specific 'hack' for the yget template *}
        <!--[if 
lte IE 6]>
            <
link rel="stylesheet" type="text/css" href="{$my_pligg_base}/templates/{$the_template}/css/ie6.css" media="screen" />
            <
script type="text/javascript">
                if (
typeof blankImg == 'undefined') var blankImg '{$my_pligg_base}/templates/{$the_template}/images/blank.gif';
            
</script>
            <style type="text/css" media="screen">
                body {ldelim}behavior:url({$my_pligg_base}/templates/{$the_template}/css/iehfix.htc); {rdelim}
                img {ldelim}behavior:url({$my_pligg_base}/templates/{$the_template}/css/iepngfix.htc); {rdelim}
            </style>    
        <![endif]-->

        {checkActionsTpl location="tpl_pligg_pre_title_thickbox"}
    
        {checkForCss}
        {checkForJs}        
    
        {checkActionsTpl location="tpl_pligg_pre_title_lightbox"}

        {if $pagename neq "published" && $pagename neq "upcoming"}
            {if $Spell_Checker eq 1}            
                <script src="{$my_pligg_base}/3rdparty/speller/spellChecker.js" type="text/javascript"></script>
            {/if}
        {/if}    

        <title>{if isset($pretitle)}{$pretitle}{/if}{#PLIGG_Visual_Name#}{if isset($posttitle)}{$posttitle}{/if}</title>
        <link rel="alternate" type="application/rss+xml" title="RSS 2.0" href="{$my_base_url}{$my_pligg_base}/rss.php"/>
        <link rel="icon" href="{$my_pligg_base}/favicon.ico" type="image/x-icon"/>    
    </head>

    <body {$body_args}>
    
        <div id="wrap">
        
            <div id="header">
                {include file=$tpl_header.".tpl"}
            </div><!-- header end -->
            
            <div id="content-wrap2">  
                
                <div id="contentbox" {if $pagename eq "editor"}style="width:100%"{/if}>            
                    {checkActionsTpl location="tpl_pligg_above_center"}
                    {include file=$tpl_center.".tpl"}
                    {checkActionsTpl location="tpl_pligg_below_center"}    
                </div><!-- contentbox end -->
                
                <div id="sidebar">
                    {if $pagename neq "editor"}{include file=$tpl_right_sidebar.".tpl"}{/if}
                </div><!-- sidebar end -->

            </div><!-- content-wrap end --> 
{if $pagename eq "index" || $pagename eq "story"}
<div align="left" style="float: left">

<script type="text/javascript"><!--
google_ad_client = "pub-0781249496911609";
/* 300x250, created 2/6/08 */
google_ad_slot = "8966375401";
google_ad_width = 300;
google_ad_height = 250;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>

</div>
<div align="right">

/* remove this line and put adbrite medium rectangle ad code */

</div>
<div style="clear: both"></div>
{/if}

                <div id="inside">
                        {checkActionsTpl location="tpl_pligg_above_center"}

                  {include file=$tpl_center.".tpl"}
                  
                        {checkActionsTpl location="tpl_pligg_below_center"}

                  </div><!-- inside end -->
                      
                </div><!-- contentbox end -->
                
            </div><!-- content-wrap end --> 

{if $pagename eq "index" || $pagename eq "story"}
<div align="center">

/* remove this line and put 728x90 link unit adsense code */

/* remove this line and put 728x90 text link ads code */

<script type="text/javascript"><!--
google_ad_client = "pub-0781249496911609";
/* 728x90, created 2/6/08 */
google_ad_slot = "2359816335";
google_ad_width = 728;
google_ad_height = 90;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>

</div>
{/if}                   
        </div><!-- wrap end -->

        {include file=$tpl_footer.".tpl"}

        <script src="{$my_pligg_base}/js/xmlhttp.php" type="text/javascript"></script> {* this line HAS to be towards the END of pligg.tpl *}
            
    </body>
</html> 
And finally the sidebar.tpl

PHP Code:
        {if $user_authenticated ne true} {* show only if NOT logged in *}
    {
assign var=sidebar_module value="about_box"}{include file=$the_template_sidebar_modules."/wrapper.tpl"}
{/if}

{
checkActionsTpl location="tpl_sidebar_top"
 
{if 
$user_authenticated ne true} {assign var=sidebar_module value="login"}{include file=$the_template_sidebar_modules."/wrapper2.tpl"} {/if}

{
assign var=sidebar_module value="sidebar_stories_u"}{include file=$the_template_sidebar_modules."/wrapper.tpl"}

{
assign var=sidebar_module value="sidebar_stories"}{include file=$the_template_sidebar_modules."/wrapper.tpl"}

{
assign var=sidebar_module value="categories"}{include file=$the_template_sidebar_modules."/wrapper.tpl"}

{
assign var=sidebar_module value="sidebar_comments"}{include file=$the_template_sidebar_modules."/wrapper.tpl"}

{if 
$Enable_Tags eq 'true'} {assign var=sidebar_module value="tags"}{include file=$the_template_sidebar_modules."/wrapper.tpl"} {/if} 
And by the way im running the Adsense module so dunno what effect that is having on these codes,.
Reply With Quote