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

Lanthan

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

Old Lynx

Wow AWESOME :)

thank you Lanthan

I'm getting VERY excited :D

DareDevil1990

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

DomDom Skye

I'm searching also a mod for SMF like this. Hope it will come out soon.

Dom

Lanthan

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.

Old Lynx

Awesome bro

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

matasanos

awesome!!!!!!!!!!!!

waiting for it

thanks

[SiNaN]

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

Lanthan

Quote from: [SiNaN] on August 23, 2008, 11:30:03 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.

[SiNaN]

Former SMF Core Developer | My Mods | SimplePortal

BuЯЯЯЯaK


Lanthan

Quote from: [SiNaN] on August 25, 2008, 11:00:45 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?

[SiNaN]

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

Lanthan

Quote from: [SiNaN] 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.
And its easy to implement or do I have to edit the template for that?

Quote from: [SiNaN] on August 25, 2008, 11:19:06 AM
Burak will provide the Turkish translation I hope.
That would be great...

[SiNaN]

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

matasanos

i can provide spanish translation

good work!!

Lanthan

Quote from: matasanos on August 26, 2008, 02:43:53 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...

Lanthan

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:

   $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:

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:

<a href="http://rapidshare.com/files/123456789/test.rar" target="_blank">Testlink1</a>

This not:

<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


Lanthan

Quote from: matasanos on August 29, 2008, 09:40:07 AM
no luck?
No, unfortunatly not.

So I will disable the feature for customized Links.

Advertisement: