Jump to content

Header / Footer code to only show to guests


Rob Fielding

Recommended Posts

Posted

Hi,

I have recently moved from VBulletin to InVision and it's a massive improvement.

One of the few decent things on VBulletin was the conditional code to show something to certain user groups.

I want to show larger adverts to guests but not to registered users (one of the benefits of membership being you get less adverts). However, the adverts are called from a script in the header (not from a Custom HTML Widget).

Is there any way of adding code to the header script to make it appear for guests only?

Something along the lines of the way VBulletin did it which was roughly:

<if user belongs to group ="guests" then show else hide>
code
</if>

Thanks,

Rob

Posted

While, technically you could do that. I would suggest avoiding template edits to your theme if possible as it could make upgrading a little more difficult for you.

Instead, I would suggest using the built-in advertising module which will let you pick which member groups are shown ads. It does allow you to insert Javascript/HTML from your ad provider:

 

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...