Page 1 of 2

Google ads between 1st and second category?

Posted: Thu Jul 22, 2010 7:48 pm
by Oysteinkn
I want to put google ads between my two first categories. I've read a lot, but nothing seems to work :S
Image

Thanks for all help!

Re: Google ads between 1st and second category?

Posted: Thu Jul 22, 2010 9:52 pm
by Lumpy Burgertushie
Knowledge Base - Advertisements in phpBB3

Take particular note of the important notice half way down regarding Google ads. Due to the google terms and conditions, the ads should only go in the index_body.html, viewtopic_body.html and viewforum_body.html files. Do not put them in the overall_header or footer.

this should help you out.

robert

Re: Google ads between 1st and second category?

Posted: Thu Jul 22, 2010 11:16 pm
by PlanetStyles.net
First thing you need to do is find the forum ID of your second category. To do this, over over the category name and look at the number that's in the target url after "f=". For example on my local server when I hover over a certain cateory title in the target URL bar I see:
The red 3 denotes that category's ID.

Once you have that, open: /styles/*/template/forumlist_body.html

Find:

Code: Select all

<!-- IF forumrow.S_IS_CAT or forumrow.S_FIRST_ROW  or forumrow.S_NO_CAT  -->
Before, Add:

Code: Select all

<!-- IF forumrow.FORUM_ID eq '3' -->
<div style="text-align: center; margin: 5px 0;">
*your ad code here*
</div>
<!-- ENDIF -->

Re: Google ads between 1st and second category?

Posted: Thu Jul 22, 2010 11:58 pm
by Lumpy Burgertushie
Well this just isn't my day. I thought that was covered in the article I linked to but it is not.

Thanks Christian for making up for my mistakes.


robert

Re: Google ads between 1st and second category?

Posted: Fri Jul 23, 2010 12:18 am
by Oysteinkn
I've read that, but it doesn't work! :(

Edit: NeverMind

Re: Google ads between 1st and second category?

Posted: Fri Jul 23, 2010 12:36 am
by Oysteinkn
I can't find:

Code: Select all

<!-- IF forumrow.S_IS_CAT or forumrow.S_FIRST_ROW  or forumrow.S_NO_CAT  -->
Can someone post a fresh forumlist_body.html here?

Thanks for the help so far. The strange thing is that wherever I put my google code nothing shows...
I even renamed the forumlist_body.html file to see what happened, nothing happened. It's like it's not in use.

Re: Google ads between 1st and second category?

Posted: Fri Jul 23, 2010 1:06 am
by Oysteinkn
Edit:nevermind this post. But anyone, help? :)

Re: Google ads between 1st and second category?

Posted: Fri Jul 23, 2010 2:03 am
by Lumpy Burgertushie
first you need to download the relevant file to your computer using a real ftp program,
then you need to use a real text editor to open/edit the files
and then upload them back using ftp.

editing them in the admin panel is not permanent.



then, you always have to go to your admin panel/styles section;
click on the templates on the left side and then click refresh on the right side
for the style you are working on.

only then will you be able to see the changes you have made.

robert

Re: Google ads between 1st and second category?

Posted: Fri Jul 23, 2010 12:44 pm
by Oysteinkn
I've done everything you explain there exept the refreshing. And still I cannot find what he told me to find in the forumlist file.

This is what I can't find:

Code: Select all

<!-- IF forumrow.S_IS_CAT or forumrow.S_FIRST_ROW  or forumrow.S_NO_CAT  -->
Are you sure that is correct?

Btw: When I refresh I can see my ads, but they are not in the right place. :S

Re: Google ads between 1st and second category?

Posted: Fri Jul 23, 2010 2:06 pm
by Lumpy Burgertushie
apparently you are using a subsilver based style and that exact line is not there.

look for this:

Code: Select all

<!-- IF forumrow.S_IS_CAT -->
put the code he said right before it ( on a new line above it )

save, upload and refresh your template from the admin panel/styles


see what happens.


robert

Re: Google ads between 1st and second category?

Posted: Fri Jul 23, 2010 3:34 pm
by Oysteinkn
I did as you said and this is what happened:
Image

Do you know how to fix this? :)

EDIT: I just moved it around, and now it looks just like I wanted!

Thank you so much for all the help! :D

Re: Google ads between 1st and second category?

Posted: Tue Mar 01, 2011 6:42 pm
by unhappyboy
it doesnt work now. Yes we can see ads but they shown after every category not after our selected category.

Re: Google ads between 1st and second category?

Posted: Wed Mar 02, 2011 12:45 am
by PlanetStyles.net
Sounds like you didn't complete this step correctly:
Christian 2.0 wrote:Once you have that, open: /styles/*/template/forumlist_body.html

Find:

Code: Select all

<!-- IF forumrow.S_IS_CAT or forumrow.S_FIRST_ROW  or forumrow.S_NO_CAT  -->
Before, Add:

Code: Select all

<!-- IF forumrow.FORUM_ID eq '3' -->
<div style="text-align: center; margin: 5px 0;">
*your ad code here*
</div>
<!-- ENDIF -->

Re: Google ads between 1st and second category?

Posted: Wed Mar 02, 2011 6:51 am
by unhappyboy
Actually i think i did it exaclty same thay you wrote;
Here is first 19 line of my forumlist

Code: Select all

<!-- BEGIN forumrow -->
	<!-- IF (forumrow.S_IS_CAT and not forumrow.S_FIRST_ROW) or forumrow.S_NO_CAT  -->
			</ul>

			<span class="corners-bottom"><span></span></span></div>
		</div>
	<!-- ENDIF -->
    <!-- IF forumrow.FORUM_ID eq '17' -->
        <div class="forabg">
			<div class="inner">
                <span class="corners-top"><span></span></span>
                    <div class="reklambar"> <br>
                        <!-- INCLUDE /ads/forumlar_arasi_reklam.txt -->
                    </div>
               <span class="corners-bottom"><span></span></span></div>
		</div>
    <!-- ENDIF -->
	<!-- IF forumrow.S_IS_CAT or forumrow.S_FIRST_ROW  or forumrow.S_NO_CAT  -->

Re: Google ads between 1st and second category?

Posted: Wed Mar 02, 2011 7:05 am
by unhappyboy
by the way eq is not working. i also tried == instead of eq