The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
non vb page wit vb permissions
i have a non vb page that i only want registered users to see. how can i do this?
many thanks |
#2
|
||||
|
||||
A quick search for vb powered pages should turn up more precise info on this, but in brief you'd need to include the global.php file of vbulletin to initialize the vb engine. Once that's done the rest of your file can run a permissions check. How this is done though varies significantly between vb 3.0.x and 3.5.x and I'm not familiar with the process under vb 3.5.x
|
#3
|
|||
|
|||
If you want to do it based on groups, then something like this should work; I use it myself:
define ("FORUM_HOME_DIR", "WhereverForumHomeIs"); define("MY_APP_HOME_DIR", "WhereverMyAppHomeIs"); define("REGISTERED_USER_GROUP", "RegisteredGroupId"); chdir(FORUM_HOME_DIR); include_once('./global.php'); include_once('./includes/functions.php'); chdir(MY_APP_HOME_DIR); if(is_member_of($vbulletin->userinfo, REGISTERED_USER_GROUP)) { Do registered stuff here; } else { Do not registered stuff here; } The above code is for vB 3.5.x For vB 3.0.x you would change $vBulletin->userinfo to $bbuserinfo. Hope this helps. |
#4
|
|||
|
|||
after a bit of trying a few things i have made a non vb page that calls a custome made templete in vb. this templete calls the header and footer and in the middle has the following
<p align=center> <iframe src="http://www.mywebsite.com/chat/chat/index.php3" style="height:500px;width:800px;"></iframe> </p> what variables are used to make a if statment so i can set what groups can see this iframe? thx |
#5
|
|||
|
|||
The Display Group Id will be $vBulletin->userinfo['usergroupid'].
The Group Membership list will be $vBulletin->userinfo['membergroupids'], and will be a comma delimited string of all groups the user is a member of. Would it not be easier just to go into your Admin Control Panel, go to the group settings, and see what group id the group you're interested in has? (Sorry, I'm beginning to think I may not be fully understanding what you are trying to do?) |
#6
|
|||
|
|||
sry if im not been clear. this non vb page is a chatroom so i dont want non registered users to see it. so was wondering can someone put an if statment together that i will put in the templete so that if a non registered member views the page they get a message sayin that they need to register to view the page, but if they have registered the iframe code is called and they see the chat room
hope that helps usergroups that i want to see the chatroom code are 2,3,5, 6, 9, 11 |
#7
|
|||
|
|||
I use this $5 script called FlashChat for my site. It integrates with vBulletin very well and already has everything you need.
check out http://www.tufat.com/s_flash_chat_chatroom.htm |
#8
|
|||
|
|||
ive tried flashchat already but my members prefer phpmychat. thx tho
|
#9
|
|||
|
|||
I think I'm beginning to understand.
The code I gave you only works if they are currently logged into vBulletin. Then, when they go to your non-vB page, you can check to see if they are real users or not. However, if I understand this aright, what you want is to know if they are registered users in your forum without actually having them login to it, right? |
#10
|
|||
|
|||
Quote:
<if condition=" user a member of either of the following groups 2,3,5, 6, 9, 11 " > show chat room in iframe else dont show chatroom in iframe </if> |
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|