1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58
|
<?php
if(!defined("IN_MYBB"))
{
die("Direct initialization of this file is not allowed.<br /><br />Please make sure IN_MYBB is defined.");
}
$plugins->add_hook("postbit", "pp_parse_details");
function pp_info()
{
return array(
"name" => "Posting profile icon",
"description" => "The profile icon plugin let you see the contact details in their posting profile",
"website" => "http://www.phcompany.info/plugins",
"author" => "pachel",
"authorsite" => "http://www.phcompany.info/plugins",
"version" => "0.5",
);
}
function pp_activate()
{
require MYBB_ROOT.'/inc/adminfunctions_templates.php';
find_replace_templatesets("postbit", '#'.preg_quote('{$post[\'user_details\']}').'#' , '{$post[\'user_details\']}<br />
<a href="private.php?action=send&uid={$post[\'uid\']}">{$lang->send_pm[\'username\']}<img src="images/pm.png" border="0" /></a>
<a href="javascript:;" onclick="MyBB.popupWindow(\'misc.php?action=imcenter&imtype=icq&uid={$post[\'uid\']}\', \'imcenter\', 450, 300);"><img src="images/icq.gif"></a>
<a href="javascript:;" onclick="MyBB.popupWindow(\'misc.php?action=imcenter&imtype=aim&uid={$post[\'uid\']}\', \'imcenter\', 450, 300);"><img src="images/aim.gif"></a>
<a href="javascript:;" onclick="MyBB.popupWindow(\'misc.php?action=imcenter&imtype=yahoo&uid={$post[\'uid\']}\', \'imcenter\', 450, 300);"><img src="images/yahoo.gif"></a>
{$post[\'msndet\']}');
}
function pp_deactivate()
{
require MYBB_ROOT.'/inc/adminfunctions_templates.php';
find_replace_templatesets("postbit", '#'.preg_quote('{$post[\'user_details\']}<br />
<a href="private.php?action=send&uid={$post[\'uid\']}">{$lang->send_pm[\'username\']}<img src="images/pm.png" border="0" /></a>
<a href="javascript:;" onclick="MyBB.popupWindow(\'misc.php?action=imcenter&imtype=icq&uid={$post[\'uid\']}\', \'imcenter\', 450, 300);"><img src="images/icq.gif"></a>
<a href="javascript:;" onclick="MyBB.popupWindow(\'misc.php?action=imcenter&imtype=aim&uid={$post[\'uid\']}\', \'imcenter\', 450, 300);"><img src="images/aim.gif"></a>
<a href="javascript:;" onclick="MyBB.popupWindow(\'misc.php?action=imcenter&imtype=yahoo&uid={$post[\'uid\']}\', \'imcenter\', 450, 300);"><img src="images/yahoo.gif"></a>
{$post[\'msndet\']}').'#s' , '{$post[\'user_details\']}',0);
}
function pp_parse_details(&$post)
{
if ($post['msn'])
{
$post['msndet'] = "<a href=\"javascript:onclick='MyBB.popupWindow(\\'misc.php?action=imcenter&imtype=msn&uid={$post['uid']}\\', \\'imcenter\\', 450, 300);\">{$post['msn']}<img src=\"images/msn.gif\"></a><br />";
}
else
{
$post['msndet'] = "";
}
}
?>
|