[pmwiki-users] FW: vBulletin 3.5 user system integration
Tim Ahrentlov
ta at ateist.org
Mon Jan 23 09:44:11 CST 2006
Pm,
I do.
But I no think the problem is located elsewhere. It arises when I simply
require the file/code below. This somehow defaults all actions to view. Yes,
I cannot edit, but I even cannot print, see history, etc.
When I disable the "require_once($FORUMPATH.'global.php');" code I can
print, do history, etc.
Weird! I remember there was something with a guy called Anno in the list
that had a similar problem.
---
<?php
$FORUMURL = "http://some.forum.url/";
$FORUMPATH = "D:/some/forum/path/"; // Set path to forum
$PRIVILEGED = array("5","6","7"); // Super Moderator,
Admin, Moderator
$TRUSTED = array("9", "10", "11"); // Trusted
membership groups
$DENIED = array("3", "4", "8"); // Unapproved, COPPA
Unapproved, Banned
$prewd = getcwd(); // get the current working directory
chdir($FORUMPATH);
require_once($FORUMPATH.'global.php');
chdir($prewd); // change back to previous working dir
$vBUsrID = $vbulletin->userinfo['userid'];
if ($vBUsrID!=0)
{
$vBUsrName = $vbulletin->userinfo['username'];
$vBMemberURL = $FORUMURL.'member.php?u='.$vBUsrID;
}
function vBIsPriviliged()
{
global $vbulletin, $vBUsrID, $PRIVILEGED;
if($vBUsrID!=0)
return is_member_of($vbulletin->userinfo, $PRIVILEGED);
else
return false;
}
function vBIsTrusted()
{
global $vbulletin, $vBUsrID, $TRUSTED;
if($vBUsrID!=0)
return (is_member_of($vbulletin->userinfo, $TRUSTED) or
vBIsPriviliged());
else
return false;
}
function vBIsDenied()
{
global $vbulletin, $vBUsrID, $DENIED;
if($vBUsrID!=0)
return is_member_of($vbulletin->userinfo, $DENIED);
else
return false;
}
?>
/Tim
-----Original Message-----
From: Patrick R. Michaud [mailto:pmichaud at pobox.com]
Sent: 23. januar 2006 16:36
To: Tim Ahrentlov
Cc: pmwiki-users at pmichaud.com
Subject: Re: [pmwiki-users] FW: vBulletin 3.5 user system integration
On Mon, Jan 23, 2006 at 04:26:13PM +0100, Tim Ahrentlov wrote:
> [...code to manipulate $DefaultPasswords...]
>
> But there seems to be a problem when blanking out passwords this way. For
> example the edit page never shows. Pages can only be viewed. And I do get
a
> hello world. When I removed the blanking out of default passwords, I get
the
> edit page. Any suggestions?
I'll look at it in more detail, but first could you quickly verify that
the code you gave is being run directly from local/config.php and
not a per-group or per-page customization file?
Thanks,
Pm
More information about the pmwiki-users
mailing list