Go Back   Pligg Forum > Pligg Help > General Help
Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 03-01-2007, 10:21 AM
kapengbarako kapengbarako is offline
Casual Pligger
 
Join Date: Feb 2007
Posts: 44
Downloads: 6
Uploads: 0
Thanks: 5
Thanked 7 Times in 3 Posts
::How to:: Ad Placement in Pligg

I have written a tutorial on how to place ads on your Pligg site using three different revenue programs including Adsense. Comments and feedback are most welcome. You can access the tutorial here. You can see a demo here.

The issue of Google Ads appearing on non-content pages (e.g. login page, submit page, etc.) has been addressed and fixed.

I hope this one gets a sticky ;)
__________________
Viral Videos Vault

Last edited by kapengbarako : 03-01-2007 at 10:55 AM.
Reply With Quote
The Following 5 Users Say Thank You to kapengbarako For This Useful Post:
Sponsored Links
  #2 (permalink)  
Old 03-01-2007, 10:58 AM
kapengbarako kapengbarako is offline
Casual Pligger
 
Join Date: Feb 2007
Posts: 44
Downloads: 6
Uploads: 0
Thanks: 5
Thanked 7 Times in 3 Posts
Thank you KB (you know we're both KB :D ) for making this a sticky post ;)
__________________
Viral Videos Vault
Reply With Quote
  #3 (permalink)  
Old 03-02-2007, 02:34 PM
jon's Avatar
jon jon is offline
Casual Pligger
 
Join Date: Jan 2007
Posts: 76
Downloads: 2
Uploads: 0
Thanks: 5
Thanked 3 Times in 2 Posts
Hmmm.... I am obviously doing something wrong, but cannot get this to work.

I am using Pligg v9.0 - culd this be the problem? Once the new code is uploaded I get a blank page, at least everything below the menu bar is blank.


PHP Code:
{if $pagename eq “index” || $pagename eq “story”} 
Is this right for all sites? Confused...

Last edited by jon : 03-02-2007 at 02:38 PM.
Reply With Quote
  #4 (permalink)  
Old 03-02-2007, 04:43 PM
kapengbarako kapengbarako is offline
Casual Pligger
 
Join Date: Feb 2007
Posts: 44
Downloads: 6
Uploads: 0
Thanks: 5
Thanked 7 Times in 3 Posts
as i've mentioned in the tutorial, this method is tested on a Pligg 9.1 using a Mollio-Beat template in a 1024x728 resolution. Are you using the same?
__________________
Viral Videos Vault

Last edited by kapengbarako : 03-03-2007 at 08:06 AM.
Reply With Quote
  #5 (permalink)  
Old 03-03-2007, 04:26 AM
jon's Avatar
jon jon is offline
Casual Pligger
 
Join Date: Jan 2007
Posts: 76
Downloads: 2
Uploads: 0
Thanks: 5
Thanked 3 Times in 2 Posts
No, still on mollio-beat Pliggv9.0

Is there anychance that you may be able to make it work for v9.0? If so I would be extremely grateful!

Cheers,

Jon.
Reply With Quote
  #6 (permalink)  
Old 03-03-2007, 08:06 AM
kapengbarako kapengbarako is offline
Casual Pligger
 
Join Date: Feb 2007
Posts: 44
Downloads: 6
Uploads: 0
Thanks: 5
Thanked 7 Times in 3 Posts
please post your pligg.tpl here
__________________
Viral Videos Vault
Reply With Quote
  #7 (permalink)  
Old 03-03-2007, 02:50 PM
jon's Avatar
jon jon is offline
Casual Pligger
 
Join Date: Jan 2007
Posts: 76
Downloads: 2
Uploads: 0
Thanks: 5
Thanked 3 Times in 2 Posts
Here it is:

PHP Code:
{config_load file="/libs/lang.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>
        <
meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />    
        {include 
file="meta.tpl"}
        
        {if 
$Voting_Method eq 1}
        <
link rel="stylesheet" type="text/css" href="{$my_pligg_base}/templates/{$the_template}/css/main.css" media="screen" />
        {else}
        <
link rel="stylesheet" type="text/css" href="{$my_pligg_base}/templates/{$the_template}/css/star_rating/main.css" media="screen" />
        <
link rel="stylesheet" type="text/css" href="{$my_pligg_base}/templates/{$the_template}/css/star_rating/star.css" media="screen" />
        {/if}
    
        {if 
$enable_categorycolors eq 'true'}
        <
link rel="stylesheet" type="text/css" href="{$my_pligg_base}/templates/{$the_template}/css/catcolors.css" media="screen" />
        {/if}
    
        <
script src="{$my_pligg_base}/js/jspath.php" type="text/javascript"></script>
    
        {checkForCss}
        {checkForJs}

        <style type="text/css" media="screen">@import "{$my_pligg_base}/templates/{$the_template}/css/sneak.css";</style>
        <script language="JavaScript" type="Text/JavaScript" src="{$my_pligg_base}/templates/{$the_template}/js/toggle.js"></script> 
        
        {if $Spell_Checker eq 1}            
        <script src="{$my_pligg_base}/3rdparty/speller/spellChecker.js" type="text/javascript"></script>
        {literal}
        <script language="javascript" type="text/javascript">
             function openSpellChecker(commentarea) {
                   var txt = document.getElementById(commentarea);
                   var speller = new spellChecker( txt );
                   speller.openChecker();
             }
          </script>
        {/literal}
        {/if}
        
        
        
        {if $Spell_Checker eq 2}
        {literal}
                <script type="text/javascript">
                    function openSpellChecker(tarea){
                  var thetext = document.getElementById(tarea);
                        var subWindow = window.open('./3rdparty/speller2/check.php?tarea='+tarea+'&content=' + thetext.value,'def','height=300,width=800');
                    }
                </script>
        {/literal}
        {/if}
        
        
        
        {literal}
        <script type="text/javascript">
        <!--
            function show_hide_user_links(thediv)
            {
                if(window.Effect){
                    if(thediv.style.display == 'none')
                    {Effect.Appear(thediv); return false;}
                    else
                    {Effect.Fade(thediv); return false;}
                }else{
                    var replydisplay=thediv.style.display ? '' : 'none';
                    thediv.style.display = replydisplay;                    
                }
            }
        //-->
        </script>
        
        
        
        <script type="text/javascript">

            /***********************************************
            * Bookmark site script-  Dynamic Drive DHTML code library (www.dynamicdrive.com)
            * This notice MUST stay intact for legal use
            * Visit Dynamic Drive at http://www.dynamicdrive.com/ for full source code
            ***********************************************/

            function bookmarksite(title, url){
            if (document.all)
            window.external.AddFavorite(url, title);
            else if (window.sidebar)
            window.sidebar.addPanel(title, url, "")
            }

        </script>
        {/literal}
        
        {checkActionsTpl location="tpl_pligg_pre_title"}
        
        <title>{$pretitle}{#PLIGG_Visual_Name#}{$posttitle}</title>
        <link rel="alternate" type="application/rss+xml" title="RSS 2.0" href="http://{$server_name}{$my_pligg_base}/rss2.php"/>
        <link rel="icon" href="{$my_pligg_base}/favicon.ico" type="image/x-icon"/>
        <script src="{$my_pligg_base}/js/xmlhttp.php" type="text/javascript"></script>



        
    </head>

    <body {$body_args}>
        <div id="wrap">

<!-- tranquillizer header logo and menu etc. -->

<!--START HEADER SECTION--></head>
<body>

<a href="http://www.tranquillizer.co.uk/"><img
 alt="health and fitness, weight loss, bruce lee, weight training, balanced diet"
 src="http://www.tranquillizer.co.uk/images/header3.jpg"
 align="left" border="0" height="83" width="355" /></a>

<div align="right">
<div id="container";>
<!-- place a nice banner here later-->
</div>
</div>



<br clear="all" />


<!-- end tranquillizer header-->


            <div id="header">
                {include file=$tpl_header.".tpl"}
            </div><!-- header end -->
            
            {if $user_authenticated ne true}<div id="content-wrap1">
          {else}
              {if $cat_url neq ""}<div id="content-wrap2">
              {else}<div id="content-wrap3">
              {/if}
          {/if}




                <div id="sidebar">
                    {include file=$tpl_right_sidebar.".tpl"}
              
                </div><!-- sidebar end -->
                <div id="contentbox">
        
              <div id="breadcrumb">
                  {if $navbar_where.show neq "no"}
                      <a href = "{$my_base_url}{$my_pligg_base}">{#PLIGG_Visual_Breadcrumb_SiteName#}{#PLIGG_Visual_Breadcrumb_Home#}</a>
                         {if $navbar_where.link1 neq ""} » <a href="{$navbar_where.link1}">{$navbar_where.text1}</a>{elseif $navbar_where.text1 neq ""} » {$navbar_where.text1}{/if}
                          {if $navbar_where.link2 neq ""} » <a href="{$navbar_where.link2}">{$navbar_where.text2}</a>{elseif $navbar_where.text2 neq ""} » {$navbar_where.text2}{/if}          
                          {if $navbar_where.link3 neq ""} » <a href="{$navbar_where.link3}">{$navbar_where.text3}</a>{elseif $navbar_where.text3 neq ""} » {$navbar_where.text3}{/if}          
                          {if $navbar_where.link4 neq ""} » <a href="{$navbar_where.link4}">{$navbar_where.text4}</a>{elseif $navbar_where.text4 neq ""} » {$navbar_where.text4}{/if}          
                     {/if}
                </div>    


  


                <div id="inside">



                        {checkActionsTpl location="tpl_pligg_above_center"}

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

<br/><br/>                   
<strong>Attention Internet Explorer users:</strong> Unfortunately the video clips are not<br/> currently working in all versions of I.E. We are trying to resolve this problem at the moment.<br/> The clips are working in Opera, Netscape and Firefox. You can download firefox here:<br/> <script type="text/javascript"><!--
google_ad_client = "pub-xxx";
google_ad_output = "textlink";
google_ad_format = "ref_text";
google_cpa_choice = "CAAQkar2_gEaCHB-GBBpAgGnKKm14YcB";
google_ad_channel = "6039632920";
//--></script>
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script><br/><br/>


<p>
<em>&ldquo;Nothing contributes so much to tranquilize the mind as a steady purpose&rdquo; </em>(Mary Shelley, 
1797-1851).
<br>
<a href="http://www.tranquillizer.co.uk/">Tranquillizer Home Page</a> 
| <a href="http://www.tranquillizer.co.uk/contact.html">Contact Us</a> | <a href="http://www.tranquillizer.co.uk/store/">Shop</a> | <a href="http://www.tranquillizer.co.uk/articles">Health and Fitness Articles</a> |
<br>
Copyright © www.Tranquillizer.co.uk Tranquillizer - Health, Fitness and Relaxation</p>

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




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

    </body>
</html> 

Last edited by jon : 03-17-2007 at 10:08 AM.
Reply With Quote
  #8 (permalink)  
Old 03-03-2007, 10:52 PM
kapengbarako kapengbarako is offline
Casual Pligger
 
Join Date: Feb 2007
Posts: 44
Downloads: 6
Uploads: 0
Thanks: 5
Thanked 7 Times in 3 Posts
You may try to use this code. Please put your own ad codes and make a backup first of your original pligg.tpl file.

Code:
{config_load file="/libs/lang.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>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
		<meta name="verify-v1" content="1NJkXleoX0jnCzXsi4W4U+GEajOL0d0Xyk87AAohlRA=" />	
		{include file="meta.tpl"}
		
		{if $Voting_Method eq 1}
		<link rel="stylesheet" type="text/css" href="{$my_pligg_base}/templates/{$the_template}/css/main.css" media="screen" />
		{else}
		<link rel="stylesheet" type="text/css" href="{$my_pligg_base}/templates/{$the_template}/css/star_rating/main.css" media="screen" />
		<link rel="stylesheet" type="text/css" href="{$my_pligg_base}/templates/{$the_template}/css/star_rating/star.css" media="screen" />
		{/if}
	
		{if $enable_categorycolors eq 'true'}
		<link rel="stylesheet" type="text/css" href="{$my_pligg_base}/templates/{$the_template}/css/catcolors.css" media="screen" />
		{/if}
	
		<script src="{$my_pligg_base}/js/jspath.php" type="text/javascript"></script>
    
		{checkForCss}
		{checkForJs}

		<style type="text/css" media="screen">@import "{$my_pligg_base}/templates/{$the_template}/css/sneak.css";</style>
		<script language="JavaScript" type="Text/JavaScript" src="{$my_pligg_base}/templates/{$the_template}/js/toggle.js"></script> 
		
		{if $Spell_Checker eq 1}			
		<script src="{$my_pligg_base}/3rdparty/speller/spellChecker.js" type="text/javascript"></script>
		{literal}
		<script language="javascript" type="text/javascript">
	         function openSpellChecker(commentarea) {
	               var txt = document.getElementById(commentarea);
	               var speller = new spellChecker( txt );
	               speller.openChecker();
	         }
	      </script>
		{/literal}
		{/if}
		
		
		
		{if $Spell_Checker eq 2}
		{literal}
				<script type="text/javascript">
					function openSpellChecker(tarea){
			      var thetext = document.getElementById(tarea);
						var subWindow = window.open('./3rdparty/speller2/check.php?tarea='+tarea+'&content=' + thetext.value,'def','height=300,width=800');
					}
				</script>
		{/literal}
		{/if}
		
		
		
		{literal}
		<script type="text/javascript">
		<!--
			function show_hide_user_links(thediv)
			{
				if(window.Effect){
					if(thediv.style.display == 'none')
					{Effect.Appear(thediv); return false;}
					else
					{Effect.Fade(thediv); return false;}
				}else{
					var replydisplay=thediv.style.display ? '' : 'none';
					thediv.style.display = replydisplay;					
				}
			}
		//-->
		</script>
		
		
		
		<script type="text/javascript">

			/***********************************************
			* Bookmark site script-  Dynamic Drive DHTML code library (www.dynamicdrive.com)
			* This notice MUST stay intact for legal use
			* Visit Dynamic Drive at http://www.dynamicdrive.com/ for full source code
			***********************************************/

			function bookmarksite(title, url){
			if (document.all)
			window.external.AddFavorite(url, title);
			else if (window.sidebar)
			window.sidebar.addPanel(title, url, "")
			}

		</script>
		{/literal}
		
		{checkActionsTpl location="tpl_pligg_pre_title"}
		
		<title>{$pretitle}{#PLIGG_Visual_Name#}{$posttitle}</title>
		<link rel="alternate" type="application/rss+xml" title="RSS 2.0" href="http://{$server_name}{$my_pligg_base}/rss2.php"/>
		<link rel="icon" href="{$my_pligg_base}/favicon.ico" type="image/x-icon"/>
		<script src="{$my_pligg_base}/js/xmlhttp.php" type="text/javascript"></script>



		
	</head>

	<body {$body_args}>
		<div id="wrap">
		
			<div id="header">
				{include file=$tpl_header.".tpl"}
			</div><!-- header end -->
			
			{if $user_authenticated ne true}<div id="content-wrap1">
		  {else}
		  	{if $cat_url neq ""}<div id="content-wrap2">
		  	{else}<div id="content-wrap3">
		  	{/if}
		  {/if}
				<div id="sidebar">
					{include file=$tpl_right_sidebar.".tpl"}
		      
				</div><!-- sidebar end -->
				<div id="contentbox">
		
		      <div id="breadcrumb">
		      	{if $navbar_where.show neq "no"}
			      	<a href = "{$my_base_url}{$my_pligg_base}">{#PLIGG_Visual_Breadcrumb_SiteName#}{#PLIGG_Visual_Breadcrumb_Home#}</a>
				     	{if $navbar_where.link1 neq ""} » <a href="{$navbar_where.link1}">{$navbar_where.text1}</a>{elseif $navbar_where.text1 neq ""} » {$navbar_where.text1}{/if}
			 	     	{if $navbar_where.link2 neq ""} » <a href="{$navbar_where.link2}">{$navbar_where.text2}</a>{elseif $navbar_where.text2 neq ""} » {$navbar_where.text2}{/if}      	
			 	     	{if $navbar_where.link3 neq ""} » <a href="{$navbar_where.link3}">{$navbar_where.text3}</a>{elseif $navbar_where.text3 neq ""} » {$navbar_where.text3}{/if}      	
			 	     	{if $navbar_where.link4 neq ""} » <a href="{$navbar_where.link4}">{$navbar_where.text4}</a>{elseif $navbar_where.text4 neq ""} » {$navbar_where.text4}{/if}      	
			 	    {/if}
			    </div>	

{if $pagename eq "index" || $pagename eq "story"}
<div align="left" style="float: left">

/* remove this line and put medium rectangle adsense code */

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

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

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

		{include file=$tpl_footer.".tpl"}
			
	</body>
</html>
__________________
Viral Videos Vault
Reply With Quote
The Following User Says Thank You to kapengbarako For This Useful Post:
  #9 (permalink)  
Old 03-04-2007, 06:29 AM
jon's Avatar
jon jon is offline
Casual Pligger
 
Join Date: Jan 2007
Posts: 76
Downloads: 2
Uploads: 0
Thanks: 5
Thanked 3 Times in 2 Posts
Excellent work. Used the same "if" codes in the sidebar too, all works a treat.

Thank you very much.
Reply With Quote
  #10 (permalink)  
Old 03-04-2007, 06:32 AM
jon's Avatar
jon jon is offline
Casual Pligger
 
Join Date: Jan 2007
Posts: 76
Downloads: 2
Uploads: 0
Thanks: 5
Thanked 3 Times in 2 Posts
Hang on, was it just because the first time I used “ instead of " that it failed? I assume it must be! Just a simple character difference - amazing how small things make such big differences with this stuff!
Reply With Quote
Reply



Thread Tools
Display Modes
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are Off
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Similar Threads
Thread Thread Starter Forum Replies Last Post
Pligg and Advertising popo General Help 2 01-16-2007 12:16 AM
Pligg Fundraiser Yankidank Retired Threads 21 10-25-2006 04:17 PM
Page titles & breadcrumbs AshDigg Core Development 11 06-30-2006 06:35 PM


LinkBacks Enabled by vBSEO 3.0.0