Advertisement:

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

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 #80 on: September 17, 2008, 03:33:41 AM »
Thx!

Dom

Offline DareDevil1990

  • Jr. Member
  • **
  • Posts: 397
Re: Converting a phpBB bot for SMF
« Reply #81 on: September 17, 2008, 06:52:09 AM »
any way to make this bot checkk each and evry thread of the forum regardless wheather it has been viewed or not :)

Offline Lanthan

  • Semi-Newbie
  • *
  • Posts: 80
Re: Converting a phpBB bot for SMF
« Reply #82 on: September 17, 2008, 08:15:15 AM »
Hmmm.. not so easy... but I understand what you want.
It's a precheck, or initialisation whats needed.

So give this little script a try:
precheckallrslinks.php

I have attached it to this post, you have to copy it to the boarddir where the cronrschecker script is located. Then call it from your browser. It should scan all your messages on the forum and put the unchecked ones into rs_checker.

Offline Rhine

  • Semi-Newbie
  • *
  • Posts: 51
Re: Converting a phpBB bot for SMF
« Reply #83 on: September 17, 2008, 08:26:48 AM »
Yes it is.
In which one? If they are in the rs_checker, then the script does not run.
The script copies all checked links from the rs_checker to the rs_links table.

Its links in rs_links and not in rs_checker, the bot does bin, but it doesnt edit a message in a topic "0% of the links are dead"

Offline Lanthan

  • Semi-Newbie
  • *
  • Posts: 80
Re: Converting a phpBB bot for SMF
« Reply #84 on: September 17, 2008, 08:39:03 AM »
Do you see the "0% of the links are dead" at the bottom of the post?
If yes, so all Links are valid, which you can see in rs_links in the field status (Value=1).
If no, do you have a custome theme which needs editing (display.template.php)?
« Last Edit: September 17, 2008, 08:41:34 AM by Lanthan »

Offline DareDevil1990

  • Jr. Member
  • **
  • Posts: 397
Re: Converting a phpBB bot for SMF
« Reply #85 on: September 17, 2008, 08:50:30 AM »
okay i did what u said ..when i called the file from browser i  get "All Links fetched"  but when i go to post it still doesnt show the message that lc has checked the post etc etc

Offline Lanthan

  • Semi-Newbie
  • *
  • Posts: 80
Re: Converting a phpBB bot for SMF
« Reply #86 on: September 17, 2008, 09:05:56 AM »
okay i did what u said ..when i called the file from browser i  get "All Links fetched"  but when i go to post it still doesnt show the message that lc has checked the post etc etc
And did you call the cronrscheckerscript after that script? The submitted script only fills the rs_checker table with the links which needs checking, not more.
And remember, if you have more then 100 Links in it, you must call the cronrschecker script multiple times, until the rs_checker table is empty.

Offline DareDevil1990

  • Jr. Member
  • **
  • Posts: 397
Re: Converting a phpBB bot for SMF
« Reply #87 on: September 17, 2008, 09:21:39 AM »
okay it worked but its sending pm eveery staff member and not only the topic starter .... please help

Offline Lanthan

  • Semi-Newbie
  • *
  • Posts: 80
Re: Converting a phpBB bot for SMF
« Reply #88 on: September 17, 2008, 09:33:04 AM »
it should only send a PM to the post creator.. Not to the staff members.
But if you have a thread with e.g. 10 posts and every post is from a different Member, you would get 10 PM's in total to this members. One PM for every post.

Offline DareDevil1990

  • Jr. Member
  • **
  • Posts: 397
Re: Converting a phpBB bot for SMF
« Reply #89 on: September 17, 2008, 09:35:36 AM »
ohh...k but this could be a problem with popular thread .... which  has no of replies in them .... i think u should change it to make it alert only the author ,,,

Offline Lanthan

  • Semi-Newbie
  • *
  • Posts: 80
Re: Converting a phpBB bot for SMF
« Reply #90 on: September 17, 2008, 09:41:40 AM »
That would not make sense, cause the Thread Starter is only able to edit his own posts, not the posts of other members.
If you don't want at this time the bot to send PM's, disable it at the modsettings. After that no PM's are send. This is a feature for the first time when to much PM's would be send. After a week or so when all old links are checked, you can switch it on again.

Offline Rhine

  • Semi-Newbie
  • *
  • Posts: 51
Re: Converting a phpBB bot for SMF
« Reply #91 on: September 17, 2008, 12:17:19 PM »
Do you see the "0% of the links are dead" at the bottom of the post?
If yes, so all Links are valid, which you can see in rs_links in the field status (Value=1).
If no, do you have a custome theme which needs editing (display.template.php)?

Value=0 so I guess I need to edit the theme, but where in display.template do I need to edit?

Offline Lanthan

  • Semi-Newbie
  • *
  • Posts: 80
Re: Converting a phpBB bot for SMF
« Reply #92 on: September 17, 2008, 12:25:46 PM »
Value=0 so I guess I need to edit the theme, but where in display.template do I need to edit?

