Jump to content

Display text only in specific forums


Recommended Posts

I'm puting my code in forums -> topics -> post template. I want to display text in every post for specific groups in specific forums.
My code:
 

    {{if in_array( \IPS\Member::loggedIn()->member_group_id, array( 2, 3, 4, 8, 10, 16, 19 ) )}}
	{{elseif request.app == 'forums' && request.module == 'forums' && request.id == 3}}
    <center>
  	sample text
  	</center>
    {{endif}}

 

Link to comment
Share on other sites

Which specific groups and in which specific forums?

Knowing this will help with checking your code - the above currently means that:

If they are in the listed groups then show nothing, otherwise if the forum is 3 then show something, otherwise nothing (go with \in_array, by the way)

Edited by Nathan Explosion
Link to comment
Share on other sites

  • Recently Browsing   0 members

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