Sign In  |  Register
 
 DotNetNuke Powered!
DotNetNuke Support Forums

Permissions and containers/skins

Rate this topic:

Please Register to post a reply.
Another benefit of registration is the ability to subscribe to and recieve notifications of new posts.

AuthorMessages
Mariette
Posts:102



01/27/2007 8:43 AM  

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?


DotNetNuke Platinum Benefactor
Mariette Knap - www.smallbizserver.net
John Mitchell
Posts:3268



01/27/2007 10:11 AM  
Thanks for posting this Mariette.

To do this in ActiveForums you would need to add it to the actual .ascx file that displays the thread.
The server-side code can then be processed by ASP.Net.

In the template, you can only work with the template tokens, and any server code you put in will probably just show up in the display.
Mariette
Posts:102



01/27/2007 11:12 AM  
Thanks. I cannot get this to work because the ascx files do not contain any repeaters so I am not able to get more than one ad placed. I think I need to wait for Will to release the next version of Active Forums, I heard he plans to implement something for ads.


DotNetNuke Platinum Benefactor
Mariette Knap - www.smallbizserver.net
Please Register to post a reply.
Another benefit of registration is the ability to subscribe to and recieve notifications of new posts.

Forums >DotNetNuke Support >General-DNN-Help > Permissions and containers/skins



ActiveForums 3.7
Visit our Store for great DotNetNuke Modules and Skins
DNNMasters Sitemap/Google Sitemap 3.0

Item codeSM3-01
Price$29.00
Product Information 
DotNetNuke CSS NavMenu 3.3 (Developers)

Item codeCSSNM33DEV
Base Price$149.00
Product Information 
Snapsis PageBlaster 3.3.2 for DotNetNuke - Professional Edition

AuthorJohn Mitchell
Base Price$79.00
Product Information 
XDAkuna (Web 2.0 CSS XHTML Skin)

Item codeXDAkuna
AuthorNina Meiers
Price$49.00
Product Information