Hope this works for you:
Code: [Select]
Display.template.php:
Search for this:
echo '
</td>
</tr><tr>
<td valign="bottom" class="smalltext" id="modified_', $message['id'], '">';

// Show "« Last Edit: Time by Person »" if this post was edited.
if ($settings['show_modify'] && !empty($message['modified']['name']))
echo '
« <i>', $txt[211], ': ', $message['modified']['time'], ' ', $txt[525], ' ', $message['modified']['name'], '</i> »';


Add before:
// RS Linkchecker Display the bot message
echo '
</td>
</tr><tr>
<td valign="bottom" class="smalltext" >';
if (!empty($message['botcheck']))
echo '
', $message['botcheck'];
      // End RS Linkchecker Display the bot message

Offline Rhine

  • Semi-Newbie
  • *
  • Posts: 51
Re: Converting a phpBB bot for SMF
« Reply #93 on: September 17, 2008, 12:58:32 PM »
Value=0 so I guess I need to edit the theme, but where in display.template do I need to edit?

Hope this works for you:
Code: [Select]
Display.template.php:
Search for this:
echo '
</td>
</tr><tr>
<td valign="bottom" class="smalltext" id="modified_', $message['id'], '">';

// Show "« Last Edit: Time by Person »" if this post was edited.
if ($settings['show_modify'] && !empty($message['modified']['name']))
echo '
« <i>', $txt[211], ': ', $message['modified']['time'], ' ', $txt[525], ' ', $message['modified']['name'], '</i> »';


Add before:
// RS Linkchecker Display the bot message
echo '
</td>
</tr><tr>
<td valign="bottom" class="smalltext" >';
if (!empty($message['botcheck']))
echo '
', $message['botcheck'];
      // End RS Linkchecker Display the bot message

Yeah it works, one little thing, Its Says 'forum name'(where the topic is inside) Bot checked this like at ....

how do I remove the 'forum name' from the bot message?
« Last Edit: September 17, 2008, 01:09:42 PM by Rhine »

Offline Lanthan

  • Semi-Newbie
  • *
  • Posts: 80
Re: Converting a phpBB bot for SMF
« Reply #94 on: September 17, 2008, 02:00:22 PM »
For this you have to edit the display.php, thats the only way and will prevent the script to uninstall properly!
Code: [Select]
Find this in diplay.php
         $bottext = "<b>" . $board_info['name']. " " .$linkbot_name. " " .$txt['rslinkbot_body_start'] . " " . timeformat($message['botchecktime']) . " ".$txt['rslinkbot_body_middle']." " . $message['botpercentdead'] . $txt['rslinkbot_body_end']. "</b>";

change it to:
         $bottext = "<b>" .$linkbot_name. " " .$txt['rslinkbot_body_start'] . " " . timeformat($message['botchecktime']) . " ".$txt['rslinkbot_body_middle']." " . $message['botpercentdead'] . $txt['rslinkbot_body_end']. "</b>";

Offline DareDevil1990

  • Jr. Member
  • **
  • Posts: 397
Re: Converting a phpBB bot for SMF
« Reply #95 on: September 18, 2008, 05:30:19 AM »
any chances of making this work with .... all the popular file uploading servcies....and one more silly question ...it is just out of curiosity .....


to check the rs links the bot must connect to rs server and to that some coding would be required......


is there any way that i can get the code for all the other popular file sharing services and add it in the mod and it checks all those file services also ....  ;) ;)
« Last Edit: September 18, 2008, 05:34:06 AM by keshav »

Offline Lanthan

  • Semi-Newbie
  • *
  • Posts: 80
Re: Converting a phpBB bot for SMF
« Reply #96 on: September 18, 2008, 09:27:47 AM »
I have found a similar script from another team which is able to check other upload sites. I'll get in contact with them, asking if I can use their regular expessions to check for more links.

Offline DareDevil1990

  • Jr. Member
  • **
  • Posts: 397
Re: Converting a phpBB bot for SMF
« Reply #97 on: September 18, 2008, 12:22:24 PM »
i think that team would be maxwcoders ....as they also have their LCB posted at warez-bb ...if yes it is the team.... i know the code who coded that boot and if u want  i can ask him... for that...

Offline Lanthan

  • Semi-Newbie
  • *
  • Posts: 80
Re: Converting a phpBB bot for SMF
« Reply #98 on: September 18, 2008, 12:25:50 PM »
You're right, I'm in contact with dman at this moment.

Offline Lanthan

  • Semi-Newbie
  • *
  • Posts: 80
Re: Converting a phpBB bot for SMF
« Reply #99 on: September 18, 2008, 03:08:13 PM »
And I have a GO from him.

So this will be one of the next features I'll implement.

But now, I'm waiting for approval of this mod (Vers. 1.0) from the SMF-Team. So I have made a feature freeze at this time.