I have a category only viewable to specific usergroup. Within that I have a sub-cat (CATID=8) that I want only viewable to those who have checked YES to {MEMBERSNEWSLETTER}
First half is easy, edit the category to set permission. For the subcategory, not easy. Maybe in the show links in category template's subcategory list <IF {MEMBERNEWSLETTER} is YES></IF> around it.
Trying to get this to work and can't. I have tried several different things, finally ending up with making a new link type - newsletter - and having the following in the displaylinks.tpl...
<IF {SHOWNEWSLETTER} > <IF {MEMBERNEWSLETTER} is no> Sorry, you have not signed up to receive the newsletter online. <OTHERWISE> <table {STANDARDTABLE}> <!-- BEGIN NEWSLETTER LINKS --> [INSERTFILE=linkbitregular] <!-- END NEWSLETTER LINKS --> </table> </IF> </IF>
I would've thought this would work but it doesn't It shows the wording "sorry..." correctly, but still shows the links.
You can see it at http://www.123club.co.uk/papclub/8/ To log in use Guest with password of temp - that has permission to view parent cat, but not newsletters.
I can't begin to guess what a link type could possibly have to do with what you said in post #1. What you've typed, though, tells it to show "Sorry,..." when there's at least one link of the link type 'newletter' somebody unspecified (is this supposed to be the viewer of the page? if so, that's {THISMEMBER) has the newsletter profile field set to no. It will then show the actual links of type neweletter when the unspecified person has some value other than no for the newsletter field.
You probably have other template code showing links of a non-newsletter link type. You've told it to make newsletter links to look exactly the same as regular links.
Paul wrote: I can't begin to guess what a link type could possibly have to do with what you said in post #1.
Well it's quite simple really when you apply a bit of blonde logic In cat #8 there will only be newsletters posted. I only want certain members to view those newsletters. I couldn't work out how to restrict viewing the cat so thought I would simply make a new link type for the newsletters.
Paul wrote: What you've typed, though, tells it to show "Sorry,..." when there's at least one link of the link type 'newletter' somebody unspecified (is this supposed to be the viewer of the page? if so, that's {THISMEMBER) has the newsletter profile field set to no. It will then show the actual links of type neweletter when the unspecified person has some value other than no for the newsletter field.
Yes, that's what I want. But I still don't think I've got it right as it still shows the links. I now have...
<IF {SHOWNEWSLETTER} > <IF {THISMEMBER} newsletter is no> Sorry, you have not signed up to receive the newsletter online. <OTHERWISE> <table {STANDARDTABLE}> <!-- BEGIN NEWSLETTER LINKS --> [INSERTFILE=linkbitregular] <!-- END NEWSLETTER LINKS --> </table> </IF> </IF>
Paul wrote: Guest/temp is not a valid login.
Sorry, was working on the members within phpmyadmin and forgot to reinstate guest. It's there and working now. It is set so that you should NOT be able to see the link types newsletter.
Paul wrote: <IF {THISMEMBERNEWSLETTER} is no> is the conditional you want.
Sorry Paul, but I still cannot get this to work. The "sorry..." message now displays in ALL categories and the newsletters still show when they shouldn't.
Well presumably {THISMEMBERNEWSLETTER} is blank unless you've edited your profile. Comparing to a blank value might be problematic. Does <?php if ("{THISMEMBERNEWSSLETTER}" == "no") { ?> work? Have you checked the actual value of {THISMEMBERNEWSSLETTER}?
0/5
1
2
3
4
5
This thread is closed, so you cannot post a reply.
Comments on Cat avail to only certain members
Expert
Usergroup: Customer
Joined: Aug 19, 2005
Location: England
Total Topics: 391
Total Comments: 1303
I have a category only viewable to specific usergroup. Within that I have a sub-cat (CATID=8) that I want only viewable to those who have checked YES to {MEMBERSNEWSLETTER}
Is there an easy way to do this?
developer
Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California
Total Topics: 61
Total Comments: 7868
First half is easy, edit the category to set permission. For the subcategory, not easy. Maybe in the show links in category template's subcategory list <IF {MEMBERNEWSLETTER} is YES></IF> around it.
Expert
Usergroup: Customer
Joined: Aug 19, 2005
Location: England
Total Topics: 391
Total Comments: 1303
Trying to get this to work and can't. I have tried several different things, finally ending up with making a new link type - newsletter - and having the following in the displaylinks.tpl...
<IF {SHOWNEWSLETTER} >
<IF {MEMBERNEWSLETTER} is no>
Sorry, you have not signed up to receive the newsletter online.
<OTHERWISE>
<table {STANDARDTABLE}>
<!-- BEGIN NEWSLETTER LINKS -->
[INSERTFILE=linkbitregular]
<!-- END NEWSLETTER LINKS -->
</table>
</IF>
</IF>
I would've thought this would work but it doesn't It shows the wording "sorry..." correctly, but still shows the links.
You can see it at http://www.123club.co.uk/papclub/8/ To log in use Guest with password of temp - that has permission to view parent cat, but not newsletters.
developer
Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California
Total Topics: 61
Total Comments: 7868
I can't begin to guess what a link type could possibly have to do with what you said in post #1. What you've typed, though, tells it to show "Sorry,..." when there's at least one link of the link type 'newletter' somebody unspecified (is this supposed to be the viewer of the page? if so, that's {THISMEMBER) has the newsletter profile field set to no. It will then show the actual links of type neweletter when the unspecified person has some value other than no for the newsletter field.
You probably have other template code showing links of a non-newsletter link type. You've told it to make newsletter links to look exactly the same as regular links.
Guest/temp is not a valid login.
Expert
Usergroup: Customer
Joined: Aug 19, 2005
Location: England
Total Topics: 391
Total Comments: 1303
I can't begin to guess what a link type could possibly have to do with what you said in post #1.
Well it's quite simple really when you apply a bit of blonde logic In cat #8 there will only be newsletters posted. I only want certain members to view those newsletters. I couldn't work out how to restrict viewing the cat so thought I would simply make a new link type for the newsletters.
What you've typed, though, tells it to show "Sorry,..." when there's at least one link of the link type 'newletter' somebody unspecified (is this supposed to be the viewer of the page? if so, that's {THISMEMBER) has the newsletter profile field set to no. It will then show the actual links of type neweletter when the unspecified person has some value other than no for the newsletter field.
Yes, that's what I want. But I still don't think I've got it right as it still shows the links. I now have...
<IF {SHOWNEWSLETTER} >
<IF {THISMEMBER} newsletter is no>
Sorry, you have not signed up to receive the newsletter online.
<OTHERWISE>
<table {STANDARDTABLE}>
<!-- BEGIN NEWSLETTER LINKS -->
[INSERTFILE=linkbitregular]
<!-- END NEWSLETTER LINKS -->
</table>
</IF>
</IF>
Guest/temp is not a valid login.
Sorry, was working on the members within phpmyadmin and forgot to reinstate guest. It's there and working now. It is set so that you should NOT be able to see the link types newsletter.
developer
Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California
Total Topics: 61
Total Comments: 7868
<IF {THISMEMBERNEWSLETTER} is no> is the conditional you want.
Expert
Usergroup: Customer
Joined: Aug 19, 2005
Location: England
Total Topics: 391
Total Comments: 1303
<IF {THISMEMBERNEWSLETTER} is no> is the conditional you want.
Sorry Paul, but I still cannot get this to work. The "sorry..." message now displays in ALL categories and the newsletters still show when they shouldn't.
developer
Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California
Total Topics: 61
Total Comments: 7868
Well presumably {THISMEMBERNEWSLETTER} is blank unless you've edited your profile. Comparing to a blank value might be problematic. Does <?php if ("{THISMEMBERNEWSSLETTER}" == "no") { ?> work? Have you checked the actual value of {THISMEMBERNEWSSLETTER}?