Few days ago I asked John to help me with a permissions issue. I wanted to show certain ads to all registered users but not to subscribers on my site. This was the solution: <% @ControlLanguage="vb"Codebehind="~/admin/Containers/container.vb"AutoEventWireup="false" Explicit="True"Inherits="DotNetNuke.UI.Containers.Container" %>
<%@RegisterTagPrefix="dnn"TagName="SOLPARTACTIONS"Src="~/Admin/Containers/SolPartActions.ascx" %>
<% If DotNetNuke.Security.PortalSecurity.IsInRoles("Unauthenticated Users") Or DotNetNuke.Security.PortalSecurity.IsInRoles("Registered Users") And Not ( DotNetNuke.Security.PortalSecurity.IsInRoles("Platinum Membership") Or DotNetNuke.Security.PortalSecurity.IsInRoles("Microsoft MVP") Or DotNetNuke.Security.PortalSecurity.IsInRoles("Gold Membership") Or DotNetNuke.Security.PortalSecurity.IsInRoles("Silver Membership") ) %> <tablewidth="100%"cellspacing="0"cellpadding="0"border="0"> <trvalign="top"> <tdid="ContentPane"runat="server"align="left"> <dnn:solpartactionsrunat="server"id="dnnSOLPARTACTIONS"/> td> tr> table><%End If %>Thanks John, that works really good but I want to go one step further. You also use ActiveForums on your site and I wanted to do the same in the TopicView Template and show Google ads after each post but with the same permissions set as in the Container sample. I can't get that to work. Any idea why? |