12-04-2015, 05:58 PMAmN Wrote: huh.
$plugins->add_hook( 'postbit', 'years_of_service' );
function years_of_service(&$post)
{
}Code:$yearsofservice = date( 'Y', TIME_NOW - $post['userregdate'] );
$years = ( $yearsofservice == 1 ) ? 'year' : 'years';
return str_replace( '<years_of_service>',' $yearsofservice . ' ' . $years . ' of service', $post['message'] );
and place this in your postbit template: <years_of_service> where you want that stuff to display.
I wanted to learn actually :noh: but thank you anyway, I'll try to base my plugin on that but with configurable settings on the ACP