Advertisement:

Author Topic: Converting a phpBB bot for SMF  (Read 49995 times)

Offline DareDevil1990

  • Jr. Member
  • **
  • Posts: 397
Re: Converting a phpBB bot for SMF
« Reply #100 on: September 19, 2008, 02:34:14 AM »
yay,,,waiting for the updated version.... :)

Offline Dman91

  • Newbie
  • *
  • Posts: 1
Re: Converting a phpBB bot for SMF
« Reply #101 on: September 19, 2008, 07:57:10 AM »
Great Work Lanthan :)

Offline DareDevil1990

  • Jr. Member
  • **
  • Posts: 397
Re: Converting a phpBB bot for SMF
« Reply #102 on: September 20, 2008, 05:34:31 AM »
i uninstalled and installed the mod again and got a error in mod settings.php ....what are the edits need t be made there??

Offline Lanthan

  • Semi-Newbie
  • *
  • Posts: 80
Re: Converting a phpBB bot for SMF
« Reply #103 on: September 20, 2008, 06:36:53 AM »
@dman91: Thank you.

@keshav: The package installer raises an error?
Code: [Select]
in ModSettings.php find:
$context['page_title'] = $txt['modSettings_title'];
$context['sub_template'] = 'show_settings';

$subActions = array(
'basic' => 'ModifyBasicSettings',
'layout' => 'ModifyLayoutSettings',
'karma' => 'ModifyKarmaSettings',

Add After:
'rslinkchecker' => 'RSLinkcheckerSettings',

Find:
$sourcedir . '/ManageServer.php');

$subActions = array(
'basic' => 'ModifyBasicSettings',
'layout' => 'ModifyLayoutSettings',
'karma' => 'ModifyKarmaSettings',

Add after:
'rslinkchecker' => 'RSLinkcheckerSettings',

Find:
'is_last' => true,
),

Replace it with:
),
'rslinkchecker' => array(
'title' => $txt['rslinkbot_managesettings'],
'href' => $scripturl . '?action=featuresettings;sa=rslinkchecker;sesc=' . $context['session_id'],
'is_last' => true,
),

Find:
?>

Add before:
// Modify all settings related to the RSLinkChecker.
function RSLinkcheckerSettings()
{
global $txt, $scripturl, $context, $settings, $sc;

$config_vars = array(
//RSLinkchecker Settings?
array('check', 'rslinkbot_enable'),
array('text', 'rslinkbot_name'),
array('int', 'rslinkbot_userid'),
'',
array('check', 'rslinkbot_sendpm'),
array('int', 'rslinkbot_post_percentage'),
array('check', 'rslinkbot_movetopic'),
array('int', 'rslinkbot_thread_percentage'),
array('int', 'rslinkbot_deadboardid'),
$txt['rslinkbot_post_settings'],
array('text', 'rslinkbot_dead_postsubject','40'),
array('large_text', 'rslinkbot_dead_postbody','10'),
$txt['rslinkbot_pm_settings'],
array('text', 'rslinkbot_dead_pmsubject','40'),
array('large_text', 'rslinkbot_dead_pmbody','10'),
);

// Saving?
if (isset($_GET['save']))
{
saveDBSettings($config_vars);
redirectexit('action=featuresettings;sa=rslinkchecker');
}

$context['post_url'] = $scripturl . '?action=featuresettings2;save;sa=rslinkchecker';
$context['settings_title'] = $txt['rslinkbot_managesettings'];

prepareDBSettingContext($config_vars);
}


Offline DareDevil1990

  • Jr. Member
  • **
  • Posts: 397
Re: Converting a phpBB bot for SMF
« Reply #104 on: September 20, 2008, 06:49:06 AM »
thanks for it .... but the modifications had already been done in mod setings.php  dont know why it showed the error ...and thank you very much for this excellent mod... :)

Offline DareDevil1990

  • Jr. Member
  • **
  • Posts: 397
