Advertisement:

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

Offline hadesflames

  • SMF Hero
  • ******
  • Posts: 2,773
  • Gender: Male
  • C++ Coder
Re: Converting a phpBB bot for SMF
« Reply #40 on: August 29, 2008, 04:24:32 PM »
so basically it will only work for rs links?

Offline Lanthan

  • Semi-Newbie
  • *
  • Posts: 80
Re: Converting a phpBB bot for SMF
« Reply #41 on: August 29, 2008, 05:21:52 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.

Offline hadesflames

  • SMF Hero
  • ******
  • Posts: 2,773
  • Gender: Male
  • C++ Coder
Re: Converting a phpBB bot for SMF
« Reply #42 on: August 29, 2008, 09:23:12 PM »
maybe you can look at the rapidleech script for some examples.

Offline Lanthan

  • Semi-Newbie
  • *
  • Posts: 80
Re: Converting a phpBB bot for SMF
« Reply #43 on: August 30, 2008, 05:45:17 AM »
I will have a look at it in the future, but for now ist only for RS.

Offline hadesflames

  • SMF Hero
  • ******
  • Posts: 2,773
  • Gender: Male
  • C++ Coder
Re: Converting a phpBB bot for SMF
« Reply #44 on: August 30, 2008, 10:36:29 AM »
works for me.....can you give an estimated percentage of completion?

Offline Lanthan

  • Semi-Newbie
  • *
  • Posts: 80
Re: Converting a phpBB bot for SMF
« Reply #45 on: August 30, 2008, 10:51:06 AM »
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?

Offline hadesflames

  • SMF Hero
  • ******
  • Posts: 2,773
  • Gender: Male
  • C++ Coder
Re: Converting a phpBB bot for SMF
« Reply #46 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

Offline Lanthan

  • Semi-Newbie
  • *
  • Posts: 80
Re: Converting a phpBB bot for SMF
« Reply #47 on: August 30, 2008, 11:43:50 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.

Offline Lanthan

  • Semi-Newbie
  • *
  • Posts: 80
Re: Converting a phpBB bot for SMF
« Reply #48 on: August 30, 2008, 11:55:38 AM »
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
« Last Edit: August 31, 2008, 08:02:13 AM by Lanthan »

Offline hadesflames

  • SMF Hero
  • ******
  • Posts: 2,773
  • Gender: Male
  • C++ Coder
Re: Converting a phpBB bot for SMF
« Reply #49 on: August 30, 2008, 06:49:50 PM »
I shall be your first beta tester =] let you know if i run into anything wierd =P

Offline hadesflames

  • SMF Hero
  • ******
  • Posts: 2,773
  • Gender: Male
  • C++ Coder
Re: Converting a phpBB bot for SMF
« Reply #50 on: August 30, 2008, 07:01:20 PM »
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.
« Last Edit: August 30, 2008, 07:23:40 PM by hadesflames »

Offline Lanthan

  • Semi-Newbie
  • *
  • Posts: 80
Re: Converting a phpBB bot for SMF
« Reply #51 on: August 30, 2008, 07:36:30 PM »
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
« Last Edit: August 31, 2008, 08:02:32 AM by Lanthan »

Offline hadesflames

  • SMF Hero
  • ******
  • Posts: 2,773
  • Gender: Male
  • C++ Coder
Re: Converting a phpBB bot for SMF
« Reply #52 on: August 30, 2008, 10:11:00 PM »
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

Offline enarsee

  • Newbie
  • *
  • Posts: 5
Re: Converting a phpBB bot for SMF
« Reply #53 on: August 30, 2008, 11:24:35 PM »
didnt bin it

hey n one more thing if the link is working

does it post

"Link Checker @ xyz time"?

Offline enarsee

  • Newbie
  • *
  • Posts: 5
Re: Converting a phpBB bot for SMF
« Reply #54 on: August 30, 2008, 11:51:02 PM »
and i didnt get a mail that cronjob is running

Offline hadesflames

  • SMF Hero
  • ******
  • Posts: 2,773
  • Gender: Male
  • C++ Coder
Re: Converting a phpBB bot for SMF
« Reply #55 on: August 31, 2008, 12:03:06 AM »
for that you would have to ask your server host =P

Offline enarsee

  • Newbie
  • *
  • Posts: 5
Re: Converting a phpBB bot for SMF
« Reply #56 on: August 31, 2008, 01:16:24 AM »
i added a cronjob

home/username/public_html/forum/cronrschecker.php

Every hour

Offline Lanthan

  • Semi-Newbie
  • *
  • Posts: 80
Re: Converting a phpBB bot for SMF
« Reply #57 on: August 31, 2008, 07:24:02 AM »
@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.
Code: [Select]
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.


Offline hadesflames

  • SMF Hero
  • ******
  • Posts: 2,773
  • Gender: Male
  • C++ Coder
Re: Converting a phpBB bot for SMF
« Reply #58 on: August 31, 2008, 09:12:37 AM »
After testing with this fixed version all is working fine with me =]


Offline Lanthan

  • Semi-Newbie
  • *
  • Posts: 80
Re: Converting a phpBB bot for SMF
« Reply #59 on: August 31, 2008, 11:14:40 AM »
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.