PDA

View Full Version : $userid not found in class_dm_threadpost.php


Andy
08-04-2005, 11:08 PM
I'm trying to make it so only the admin has the ability to use all uppercase in a thread title.

Line 183 in the class_dm_threadpost.php file I have added a condtional.

if ($userid != 1)
{
$title = fetch_no_shouting_text($title);
}

It does not work as expected, I suspect the $userid variable is not know in this php file. Do I use a require once to make this work?

Thank you.

Andreas
08-05-2005, 12:02 AM
$this->registry->userinfo['userid'] contains the Userid of the current User.


But as I hate File Edits ...

Hook: global_start

if ($permissions['adminpermissions'] & $vbulletin->bf_ugp_adminpermissions['cancontrolpanel'])
{
$vbulletin->options['stopshouting'] = false;
}

Andy
08-05-2005, 12:14 AM
Kirby you are awesome, the plugin works perfect.

Thank you very much I really appreciate it. :up: :)