PhotoPost Community

PhotoPost Community (http://www.photopost.com/forum/)
-   Photopost Pro How Do I...? (http://www.photopost.com/forum/photopost-pro-how-do-i/)
-   -   $photopostfeature Not checking permissions? (http://www.photopost.com/forum/photopost-pro-how-do-i/130773-photopostfeature-not-checking-permissions.html)

coralnutz March 4th, 2007 12:36 PM

$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. :)

Chuck S March 4th, 2007 01:03 PM

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.
I would assume vbportal has its own convention for grabbing user permissions based on its own system since its permissions are set outside of vbulletin forum but its structure so you are free to discuss modifications to any code for use of things outside supported parameters in THE MOD CORNER.

coralnutz March 4th, 2007 01:09 PM

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.

Chuck S March 4th, 2007 01:15 PM

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']

coralnutz March 4th, 2007 01:17 PM

Quote:

Originally Posted by Chuck S (Post 1190964)
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.


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

Chuck S March 4th, 2007 01:19 PM

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.

coralnutz March 4th, 2007 01:24 PM

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.

Chuck S March 4th, 2007 02:15 PM

I think your misunderstanding something here. Nowhere on our site does it say inc_features.php is written for vbportal.

Quote:

Can integrate with vbPortal
That means there is vbportal 2 or 3 integration with photopost meaning their products sidebar is automatically picked up on our gallery which indeed it is. Example here

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.

coralnutz March 4th, 2007 02:50 PM

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.

Chuck S March 4th, 2007 02:56 PM

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

coralnutz March 4th, 2007 03:00 PM

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. :)

Chuck S March 4th, 2007 03:02 PM

Just as a sidenote though I tested this block on my vbportal side as is with its default coding and it works fine

coralnutz March 4th, 2007 03:17 PM

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.

Chuck S March 4th, 2007 03:24 PM

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.

coralnutz March 4th, 2007 03:30 PM

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.

coralnutz March 4th, 2007 04:31 PM

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.

Chuck S March 4th, 2007 04:34 PM

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


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97