The Arcive of vBulletin Modifications Site. |
|
|
#1
|
|||
|
|||
|
I'm hoping anyone can provide me with data of what condition I can use inside the bbcode parser (hardcoded) as condition.
Right now the only condition I've found is Code:
if ($vbulletin->userinfo['userid'])
{
bla
} Else {
bla
}
Thanks for your possible reply
|
|
#2
|
||||
|
||||
|
Hardcoding = Bad
What exactly do you want to do? |
|
#3
|
||||
|
||||
|
i think he wants to get the persons usergroup id,
this probably dosent work but whatever, I tried. Code:
if ($vbulletin->userinfo['usergroupid']) > '5'
{
bla
} Else {
bla
}
|
|
#4
|
|||
|
|||
|
Quote:
Sorry for the terrible slow reply, been busy this week. |
|
#5
|
||||
|
||||
|
Quote:
Code:
if ($vbulletin->userinfo['usergroupid'] == 5)
{
echo'You are in the right usergroup!'
} Else {
echo'Sorry, you cant view this page!'
}
Code:
if ($vbulletin->userinfo['usergroupid'] > 5)
{
echo'You are in the right usergroup!'
} Else {
echo'Sorry, you cant view this page!'
}
|
|
#6
|
|||
|
|||
|
Yes, thanks a lot for your help; I'll go try it out on my testboard.
Quote:
Code:
function handle_bbcode_code($code)
{
global $vbulletin, $vbphrase, $stylevar, $show;
// remove unnecessary line breaks and escaped quotes
$code = str_replace(array('<br>', '<br />', '\\"'), array('', '', '"'), $code);
$code = $this->strip_front_back_whitespace($code, 1);
if ($vbulletin->userinfo['usergroupid'] > 5) /* also tried == and != etc, plainly to try it out, neither of them did what I wanted */
{
$code = $code;
}
else
{
$code = "You are not allowed to view codes yet";
}
if ($this->printthread)
{
$code = $this->emulate_pre_tag($code);
$template = 'bbcode_code_printthread';
}
else
{
$blockheight = $this->fetch_block_height($code);
$template = 'bbcode_code';
}
eval('$html = "' . fetch_template($template) . '";');
return $html;
}
|
|
#7
|
||||
|
||||
|
sorry, im not good at php at all, try making the 5 into '5' (dont know if this will help at all.)
|
|
#8
|
|||
|
|||
|
Do you have post caching turned on in your vB options?
|
|
#9
|
|||
|
|||
|
Quote:
(I'm actually wondering what the way is that the code is added here at vB.org, but I doubt I'll get to know that) |
|
#10
|
|||
|
|||
|
Yes disabling would stress your server more.
|
![]() |
|
|
| X vBulletin 3.8.12 by vBS Debug Information | |
|---|---|
|
|
More Information |
|
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|