Jakeman |
10-13-2004 03:33 PM |
How do get Signatures to show on Announcements?
Re: http://www.vbulletin.com/forum/showthread.php?t=118117
You need to edit the files a bit. Announcements do not have a showsignature field, and that field is used in a condition to parse the signature:
In the construct_postbit() function in the includes/functions_showthread.php file, notice the red code:
Code:
// get signature
if ($post['showsignature'] AND $vboptions['allowsignatures'] AND trim($post['signature']) != '' AND (!$bbuserinfo['userid'] OR $bbuserinfo['showsignatures']) AND $checkperms["$post[userid]"]['genericpermissions'] & CANUSESIGNATURE)
{
if (!isset($sigcache["$post[userid]"]))
{
$parsed_postcache['skip'] = true;
$post['signature'] = parse_bbcode($post['signature'], 'nonforum', $vboptions['allowsmilies']);
$sigcache["$post[userid]"] = $post['signature'];
}
else
{
$post['signature'] = $sigcache["$post[userid]"];
}
}
else
{
$post['signature'] = '';
}
You can set this variable to true when an announcer has a signature by adding the blue code to the announcement.php file:
Code:
while ($post = $DB_site->fetch_array($announcements))
{
$counter++;
$post['counter'] = $counter;
$post['musername'] = fetch_musername($post);
$post['dateline'] = $post['startdate'];
$post['startdate'] = vbdate($vboptions['dateformat'], $post['startdate']);
$post['enddate'] = vbdate($vboptions['dateformat'], $post['enddate']);
if ($post['startdate'] > $bbuserinfo['lastvisit'])
{
$post['statusicon'] = 'new';
}
else
{
$post['statusicon'] = 'old';
}
if ($post['signature'])
{
$post['showsignature'] = true;
}
$announcebits .= construct_postbit($post, 'postbit', 'announcement');
$anncids .= ", $post[announcementid]";
}
Now signatures will show in announcements.
|