WebmasterSite.net: PHP scripts to enable your creativity
WSN Links PHP Directory Software
PHP Scripts Webmaster Links Support Forums

Register | Forgot Password

hide category from everyone except admin

Version: 4.0.39
printPrint


hide category from everyone except admin
hai
Forum Regular
Avatar

Usergroup: Customer
Joined: Apr 03, 2007
Total Topics: 68
Total Posts: 268
Posted 09/13/07 - 08:51 PM:
quote post
#1
I have a category that I would like to have hidden from all guests and members, but still be viewable by the admin. I have edited the category and set "Can view category?" for Guests & Members to No and for Admin Yes. Unfortunately, the category, although not accessible without logging in is still listed in the site map and category drop-down list for guests.

If instead I change "Hide this category from listing?" to Yes it is not listed anywhere, not even for the admin. The only way I can access it is if I do a search for the category directly.

Is there anyway I can do what I want? Keep the category completely hidden from all guests and members yet still be available to admins?

Thanks for your help.

Marilyn

High Aspirations, Inc. - Web Site Design & More
http://www.highaspirationsinc.com/

Be who you are and say what you feel, because those who mind don't matter and those who matter don't mind. - Dr. Seuss
babrees
Expert
Avatar

Usergroup: Customer
Joined: Aug 19, 2005
Location: England
Total Topics: 312
Total Posts: 1032
Posted 09/13/07 - 09:07 PM:
quote post
#2
Go to Admin > Settings > Categories

Show categories in list even when user doesn't have permission to view their content?

Select No


hai
Forum Regular
Avatar

Usergroup: Customer
Joined: Apr 03, 2007
Total Topics: 68
Total Posts: 268
Posted 09/13/07 - 09:15 PM:
quote post
#3
Thansk for the quick response.

The setting was already set to no. Right now the category doesn't appear in the regular list, but shows up in the site map and drop-down list.

High Aspirations, Inc. - Web Site Design & More
http://www.highaspirationsinc.com/

Be who you are and say what you feel, because those who mind don't matter and those who matter don't mind. - Dr. Seuss
Paul
Administrator
Avatar

Usergroup: Administrator
Joined: Dec 21, 2001
Location: Northern California
Total Topics: 57
Total Posts: 6316
Posted 09/14/07 - 06:11 PM:
quote post
#4
The sitemap and category selector aren't usergroup-specific, categories are either shown or not in them. I'll look into it but I don't think there's a practical way to change that.

"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
hai
Forum Regular
Avatar

Usergroup: Customer
Joined: Apr 03, 2007
Total Topics: 68
Total Posts: 268
Posted 09/14/07 - 08:52 PM:
quote post
#5
If there is no easy way for you to implement this I figured out a way around the problem that is good enough for me.

For anyone else who's interested this is what I did. I changed the "Hide this category" option to yes and then added the following code to my main.tpl -

<IF {THISMEMBERGROUPCANSUBMITCATEGORIES}>
<p>
<a href="http://www.webmastersite.net/forums/{DIRURL}/index.php?action=displaycat&catid=175" class="categoryname">Category Name</a><br>Click to view shows from the private category.</p>
</IF>

It's not perfect and may not work for everyone, but it does the job I need it to do.

Thanks.


High Aspirations, Inc. - Web Site Design & More
http://www.highaspirationsinc.com/

Be who you are and say what you feel, because those who mind don't matter and those who matter don't mind. - Dr. Seuss
Paul
Administrator
Avatar

Usergroup: Administrator
Joined: Dec 21, 2001
Location: Northern California
Total Topics: 57
Total Posts: 6316
Posted 09/15/07 - 11:57 PM:
quote post
#6
If it's only for admins wouldn't you use <IF {THISMEMBERISADMIN}>?

"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
hai
Forum Regular
Avatar

Usergroup: Customer
Joined: Apr 03, 2007
Total Topics: 68
Total Posts: 268
Posted 09/16/07 - 10:32 AM:
quote post
#7
Yes, you're correct. Didn't see that one. Copied the coding from another section of the page and got it to work so I left it at that. I will change it. Thanks for the correction!

High Aspirations, Inc. - Web Site Design & More
http://www.highaspirationsinc.com/

Be who you are and say what you feel, because those who mind don't matter and those who matter don't mind. - Dr. Seuss
Search thread for
Download thread as


You don't have permission to post.

Please login or register.

   
 
© 2008 Paul Knierim. All rights reserved.