ok so here is the code to add for the 'new challenge sent' notification.
And not shout if you had allready a pending challenge with that user.
First open purps.php and look for that line:
for j1.5:
| Code: |
echo '<h3>'.JText::_('CHALLENGESENT').'</h3>';
|
for j1.0x:
| Code: |
echo '<h3>'.$lang['CHALLENGESENT'].'</h3>';
|
and add this just after, and before the next '}':
| Code: |
// now we shout for new challenge sent
$msg = $user->username." has just sent a RPS challenge to ".mosGetParam( $_REQUEST, 'user');
$entryby = "Rock Paper Scissors";
$thetime = time();
$url = "index.php?option=com_purps";
$query = "INSERT INTO #__shoutbox (time,name,text,url) VALUES ('" . $thetime . "','". $entryby ."','". $msg ."','" . $url . "')";
$database->setQuery($query);
$shout = $database->query();
//end of new challenge shoutbox mode
|
This code is for j1.5, for j1.01 replace #__shoutbox by #__liveshoutbox
That way, It will not re-shout if you had allready a pending challenge with that user.
have fun