It works in 3.7.3 and 4.1.4 with some changes, so I'm not sure why it wasn't working in 3.8.6.
I've modified the main plug-in and it still works in 3.7.3 and I think it should solve the problem.
Go to Plug-in Manager, find "Graffiti main", clear it out and paste in this:
PHP Code:
$vbulletin->input->clean_array_gpc('r', array(
'bit' => TYPE_NOHTML,
'threadid' => TYPE_INT
));
//$threadid = $vbulletin->GPC['threadid'];
$userid = $vbulletin->userinfo['userid'];
$username = $vbulletin->userinfo['username'];
$bitlimit = $vbulletin->options['graffiti_max_entries'];
$charlimit = $vbulletin->options['graffiti_max_chars'];
$show_name = $vbulletin->options['graffiti_showname'];
$showname_group = explode(',', $vbulletin->options['graffiti_showname_group']);
$bit = $vbulletin->GPC['bit'];
//$bit = substr(convert_urlencoded_unicode($bit), 0, $charlimit);
$bit = htmlentities(substr(html_entity_decode($bit), 0, $charlimit));
$bit = '<strong>' . $username . ': </strong>' . $bit;
$bit = addslashes(convert_urlencoded_unicode($bit));
function select_graffiti()
{
global $threadid, $userid, $username;
global $userstr, $countstr, $graffiti_text;
global $vbulletin;
$db = $vbulletin->db;
$result =
$db->query_read ("
SELECT *
FROM " . TABLE_PREFIX . "graffiti
WHERE threadid = '$threadid'
")or die(mysql_error());
$graffiti = $db->fetch_array($result);
$graffiti_text = $graffiti['string'];
$userstr = $graffiti['users'];
$countstr = $graffiti['counts'];
}
function insert_graffiti($bit)
{
global $threadid, $userid, $username, $bit;
global $vbulletin;
$db = $vbulletin->db;
$db->query_write ("
INSERT INTO " . TABLE_PREFIX . "graffiti
(
threadid,
users,
counts,
string
)
VALUES
(
'$threadid',
'$userid',
'1',
'$bit'
)
")or die(mysql_error());
}
function update_graffiti()
{
global $threadid, $userid, $username;
global $userstr, $countstr, $graffiti_text;
global $vbulletin;
$db = $vbulletin->db;
$db->query_write ("
UPDATE " . TABLE_PREFIX . "graffiti
SET
users = '$userstr',
counts = '$countstr',
string = '$graffiti_text'
WHERE
threadid = '$threadid'
")or die(mysql_error());
}
function add_graffiti()
{
global $bitlimit, $charlimit;
global $userid, $threadid, $bit;
global $userstr, $countstr, $graffiti_text, $show_name, $showname_group;
global $vbulletin;
$db = $vbulletin->db;
select_graffiti();
$userarray = explode(",", $userstr);
$count = 0;
$ii = -1;
for($i = 0; $i < count($userarray); $i++)
{
if($userid == $userarray[$i]) $ii = $i;
$count = $countarray[$ii];
}
$countarray = explode(",", $countstr);
if($graffiti_text == NULL)
{
insert_graffiti($bit);
$bit = stripslashes($bit);
$return = $bit;
}
else
{
$graffiti_text = $db->escape_string($graffiti_text);
$graffiti_text .= ' ? ' . $bit;
if($ii == -1)
{
$countarray[] = 1;
$userarray[] = $userid;
}
else
{
$countarray[$ii]++;
}
$countstr = implode(',', $countarray);
$userstr = implode(',', $userarray);
if($countarray[$ii] <= $bitlimit) update_graffiti();
$return = stripslashes($graffiti_text);
}
$showname= 1;
if(!($show_name == 1 OR in_array($vbulletin->userinfo['usergroupid'], $showname_group)))
{
$return = preg_replace('/<strong>[^>]+<\/strong>/', '', $return);
$showname = 0;
}
return $return;
}
if($_REQUEST['do'] == 'addnew')
{
$threadid = $vbulletin->GPC['threadid'];
$return = add_graffiti();
die($return);
}
elseif($vbulletin->options['graffiti_onoff'] == 1
AND !in_array($vbulletin->userinfo['usergroupid'],explode(',',$vbulletin->options['graffiti_no_show']))
AND !in_array($forumid, explode(',', $vbulletin->options['graffiti_forum_noshow'])))
{
select_graffiti();
$showname = 1;
if(!($show_name == 1 OR in_array($vbulletin->userinfo['usergroupid'], $showname_group)))
{
$graffiti_text = preg_replace('/<strong>[^>]+<\/strong>/', '', $graffiti_text);
$showname = 0;
}
$usercounts = array_combine(explode(',', $userstr), explode(',', $countstr));
$count = 0;
if($usercounts[$userid]) {$count = $usercounts[$userid];}
$bitlimit = $vbulletin->options['graffiti_max_entries'] - $count;
$inputdisplay = '';
if($bitlimit == 0
OR $vbulletin->userinfo['usergroupid'] == 1
OR in_array($vbulletin->userinfo['usergroupid'], explode(',',$vbulletin->options['graffiti_no_post']))
OR in_array($vbulletin->userinfo['userid'],explode(',',$vbulletin->options['graffiti_banned'])))
{$inputdisplay = 'none';}
eval('$graffiti = "' . fetch_template('graffiti') . '";');
}
Let me know if it works and I will upload a cleaned up version and you can overwrite the present one.