![]() |
$photopostfeature Not checking permissions? I am using a block on vbportal page with the follwing code. $pppath = "/path/to/my/gallery"; //no trailing slash include "{$pppath}/inc_features.php"; echo "$photopostfeature"; Everything shows up fine and the pictures are there. However. I am having a photocontest were people upload their submission into a gallery that only mods and admins are suppose to be able to see. So I have the permissions on that category that registered users can upload but not view. When a guest or regular registered user visits the gallery itself everthing works fine, they don't see that category or any pictures there. And if they click on a user link to view all of their pictures, it doesn't list the photos in the private category. So that all seems to work find. But when guest or registered user visits the portal page, they are able to see these pictures along with teh names and all that. If I click on the thumbnail picture on the portal page i get a message that I don't have permissions to view. Any ideas? If I need to post any more code let me know and I will. Thanks in advance for the help. :) |
Well this block is written for vbportal not vbulletin so I can not say if the permission structure works or not for that vb program. It surely checks for vb permissions when installed in its default state on the vb forumhome page via this code here at the top of inc_features.php Code: Content visible to verified customers only. |
Wouldnt' the vbportal permissions just determine whether users are able to see the block at all and not what pictures would load inside that block? I want all users to be able to see the block itself, but shouldn't the photopost software be checking what users see's what pictures. All my installs are default, non of my code for vbulletin, vbportal or photpost pro is modified so I would assume this should work as it's supposed to. |
No the issue being is that vbportal probally never defines this statement $vbulletin->userinfo['usergroupid'] which means vbportal does not have the element needed to check permissions hense your using the coded block outside of its normal intention for what it is coded for which is why I suggested you post in the mod corner forums for mod help maybe someone knows what variable that software uses to house the usergroup permissions or grab them. In the vb software for 3.5/3.6 it is definately $vbulletin->userinfo['usergroupid'] |
Quote:
So if the block is written fro vbportal? Then I don't understand why this is outside of it's intended use? That's what I'm trying to do... |
The block is written for vbulletin for use on the FORUMHOME template of said product as the instructions for installing it state. It is not written for vbportal in any manner. While you can easily get it to show there the permissions structure can not be followed since that variable is not defined in vbportal only vbulletin. |
So does this mean there is another block written for vbportal? Or is there a way in the inc-features file to tell it to ignore/include certain galleries all together? It's listed on the features page for photopost pro that it can integrate with vbportal, so I assumed it would be straighforwared. |
I think your misunderstanding something here. Nowhere on our site does it say inc_features.php is written for vbportal. Quote:
http://www.reeftalk.com/gallery/index.php Your talking about a vb mod block we include with our code that was written for the vbulletin forum here http://www.photopost.com/forum/photopost-product-faqs/110527-photopost-enhanced-vb3-index-integration.html Later on we released a vb3.6 plugin to show that on the vb forumhome here http://www.photopost.com/forum/showp...06&postcount=1 Nowhere do we claim this block was written for the vbportal index. If you want to discuss code modifications to existing code which falls outside product support you may do so in THE MOD CORNER. |
I guess your right, I misunderstood what "integrate" meant. When I read "Can integrate with vbportal" I was under the impression that it fully integrates with vbportal. I guess I should have investigated more before purchasing. Thank you for your time, hopefully someone at vbportal will know how to make this work properly. |
Just have them tell you what vbportal defined variable holds the user's usergroup and replace this in inc_features.php $vbulletin->userinfo['usergroupid'] with what they tell you |
Thanks Chuck... Hopefully that will get in the right direction... I've been searching for everything on this. I can't believe that there isn't something here or on vbportal on how to do this. I can't be the onlyone wanting to put a photopost block on their vbportal page and have permissions work correctly. Thanks for the tips though, it's much appreciated. :) |
Just as a sidenote though I tested this block on my vbportal side as is with its default coding and it works fine |
Are you using any private categories? It works fine if I wasn't concerned about that. If you look here... I put the block on on another page other than the homepage, just so my users wont see it easily. But still a vbportal page, does the same thing on the index. http://club-zoa.com/modules.php?name=allstars You can see the photo in the photo contest gallery? You shouldn't be able to cause your not in the group that's allowed. And if you click on it you will get that message about not haveing permissions. If you just go directly into the gallery, you don't see it either. |
The block checks to see who has access to a category via the viewing permissions set by you in Admin => Edit Categories so if you set that they can view it then it will appear. |
It is set so they cannot view that, only upload too it. If you go into the gallery the permissions work fine, you cannot see the "Photo Contest" or any pictures in it. But it still is showing the thumb on the vbportal block regardless. |
The response I got over at vbportal was that $vbulletin->userinfo['usergroupid'] is defined as a global and that any php block should already have that variable. They also didn't see any reason that it shouldn't be working just the way it was. Well it won't be an issue after the photo contest is done. I was able to find this little bit to add to make it exclude that category all together. AND cat NOT IN (504) I guess I just wasn't searching for the right answer. :) Thanks for taking the time to look at this, it is much appreciated. |
Very simple test here is my site. I set now guests can not view members gallery or any cat only the mobile uploads cat. http://www.reeftalk.com You can see you can only see that one pic in both links http://www.reeftalk.com/gallery Now login with testing and testing and you see you can see everything in both links so looks like it works fine as stated but again this block was written for vbulletin forumhome not vbportal. |
| All times are GMT -5. The time now is 07:10 PM. |
Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0