The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Find visible Channels by Groupid?
Hello,
I am working on a custom back end that pulls a list of documents from vBulletin's database. One intricate aspect of the vBulletin set up is that 90% of the channels are restricted to one User Groups's visiblity. Because of this, it would not work for my client to show a user documents which he can't see through the forum. If that was unclear at all, here is an example: UserA is in Channel1 UserB is in Channel1, Channel2. UserB uploads Document9 in Channel2. UserA should not be able to see Document9. UserA uploads Document8 in Channel1. UserA, UserB should be able to see Document 8. Ideally, I would like a function that is able to match a User's Group to visible Channels, but I would settle for a list of nodeids that a user is able to access. Does anyone have any ideas of how I might achieve this? That or, is somone able to explain to me how I can extrapolate this information from the permission table? I see it has listed nodeid, and groupid, but I am unable to accurately determine the correlations. PHP Code:
I would appreciate any snippets, or advice anyone would have to offer! Thanks |
#2
|
|||
|
|||
So, i have a working solution:
Bare in mind, while I am not too much of a PHP novice, I am still learning OOP. I have also only been using vBulletin for about 3 weeks. PHP Code:
If anyone else is facing a similar situation, feel free to try and figure out my code. If you take out the join for _attach_keywords, it should work rather easily. |
Благодарность от: | ||
tbworld |
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|