Converting a phpBB bot for SMF

Started by Old Lynx, July 09, 2008, 06:50:06 AM

Previous topic - Next topic

DareDevil1990

yay,,,waiting for the updated version.... :)

Dman91


DareDevil1990

i uninstalled and installed the mod again and got a error in mod settings.php ....what are the edits need t be made there??

Lanthan

@dman91: Thank you.

@keshav: The package installer raises an error?

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);
}


DareDevil1990

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... :)

DareDevil1990

hmm... after isntallation it is recechking all the links which were allready binned by  it earlier :((

Lanthan

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.

Lanthan

Quote from: keshav 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... :)
What error comes up in the modsettings?

DareDevil1990

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???


DareDevil1990

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......

hadesflames

good to see you released 1.0.0 =D have u added to the mod dl page?

ne.miguelito

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.

Lanthan

Quote from: hadesflames 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?
Yes I have submited it, but yet its not approved by the SMF team.

Lanthan

#113
Quote from: keshav 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......
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.

DareDevil1990

#114

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
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......

Lanthan

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.

DareDevil1990

okay gonna try it and post a feddfack soon.. :D

DareDevil1990

#117
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...  :'(

Lanthan

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.

M@nNiak

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.

Advertisement: