Jump to content


- - - - -

Invision Board, Adsense And Html Logic


  • Please log in to reply
3 replies to this topic

#1 glen

glen

    Administrator

  • Admin
  • PipPipPipPip
  • 888 posts

Posted 12 June 2005 - 12:27 AM

Hi everyone,

Here is a collection of threads in the Invision Board Forum relating to the control of Ad placement (including Adsense placement) using the "HTML Logic" feature.

Google Adsense next to Forum Logo

HTML Logic to find out the current page

HTML Logic help please, can't get it to work

how to use

The IF Statement

Add HTML if member_group=x, HTML Logic?

And here is the knowledge base article relating to HTML Logic -

HTML Logic

Template Variables

#2 glen

glen

    Administrator

  • Admin
  • PipPipPipPip
  • 888 posts

Posted 20 July 2005 - 08:45 AM

If you just want to show some adsense ads to a "guest" only, then the following IF statement was recommended by some IPB staff on the IPB forum at this thread -

<if="ipb.member['mgroup'] == ipb.vars['guest_group']">
AD CODE HERE
</if>

From what I have read, this will only work in the HTML templates and will not work in the header/footer wrapper. If you know of how to achieve a similar thing in the header/footer please let me know.

Cheers, Glen :-)

#3 Joseph

Joseph

    Member

  • Members
  • PipPip
  • 31 posts

Posted 21 July 2005 - 08:32 AM

Hi Glen,

I found a very good guide to HTML LOGIC at the following site.

http://community.ibe...?showtopic=2402

It is called the HTML Logic Cheat Sheet and it will certainly come in useful. It has a long list of examples of IF and ELSE statements using html logic. I am not sure why this is not in the IPB official documentation but it certainly should be added!

Jo :)

#4 glen

glen

    Administrator

  • Admin
  • PipPipPipPip
  • 888 posts

Posted 22 August 2005 - 09:08 AM

thanks for that info jo,

I was a bit frustrated by not being able to put HTML Logic in the board header/footer but the following post by the IPB staff on the invision forum was helpful (at least for the header..I have not tried to footer part as yet)

Quote

I'm afraid you can't add in HTML Logic in the board wrapper, it has to be in the HTML templates.

So you can either put this at the bottom of the All Global HTML -> global_board_header or the top of the member_bar template bit:


<if="ipb.member['mgroup'] == ipb.vars['guest_group']">


then


</if>


After the message.

....by putting the code above the global_board_header, that gives you an ad that is just above the "Welcome Guest ( Log In | Register )" bar.

..if you were to put the same code in the header it would apear just underneath this Welcome Guest ( Log In | Register ) bar....so that is close enough for me!

Cheers :)




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users