Bravo List

Bravo List (http://www.bvlist.com/index.php)
-   Mods & Themes (http://www.bvlist.com/forumdisplay.php?f=113)
-   -   [FTS 1.1] Announce new forum topics on shoutbox (http://www.bvlist.com/showthread.php?t=4098)

benjaminbih 31st December 2009 04:24

[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

Edgein 31st December 2009 21:01

Nice one just add ,topics into settings pannel in the tweak page

benjaminbih 31st December 2009 22:14

Quote:

Originally Posted by Edgein (Post 18794)
Nice one just add ,topics into settings pannel in the tweak page

Yes you are right


All times are GMT +2. The time now is 19:33.

Powered by vBulletin® Version 3.8.11 Beta 3
Copyright ©2000 - 2024, vBulletin Solutions Inc.