Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 General Discussions

Reply
 
Thread Tools Display Modes
  #1  
Old 12-27-2005, 06:06 PM
PuntoPower PuntoPower is offline
 
Join Date: Apr 2004
Posts: 37
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default 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
Reply With Quote
  #2  
Old 12-27-2005, 06:34 PM
Michael Morris's Avatar
Michael Morris Michael Morris is offline
 
Join Date: Nov 2003
Location: Knoxville TN
Posts: 774
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #3  
Old 12-27-2005, 07:13 PM
gizmo4321 gizmo4321 is offline
 
Join Date: Nov 2004
Posts: 34
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #4  
Old 12-27-2005, 08:02 PM
PuntoPower PuntoPower is offline
 
Join Date: Apr 2004
Posts: 37
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #5  
Old 12-27-2005, 08:07 PM
gizmo4321 gizmo4321 is offline
 
Join Date: Nov 2004
Posts: 34
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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?)
Reply With Quote
  #6  
Old 12-27-2005, 08:18 PM
PuntoPower PuntoPower is offline
 
Join Date: Apr 2004
Posts: 37
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #7  
Old 12-27-2005, 08:58 PM
citricguy citricguy is offline
 
Join Date: Jun 2005
Location: Maui, Hawaii
Posts: 33
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #8  
Old 12-27-2005, 09:06 PM
PuntoPower PuntoPower is offline
 
Join Date: Apr 2004
Posts: 37
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

ive tried flashchat already but my members prefer phpmychat. thx tho
Reply With Quote
  #9  
Old 12-27-2005, 09:41 PM
gizmo4321 gizmo4321 is offline
 
Join Date: Nov 2004
Posts: 34
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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?
Reply With Quote
  #10  
Old 12-27-2005, 10:01 PM
PuntoPower PuntoPower is offline
 
Join Date: Apr 2004
Posts: 37
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by gizmo4321
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?
you are right the first time but that code doesnt work in templetes, "if" statements have to be done like below


<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>
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 12:02 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.06823 seconds
  • Memory Usage 2,251KB
  • Queries Executed 13 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete