Webmastersite.net
Register Log In

New links page - shows all links

Comments on New links page - shows all links

hai
Forum Regular

Usergroup: Customer
Joined: Apr 03, 2007
Location: NY & PA

Total Topics: 94
Total Comments: 339
hai
Posted Jun 28, 2008 - 12:15 PM:

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
Paul
developer

Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California

Total Topics: 61
Total Comments: 7868
Paul
Posted Jun 29, 2008 - 9:33 AM:

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|%'
hai
Forum Regular

Usergroup: Customer
Joined: Apr 03, 2007
Location: NY & PA

Total Topics: 94
Total Comments: 339
hai
Posted Jun 29, 2008 - 1:22 PM:

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.
Paul
developer

Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California

Total Topics: 61
Total Comments: 7868
Paul
Posted Jun 29, 2008 - 4:22 PM:

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.
hai
Forum Regular

Usergroup: Customer
Joined: Apr 03, 2007
Location: NY & PA

Total Topics: 94
Total Comments: 339
hai
Posted Jun 29, 2008 - 5:25 PM:

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.
Paul
developer

Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California

Total Topics: 61
Total Comments: 7868
Paul
Posted Jun 30, 2008 - 3:12 PM:

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.
Paul
developer

Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California

Total Topics: 61
Total Comments: 7868
Paul
Posted Jun 30, 2008 - 5:19 PM:

Fixed. Just regenerating links should work with the old versions.
hai
Forum Regular

Usergroup: Customer
Joined: Apr 03, 2007
Location: NY & PA

Total Topics: 94
Total Comments: 339
hai
Posted Jun 30, 2008 - 7:13 PM:

This works now. Thank you.
hai
Forum Regular

Usergroup: Customer
Joined: Apr 03, 2007
Location: NY & PA

Total Topics: 94
Total Comments: 339
hai
Posted Aug 28, 2008 - 6:51 AM:

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.
Paul
developer

Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California

Total Topics: 61
Total Comments: 7868
Paul
#10 - Quote - Permalink
Posted Aug 29, 2008 - 12:07 PM:

Tested, can't reproduce. When I set a category to not be viewable by guests, its links vanish from the new links page.
hai
Forum Regular

Usergroup: Customer
Joined: Apr 03, 2007
Location: NY & PA

Total Topics: 94
Total Comments: 339
hai
#11 - Quote - Permalink
Posted Aug 29, 2008 - 12:28 PM:

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.
Paul
developer

Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California

Total Topics: 61
Total Comments: 7868
Paul
#12 - Quote - Permalink
Posted Aug 30, 2008 - 9:05 AM:

Fixed.
Search thread for
Download thread as
  • 0/5
  • 1
  • 2
  • 3
  • 4
  • 5



Sorry, you don't have permission to post posts. Log in, or register if you haven't yet.