I understand that it is a feature that items from restricted sections don't show up in the New and Popular web boxes in unrestricted areas. But in the previous version of CSK you could comment out a line of code in a stored procedure and those boxes would show
restricted content, including thumbnails. That seems to have changed. Now it seems that I need to go into the SQL function "Community_GetTop3ContentItem" and comment out the WHERE clause line "AND dbo.Community_IsContentAllowed(@communityID, Community_ContentPages.ContentPage_SectionID,
@user) = 1" That works perfectly for Articles and Posts, but Photo Gallery thumbnails have an "X". Is there some quick code change I can make to get the restricted image thumbnails to appear in an unrestricted area?
If I understand correctly, the behavior you saw on older versions of the CSK where commenting out that line of code allowed the thumbnails to show correctly was actually a bug itself, and was inconsistant (if there wasn't an output cached version with thumbnails
in memory, you still wouldn't see the thumbnails). You could reimplement output caching to get back to the origonal behavior probably, I don't recommend that since it is very inconsistant and will only work some of the time. To make this work well, you'll
need to modify the engine so that it allows requests for thumbnail images regardless of section security.
I'm not sure if I explained myself well. The following thread is that one that helped me through this in the old version. I'd just like the same solution for the new version. http://www.asp.net/Forums/ShowPost.aspx?tabindex=1&PostID=147965 If what you say is
correct, than this never really was a solution. I guess I'm not sure where to modify the engine. I thought it might be just a quick modification in SQL, like it is with New Posts or Articles. Thanks for your response.
The difference with photos and articles is that: In articles, the query ran in the web box will return all the info needed to populate the web box. With photos though, the web box query only returns the info about the photo... a second call is made from the
browser to actually load the photo's thumbnail. That call, goes into the actual photo section to get the thumbnail, so even if the web box's query wasn't hitting an access restriction, the image request will. The way around it is to modify the engine code
that returns the thumbnail so that requests for thumbnails aren't checked against the section's security. I consider this a very bad idea personally. If you want anonymous users to see the thumbnail, then make the photo section accessable to anonymous users.
But if you really want to circumvent security for your web boxes with photos, you'll have to allow anonymous users to fetch thumbnails system wide. There is probably a more elegant solution where only web box based requests can fetch thumbnails anonymously,
but it gets more complex. I wish I could give you more details, but without investigating how to do this myself (which I don't have time for) I can't tell you where exactly the changes need to be made. They certainly aren't simple database changes though.
These would be engine code changes, though only minor ones.
None
0 Points
31 Posts
New and Popular photo web box not showing pics
Oct 22, 2003 09:55 AM|Teckguy|LINK
Member
35 Points
1052 Posts
Re: New and Popular photo web box not showing pics
Oct 22, 2003 11:16 AM|Redd|LINK
http://www.reddnet.net
None
0 Points
31 Posts
Re: New and Popular photo web box not showing pics
Oct 22, 2003 12:49 PM|Teckguy|LINK
Member
35 Points
1052 Posts
Re: New and Popular photo web box not showing pics
Oct 22, 2003 03:59 PM|Redd|LINK
http://www.reddnet.net