Advertisement:

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

Offline Lanthan

  • Semi-Newbie
  • *
  • Posts: 80
Re: Converting a phpBB bot for SMF
« Reply #20 on: August 13, 2008, 03:44:35 PM »
Hi folks,
okay a little status update...

basic functionality is running, the system logs every rs-link and the linkchecker checks against rs and marks the rs-links as alive or dead.

So stay tuned.
Lanthan

Offline Old Lynx

  • Jr. Member
  • **
  • Posts: 337
Re: Converting a phpBB bot for SMF
« Reply #21 on: August 13, 2008, 06:19:59 PM »
Wow AWESOME :)

thank you Lanthan

I'm getting VERY excited :D

Offline DareDevil1990

  • Jr. Member
  • **
  • Posts: 397
Re: Converting a phpBB bot for SMF
« Reply #22 on: August 14, 2008, 05:54:53 AM »
yay thanks to the tiopic cretor as well as Lanthan for converting the mod i will be waitng for this mod ....as my site has many dead links :D

Offline DomDom Skye

  • Semi-Newbie
  • *
  • Posts: 80
  • Gender: Male
  • www.john-howe.com
    • Metadelic :: Webdesign in excellence
Re: Converting a phpBB bot for SMF
« Reply #23 on: August 21, 2008, 03:09:48 PM »
I'm searching also a mod for SMF like this. Hope it will come out soon.

Dom

Offline Lanthan

  • Semi-Newbie
  • *
  • Posts: 80
Re: Converting a phpBB bot for SMF
« Reply #24 on: August 21, 2008, 07:53:14 PM »
Okay folks,
the next status update:
basic functionality is implemented, sorry for the delay but the coding guidelines of SMF had to be implemented.
The only thing that is missing is the admin panel, all parameters are hardcoded at this point.

If someone want to do an alpha test, he can give me an PM, but keep in mind at this point of development you can only install it manual.
I think I can release a first paket install next week for testing.

Offline Old Lynx

  • Jr. Member
  • **
  • Posts: 337
Re: Converting a phpBB bot for SMF
« Reply #25 on: August 22, 2008, 03:57:46 AM »
Awesome bro

to us who have Warez Forums you are an angle sent from above :) lol THANK YOU THANK YOU THANK YOU :D

Offline matasanos

  • Jr. Member
  • **
  • Posts: 267
    • Lords-Beer.net
Re: Converting a phpBB bot for SMF
« Reply #26 on: August 22, 2008, 10:05:10 AM »
awesome!!!!!!!!!!!!

waiting for it

thanks

Offline [SiNaN]

  • SMF Super Hero
  • *******
  • Posts: 11,526
  • Young and Foolish
    • SimplePortal
Re: Converting a phpBB bot for SMF
« Reply #27 on: August 23, 2008, 11:30:03 AM »
Well, I was unaware of this topic and we in the Turkish Language Support board were working a bot that has the same functionality.

What I did so far is that, it checks the rs link is dead or not. If dead, leaves a message and sends pm/mail to the author of post.

As you are working on this mod, I'll not work on it anymore. If you need help in admin panel, just ask.
Former SMF Core Developer | My Mods | SimplePortal

Offline Lanthan

  • Semi-Newbie
  • *
  • Posts: 80
Re: Converting a phpBB bot for SMF
« Reply #28 on: August 25, 2008, 10:54:14 AM »
If you need help in admin panel, just ask.
Thanks SiNaN, but I think I have solved my problems at the weekend with the Admin CP.
At this time I'm testing it, together with Eliana Tamerin (many thanks for her quickly build package!).

I think if all goes okay, I will release it here in the next days for beta-testing, cause all features have been implemented.

Attached you find a screen of the admin cp.

Offline [SiNaN]

  • SMF Super Hero
  • *******
  • Posts: 11,526
  • Young and Foolish
    • SimplePortal
Re: Converting a phpBB bot for SMF
« Reply #29 on: August 25, 2008, 11:00:45 AM »
Okay, good luck with it.
Former SMF Core Developer | My Mods | SimplePortal

Offline BuЯЯЯЯaK

  • SMF Hero
  • ******
  • Posts: 2,124
  • Gender: Male
  • Burak
    • dinle sevgili
Re: Converting a phpBB bot for SMF
« Reply #30 on: August 25, 2008, 11:05:36 AM »
Good work I'm waiting for mod .

Offline Lanthan

  • Semi-Newbie
  • *
  • Posts: 80
Re: Converting a phpBB bot for SMF
« Reply #31 on: August 25, 2008, 11:14:06 AM »
Okay, good luck with it.
Thanks, I hope I will have ;)

If you want you could provide me with a turkish language file, so I could attach it to the mod.
By the way, is there an easy way to add a custom button at the modsetting page, I could use it for manual executing the RS-Linkchecker?

