Go Back   PHP Link Directory Forum > PHP Link Directory (phpLD) > Mods and contribution Discussion

Mods and contribution Discussion This forum is only for discussion of modding phpLD. For specific mod releases, please see the appropriate forum.

Closed Thread
 
Thread Tools Display Modes
Old 08-03-2005   #1
Jim_Westergren
 
Jim_Westergren's Avatar
 
Join Date: Jul 2005
Posts: 243
Default Google Adsense inside link pages as "sponsored links"

This mod will show Google Adsense under the "Featured Links" as "Sponsored Links". You can see what I mean on the site in my sig.

This mod was inspired from a thread of "seothatworks", Thank you!

In main.tpl just before "{* Links heading and sorting*}" add:

Code:
{if $category.ID != 0}
{include file="googlead.tpl"}
{/if}
Make a new file and call it googlead.tpl with these lines:

Code:
<h3>{l}Sponsored Links{/l}</h3>

<DIV STYLE="text-align:center;margin-bottom:-10px;">
<script type="text/javascript"><!--
google_ad_client = "XXXXXXXXXXXX";
google_ad_width = 728;
google_ad_height = 90;
google_ad_format = "728x90_as";
google_ad_type = "text";
google_ad_channel ="XXXXXXXXXXXXX";
google_color_border = "FFFFFF";
google_color_bg = "FFFFFF";
google_color_link = "0000FF";
google_color_url = "008000";
google_color_text = "000000";
//--></script>
<script type="text/javascript"
  src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</DIV>
Finished.
__________________
/ Jim Westergren
www.jimwestergren.com
Jim_Westergren is offline  
Old 08-15-2005   #2
twin
 
Join Date: Jul 2005
Posts: 13
Default

Man, that's perfect, thank You.
twin is offline  
Old 08-22-2005   #3
kickass
 
Join Date: Aug 2005
Location: Delaware Valley, PA
Posts: 222
Default

This is a good mod. Make sure to add it to the wiki!
kickass is offline  
Old 09-15-2005   #4
shortd81
 
Join Date: Sep 2005
Location: Daytona Beach, Florida
Posts: 76
Send a message via MSN to shortd81 Send a message via Yahoo to shortd81
Default

Thanks....that is very nice
shortd81 is offline  
Old 10-01-2005   #5
Zap
 
Zap's Avatar
 
Join Date: Oct 2005
Location: WEBTALKFORUMS.COM
Posts: 3
Default

SWEET!!!

Thanks brother!

Chris
Zap is offline  
Old 10-12-2005   #6
renfrompenn
 
Join Date: Sep 2005
Posts: 62
Default

How do I get adsense to appear on the search pages as well?
renfrompenn is offline  
Old 10-12-2005   #7
yktan
 
Join Date: Jun 2005
Posts: 353
Default

Quote:
Originally Posted by renfrompenn
How do I get adsense to appear on the search pages as well?
Hi renfrompenn, to make adsense appear in the search page as well, just use the following code:
Code:
{if $category.ID gt 0 or $qu} 
{include file="googlead.tpl"} 
{/if}
instead of
Code:
{if $category.ID != 0} 
{include file="googlead.tpl"} 
{/if}
__________________
Greatest fear in a coder\'s world: A minute bug with correct syntax.
{link removed from sig as the account seemed to be suspended}
yktan is offline  
Old 11-02-2005   #8
Bill
Mentor
 
Bill's Avatar
 
Join Date: Aug 2005
Location: New Jersey
Posts: 334
Default

would this mod work if i wanted to keep my featured links?
Bill is offline  
Old 11-02-2005   #9
Jim_Westergren
 
Jim_Westergren's Avatar
 
Join Date: Jul 2005
Posts: 243
Default

Sure.

Check the example in the site in my sig.

/ Jim
__________________
/ Jim Westergren
www.jimwestergren.com
Jim_Westergren is offline  
Old 11-03-2005   #10
Bill
Mentor
 
Bill's Avatar
 
Join Date: Aug 2005
Location: New Jersey
Posts: 334
Default

Quote:
Originally Posted by Jim_Westergren
Sure.

Check the example in the site in my sig.

/ Jim

Thanks Jim, works great!
Bill is offline  
Old 01-08-2006   #11
mike
Supporter
 
Join Date: Jan 2006
Posts: 61
Default

Wow, you know it's an easy mod if I can do it

Thanks for posting this.
mike is offline  
Old 01-16-2006   #12
thompson
Supporter
 
Join Date: Oct 2005
Posts: 548
Default

hi,

great mod.