Re: Converting a phpBB bot for SMF
« Reply #105 on: September 20, 2008, 06:53:41 AM »
hmm... after isntallation it is recechking all the links which were allready binned by  it earlier :((

Offline Lanthan

  • Semi-Newbie
  • *
  • Posts: 80
Re: Converting a phpBB bot for SMF
« Reply #106 on: September 20, 2008, 09:02:15 AM »
Yepp.. its a "complete uninstall". It drops all tables it creates. If you want to prevent this, you have to make a backup of the rs_links/messages tables BEFORE you deinstall the mod.
As an alternative you can delete the file remove_settings.php from the installation file before you install it the first time.

I have attached 2 Versions of the install file for version 1.0 to this post. The one is with complete deinastallation, the other one leaves the settings untouched.

Offline Lanthan

  • Semi-Newbie
  • *
  • Posts: 80
Re: Converting a phpBB bot for SMF
« Reply #107 on: September 20, 2008, 09:23:23 AM »
thanks for it .... but the modifications had already been done in mod setings.php  dont know why it showed the error ...and thank you very much for this excellent mod... :)
What error comes up in the modsettings?

Offline DareDevil1990

  • Jr. Member
  • **
  • Posts: 397
Re: Converting a phpBB bot for SMF
« Reply #108 on: September 20, 2008, 10:28:33 AM »
Code: [Select]
Dead RS-Links found in
« Sent to: ~Mr DJ~, Nitish, jitesh11, *Shubham*, Ridhima-The Princess, monsterofblack, Exiles on: Today at 07:53:57 PM »

this pm was sent to me by the LCB there was only one post no reply was posted in the thread but it still sends the email to so many member.... why???


Offline DareDevil1990

  • Jr. Member
  • **
  • Posts: 397
Re: Converting a phpBB bot for SMF
« Reply #109 on: September 20, 2008, 11:04:38 AM »
hey man please check this mod sometimes it gets out of control.....i disabled pm sending and still it sends pm...... disabled the mod itself but it still kept checking the links ...... ultimately i had to uninstall it again......

Offline hadesflames

  • SMF Hero
  • ******
  • Posts: 2,773
  • Gender: Male
  • C++ Coder
Re: Converting a phpBB bot for SMF
« Reply #110 on: September 20, 2008, 01:11:38 PM »
good to see you released 1.0.0 =D have u added to the mod dl page?

Offline ne.miguelito

  • Jr. Member
  • **
  • Posts: 355
Re: Converting a phpBB bot for SMF
« Reply #111 on: September 20, 2008, 02:25:43 PM »
Can I post links inside code with the rapidshare links, like links of megaupload?

The mod keeps working fine if I do that?

One more thing, there is some possibility on the mod send a personal message only to the member who sent the topic, and if there is the option to don't move the topic and do not send answer to the topic?

Thanks for the mod.

Offline Lanthan

  • Semi-Newbie
  • *
  • Posts: 80
Re: Converting a phpBB bot for SMF
« Reply #112 on: September 20, 2008, 02:54:15 PM »
good to see you released 1.0.0 =D have u added to the mod dl page?
Yes I have submited it, but yet its not approved by the SMF team.

Offline Lanthan

  • Semi-Newbie
  • *
  • Posts: 80
Re: Converting a phpBB bot for SMF
« Reply #113 on: September 20, 2008, 03:03:16 PM »
hey man please check this mod sometimes it gets out of control.....i disabled pm sending and still it sends pm...... disabled the mod itself but it still kept checking the links ...... ultimately i had to uninstall it again......
Ohh I know what happend... Please search in table "settings" for the following:
Field Variable, Values (without quotes):
'rslinkbot_enable'
'rslinkbot_post_percentage'
'rslinkbot_thread_percentage'
'rslinkbot_userid'
'rslinkbot_name'
'rslinkbot_deadboardid'
'rslinkbot_dead_postsubject'
'rslinkbot_dead_postbody'
'rslinkbot_dead_pmsubject'
'rslinkbot_dead_pmbody'
'rslinkbot_sendpm'
'rslinkbot_movetopic'

They all should be twice in the table. Always delete one of them, this should fix your problem, after reapplying your settings.

Regarding the double PM's I have to check the code, I don't understand yet why it happens.

Little Update, you can use the script remove_and_reapply_settings.php in the attachment to do this. I have also attached a little modification of the linkbot.php script. Please tell me if with this script the double PM's are gone.
« Last Edit: September 20, 2008, 03:44:23 PM by Lanthan »

Offline DareDevil1990

  • Jr. Member
  • **
  • Posts: 397
Re: Converting a phpBB bot for SMF
« Reply #114 on: September 21, 2008, 12:28:05 AM »
Code: [Select]
Warning: Invalid argument supplied for foreach() in /home/dalegend/public_html/Sources/Subs-Post.php on line 717

Warning: Invalid argument supplied for foreach() in /home/dalegend/public_html/Sources/Subs-Post.php on line 717

Warning: array_unique() [function.array-unique]: The argument should be an array in /home/dalegend/public_html/Sources/Subs-Post.php on line 755

Warning: array_unique() [function.array-unique]: The argument should be an array in /home/dalegend/public_html/Sources/Subs-Post.php on line 758

Warning: array_diff() [function.array-diff]: Argument #1 is not an array in /home/dalegend/public_html/Sources/Subs-Post.php on line 758

Warning: array_merge() [function.array-merge]: Argument #1 is not an array in /home/dalegend/public_html/Sources/Subs-Post.php on line 761

Warning: array_merge() [function.array-merge]: Argument #2 is not an array in /home/dalegend/public_html/Sources/Subs-Post.php on line 761

Warning: implode() [function.implode]: Invalid arguments passed in /home/dalegend/public_html/Sources/Subs-Post.php on line 772

after installig v1.0 i get these errors when i run that cronrschecker.php
Code: [Select]
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')
ORDER BY mem.lngfile
LIMIT 0' at line 8
File: /home/dalegend/public_html/Sources/Subs-Post.php
Line: 774
look at this picutre for better understanding... :)
http://img87.imageshack.us/img87/8866/76463942en1.jpg


