|
I have this code to easily add shoutbox announcer support
it wouldnt be much harder to add options in control panel for:
version of shoutbox
announcement name (system, forum, ect)
link to cb & cb Itemid
for sites with SMO shoutbox:
[code:1]if ($database->query())
{
$pid = $database->insertId();
// shout about it
$shout='[iurl='.sefRelToAbs('index.php?option=com_comprofiler&task=userProfile&user='.$my->id.'&Itemid=261').']'.$my->username.'[/iurl] Just Posted [iurl='.sefRelToAbs(JB_LIVEURLREL.'&func=view&catid=$catid&id=$pid').'#$pid'.']'.$subject.'[/iurl] in Forum!';
$query = "INSERT INTO #__liveshoutbox (time,name,text,url) VALUES ('".time()."','Forum','".mysql_real_escape_string($shout)."','')";
$database->setQuery($query);
$res = $database->query();
// now increase the #s in categories
[/code:1]
for sites with risp shoutbox use this:
[code:1]if ($database->query())
{
$pid = $database->insertId();
// shout about it
$shout=$my->username.' Just Posted '.$subject.' in Forum!'.sefRelToAbs(JB_LIVEURLREL.'&func=view&catid=$catid&id=$pid').'#$pid';
$query = "INSERT INTO #__liveshoutbox (time,name,text,url) VALUES ('".time()."','Forum','".mysql_real_escape_string($shout)."','')";
$database->setQuery($query);
$res = $database->query();
// now increase the #s in categories
[/code:1]
contact me for more info about shoutbox announcer, as adding integration to more components is a big goal.
SoM
|