Usergroup: Customer
Joined: Aug 19, 2005
Location: England
Total Topics: 270
Total Posts: 870
Posted 10/07/07 - 11:57 PM:
#1
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}
Usergroup: Administrator
Joined: Dec 21, 2001
Location: Northern California
Total Topics: 56
Total Posts: 5853
Posted 10/09/07 - 08:59 AM:
#2
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.
_____________________
"Do things you love doing, because then it ain't work. Don't do something you don't really enjoy, because you're never going to work hard enough at it." - Bob Young, founder of Red Hat
Usergroup: Customer
Joined: Aug 19, 2005
Location: England
Total Topics: 270
Total Posts: 870
Posted 11/02/07 - 05:42 AM:
#3
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.
Usergroup: Administrator
Joined: Dec 21, 2001
Location: Northern California
Total Topics: 56
Total Posts: 5853
Posted 11/02/07 - 03:12 PM:
#4
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.
_____________________
"Do things you love doing, because then it ain't work. Don't do something you don't really enjoy, because you're never going to work hard enough at it." - Bob Young, founder of Red Hat
Usergroup: Customer
Joined: Aug 19, 2005
Location: England
Total Topics: 270
Total Posts: 870
Posted 11/02/07 - 08:43 PM:
#5
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.
Usergroup: Administrator
Joined: Dec 21, 2001
Location: Northern California
Total Topics: 56
Total Posts: 5853
Posted 11/03/07 - 03:53 PM:
#6
<IF {THISMEMBERNEWSLETTER} is no> is the conditional you want.
_____________________
"Do things you love doing, because then it ain't work. Don't do something you don't really enjoy, because you're never going to work hard enough at it." - Bob Young, founder of Red Hat
Usergroup: Customer
Joined: Aug 19, 2005
Location: England
Total Topics: 270
Total Posts: 870
Posted 11/05/07 - 03:19 AM:
#7
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.
Usergroup: Administrator
Joined: Dec 21, 2001
Location: Northern California
Total Topics: 56
Total Posts: 5853
Posted 11/06/07 - 03:02 PM:
#8
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}?
_____________________
"Do things you love doing, because then it ain't work. Don't do something you don't really enjoy, because you're never going to work hard enough at it." - Bob Young, founder of Red Hat