Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
 profile plugin
pachel Offline
Junior Member
**
Posts: 8
Joined: Mar 2008
Post: #1
profile plugin
i'm trying to make a profile plugin but i start testing it with db updates with with the msn button but msn won't work can you check heres the whole plugin:

PHP Code:
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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
<?php
if(!defined("IN_MYBB"))
{
    die("Direct initialization of this file is not allowed.<br /><br />Please make sure IN_MYBB is defined.");
} 
//All the information about the plugin. These will appear in the plugins list.
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",
    );
}

//All the activation processes go here
function pp_activate()
{

require MYBB_ROOT.'/inc/adminfunctions_templates.php';
find_replace_templatesets("postbit_author_user", '#'.preg_quote('{$post[\'replink\']}<br />').'#' , '{$post[\'replink\']}<br />
<a href="private.php?action=send&amp;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&amp;imtype=icq&amp;uid={$post[\'uid\']}\', \'imcenter\', 450, 300);"><img src="images/icq.gif"></a>
<a href="javascript:;" onclick="MyBB.popupWindow(\'misc.php?action=imcenter&amp;imtype=aim&amp;uid={$post[\'uid\']}\', \'imcenter\', 450, 300);"><img src="images/aim.gif"></a>
<a href="javascript:;" onclick="MyBB.popupWindow(\'misc.php?action=imcenter&amp;imtype=yahoo&amp;uid={$post[\'uid\']}\', \'imcenter\', 450, 300);"><img src="images/yahoo.gif"></a>
{$post[\'msndet\']}');

}

//All deactivation processes go here
function pp_deactivate()
{

require MYBB_ROOT.'/inc/adminfunctions_templates.php';
find_replace_templatesets("postbit_author_user", '#'.preg_quote('{$post[\'replink\']}<br />
<a href="private.php?action=send&amp;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&amp;imtype=icq&amp;uid={$post[\'uid\']}\', \'imcenter\', 450, 300);"><img src="images/icq.gif"></a>
<a href="javascript:;" onclick="MyBB.popupWindow(\'misc.php?action=imcenter&amp;imtype=aim&amp;uid={$post[\'uid\']}\', \'imcenter\', 450, 300);"><img src="images/aim.gif"></a>
<a href="javascript:;" onclick="MyBB.popupWindow(\'misc.php?action=imcenter&amp;imtype=yahoo&amp;uid={$post[\'uid\']}\', \'imcenter\', 450, 300);"><img src="images/yahoo.gif"></a>
{$post[\'msndet\']}').'#s' , '{$post[\'replink\']}<br />',0);

} 

function parse_details()
{	
global $db, $mybb;

	if ($post['msn'])
	{
                $query = $db->query("select * FROM ".TABLE_PREFIX."userfields WHERE name='msn");
		$ffid = $db->fetch_array($query);
		$fid = $ffid['fid'];
		$source = "fid".$fid;
		if ($post[$source] != '') 
		{
			$post['msndet'] = "<a href=\"javascript:onclick='MyBB.popupWindow(\\'misc.php?action=imcenter&amp;imtype=msn&amp;uid={$post['uid']}\\', \\'imcenter\\', 450, 300);\">{$post['msn']}<img src=\"images/msn.gif\"></a><br />";
		}

	} 
	else 
	{
          $ffid = $db->fetch_array($query);
		$fid = $ffid['fid'];
		$source = "fid".$post['msn'];
		if ($post[$source] != '') 
		{
			$post['msndet'] = "<a href=\"javascript:onclick='MyBB.popupWindow(\\'misc.php?action=imcenter&amp;imtype=msn&amp;uid={$post['uid']}\\', \\'imcenter\\', 450, 300);\">{$post['msn']}<img src=\"images/msn.gif\"></a><br />";
		}
	}	
}

?>

(This post was last modified: 03-10-2008 09:17 AM by ZiNgA BuRgA.)
03-10-2008 04:53 AM
Find all posts by this user

« Next Oldest | Next Newest »

Messages In This Thread
profile plugin - pachel - 03-10-2008 04:53 AM
RE: profile plugin - ZiNgA BuRgA - 03-10-2008, 09:22 AM
RE: profile plugin - pachel - 03-10-2008, 04:13 PM
RE: profile plugin - ZiNgA BuRgA - 03-10-2008, 05:34 PM
RE: profile plugin - pachel - 03-11-2008, 12:03 AM
RE: profile plugin - ZiNgA BuRgA - 03-11-2008, 08:36 AM
RE: profile plugin - pachel - 03-11-2008, 04:14 PM
RE: profile plugin - ZiNgA BuRgA - 03-12-2008, 11:15 AM
RE: profile plugin - pachel - 03-12-2008, 04:05 PM
RE: profile plugin - ZiNgA BuRgA - 03-12-2008, 04:44 PM
RE: profile plugin - pachel - 03-14-2008, 04:54 AM
RE: profile plugin - ZiNgA BuRgA - 03-14-2008, 11:52 AM
RE: profile plugin - pachel - 03-14-2008, 03:21 PM
RE: profile plugin - ZiNgA BuRgA - 03-14-2008, 03:51 PM
RE: profile plugin - pachel - 03-15-2008, 12:04 AM
RE: profile plugin - ZiNgA BuRgA - 03-15-2008, 01:06 AM

 Standard Tools
Forum Jump: