2011-10-06, 01:26 AM
Hello All,
i keep getting an Error when trying to install
"Receive alert privite messages with ring sound" Plugin
i have uploaded
& added
to my
GLOBAL.CSS
but when i go admin cp/Plugins,
where my list of Plugins is normally at, i just get this msg
i'm not great with php but the code in alertpm.php looks fine to me,
Any change one of you php geniuses can take a look & tell me what the problem is
any & all help is greatly Appreciate
Here is the code from alertpm.php
Thanks
i keep getting an Error when trying to install
"Receive alert privite messages with ring sound" Plugin
i have uploaded
- images
- inc
- jscripts
- default_ring.swf
- player.html
- player.swf
- player.xml
& added
#topbar{
position:absolute;
padding: 2px;
BORDER-RIGHT: #455690 1px solid;
BORDER-TOP: #b9c9ef 1px solid;
BORDER-LEFT: #b9c9ef 1px solid;
BORDER-BOTTOM: #455690 1px solid;
background-color: #e0e9f8;
width: 200px;
height: 105px;
visibility: hidden;
z-index: 100;
background-image: url(images/zamine.jpg);
}
to my
GLOBAL.CSS
but when i go admin cp/Plugins,
where my list of Plugins is normally at, i just get this msg
Parse error: syntax error, unexpected '<' in /forum/inc/plugins/alertpm.php on line 8
i'm not great with php but the code in alertpm.php looks fine to me,
Any change one of you php geniuses can take a look & tell me what the problem is
any & all help is greatly Appreciate
Here is the code from alertpm.php
<?php
if(!defined("IN_MYBB"))
{
die("Direct initialization of this file is not allowed.<br /><br />Please make sure IN_MYBB is defined.");
}
<?php
function plugin_info()
{
return array(
'name' => 'Receive alert privite messages with ring sound',
'description' => 'When receiving a message and let you know, like a phone ringing shall start.',
'website' => 'http://www.Aryan-translators.ir/',
'version' => '1.0',
'author' => '"HAMED.RAMZI',
'authorsite' => 'http://www.Aryan-translators.ir/',
'guid' => '986d441a27574f7ce635e7cca328ac13'
);
}
function alertpm_activate()
{
global $db,$mybb,$view,$cache ;
include MYBB_ROOT."/inc/adminfunctions_templates.php";
$global_pm_alert= array(
"template" => "<script type=\"text/javascript\" src=\"jscripts/pm.js\"></script>
<div id=\"topbar\">
<table width=\"100%\" style=\"cursor: default;\">
<tr>
<td valign=\"top\" align=\"left\"><span class=\"\"><img src=\"/images/ajaxpmnotice.png\" border=\"0\" ></span></td>
<td valign=\"top\" align=\"center\"><font color=\"#CC66FF\" size=\"1px\"><b>شما ÙŠÚ© پيام درياÙت کرديد</b></font></td>
<td valign=\"top\" align=\"right\"><embed src=\"player.swf\" quality=\"high\" type=\"application/x-shockwave-flash\" WMODE=\"transparent\" width=\"32\" height=\"31\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\" allowScriptAccess=\"always\" /></td>
</tr>
</table>
<table height=\"78%\" width=\"100%\" style=\"border-right:1px solid #b9c9ef; border-top:1px solid #728eb8; border-bottom:1px solid #b9c9ef; border-left:1px solid #728eb8; cursor: default;\">
<tr>
<td valign=\"top\"></td>
<td valign=\"center\"><font size=\"1px\"></font></td>
</tr>
<tr>
<td valign=\"top\" align=\"center\" colspan=\"2\"><font size=\"2px\"><b><a href=\"private.php?fid=1\"></font><font color=\"red\">{\$privatemessage_text}</a></b></font></td>
</tr>
</table>
</div>
<br /><br>",
);
$db->update_query("templates", $global_pm_alert, "title='global_pm_alert'");
$cache->update_forums();
}
function alertpm_deactivate()
{
require MYBB_ROOT.'/inc/adminfunctions_templates.php';
global $db;
$global_pm_alert = array(
"template" => "<div class=\"pm_alert\" id=\"pm_notice\">
<div class=\"float_right\"><a href=\"private.php?action=dismiss_notice&my_post_key={\$mybb->post_code}\" title=\"{\$lang->dismiss_notice}\" onclick=\"return MyBB.dismissPMNotice()\"><img src=\"{\$theme[\'imgdir\']}/dismiss_notice.gif\" alt=\"{\$lang->dismiss_notice}\" title=\"[x]\" /></a></div>
<div>{\$privatemessage_text}</div>
</div>
<br />",
);
$db->update_query("templates", $global_pm_alert, "title='global_pm_alert'");
}
?>
Thanks