i did the same as descripted in topic here. (adsense.tpl and main.tpl)

i did it also for search results.

my problem is, that sometimes the adsense were shown and sometimes not. but i cant find a error.

anyone a solution for that ?

main.tpl:
{if $category.ID gt 0 or $qu or $p}

{include file="googlead.tpl"}
{/if}
__________________
many thanks.

thompson.
thompson is offline  
Old 01-16-2006   #13
Neticus
Supporter
 
Neticus's Avatar
 
Join Date: Dec 2005
Posts: 487
Default

Quote:
Originally Posted by thompson
hi,

great mod.

i did the same as descripted in topic here. (adsense.tpl and main.tpl)

i did it also for search results.

my problem is, that sometimes the adsense were shown and sometimes not. but i cant find a error.

anyone a solution for that ?

main.tpl:
{if $category.ID gt 0 or $qu or $p}

{include file="googlead.tpl"}
{/if}

I think it should be:
{if $category.ID gt 0 or $qu}

This is what is described in this post, this works for me.

Also try removing the


- Neticus
Neticus is offline  
Old 01-16-2006   #14
thompson
Supporter
 
Join Date: Oct 2005
Posts: 548
Default

does it work also on empty searchresult pages (if you search for ex. bodybuilding) ? ever tried it ?

what says the variable $p ?
__________________
many thanks.

thompson.
thompson is offline  
Old 01-17-2006   #15
Neticus
Supporter
 
Neticus's Avatar
 
Join Date: Dec 2005
Posts: 487
Default

Quote:
Originally Posted by thompson
my problem is, that sometimes the adsense were shown and sometimes not. but i cant find a error.
I have searched 'sport' on your directory and I see your problem. There is a blank space where google adsense should be.

I think I know your problem. You have google adsense code to show in category and search results. You also have google adsense code in the top right of your directory. This is causing the conflict. Sometimes google struggles to fill all boxes and will leave a box empty if it can not.

I had the same problem of blank google boxes when I tried to add another adsense block. See this discussion:

{older link removed}

Try removing the google box at the top right of your directory and I think your problem will be solved.

- Neticus

Last edited by David; 03-13-2008 at 05:57 AM.
Neticus is offline  
Old 01-27-2006   #16
fworth
Supporter
 
Join Date: Jan 2006
Location: www.criticdirectory.com
Posts: 88
Default Any Help?

Hi, i did all the requirements but still cannot get it to work--Any Help?
Lore
fworth is offline  
Old 01-28-2006   #17
gariben
Supporter
 
Join Date: Jan 2006
Posts: 2
Default

Quote:
Originally Posted by Jim_Westergren
Sure.

Check the example in the site in my sig.

/ Jim
Hi Jim,

Can you repost the example in your sig? I can't seem to find out to display Google Adsense along with Featured Links.

Thanks!!!
Mike
gariben is offline  
Old 01-28-2006   #18
thompson
Supporter
 
Join Date: Oct 2005
Posts: 548
Default

you can have a look here:

http://www.sportsuche.info/sporternaehrung/
__________________
many thanks.

thompson.
thompson is offline  
Old 01-29-2006   #19
fworth
Supporter
 
Join Date: Jan 2006
Location: www.criticdirectory.com
Posts: 88
Default Someone Please Help?

Hi, anybody is this where the code is suppose to go.. between these codes?

main.tpl

{foreach from=$feat_links item=link name=links} {include file="link.tpl" link=$link} {/foreach} {/if}

{if $category.ID gt 0 or $qu}
{include file="googlead.tpl"}
{/if}



{* Links heading and sorting*} {if ($qu or $category.ID gt 0 or $p) and count($links) gt 0}



Also, i created the googlead.tpl what type do i create it as? doc,html,shell,php
fworth is offline  
Old 03-15-2006   #20
mortgages
 
Join Date: Feb 2006
Posts: 120
Default

Jim in your code you have a bottom margin set at -10px

if you use this it obscures the words "Ads by Goooooogle" which as you know is very very naughty. :roll: (it should read 0px)

unless it only happened on my site of course :?
mortgages is offline  
Closed Thread


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Suggest Link Directory offers free links unknown888 Advertising and Exchanges 7 05-27-2006 12:58 PM
New Module - Publish HTML Link Pages rochnet Mods and contribution Discussion 17 11-19-2005 12:26 PM
Pages per link :: urgent query riteshseth99 Support (Version 2) 13 08-24-2005 08:26 PM
PHP Link Directory RC4 is now available dcb Support (Version 2) 2 07-11-2005 09:04 PM


All times are GMT +1. The time now is 01:59 PM.


Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.