Go Back   Pligg Forum > Pligg Help > General Help
Reply
 
LinkBack Thread Tools Display Modes
  #21 (permalink)  
Old 03-17-2007, 10:27 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
Quote:
Originally Posted by jon View Post
Yeah, I dig it man. Got a rarely used account. I use netscape more, so will netscape it!

On question though - the whole "if" thing led me to want to try new things. I would like to set a banner which will show depending on words in other parts of the URL. i.e. at the end, or anywhere, so e.g.

if bodybuilding appears anywhere in the URL, then show a bodybuilding banner.

How is that done? The code seems to only look at the first word in the URL (i.e. search, index, story).

Anyway, I also made the same mistake with the " and ' I tried to mention on the blog but my message was poorly formatted! ( I see it has been cleaned up!)

The Netscape page:
http://diy.netscape.com/story/2007/0...ement-tutorial

THe Digg page:
http://www.digg.com/programming/Plig...ement_Tutorial

i think you're request will require a more thorough programming/modification of the code. honestly, can't figure out how will it be =)

nevertheless, you can still use Adsense. just limit it to images (and not text links) so that it will show images related to your content
__________________
Viral Videos Vault
Reply With Quote
Sponsored Links
Check out the New Templates at the Pligg Pro Shop.
  #22 (permalink)  
Old 03-18-2007, 06:31 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
Nevermind then, I'll live without that for now. Was a nice idea though.
Reply With Quote
  #23 (permalink)  
Old 03-18-2007, 10:11 PM
Critter183 Critter183 is offline
Pligg Donor
 
Join Date: Mar 2007
Posts: 34
Downloads: 0
Uploads: 0
Thanks: 8
Thanked 3 Times in 3 Posts
I did a little tinkering today. I enabled adsense revshare and I wanted that to work in conjunction with my adsense ads in my header.tpl.

The following code displays my site logo on the left and uses my AdSense ID on all pages except the story page of any of my users who have plugged in their own ID, where we will split the ad exposure at the default 50/50 for now:

PHP Code:
Line 36:</div>
<!-- 
My mods begin here -->

<
p>&nbsp;</p>
<
table border="0" cellpadding="4" width="100%"><tr>
<
td align="center" valign="top">
<
img src="http://www.mydomain.com/templates/yget/images/logo.jpg" alt="My Logo" />
</
td>
<
td align="center" valign="top">
{if 
$pagename eq 'index' || $pagename eq 'search' || $pagename eq 'upcoming'}
<
script type="text/javascript"><!--
google_ad_client "pub-xxxxxxxxxxxxxxxx";
google_ad_width 728;
google_ad_height 90;
google_ad_format "728x90_as";
google_ad_type "text";
google_ad_channel "xxxxxxxxx";
google_color_border "ffffff";
google_color_bg "ffffff";
google_color_link "E1771E";
google_color_text "000000";
google_color_url "940F04";
//--></script>
<script type="text/javascript"
  
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
{elseif $pagename eq 'story'}
{adsense assign=users_adsense}
{if $users_adsense}
    <script type="text/javascript"><!--
        google_ad_client = "{$google_adsense_id}";
        google_alternate_ad_url = "";
        google_ad_width = 728;
        google_ad_height = 90;
        google_ad_format = "728x90_as";
        google_ad_type = "text";
        google_ad_channel ="{$google_adsense_channel}";
        google_color_border = "ffffff";
        google_color_bg = "ffffff";
        google_color_link = "E1771E";
        google_color_text = "000000";
        google_color_url = "940F04";
        //-->
    </script>
    <script type="text/javascript"
      src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
    </script>
    {else}
    <script type="text/javascript"><!--
google_ad_client = "pub-xxxxxxxxxxxxxxxx";
google_ad_width = 728;
google_ad_height = 90;
google_ad_format = "728x90_as";
google_ad_type = "text";
google_ad_channel = "xxxxxxxxx";
google_color_border = "ffffff";
google_color_bg = "ffffff";
google_color_link = "E1771E";
google_color_text = "000000";
google_color_url = "940F04";
//--></script>
<script type="text/javascript"
  src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
{/if}
{/if}
</td></tr></table>
<p>&nbsp;</p>

