Google ads between 1st and second category?

For support and discussion related to templates, themes, and imagesets in phpBB 3.0.
Ideas Centre
Oysteinkn
Registered User
Posts: 6
Joined: Thu Jul 22, 2010 7:41 pm

Google ads between 1st and second category?

Post 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!
User avatar
Lumpy Burgertushie
Registered User
Posts: 68189
Joined: Mon May 02, 2005 3:11 am
Contact:

Re: Google ads between 1st and second category?

Post 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
I'm baaaaaccckkkk. still doing work on donation basis. PM your needs.

Premium phpBB 3.3 Styles by PlanetStyles.net

If nobody is in the forest, does a tree really fall?
User avatar
PlanetStyles.net
Former Team Member
Posts: 4674
Joined: Wed Nov 04, 2009 11:16 pm
Location: UK
Name: Christian
Contact:

Re: Google ads between 1st and second category?

Post 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 -->
User avatar
Lumpy Burgertushie
Registered User
Posts: 68189
Joined: Mon May 02, 2005 3:11 am
Contact:

Re: Google ads between 1st and second category?

Post 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
I'm baaaaaccckkkk. still doing work on donation basis. PM your needs.

Premium phpBB 3.3 Styles by PlanetStyles.net

If nobody is in the forest, does a tree really fall?
Oysteinkn
Registered User
Posts: 6
Joined: Thu Jul 22, 2010 7:41 pm

Re: Google ads between 1st and second category?

Post by Oysteinkn »

I've read that, but it doesn't work! :(

Edit: NeverMind
Oysteinkn
Registered User
Posts: 6
Joined: Thu Jul 22, 2010 7:41 pm

Re: Google ads between 1st and second category?

Post 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.
Oysteinkn
Registered User
Posts: 6
Joined: Thu Jul 22, 2010 7:41 pm

Re: Google ads between 1st and second category?

Post by Oysteinkn »

Edit:nevermind this post. But anyone, help? :)
User avatar
Lumpy Burgertushie
Registered User
Posts: 68189
Joined: Mon May 02, 2005 3:11 am
Contact:

Re: Google ads between 1st and second category?

Post 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
I'm baaaaaccckkkk. still doing work on donation basis. PM your needs.

Premium phpBB 3.3 Styles by PlanetStyles.net

If nobody is in the forest, does a tree really fall?
Oysteinkn
Registered User
Posts: 6
Joined: Thu Jul 22, 2010 7:41 pm

Re: Google ads between 1st and second category?

Post 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
User avatar
Lumpy Burgertushie
Registered User
Posts: 68189
Joined: Mon May 02, 2005 3:11 am
Contact:

Re: Google ads between 1st and second category?

Post 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
I'm baaaaaccckkkk. still doing work on donation basis. PM your needs.

Premium phpBB 3.3 Styles by PlanetStyles.net

If nobody is in the forest, does a tree really fall?
Oysteinkn
Registered User
Posts: 6
Joined: Thu Jul 22, 2010 7:41 pm

Re: Google ads between 1st and second category?

Post 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
unhappyboy
Registered User
Posts: 59
Joined: Sun Aug 19, 2007 3:00 pm

Re: Google ads between 1st and second category?

Post by unhappyboy »

it doesnt work now. Yes we can see ads but they shown after every category not after our selected category.
User avatar
PlanetStyles.net
Former Team Member
Posts: 4674
Joined: Wed Nov 04, 2009 11:16 pm
Location: UK
Name: Christian
Contact:

Re: Google ads between 1st and second category?

Post 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 -->
unhappyboy
Registered User
Posts: 59
Joined: Sun Aug 19, 2007 3:00 pm

Re: Google ads between 1st and second category?

Post 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  -->
unhappyboy
Registered User
Posts: 59
Joined: Sun Aug 19, 2007 3:00 pm

Re: Google ads between 1st and second category?

Post by unhappyboy »

by the way eq is not working. i also tried == instead of eq
Locked

Return to “[3.0.x] Styles Support & Discussion”