View Full Version : $vbulletin->userinfo['usergroupid']
squishi
19 Oct 2007, 15:25
I need some help with coding.
I use the mod "login simple v1.10" in a non-vb page.
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
Usergroup 17 is a custom usergroup with only additional members and no primary members.
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.
Andrew Green
19 Oct 2007, 16:02
Try this:
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
squishi
19 Oct 2007, 17:52
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 1192813103 at 1192813103 ---------------
Okay, I modded it slightly and it works. :up:
Thanks.
--------------- Added 1192822078 at 1192822078 ---------------
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.
Dismounted
20 Oct 2007, 14:13
You're going to have to include the global.php file in order to use vBulletin's functions.
Analogpoint
20 Oct 2007, 16:26
Remove exit; (both of them.)
cagatayh
21 Oct 2007, 12:49
http://www.vbulletin.org/forum/showthread.php?t=160679
I want to do another thing. I want to
<?php
if ($vbulletin->forum['forumno'] == '67 ) like that...
for example;http://www.vbulletin.org/forum/forumdisplay.php?f=15
<?php
if ($vbulletin->forum['forumno'] == '15 ) like that...
squishi
21 Oct 2007, 22:30
You're going to have to include the global.php file in order to use vBulletin's functions.
Okay, I have replaced the "require_once" with "include" and removed the exits, but the script still does not produce any result.
Analogpoint
22 Oct 2007, 00:01
Okay, I have replaced the "require_once" with "include" and removed the exits, but the script still does not produce any result.
require_once does the same as include, except how it handles it if the file is not found, or if you try to include it more than once.
Post your code as you now have it.
squishi
22 Oct 2007, 09:35
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...
Analogpoint
22 Oct 2007, 16:22
Try something like this. (untested)
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
squishi
22 Oct 2007, 17:38
Thanks, man! I think that worked! :up:
vBulletin® v3.6.12, Copyright ©2000-2009, Jelsoft Enterprises Ltd.