View Single Post
  #1  
Old 31st December 2009, 04:24
benjaminbih benjaminbih is offline
Senior Member
 
Join Date: Jul 2008
Bosnia-Herzegovina
Posts: 70
Default [FTS 1.1] Announce new forum topics on shoutbox
Add announcing of new forum topics to the shoutbox bot.

open /include/libs/config/tweak.php and change:
PHP Code:
$shoutduty            FFactory::configoption($TWEAK['shoutduty'],'torrents,cleanups,requests,users'); 
to:
PHP Code:
$shoutduty            FFactory::configoption($TWEAK['shoutduty'],'torrents,cleanups,requests,users,topics'); 
open /administrator/options.php and change:
PHP Code:
    tr"ShoutBot Duties"makehelp('L48')."<input type='text' size='45' name=shoutduty value='" .
        (
$shoutduty $shoutduty "torrents,cleanups,requests,users") . "'>") ; 
to:
PHP Code:
    tr"ShoutBot Duties"makehelp('L48')."<input type='text' size='45' name=shoutduty value='" .
        (
$shoutduty $shoutduty "torrents,cleanups,requests,users,topics") . "'>") ; 
Open /administrator/js/fts_vars.js and change:

PHP Code:
    L48'ShoutBot can do only those listed below actions.<BR><b>Announce Torrents</b>(if you want this to be enabled write \'torrents\' separated by commas to the other duties.)<BR><b>Announce Cleanups</b>(if you want this to be enabled write \'cleanups\' separated by commas to the other duties)<BR><b>Announce Requests</b>(if you want this to be enabled write \'requests\' separated by commas to the other duties)<BR><b>Announce New Users</b>(if you want this to be enabled write \'users\' separated by commas to the other duties)<BR>EG: To use all the duties write \'torrents,cleanups,requests,users\''
to:
PHP Code:
    L48'ShoutBot can do only those listed below actions.<BR><b>Announce Torrents</b>(if you want this to be enabled write \'torrents\' separated by commas to the other duties.)<BR><b>Announce Cleanups</b>(if you want this to be enabled write \'cleanups\' separated by commas to the other duties)<BR><b>Announce Requests</b>(if you want this to be enabled write \'requests\' separated by commas to the other duties)<BR><b>Announce New Users</b>(if you want this to be enabled write \'users\' separated by commas to the other duties)<BR><b>Announce New Topics</b>(if you want this to be enabled write \'topcics\' separated by commas to the other duties)<BR>EG: To use all the duties write \'torrents,cleanups,requests,users,topics\''
open /forums/post.php and find:
PHP Code:
      $topicid mysql_insert_id() or stderr("Error""No topic ID returned"); 
below it add:
PHP Code:
    $user_row sql_query("SELECT * FROM users WHERE id = $userid");
    while(
$row mysql_fetch_assoc($user_row))
    
$message "User [URL=".$BASEURL."/userdetails.php?id=".$row["id"]."]".$row["username"]."[/URL] has create new topic [url=".$BASEURL."/forums/viewtopic.php?topicid=".$topicid."]".$subject."[/url]";
    if(
duty('topics'))
    
add_shout($message); 
Thats all

Last edited by benjaminbih; 31st December 2009 at 22:22.
Reply With Quote
The Following 5 Users Say Thank You to benjaminbih For This Useful Post:
Edgein (31st December 2009), elvira (31st December 2009), Moh.ElBaz (31st December 2009), Phogo (8th January 2010), yoligim (3rd January 2010)