Offline [SiNaN]

  • SMF Super Hero
  • *******
  • Posts: 11,526
  • Young and Foolish
    • SimplePortal
Re: Converting a phpBB bot for SMF
« Reply #32 on: August 25, 2008, 11:19:06 AM »
Well, as far as I know; there is only one way to add a button to the mod settings.

Burak will provide the Turkish translation I hope.
Former SMF Core Developer | My Mods | SimplePortal

Offline Lanthan

  • Semi-Newbie
  • *
  • Posts: 80
Re: Converting a phpBB bot for SMF
« Reply #33 on: August 25, 2008, 11:30:58 AM »
Well, as far as I know; there is only one way to add a button to the mod settings.
And its easy to implement or do I have to edit the template for that?

Burak will provide the Turkish translation I hope.
That would be great...

Offline [SiNaN]

  • SMF Super Hero
  • *******
  • Posts: 11,526
  • Young and Foolish
    • SimplePortal
Re: Converting a phpBB bot for SMF
« Reply #34 on: August 25, 2008, 11:48:39 AM »
Ahh, I just got what you mean. I usually use my own templates in the mods. But as you just need a single button; you can make it to display a button in template_show_settings() sub template in Admin.template.php. Of course with an if statement, cause that sub template is used almost in every section on Admin CP. It will not make it hard to install cause custom themes *mostly* do not include an Admin.template.php file.
Former SMF Core Developer | My Mods | SimplePortal

Offline matasanos

  • Jr. Member
  • **
  • Posts: 267
    • Lords-Beer.net
Re: Converting a phpBB bot for SMF
« Reply #35 on: August 26, 2008, 02:43:53 PM »
i can provide spanish translation

good work!!

Offline Lanthan

  • Semi-Newbie
  • *
  • Posts: 80
Re: Converting a phpBB bot for SMF
« Reply #36 on: August 26, 2008, 03:51:07 PM »
i can provide spanish translation

good work!!
Great, download the language file above, and if you send me the translation I will put it into the package...

Offline Lanthan

  • Semi-Newbie
  • *
  • Posts: 80
Re: Converting a phpBB bot for SMF
« Reply #37 on: August 26, 2008, 04:41:00 PM »
Okay folks I need help!
I have a problem with a part of the original code of hawke.
It's a problem in the display of checked Links.
In display.php the code modifies the displayed links to show the status of a rs link.
This is done by parsing the message['body'] for the rs-link.
This normally works as expected, but if you use formatting codes for the tag of the link, it fails.
The parsing is done by a regular expression, so I would need help from someone who is a regular expression crack.
This is the code:
Code: [Select]
   $pattern = '|(<a href=")?(http://(www\.)?rapidshare\.com/files/([0-9]+)/([^\s<>",]+))(("[^>]*>)([^<]+)</a>)?|i';
   $message['body'] = preg_replace_callback($pattern, 'Linkbot', $message['body']);

The function linkbot:
Code: [Select]
function Linkbot($matches) {
//            01           2    3                                4        5            67        8
//$pattern = '|(<a href=")?(http://(www\.)?rapidshare\.com/files/([0-9]+)/([^\s<>",]+))(("[^>]*>)([^<]+)</a>)?|i';
echo ' : ' . $matches[8];
if ($matches[1] != '') {
$GLOBALS['links_to_check'][$matches[4]] = $matches[2];
$GLOBALS['anchor_text'][$matches[4]] = $matches[8];
// <a href=""> type
return $matches[1] . $matches[2] . $matches[7] . 'testRsComLink{' . $matches[4] . '}</a>';
} else {
$GLOBALS['links_to_check'][$matches[4]] = $matches[0];
// Plain text url type
return 'testRsComLink{' . $matches[4] . '}';
}
}

To give an example of which code is working, and which is not:
This works:
Code: [Select]
<a href="http://rapidshare.com/files/123456789/test.rar" target="_blank">Testlink1</a>
This not:
Code: [Select]
<a href="http://rapidshare.com/files/137196798/Publ1-1.rar" target="_blank"><b>Testlink2</b></a>

Hope someone can help, cause if not I'll have to disable this feature.

Best Regards
Lanthan

Offline matasanos

  • Jr. Member
  • **
  • Posts: 267
    • Lords-Beer.net
Re: Converting a phpBB bot for SMF
« Reply #38 on: August 29, 2008, 09:40:07 AM »
no luck?

Offline Lanthan

  • Semi-Newbie
  • *
  • Posts: 80
Re: Converting a phpBB bot for SMF
« Reply #39 on: August 29, 2008, 11:05:47 AM »
no luck?
No, unfortunatly not.

So I will disable the feature for customized Links.