coppermine-gallery.com/forum

Support => cpg1.4.x Support => Older/other versions => cpg1.4 miscellaneous => Topic started by: TeenStorm on July 02, 2007, 12:13:27 AM

Title: How to disable certain bbcode flags?
Post by: TeenStorm on July 02, 2007, 12:13:27 AM
I'm purposely allowing anonymous users to post comments, however, I don't want to allow non-registered users to use the  &  (http://&) bbcodes.  It doesn't look like I can use bbcode syntax as banned terms in lang_bad_words.  What's my best route to tackle this?  I had contemplated using find/replace to change the syntax from [URL] to something weird I could educate registered users about like how about [BLAH_LINK] but don't want to overstep my bounds on the CPG license. 
Title: Re: How to disable certain bbcode flags?
Post by: TeenStorm on July 02, 2007, 12:17:28 AM
BTW:  Using CPG 1.4.10 w/captcha plugin.  I'm just exploring ways to prevent spammers from inserting clickable links. 
Title: Re: How to disable certain bbcode flags?
Post by: Nibbler on July 02, 2007, 01:25:44 AM
Coppermine is Free Software; the freedom to modify the source code is one of the main rights that gives you.

Look at the bb_decode() function in include/functions.inc.php
Title: Re: How to disable certain bbcode flags?
Post by: TeenStorm on July 02, 2007, 02:50:48 AM
Thanks Nibbler.  I've commented out the url decodes for now (will probably customize a unique value later).  About CPG being "free"... I was just being cautious given that "free" does not allow one to change the "p-_-red by" phrase; better to be careful than offensive. 
Title: Re: How to disable certain bbcode flags?
Post by: Nibbler on July 02, 2007, 02:54:50 AM
I forgot to mention make_clickable(), that makes normally typed urls clickable so you might want to disable that too.
Title: Re: How to disable certain bbcode flags?
Post by: mickyd on November 13, 2007, 01:26:06 AM
Could you please explain where I comment out url decodes and how I can disable make_clickable()
I have members of a site where each has an individual gallery but wish other members (not logged in) to be able to comment.
So disabling anonymous comments is not really practical

Getting some porn spam.

Thanks
Title: Re: How to disable certain bbcode flags?
Post by: Joachim Müller on November 13, 2007, 06:45:43 AM
To fight spam it is advisable not to allow anonymous comments or to use captcha or akismet instead of fiddling with bbcode permissions.
Title: Re: How to disable certain bbcode flags?
Post by: mickyd on November 13, 2007, 10:38:57 AM
Thanks for that
I have both captcha and  akismet installed.
Thanks for the advice on how to fight spam.
However, I would still appreciate instructions on how to comment out url decodes and disable make_clickable().
We wish to allow anonymous comments.
Thanks again
Title: Re: How to disable certain bbcode flags?
Post by: Sami on November 13, 2007, 10:54:07 AM
to disable make_clickable() function , simply edit {gallery-root}/includes/functions.inc.php
find make_clickable() function and add a return at the very first line of that function , something like this

function make_clickable($text)
{
     //Mod Disable this function   
     return $text;
.
.
.
.
.
}
Title: Re: How to disable certain bbcode flags?
Post by: Joachim Müller on November 13, 2007, 03:51:18 PM
But keep in mind that this will disable clickable URLs everywhere - not only in comments, but in every description field.
Title: Re: How to disable certain bbcode flags?
Post by: mickyd on November 14, 2007, 08:04:31 AM
Thanks for that.