The asterisks were a problem with my editor. Could you list the exact code in line 141 that is incorrect?
I don't see the typo mentioned.
EDIT: Is it a ")" sign missing?
EDIT2: This is the new code:
<?php
/*****************************************************************************
* Buy Domains (/inc/plugins/myplaza/domain.php)
* - MyPlaza for MyBB 1.4
* By Ricardo-san, 2009.
*
* Allows users to purchase TLDs with KBucks.
* Sends admin PM.
*****************************************************************************/
// basically the same as a normal plugin
if(!defined("IN_MYBB"))
die("This file cannot be accessed directly.");
// include this function, and specify your module's details
function domain_info()
{
return array(
"name" => "Buy Domains",
"description" => "Purchase top-level domain names.",
"website" => "http://kh3.us/",
"author" => "Richard Leik",
"authorsite" => "http://kh3.us/",
"version" => "1.0",
);
}
function domain_lang()
{
global $mybb, $lang;
switch($mybb->settings['bblanguage'])
{
default:
$lang->domain_privatemessage_subject = 'Domain bought';
$lang->domain_privatemessage = 'The user {1} bought a {2} domain.';
}
}
function domain_add_templates()
{
$new_templates = array();
$new_templates['plaza_domain'] = '
{$plaza_header}
<form action="plaza.php" method="post">
<input type="hidden" name="action" value="page" />
<input type="hidden" name="p" value="domain" />
<input type="hidden" name="process" value="yes" />
<input type="hidden" name="postcode" value="{$mybb->post_code}" />
<table border="0" cellspacing="{$theme[\'borderwidth\']}" cellpadding="{$theme[\'tablespace\']}" class="tborder">
<tr><td class="thead" colspan="2"><strong>Buy Domain</strong></td></tr>
<tr>
<td class="trow1" width="50%">
<strong>Domain Requested:</strong>
</td><td class="trow1" width="50%">
<input type="text" class="textbox" name="domain" value="" size="40" />
</td>
</tr>
<tr>
<td class="tfoot" colspan="2" align="center">
<input type="submit" class="button" value="Buy" />
</td>
</tr>
</table>
</form>
{$plaza_footer} ';
add_templates($new_templates);
}
// add your items in the _activate() function
function domain_activate()
{
myplaza_add_item(array(
"idname" => 'domain_com',
"name" => 'COM',
"description" => 'Purchase a domain with the .com extension.',
"cost" => 1000.00,
));
myplaza_add_item(array(
"idname" => 'domain_net',
"name" => 'NET',
"description" => 'Purchase a domain with the .net extension.',
"cost" => 1000.00,
));
myplaza_add_item(array(
"idname" => 'domain_info',
"name" => 'INFO',
"description" => 'Purchase a domain with the .info extension.',
"cost" => 1000.00,
));
myplaza_add_item(array(
"idname" => 'domain_biz',
"name" => 'BIZ',
"description" => 'Purchase a domain with the .biz extension.',
"cost" => 1000.00,
));
myplaza_add_item(array(
"idname" => 'domain_us',
"name" => 'US',
"description" => 'Purchase a domain with the .us extension.',
"cost" => 1000.00,
));
domain_add_templates();
domain_modify_templates();
}
// remove all items we added earlier in the _deactivate() function
function domain_deactivate() {
myplaza_remove_module_items();
}
// this function handles what is done when buying an item
function domain_run($item)
{
global $mybb, $lang, $db, $buyRtnMsg, $buyLogMsg;
switch($item['idname'])
{
case 'domain_com':
// send pm to uid 1 informting that a .com domain has been bought
****$pm*=*array();
****$ret*=*true;
****
****$touser*=*array();
****$touser['uid']*=*intval($mybb->user['1']);
****$touser['receivepms']*=*MY_YES;*//*ignore*user*settings
****$touser['username']*=*$db->fetch_field($db->simple_select(MY_TABLE_PREFIX.'users',*'username',*'uid='.intval($touser['uid']),*array('limit'*=>*1)));
****
****//*send*PM
****$pm['subject']*=*$lang->sprintf($lang->domain_privatemessage);
$pm['message']*=*$lang->sprintf($lang->domain_privatemessage,*$mybb->user['username'],*".com");*****
****$ret*=*myplaza_send_pm($pm,*$touser);
****if*($ret*===*false)
********$buyRtnMsg*.=*$lang->domain_error_sending_pm;
****else*$buyRtnMsg*.=*$lang->domain_pm_sent;
*
break;
case 'domain_net':
// send pm to uid 1 informting that a .net domain has been bought
****$pm*=*array();
****$ret*=*true;
****
****$touser*=*array();
****$touser['uid']*=*intval($mybb->user['1']);
****$touser['receivepms']*=*MY_YES;*//*ignore*user*settings
****$touser['username']*=*$db->fetch_field($db->simple_select(MY_TABLE_PREFIX.'users',*'username',*'uid='.intval($touser['uid']),*array('limit'*=>*1)));
****
****//*send*PM
****$pm['subject']*=*$lang->sprintf($lang->domain_privatemessage);
$pm['message']*=*$lang->sprintf($lang->domain_privatemessage,*$mybb->user['username'],*".net");*****
****$ret*=*myplaza_send_pm($pm,*$touser);
****if*($ret*===*false)
********$buyRtnMsg*.=*$lang->domain_error_sending_pm;
****else*$buyRtnMsg*.=*$lang->domain_pm_sent;
break;
case 'domain_info':
// send pm to uid 1 informting that a .org domain has been bought
****$pm*=*array();
****$ret*=*true;
****
****$touser*=*array();
****$touser['uid']*=*intval($mybb->user['1']);
****$touser['receivepms']*=*MY_YES;*//*ignore*user*settings
****$touser['username']*=*$db->fetch_field($db->simple_select(MY_TABLE_PREFIX.'users',*'username',*'uid='.intval($touser['uid']),*array('limit'*=>*1)));
****
****//*send*PM
****$pm['subject']*=*$lang->sprintf($lang->domain_privatemessage);
$pm['message']*=*$lang->sprintf($lang->domain_privatemessage,*$mybb->user['username'],*".info");*
****
****$ret*=*myplaza_send_pm($pm,*$touser);
****if*($ret*===*false)
********$buyRtnMsg*.=*$lang->domain_error_sending_pm;
****else*$buyRtnMsg*.=*$lang->domain_pm_sent;
break;
case 'domain_biz':
// send pm to uid 1 informting that a .biz domain has been bought
****$pm*=*array();
****$ret*=*true;
****
****$touser*=*array();
****$touser['uid']*=*intval($mybb->user['1']);
****$touser['receivepms']*=*MY_YES;*//*ignore*user*settings
****$touser['username']*=*$db->fetch_field($db->simple_select(MY_TABLE_PREFIX.'users',*'username',*'uid='.intval($touser['uid']),*array('limit'*=>*1)));
****
****//*send*PM
****$pm['subject']*=*$lang->sprintf($lang->domain_privatemessage;
$pm['message']*=*$lang->sprintf($lang->domain_privatemessage,*$mybb->user['username'],*".biz");*****
****$ret*=*myplaza_send_pm($pm,*$touser);
****if*($ret*===*false)
********$buyRtnMsg*.=*$lang->domain_error_sending_pm;
****else*$buyRtnMsg*.=*$lang->domain_pm_sent;
*
break;
case 'domain_us':
// send pm to uid 1 informting that a .us domain has been bought
****$pm*=*array();
****$ret*=*true;
****
****$touser*=*array();
****$touser['uid']*=*intval($mybb->user['1']);
****$touser['receivepms']*=*MY_YES;*//*ignore*user*settings
****$touser['username']*=*$db->fetch_field($db->simple_select(MY_TABLE_PREFIX.'users',*'username',*'uid='.intval($touser['uid']),*array('limit'*=>*1)));
****
****//*send*PM
****$pm['subject']*=*$lang->sprintf($lang->domain_privatemessage;
$pm['message']*=*$lang->sprintf($lang->domain_privatemessage,*$mybb->user['username'],*".us");*****
****$ret*=*myplaza_send_pm($pm,*$touser);
****if*($ret*===*false)
********$buyRtnMsg*.=*$lang->domain_error_sending_pm;
****else*$buyRtnMsg*.=*$lang->domain_pm_sent;
break;
}
return true;
}
?>
I get this error:
Parse error: syntax error, unexpected T_VARIABLE in /home/kh3us/public_html/testing/inc/plugins/myplaza/domain.php on line 132
EDIT3: Dang, I see the asterisks again. Perhaps that is the problem...I don't know how to remove them though. I used TextWrangler and TextEdit for Mac. I just formatted the code so I could read it...but asterisks only show up when I paste the code into the post area.