 | |  | | | Photopost Pro How Do I...? Wondering how to do things in PhotoPost? |
March 4th, 2007, 12:36 PM
|
#1 (permalink)
| | Junior Member Verified Customer
Join Date: Feb 2007
Posts: 18
| $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. |
| |
March 4th, 2007, 01:03 PM
|
#2 (permalink)
| | Photopost Developer Verified Customer
Join Date: Jun 2002 Location: Abingdon,MD
Posts: 71,650
|
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.
|
| |
March 4th, 2007, 01:09 PM
|
#3 (permalink)
| | Junior Member Verified Customer
Join Date: Feb 2007
Posts: 18
|
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.
|
| |
March 4th, 2007, 01:15 PM
|
#4 (permalink)
| | Photopost Developer Verified Customer
Join Date: Jun 2002 Location: Abingdon,MD
Posts: 71,650
|
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']
|
| |
March 4th, 2007, 01:17 PM
|
#5 (permalink)
| | Junior Member Verified Customer
Join Date: Feb 2007
Posts: 18
| Quote:
Originally Posted by Chuck S 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...
|
| |
March 4th, 2007, 01:19 PM
|
#6 (permalink)
| | Photopost Developer Verified Customer
Join Date: Jun 2002 Location: Abingdon,MD
Posts: 71,650
|
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.
|
| |
March 4th, 2007, 01:24 PM
|
#7 (permalink)
| | Junior Member Verified Customer
Join Date: Feb 2007
Posts: 18
|
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.
Last edited by coralnutz; March 4th, 2007 at 01:44 PM.
|
| |
March 4th, 2007, 02:15 PM
|
#8 (permalink)
| | Photopost Developer Verified Customer
Join Date: Jun 2002 Location: Abingdon,MD
Posts: 71,650
|
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 PhotoPost Enhanced vB3 Index Integration
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.
Last edited by Chuck S; March 4th, 2007 at 02:55 PM.
|
| |
March 4th, 2007, 02:50 PM
|
#9 (permalink)
| | Junior Member Verified Customer
Join Date: Feb 2007
Posts: 18
|
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.
|
| |
March 4th, 2007, 02:56 PM
|
#10 (permalink)
| | Photopost Developer Verified Customer
Join Date: Jun 2002 Location: Abingdon,MD
Posts: 71,650
|
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
|
| |
March 4th, 2007, 03:00 PM
|
#11 (permalink)
| | Junior Member Verified Customer
Join Date: Feb 2007
Posts: 18
|
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. |
| |
March 4th, 2007, 03:02 PM
|
#12 (permalink)
| | Photopost Developer Verified Customer
Join Date: Jun 2002 Location: Abingdon,MD
Posts: 71,650
|
Just as a sidenote though I tested this block on my vbportal side as is with its default coding and it works fine
|
| |
March 4th, 2007, 03:17 PM
|
#13 (permalink)
| | Junior Member Verified Customer
Join Date: Feb 2007
Posts: 18
|
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.
|
| |
March 4th, 2007, 03:24 PM
|
#14 (permalink)
| | Photopost Developer Verified Customer
Join Date: Jun 2002 Location: Abingdon,MD
Posts: 71,650
|
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.
|
| |
March 4th, 2007, 03:30 PM
|
#15 (permalink)
| | Junior Member Verified Customer
Join Date: Feb 2007
Posts: 18
|
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.
|
| |
March 4th, 2007, 04:31 PM
|
#16 (permalink)
| | Junior Member Verified Customer
Join Date: Feb 2007
Posts: 18
|
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.
|
| |
March 4th, 2007, 04:34 PM
|
#17 (permalink)
| | Photopost Developer Verified Customer
Join Date: Jun 2002 Location: Abingdon,MD
Posts: 71,650
|
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.
|
| | |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | | | | Thread Tools | | | | Display Modes | Rate This Thread | Linear Mode | |
Posting Rules
| You may not post new threads You may not post replies You may not post attachments You may not edit your posts HTML code is Off | | | All times are GMT -5. The time now is 12:11 PM. | |