Advanced search  

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Pages: [1]   Go Down

Author Topic: How to disable certain bbcode flags?  (Read 4199 times)

0 Members and 1 Guest are viewing this topic.

TeenStorm

  • Coppermine novice
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 23
  • €®!¢
    • TeenStorm.com
How to disable certain bbcode flags?
« 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 & 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. 
« Last Edit: July 02, 2007, 02:55:52 am by Nibbler »
Logged

TeenStorm

  • Coppermine novice
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 23
  • €®!¢
    • TeenStorm.com
Re: How to disable certain bbcode flags?
« Reply #1 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. 
Logged

Nibbler

  • Guest
Re: How to disable certain bbcode flags?
« Reply #2 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
Logged

TeenStorm

  • Coppermine novice
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 23
  • €®!¢
    • TeenStorm.com
Re: How to disable certain bbcode flags?
« Reply #3 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. 
Logged

Nibbler

  • Guest
Re: How to disable certain bbcode flags?
« Reply #4 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.
Logged

mickyd

  • Coppermine newbie
  • Offline Offline
  • Posts: 4
Re: How to disable certain bbcode flags?
« Reply #5 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
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: How to disable certain bbcode flags?
« Reply #6 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.
Logged

mickyd

  • Coppermine newbie
  • Offline Offline
  • Posts: 4
Re: How to disable certain bbcode flags?
« Reply #7 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
Logged

Sami

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 3686
  • BMossavari
    • My Project
Re: How to disable certain bbcode flags?
« Reply #8 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
Code: [Select]
function make_clickable($text)
{
     //Mod Disable this function   
     return $text;
.
.
.
.
.
}
Logged
‍I don't answer to PM with support question
Please post your issue to related board

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: How to disable certain bbcode flags?
« Reply #9 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.
Logged

mickyd

  • Coppermine newbie
  • Offline Offline
  • Posts: 4
Re: How to disable certain bbcode flags?
« Reply #10 on: November 14, 2007, 08:04:31 am »

Thanks for that.
Logged
Pages: [1]   Go Up
 

Page created in 0.02 seconds with 20 queries.