and do check your pm also......
« Last Edit: September 21, 2008, 01:34:49 AM by keshav »

Offline Lanthan

  • Semi-Newbie
  • *
  • Posts: 80
Re: Converting a phpBB bot for SMF
« Reply #115 on: September 21, 2008, 07:21:52 AM »
Hi keshav,
I have found the issue with the PM's, it adresses the mentionend errors too.

Use the attached linkbot.php and copy it to the sources dir.

Offline DareDevil1990

  • Jr. Member
  • **
  • Posts: 397
Re: Converting a phpBB bot for SMF
« Reply #116 on: September 21, 2008, 08:14:49 AM »
okay gonna try it and post a feddfack soon.. :D

Offline DareDevil1990

  • Jr. Member
  • **
  • Posts: 397
Re: Converting a phpBB bot for SMF
« Reply #117 on: September 21, 2008, 08:24:17 AM »
okay now i think its working fine...but i will ask the sam equestion again...when can we epect it to check other file uploading site... :P


update: now it seems to send no  pms at all...  :'(
« Last Edit: September 21, 2008, 09:09:02 AM by keshav »

Offline Lanthan

  • Semi-Newbie
  • *
  • Posts: 80
Re: Converting a phpBB bot for SMF
« Reply #118 on: September 21, 2008, 09:42:30 AM »
That's something I can't believe. I have checked it at my testsite and he sends me the pm's.
But only if 60 minutes have elapsed since last time he checked it, and the links are not in the bin board.

Offline M@nNiak

  • Semi-Newbie
  • *
  • Posts: 51
Re: Converting a phpBB bot for SMF
« Reply #119 on: September 24, 2008, 07:02:03 PM »
Hi lanthan great job, I have a request, can you put the instructions so i can install this mod in my smf forum manually?

thanks.