I would like to be able to edit the code below so that it will only show the new topic when I certain member 4860 is logged in, so far i can only do it for all members. Can anyone help.
Thanks
Natasha
<xsl:choose> <xsl:when test="umbraco.library:IsLoggedOn()"> <div class="infoBox" id="newTopic"> <a href="{uForum:NicePostingUrl($currentPage/@id)}">Create a new topic</a> <br/> <small>Create a new topic in this forum</small> </div> </xsl:when> <xsl:otherwise> <div class="infoBox" id="newTopic"> <span>You cannot post</span> <br/> <small>You do not have permission to post in this forum</small> </div> </xsl:otherwise> </xsl:choose>
I spoke too soon the above code lets everyone who is logged on post. I have tried this also:
<xsl:variable name="memberName" select="umbraco.library:GetCurrentMember()/allowToCeateTopics"/> <!--<xsl:choose>--> <xsl:if test="number($memberName) = 1"> <div class="infoBox" id="newTopic"> <a href="{uForum:NicePostingUrl($currentPage/@id)}">Create a new topic</a> <br/> <small>Create a new topic in this forum</small> </div>
Checking if a specific member is logged in
Hi Guys
I would like to be able to edit the code below so that it will only show the new topic when I certain member 4860 is logged in, so far i can only do it for all members. Can anyone help.
Thanks
Natasha
Hi Natasha,
You could set up Public Access to any content folder so as members can view specific content.
Here are some examples
Something
Hope this helps
//fuji
Thanks Fuji I fixed it by amending the when test:
<xsl:when test="umbraco.library:IsLoggedOn()and string(data[@alias = 'memberId']) != '4860'">
I spoke too soon the above code lets everyone who is logged on post. I have tried this also:
<xsl:variable name="memberName" select="umbraco.library:GetCurrentMember()/allowToCeateTopics"/>
<!--<xsl:choose>-->
<xsl:if test="number($memberName) = 1">
<div class="infoBox" id="newTopic">
<a href="{uForum:NicePostingUrl($currentPage/@id)}">Create a new topic</a>
<br/>
<small>Create a new topic in this forum</small>
</div>
</xsl:if>
still need help
Thanks
Natasha
Awesome if you got it working.
But one thing if you are hardcoding the Member Id how will you handle other members ?
In your content section did you give Public Access ?
is working on a reply...