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
 
topic widgets
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:
Content visible to registered users only.
Make a new file and call it googlead.tpl with these lines:

Code:
Content visible to registered users only.
Finished.
__________________
/ Jim Westergren
www.jimwestergren.com
Jim_Westergren is offline  
Old 08-14-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: 221
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
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: 350
Default

Code:
Content visible to registered users only.
Hi renfrompenn, to make adsense appear in the search page as well, just use the following code:
Code:
Content visible to registered users only.
instead of
Code:
Content visible to registered users only.
__________________
Greatest fear in a coder\'s world: A minute bug with correct syntax.
Math Captcha - Database Backup Tool - PHP Background Image
yktan is offline  
Old 11-02-2005   #8
Bill
Mentor
 
Bill's Avatar
 
Join Date: Aug 2005
Location: New Jersey
Posts: 331
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: 331
Default

Code:
Content visible to registered users only.

Thanks Jim, works great!
Bill is offline  
Old 01-08-2006   #11
mike
Supporter
 
Join Date: Jan 2006
Posts: 60
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: 540
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: 484
Default

Code:
Content visible to registered users only.

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: 540
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: 484
Default

Code:
Content visible to registered users only.
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 04:57 AM.
Neticus is offline  
Old 01-27-2006   #16
fworth
Supporter
 
Join Date: Jan 2006
Location: www.criticdirectory.com
Posts: 87
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

Code:
Content visible to registered users only.
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: 540
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: 87
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)
 
topic widgets



All times are GMT +1. The time now is 05:53 PM.


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