The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
![]()
I need some help with coding.
I use the mod "login simple v1.10" in a non-vb page. Code:
<?php if ($vbulletin->userinfo['usergroupid'] == '17' ) { echo "This is only visible to people in usergroup 17"; } ?> <br /><br /> <?php if ($vbulletin->userinfo['usergroupid'] == '2' ) { echo "This is only visible to registered users"; } ?> Usergroup 2 is the usual registered member group. With a user who visits this page, only the second if-statement works. Testing the usergroup 17 doesn't work. What to do? Checking Usergroup 17 is what I want to do. |
#2
|
||||
|
||||
![]()
Try this:
Code:
if (! is_member_of($vbulletin->userinfo, 17)) { print_no_permission(); } |
#3
|
|||
|
|||
![]()
This didn't work.
I want to check if the user is in usergroup 17 and show him the content of the page if it is true. --------------- Added [DATE]1192813103[/DATE] at [TIME]1192813103[/TIME] --------------- Okay, I modded it slightly and it works. :up: Thanks. --------------- Added [DATE]1192822078[/DATE] at [TIME]1192822078[/TIME] --------------- I ran into another problem: I want to load a file for the members of the usergroup 17. The code looks like this: If I remove the code between the //*** and remove the if statements, the file is loaded. But it seems the header function collides with something in the forum's global.php? I tried to puffer the output with ob_start / ob_flush, but it didn't work. The script is doing nothing. |
#4
|
||||
|
||||
![]()
You're going to have to include the global.php file in order to use vBulletin's functions.
|
#5
|
||||
|
||||
![]()
Remove exit; (both of them.)
|
#6
|
|||
|
|||
![]()
https://vborg.vbsupport.ru/showthread.php?t=160679
I want to do another thing. I want to <?php if ($vbulletin->forum['forumno'] == '67 ) like that... for example;https://vborg.vbsupport.ru/forumdisplay.php?f=15 <?php if ($vbulletin->forum['forumno'] == '15 ) like that... |
#7
|
|||
|
|||
![]()
Okay, I have replaced the "require_once" with "include" and removed the exits, but the script still does not produce any result.
|
#8
|
||||
|
||||
![]() Quote:
Post your code as you now have it. |
#9
|
|||
|
|||
![]()
Here's the full code (with changed paths):
If I leave out the global.php include and remove the usergroup check, the movies are loading... |
#10
|
||||
|
||||
![]()
Try something like this. (untested)
PHP Code:
|
![]() |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|