<!-- My mods end here -->

<div id="cab"> 
The mods begin after line 36 in header.tpl of the yget template. Replace "pub-xxxxxxxxxxxxxxxxx" in two instances in this mod with your google adsense ID.

Replace the "xxxxxxxx" in two instances of "google_ad_channel ="xxxxxxxxx";" with your ad channel ID or remove the x's and leave empty if you don't use channels. I set up a few channels at google adsense so I can see if clicks are coming from my ads on story pages or on published or upcoming pages.

Do not edit "google_ad_client = "{$google_adsense_id}";" or "google_ad_channel ="{$google_adsense_channel}";" as those are related to your users' adsense ID and channel.

I tested it pretty thorougly tonight and it works just dandy. :)

Last edited by Critter183 : 03-18-2007 at 10:15 PM.
Reply With Quote
  #24 (permalink)  
Old 04-05-2007, 10:35 PM
Hellevator Hellevator is offline
New Pligger
 
Join Date: Mar 2007
Location: Newport Beach, California
Posts: 7
Downloads: 2
Uploads: 0
Thanks: 0
Thanked 0 Times in 0 Posts
{literal}

Why is it that when using this technique on sidebar.tpl it says to put {literal} inside of the if conditional but on pligg.tpl it does not say to do this. Why is this? What does {literal} do?
Reply With Quote
  #25 (permalink)  
Old 04-06-2007, 05:46 PM
paulocon paulocon is offline
Casual Pligger
 
Join Date: Apr 2007
Posts: 31
Downloads: 6
Uploads: 0
Thanks: 1
Thanked 0 Times in 0 Posts
Anyone know if there is code available for the yget template for displaying ads in the sidebar?
Reply With Quote
  #26 (permalink)  
Old 04-13-2007, 05:12 PM
ashepp ashepp is offline
New Pligger
 
Join Date: Apr 2007
Posts: 11
Downloads: 1
Uploads: 0
Thanks: 0
Thanked 3 Times in 1 Post
Yget template ads integration

I'd also appreciate an update to the tutorial that outlines how to integrate adsense with the Yget Template.

Thanks in advance.
Adam.
Reply With Quote
  #27 (permalink)  
Old 04-14-2007, 10:09 AM
onelessthang's Avatar
onelessthang onelessthang is offline
Constant Pligger
 
Join Date: Feb 2007
Location: Dallas, TX - USA
Posts: 120
Downloads: 3
Uploads: 0
Thanks: 39
Thanked 32 Times in 16 Posts
Lightbulb

For adding adsense to the sidebar and header in yget reference this thread.

how to add a logo and Google AdSense like this

Hope this helps.


For a demo of how I have implemented in on my 'playing around with pligg site' check out

gordonkeithwannabe.com - be careful though some of the content is not safe for work(for 'bad' language reasons')


Be Well,
OneLessThang

Last edited by onelessthang : 04-14-2007 at 03:31 PM.
Reply With Quote
  #28 (permalink)  
Old 04-14-2007, 10:14 AM
paulocon paulocon is offline
Casual Pligger
 
Join Date: Apr 2007
Posts: 31
Downloads: 6
Uploads: 0
Thanks: 1
Thanked 0 Times in 0 Posts
Which thread?
Reply With Quote
  #29 (permalink)  
Old 04-14-2007, 03:30 PM
onelessthang's Avatar
onelessthang onelessthang is offline
Constant Pligger
 
Join Date: Feb 2007
Location: Dallas, TX - USA
Posts: 120
Downloads: 3
Uploads: 0
Thanks: 39
Thanked 32 Times in 16 Posts
Sorry forgot the link

how to add a logo and Google AdSense like this
Reply With Quote
  #30 (permalink)  
Old 04-17-2007, 05:33 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
I have created another tutorial, now for the Yget template.
Read it here: http://www.maranan.us/archives/pligg...yget-template/
__________________
Viral Videos Vault
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