2011-05-10, 05:15 PM
My plugin skills are rusty I have been programming in vb.NET for the last 7 months and PHP is taking a while to com back to me
I am writing a small plugin for my forum to not display the signatures of users unless they have a minimum required posts.
The code:
Basically it should only display the sig if the user has X amount of posts. Is there something Im doing blatantly wrong?
I am writing a small plugin for my forum to not display the signatures of users unless they have a minimum required posts.
The code:
<?php
$plugins->add_hook("postbit", "CheckSig");
//some code, such as activation - this all works FINE :)
//now the bit that wont work:
function CheckSig($post)
{
global $mybb, $CheckSig;
if ($mybb->settings['signaturecontrol_onsetting'] == "yes")
{
if ($post['postnum'] > $mybb->settings['signaturecontrol_postcount'])
{
$CheckSig = $post['signature'];
}
else {
$CheckSig = "";
}
}
else {
$CheckSig = $post['signature'];
}
}
Basically it should only display the sig if the user has X amount of posts. Is there something Im doing blatantly wrong?