1
Gombunan
Re: AdSense ads in news module
  • 2007/3/20 18:02

  • Gombunan

  • Just popping in

  • Posts: 30

  • Since: 2005/5/14


Hi JMorris,

I have another question if you don't mind.

I tried your suggestion below but my AdSense code is still being generated on the news/index.php page

Quote:

JMorris wrote:
2 things...

1. If you don't qualify that you only want the article to be displayed on the full article page, you'll violate Google's terms of only displaying 3 ad blocks on a page. The same template that is used for the full article page is used for the module index.

Here's the code I'm using on one of my sites.

<table cellpadding="0" cellspacing="0" class="item">
<
tr>
    <
td>
        <
table cellpadding="0" cellspacing="0" width="98%">
        <
tr>
            <
td class="itemHead"><span class="itemTitle"><{$story.title}></span></td>
        </
tr>
        <
tr>
            <
td class="itemInfo"><{if $story.files_attached}><{$story.attached_link}>&nbsp;<{/if}><{if $story.poster != ''}><span class="itemPoster"><{$lang_postedby}> <{$story.poster}></span><{/if}> <span class="itemPostDate"><{$lang_on}> <{$story.posttime}></span> (<span class="itemStats"><{$story.hits}> <{$lang_reads}></span>) <{$news_by_the_same_author_link}></td>
        </
tr>
        <
tr>
            <
td>[b]<{if $SCRIPT_NAME != '/modules/news/index.php'}><div class="gads"><!--My Adsense Code--></div><{/if}>[/b]<div class="itemBody"><{$story.imglink}><class="itemText"><{$story.text}></p></div></td>
        </
tr>
        <
tr>
            <
td class="itemFoot"><span class="itemAdminLink"><{$story.adminlink}></span><{if $rates}><b><{$lang_ratingc}></b> <{$story.rating}> (<{$story.votes}>) - <a href="<{$xoops_url}>/modules/news/ratenews.php?storyid=<{$story.id}>" rel="nofollow"><{$lang_ratethisnews}></a> - <{/if}><span class="itemPermaLink"><{$story.morelink}></span></td>
        </
tr>
        </
table>
    </
td>
</
tr>
</
table>


Instead of putting the CSS inline, I did class="gads" and created the .gads definition in my style.css file.

2. If you're just adding Adsense to your site, it may take a day or two even for the public service ads to show up.

HTH.

James



2
Gombunan
Re: AdSense ads in news module
  • 2007/3/20 17:02

  • Gombunan

  • Just popping in

  • Posts: 30

  • Since: 2005/5/14


You are right. I shouldn't have edited the template set files directly on the server.

That's what I did. But the template should've been updated anyway after I went to the Module admin and update the module right? But it didn't.

Anyway I follow your the first suggestion and it fixed the problem. Thank you!



3
Gombunan
Re: AdSense ads in news module
  • 2007/3/19 23:49

  • Gombunan

  • Just popping in

  • Posts: 30

  • Since: 2005/5/14


Quote:

JMorris wrote:
Sounds like the template set you are editing is not set as the default. Either that, or you need to clear the contents of the templates_c/ directory.


news_item.html is the default template and I've been clearing the templates_c directory. But nothing happens.



4
Gombunan
Re: AdSense ads in news module
  • 2007/3/19 11:29

  • Gombunan

  • Just popping in

  • Posts: 30

  • Since: 2005/5/14


Quote:

Gombunan wrote:
Thanks for the reply.

Problem is, the AdSense code does not even appear in the source code of the page.

Any changes I made to the news_item.html isn't included in the news section.


BTW, anybody can suggest how to fix the problem I am having above?

Thanks



5
Gombunan
Re: AdSense ads in news module
  • 2007/3/17 16:13

  • Gombunan

  • Just popping in

  • Posts: 30

  • Since: 2005/5/14


Sounds good to me. Looking forward to the official release



6
Gombunan
Re: AdSense ads in news module
  • 2007/3/17 16:12

  • Gombunan

  • Just popping in

  • Posts: 30

  • Since: 2005/5/14


Thanks for the reply.

Problem is, the AdSense code does not even appear in the source code of the page.

Any changes I made to the news_item.html isn't included in the news section.



7
Gombunan
AdSense ads in news module
  • 2007/3/16 17:56

  • Gombunan

  • Just popping in

  • Posts: 30

  • Since: 2005/5/14


Hello,

I am trying to ad AdSense ads into my news module. The ad should float on the left side and the article wraps around it.

I've actually done this before but I can seem to figure out what I did to make it work.

At the moment I tried editing the templates news_item.html and add the following code

<div style="width: 300px;float: left; margin: 0px 19px 5px 1px;">
My AdSense code
</div>


the final template looks like

<table cellpadding="0" cellspacing="0" class="item">
<
tr>
    <
td>
        <
table cellpadding="0" cellspacing="0" width="98%">
        <
tr>
            <
td class="itemHead"><span class="itemTitle"><{$story.title}></span></td>
        </
tr>
        <
tr>
            <
td class="itemInfo"><{if $story.files_attached}><{$story.attached_link}>&nbsp;<{/if}><{if $story.poster != ''}><span class="itemPoster"><{$lang_postedby}> <{$story.poster}></span><{/if}> <span class="itemPostDate"><{$lang_on}> <{$story.posttime}></span> (<span class="itemStats"><{$story.hits}> <{$lang_reads}></span>) <{$news_by_the_same_author_link}></td>
        </
tr>
        <
tr>
            <
td><div class="itemBody"><{$story.imglink}><class="itemText">

<
div style="width: 300px;float: left; margin: 0px 19px 5px 1px;">
My AdSense code

</div>

<{
$story.text}></p></div></td>
        </
tr>
        <
tr>
            <
td class="itemFoot"><span class="itemAdminLink"><{$story.adminlink}></span><{if $rates}><b><{$lang_ratingc}></b> <{$story.rating}> (<{$story.votes}>) - <a href="<{$xoops_url}>/modules/news/ratenews.php?storyid=<{$story.id}>" rel="nofollow"><{$lang_ratethisnews}></a> - <{/if}><span class="itemPermaLink"><{$story.morelink}></span></td>
        </
tr>
        </
table>
    </
td>
</
tr>
</
table>


I tried updating via the preference section, deleted files in templates_c folder but the changes were not added.

What am I missing here?



8
Gombunan
Re: Unable to update News 1.44 block option
  • 2006/5/8 7:06

  • Gombunan

  • Just popping in

  • Posts: 30

  • Since: 2005/5/14


I am still having the problem. Is this a bug?



9
Gombunan
Re: Unable to update News 1.44 block option
  • 2006/5/6 13:45

  • Gombunan

  • Just popping in

  • Posts: 30

  • Since: 2005/5/14


I searched around and found this. Someone is having the same problem.



10
Gombunan
Re: Unable to update News 1.44 block option
  • 2006/5/6 10:30

  • Gombunan

  • Just popping in

  • Posts: 30

  • Since: 2005/5/14


Hey guys,

Thanks for the suggestions. I've tried upgrading my News module for my latest site (Xoops v2.0.13.2) but still having the same problem.

I've also removed and reinstall the module but the problem persists.

I've also made sure to update the module and update my Preferences General Settings.

All the News template files have been chmoded to 777.

Still I am unable to change the Length of the title for the Recent News block.

Any other ideas?

Thank you.




TopTop
(1) 2 3 »



Login

Who's Online

219 user(s) are online (147 user(s) are browsing Support Forums)


Members: 0


Guests: 219


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Apr 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits