minibb®
Fight the automated spam - protect your miniBB-forums,
getting the Captcha addon! Click here to read more.
Captcha Addon for miniBB
Community Forum
 | Forums | File Bank | Sign Up | Reply | Search | Statistics | Manual |
Official Addons and Solutions miniBB Community Forum / Official Addons and Solutions /

Forums Checker add-on discussions

 Page:  ««  1  2 
Vishal
Forums Member
#16 | Posted: 3 Apr 2007 23:24 | Edited by: Vishal
Reply 
In general I think self-serving links could be easy identified just reading the post :-) At least I could determine it... when there's no content related message or something like this.

Yes I agree Paul. Purely self-serving posts can be easily identified. But sometimes members include a link or two among genuine posts and they can get overlooked. Anyway, thanks for the quick solution.

BTW, I'm willing to pay for the algorithm if you intend to work on it.

Update:

I tried the above solution but it doesn't seem to work.
Paul
CEO
#17 | Posted: 4 Apr 2007 03:26
Reply 
Unfortunatelly this algorithm is not very easy and I doubt I could even create something like that. I think it's not really worth to implement.

First of all, URLs could be the part of the hyperlink wording, for example: "mini forum could be downloaded from miniBB site". Or URL could be "native", i.e. simply http://www.minibb.com .

It is ok if such URL fits into first 200 preview text symbols (or whatever you specify in $previewPostsLength). However I am sure there will be a lot of the cases, when the URL doesn't fit into limited text (so you anyway don't see it in the Preview - or you will need to increase $previewPostsLength value to thousands, which is for sure is not worth, since it will extremely eat your space, and won't work effective anyway).

The most difficult case is when URL partially fits into limited length. For example first 200 symbols include <a href="http://www.mini ... and that's all. I have no ideas how to display such URL cuts easy and effectively.

There are a lot of built-in or addon-solutions around which allow to prevent URLs in spam messages in miniBB. Why wouldn't you simply to enable them instead?

The code above absolutely works on my side. So you need just to paste one line of code, don't modify anything else - is this what you did?
Vishal
Forums Member
#18 | Posted: 4 Apr 2007 05:03
Reply 
Thanks for following up Paul! The code you mentioned above is working! The reason it didn't work the first time is because after I modified and uploaded the file, I just hit refresh not knowing that the previews are already cached. I recreated the cache and now it's working just the way I wanted.

I agree with your views but in my case I'm using the Checker just for my moderation purpose and not for general public. Hence I have my $previewPostsLength=2000 which serves the purpose very well as very few messages cross this limit.

Thanks again for this wonderful piece of software and your dedicated support :)
Paul
CEO
#19 | Posted: 4 Apr 2007 06:37 | Edited by: Paul
Reply 
Ok, but don't forget to re-paste this string of code if you update the version of addon_checker.php in the future.

And yes - cache must be refreshed (reloading starting date for example) before seeing new results.
Paul
CEO
#20 | Posted: 25 Apr 2007 05:49 | Edited by: Paul
Reply 
Today I've got the following question:

...you had suggested to use:

$pText=urlMaker($pText);

It worked great but there's one drawback. When someone users anchor text to hyperlink urls, it fails to recognise it. For example:
[url=http://www.test.com ]Test[ /url]
Can you come with a solution to overcome this? It would be nice if all the text formatting were intact too.


Well to keep the formatting and maybe the original message at all, before the code when it says:

$pText.='<br /><br />';

paste:

if(substr_count($row[5], 'action=polls&amp;pid=')>0) {
$pText=preg_replace("#<script type=\"text/javascript\" src=\"(.+?)action=polls&amp;pid=(.+?)\"></script>#", '[POLL]', $row[5]);
}
else {
$pText=$row[5];
}

and that's all...
Vishal
Forums Member
#21 | Posted: 25 Apr 2007 23:42 | Edited by: Vishal
Reply 
Simply amazing !!

and I just modified it a bit to:

if($user_id==1) $pText=$row[5];

...so the feature will be available only to me.

Cheers!
Vishal
Forums Member
#22 | Posted: 3 Feb 2008 22:58
Reply 
I saw that when new forums are added, they are not automatically checked in the checker for new messages. One has to manually check it through the settings.

I think they should be checked by default as members may not be aware of when new forums are added or may forget to manually check the forum in the checker. I myself have forgotten many times to check new forums in the checker.
Paul
CEO
#23 | Posted: 4 Feb 2008 04:28
Reply 
Thanks, but... I have no plans to add it currently.

Just announce your board with new forum added and don't forget to update the list. It's 10 seconds of clicks for you and months of work and fixing new bugs for me.
tom322
Forums Member
#24 | Posted: 26 Jun 2008 10:47 | Edited by: tom322
Reply 
After updating the code it seems messages that have quoted text appear in checker preview along with the quote formatting and then the checker preview text views more characters -- most likely the whole quoted text - than it is specified in $previewPostsLength.

But then, as Paul noted, all formatting stays there so the solution should work there for you.

---

I personally tried to put only this code below in the hopes it will insert [POLL] as text in the checker's preview when there is a post with a poll. Note that this approach may be wrong, only Paul would know..

if(substr_count($row[5], 'action=polls&amp;pid=')>0) {
$pText=preg_replace("#<script type=\"text/javascript\" src=\"(.+?)action=polls&amp;pid=(.+?)\"></script>#", '[POLL]', $row[5]);
}
Paul
CEO
#25 | Posted: 26 Jun 2008 11:28 | Edited by: Paul
Reply 
tom322:
After updating the code it seems messages that have quoted text appear in checker preview along with the quote formatting and then the checker preview text views more characters -- most likely the whole quoted text - than it is specified in $previewPostsLength.

The aforementioned solution doesn't care about text length at all of course. It includes THE WHOLE MESSAGE, with all quoting and other kind of HTML. The updated code contains only the fix regarding Polls add-on, and I can't care about all possible cases like quotes, then possibly YouTube codes or any other kind of custom HTML formatting. It works ideally only if set by default - strips off every HTML, then limits preview message by 200 symbols... this is what actually called a preview, and if you guys want to display THE WHOLE message, it's up to you to handle it all ;-)
tom322
Forums Member
#26 | Posted: 26 Jun 2008 11:30 | Edited by: tom322
Reply 
Yes, that explains it well (that's what I thought and I'm happy with how the checker works by default without any changes;). So if I don't use the provided by you solution, in the preview there will still be [POLL] or [HTML only] if there's a poll in the post, correct? So that I don't have to use the code I tried above..

PS> Reading your answer again I conclude the original checker solution is best so I won't be using any additional code in this script.
Vishal
Forums Member
#27 | Posted: 1 Jul 2008 23:49
Reply 
tom322:
So if I don't use the provided by you solution, in the preview there will still be [POLL] or [HTML only] if there's a poll in the post, correct? So that I don't have to use the code I tried above..

I don't think so. The real Poll or [POLL] text will not be displayed at all as all formatting will be removed by default.

tom322:
Reading your answer again I conclude the original checker solution is best so I won't be using any additional code in this script.

The code mentioned is great for moderators and admins as all links and formatting are displayed as it is in the checker and they don't have to cross-check with the posts in the forum. Adding if($user_id==1) condition before the code will ensure that formatting will be visible only to the admin and the rest of the members will be shown the default version with all the formatting removed.
tom322
Forums Member
#28 | Posted: 2 Jul 2008 00:29
Reply 
Vishal:
The real Poll or [POLL] text will not be displayed at all as all formatting will be removed by default.

Actually that's what I prefer - only [POLL] or [HTML only] text is enough for me, I don't need the actual poll or other formatting in the Checker.

Vishal:
The code mentioned is great for moderators and admins as all links and formatting are displayed as it is in the checker and they don't have to cross-check with the posts in the forum.

Well, I would argue with that..

* What if the message is long (like 1000-2000 characters) - in the preview you'll still see only a part of the message (what if the links/poll/picture/videos are posted at the end of the message - that way you'd still have to check the actual message, UNLESS you set up that you want a preview of 2000 characters, but then the checker file of each member would be very large, the page would be very long, and it would slow the exectution overall)..

So I think I prefer the default option and it works well for me (but for you the custom change may work well too :).
 Page:  ««  1  2 
Your reply
Bold Style  Italic Style  Image Link  URL Link 


» Username  » Password 
You are welcome to post anonymously by entering a nickname with no password (if that nickname has not been taken by another member) or by leaving both fields empty. If you have a forums membership account, you can also sign in from this page without posting a message, or sign in and post at once.

Before posting, be sure your message is compliant with our forum posting rules. If not, it may be locked or deleted with no explanation.

 
Online now: Guests - 18
Members - 0
Most users ever online: 191 [24 Dec 2007 14:33]
Guests - 191 / Members - 0

Forums are powered by miniBB®