![]() |
| | LinkBack | Thread Tools | Display Modes |
| |||
| ::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. |
| The Following 5 Users Say Thank You to kapengbarako For This Useful Post: | ||
| Sponsored Links |
| |||
| Thank you KB (you know we're both KB :D ) for making this a sticky post ;)
__________________ Viral Videos Vault |
| |||
| 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. |
| ||||
| 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. |
| |||
| please post your pligg.tpl here
__________________ Viral Videos Vault |
| ||||
| Here it is: PHP Code: Last edited by jon : 03-17-2007 at 10:08 AM. |
| |||
| 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 |
| The Following User Says Thank You to kapengbarako For This Useful Post: | ||
| ||||
| Excellent work. Used the same "if" codes in the sidebar too, all works a treat. Thank you very much. |
| ||||
| 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! |
![]() |
« Previous Thread
|
Next Thread »
| Thread Tools | |
| Display Modes | |
| |
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 |




Linear Mode

