News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

Converting a phpBB bot for SMF

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

Previous topic - Next topic

hadesflames

so basically it will only work for rs links?

Lanthan

Quote from: hadesflames on August 29, 2008, 04:24:32 PM
so basically it will only work for rs links?
Yes, cause it uses a web api of rapidshare to check the status of the links.

hadesflames

maybe you can look at the rapidleech script for some examples.

Lanthan

I will have a look at it in the future, but for now ist only for RS.

hadesflames

works for me.....can you give an estimated percentage of completion?

Lanthan

Yes off course...
I'm finishing the last feature fo this mod for version 1.0 at this moment.
I have found the bug in the regular expressions, so that the links are working again.

So I will release it as a beta at this weekend.

But one question hadesflames, the rapidleech script is able to check the existence of megaupload files? Or ist it only able to copy the files and if it does not exist anymore on the server it gives an error?

hadesflames

idk I don't use rapidleech =/ although i would think it would give an error if the file is no longer available on MU.....thats something you might want to ask to the coders of rapidleech at their website

Lanthan

Quote from: hadesflames on August 30, 2008, 11:22:51 AM
idk I don't use rapidleech =/ although i would think it would give an error if the file is no longer available on MU.....thats something you might want to ask to the coders of rapidleech at their website
So I think its not possible to use it with other filehosts. The point is , that rapidshare has an own web function to check for the existence of a file. The script uses this function, it does not try to catch the file and then reacts on the error message.

Btw I have finished the work and will release a Beta for testing soon.

Lanthan

#48
Okay folks,
this is the first beta release of RSLinkchecker.
Its Version is 0.9, and its feature complete. If beta works okay, the version is raised to 1.0

Rapidshare LinkChecker 0.9.2 Beta
based on the work of hawke

Features:
Configurable messages for dead links PM and moved topics replys.
Configurable percentage for both, sending a PM and moving the topic.
Configurable board to which a dead link topic is moved (global setting).
Configurable board to which a dead link topic is moved (board setting, it overwrites global setting).
No move and PM for already moved topics.
uninstall script

You have to install a cronjob on your server to hav it working ($boarddir."/cronrschecker.php").

Configuration of the mod:
Create a new user for the linkbot.
Create a new board (or more), or use an existing, for the moved topics

The complete configuration is controlled thru the Admin Panel. You can find the Panel at the global Forum Features and Options.
Additional you can configure a specific Board to move dead links to at the board configuration.
ATTENTION!
If you use the board depending setting you MUST specify at the move board itself as the target move board!
If you don't do that, it will be moved to the board in the global setting.

Use it at your own risk, tested only on clean installed SMF 1.1.5

Turkish translation provided by Burak
Thanks to Eliana Tamerin

hadesflames

I shall be your first beta tester =] let you know if i run into anything wierd =P

hadesflames

#50
Heres your first feedback:

when running "cronrschecker.php" file fails because linkbot.php is not available to open.

to fix the problem you must either chnage the file name in /Sources/linkbot.php to Linkbot.php (L is not capitalized)

other solution change the link in the cronrschecker.php to Sources/Linkbot.php

I have attached a new install addressing the above error.

EDIT:

ok i tried out the bot after fixing the above error, and did so by posting a dead link (it is the ONLY link available in the post but the bot does not bin it.

Lanthan

#51
Ups. damn windows.. on my windows xampp testing machine this didn't came up, sorry!
I've corrected this and attached a fixed version, thank you for your correction.

okay, to the other problem. You have made the post with an inactiv link. Then you have started the cronrschecker.php, If you view the post again, there must be a message at the bottom of the post mentioning the status of the links. What do you see at the bottom is there anything?

One thing to mention, the checker only rechecks the links if the last check is 60 minutes gone.
To make it quicker check you have to erase the content of rs_links table.

Another thing is, you need the CURL library activated for php for checking the links. On my host its activated by default, but I don't know if its activated on your machine.

Thanks for your feedback!
Lanthan

hadesflames

well theres nothing posted under it and it is supposed to bin it because i set it to board 24...I'll ask about CURL

enarsee

didnt bin it

hey n one more thing if the link is working

does it post

"Link Checker @ xyz time"?

enarsee

and i didnt get a mail that cronjob is running

hadesflames

for that you would have to ask your server host =P

enarsee

i added a cronjob

home/username/public_html/forum/cronrschecker.php

Every hour

Lanthan

@hadesflames and enarsee,
you can check for curl with phpinfo.php. There are two ways to run it, first the usual way, copy the phpinfo.php to your forumdirectory and execute ist, second you can try to install this smf mod:
http://custom.simplemachines.org/mods/index.php?mod=574
It's for 1.1.4 and it should install if you modify the packageinfo file.

To execute the cronrschecker by hand, you can call it thru your web browser.

www.yourforumurl.com/cronrschecker.php


But as I look at my code, I see something.... URGH....
First there is a hidden feature, that I implemented for testing, and this is enabled in your version, but it shouldn't. Second I have found a big bug in examing links that need a refresh of the status.

Sorry for that, I attached a fixed version, please uninstall the old one and install this new one.


hadesflames

After testing with this fixed version all is working fine with me =]


Lanthan

Okay folks next little update..

Thanks to hadesflames for his help!

This is only a minor update which has an additional spanish language file, and adds the forgotten turkish version.

Advertisement: