Hmmm... you could force users to use a specific style for that forum, and in that style you could remove the code for the new thread button completely... but that seems overkill... the IF condition should work... I'm surprised it's not.
|
I was surprised it didn't work either, unless there's something I might have missed?
|
Quote:
Hook Location: newthread_start Two examples in the code below - (change the forum ID numbers and the form addresses) PHP Code:
|
I want a user to be able to disable and enable a plugin that starts:
if ($vbulletin->options['mob_detect_enabled'] == 1) So, I've created a profile field (for a setting) and I want to use this conditional inside the plugin so that ordinary members can disable it (it uses the style_fetch hook). I think I need to add something like this at the top of the plugin, but in php ... HTML Code:
<vb:if condition="$bbuserinfo['fieldXXX'] === 'off'"> |
Try
Code:
if ($vbulletin->options['mob_detect_enabled'] == 1 AND $bbuserinfo['fieldX'] == "off") |
No that didn't do it ... but that may be down to my lack of php understanding.
|
Yeah the problem is the $bbuserinfo - there are various ways to access the same data, different ways work in different places... it may be something like $vboptions->bbuserinfo['fieldX'] or even $this->registry->bbuserinfo['fieldX'] but honestly I'm not sure of the exact syntax off hand, if you search around for it you should be able to find one that works, that's what I usually do.
|
try
Code:
$userinfo['fieldxx'] |
Quote:
Quote:
Quote:
|
Quote:
Thanks to the people who helped, greatly appreciated. :) |
All times are GMT. The time now is 01:04 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 | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|