I've created 3 category types. 1 visible by admins only, 1 visible by members & admins & 1 visible by all.
I'd like only the links in the category visible by all to be listed on the "new links" page. I've tried a few different ways to get this to work, but either it still shows me all the links regardless of category or it gives me mysql errors.
At this point, I thought it may make it easier to add the tag "publiclink" to the links in that category (this way I'm not having to create link types). Admins will only be allowed to add or edit tags so I thought the following might work -
<CONFIG>links,time,20,descending,time > {SINCE},tags='publiclinks'</CONFIG> I've also tried changing 'publiclinks' to '|publiclinks|' - since this is how it shows up when I click the tag. When I add the tags filter I do not get any links and get the following error at the top of the page -
Warning: mysqli_num_rows() expects parameter 1 to be mysqli_result, boolean given in /path/html/portal/databases/mysqli.php on line 20
Category permissions are set correctly, but the links still show up on the new links page. Granted the permissions don't allow access to guests who may click on the category, but the links & their description still show up on the page. This "hard, insecure and error-prone hack" is just a way for me to work around this problem. If you have a better suggestion I'm defintely open to it.
In the meantime, changing the line to <CONFIG>links,time,20,descending,time > {SINCE},tags LIKE '%|publiclinks|%'</CONFIG> gave me the same mysql error from my first post.
Category permissions are set correctly, but the links still show up on the new links page.
Then please wait for the fix on that instead of delaying it by using up my time on an extremely complicated workaround (much more complicated than the fix is likely to be) that doesn't work either.
Obviously, I didn't realize it was complicated workaround nor was I deliberately trying to use up your time. I was trying to get a solution to a problem I was having and it never crossed my mind that it was a bug of some sort. I will gladly wait for a fix.
I just set a category to not allow guests to view, and the link in it doesn't show up to guests in new links or any other toplist.
After another test, I see that if you change the permission on a category, links in its grandchildren aren't affected. This must be what you're seeing, the lack of inheritance down multiple levels. Will fix.
I hate to do this, but this problem has come back.
I am now on version 5.0.2 and when a guest views the New Links page it lists links in categories they do not have permission to view. Upon clicking the link they recieve the login page, but the links should still not be listed.
I have tried regenerating, but the links are still listed on the page.
I see what you mean. If I set a category to not be viewable by guests then it disappears from the new links page which I'm sure is how you are testing. If, instead, I set the "Default to no access" option to yes and change the permissions only for the group that does have access that's when the links show up. Guests (correctly) do not have access to the actual links, but they are listed on the New Links page.
Comments on New links page - shows all links
Forum Regular
Usergroup: Customer
Joined: Apr 03, 2007
Location: NY & PA
Total Topics: 94
Total Comments: 339
I've created 3 category types. 1 visible by admins only, 1 visible by members & admins & 1 visible by all.
I'd like only the links in the category visible by all to be listed on the "new links" page. I've tried a few different ways to get this to work, but either it still shows me all the links regardless of category or it gives me mysql errors.
At this point, I thought it may make it easier to add the tag "publiclink" to the links in that category (this way I'm not having to create link types). Admins will only be allowed to add or edit tags so I thought the following might work -
<CONFIG>links,time,20,descending,time > {SINCE},tags='publiclinks'</CONFIG>
I've also tried changing 'publiclinks' to '|publiclinks|' - since this is how it shows up when I click the tag. When I add the tags filter I do not get any links and get the following error at the top of the page -
Warning: mysqli_num_rows() expects parameter 1 to be mysqli_result, boolean given in /path/html/portal/databases/mysqli.php on line 20
developer
Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California
Total Topics: 61
Total Comments: 7868
Permissions for categories should really be handled through category permissions, that's not what category types are intended for.
If you insist on the hard, insecure and error-prone hack way though,
tags LIKE '%|publiclink|%'
Forum Regular
Usergroup: Customer
Joined: Apr 03, 2007
Location: NY & PA
Total Topics: 94
Total Comments: 339
Category permissions are set correctly, but the links still show up on the new links page. Granted the permissions don't allow access to guests who may click on the category, but the links & their description still show up on the page. This "hard, insecure and error-prone hack" is just a way for me to work around this problem. If you have a better suggestion I'm defintely open to it.
In the meantime, changing the line to
<CONFIG>links,time,20,descending,time > {SINCE},tags LIKE '%|publiclinks|%'</CONFIG>
gave me the same mysql error from my first post.
developer
Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California
Total Topics: 61
Total Comments: 7868
Category permissions are set correctly, but the links still show up on the new links page.
Then please wait for the fix on that instead of delaying it by using up my time on an extremely complicated workaround (much more complicated than the fix is likely to be) that doesn't work either.
Forum Regular
Usergroup: Customer
Joined: Apr 03, 2007
Location: NY & PA
Total Topics: 94
Total Comments: 339
Obviously, I didn't realize it was complicated workaround nor was I deliberately trying to use up your time. I was trying to get a solution to a problem I was having and it never crossed my mind that it was a bug of some sort. I will gladly wait for a fix.
developer
Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California
Total Topics: 61
Total Comments: 7868
I just set a category to not allow guests to view, and the link in it doesn't show up to guests in new links or any other toplist.
After another test, I see that if you change the permission on a category, links in its grandchildren aren't affected. This must be what you're seeing, the lack of inheritance down multiple levels. Will fix.
developer
Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California
Total Topics: 61
Total Comments: 7868
Fixed. Just regenerating links should work with the old versions.
Forum Regular
Usergroup: Customer
Joined: Apr 03, 2007
Location: NY & PA
Total Topics: 94
Total Comments: 339
This works now. Thank you.
Forum Regular
Usergroup: Customer
Joined: Apr 03, 2007
Location: NY & PA
Total Topics: 94
Total Comments: 339
I hate to do this, but this problem has come back.
I am now on version 5.0.2 and when a guest views the New Links page it lists links in categories they do not have permission to view. Upon clicking the link they recieve the login page, but the links should still not be listed.
I have tried regenerating, but the links are still listed on the page.
developer
Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California
Total Topics: 61
Total Comments: 7868
Tested, can't reproduce. When I set a category to not be viewable by guests, its links vanish from the new links page.
Forum Regular
Usergroup: Customer
Joined: Apr 03, 2007
Location: NY & PA
Total Topics: 94
Total Comments: 339
I see what you mean. If I set a category to not be viewable by guests then it disappears from the new links page which I'm sure is how you are testing. If, instead, I set the "Default to no access" option to yes and change the permissions only for the group that does have access that's when the links show up. Guests (correctly) do not have access to the actual links, but they are listed on the New Links page.
developer
Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California
Total Topics: 61
Total Comments: 7868
Fixed.