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: BB code in comments  (Read 4245 times)

0 Members and 1 Guest are viewing this topic.

panwac

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Gender: Male
  • Posts: 52
BB code in comments
« on: December 18, 2004, 03:41:32 pm »

In my CPG 1.3.2 test-gallery any comments are only a simple text, without any BB codes. I think, BB codes like
Code: [Select]
[b]Bold[/b], [i]Italic[/i], [url=http://yoursite.com/]Url Text[/url] (the same codes can be useful in descriptions for photos) in comments could make gallery better - reading texts would be easer.
« Last Edit: December 20, 2004, 11:28:11 pm by TranzNDance »
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: BB code in comments
« Reply #1 on: December 19, 2004, 06:07:24 am »

adding this request to todo-list

Joachim
Logged

panwac

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Gender: Male
  • Posts: 52
Re: BB code in comments
« Reply #2 on: December 19, 2004, 12:14:21 pm »

Super - thanks!  :)
Logged

Tranz

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Female
  • Posts: 6149
Re: BB code in comments
« Reply #3 on: December 20, 2004, 11:29:00 pm »

BBcode has been added to devel version comments and ecard. However, due to the character limit, comments with url would get truncated, it seems because they would appear to be too long. Maybe someone can address that.

Thanks for the suggestion.
Logged

Casper

  • VIP
  • Coppermine addict
  • ***
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 5231
Re: BB code in comments
« Reply #4 on: December 20, 2004, 11:35:15 pm »

Well, in 1.3.2, you can change ' Max number of characters in a word' in config, but this has been removed from 1.4  :-\\
Logged
It has been a long time now since I did my little bit here, and have done no coding or any other such stuff since. I'm back to being a noob here

Casper

  • VIP
  • Coppermine addict
  • ***
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 5231
Re: BB code in comments
« Reply #5 on: December 20, 2004, 11:40:55 pm »

The table setting is still there 'max_com_wlength', and it seems to default at 38.  I suppose you can change this.

Edit, it is still there, but it's been moved from the comment settings to the image settings.
Logged
It has been a long time now since I did my little bit here, and have done no coding or any other such stuff since. I'm back to being a noob here

Tranz

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Female
  • Posts: 6149
Re: BB code in comments
« Reply #6 on: December 21, 2004, 12:02:38 am »

It would be nice to still enforce the character limit on regular words but make an exception for urls. For example, instead of having the character count be based on the raw message, have it apply to the final output. So that if there is a 5-letter word pointing to a 40-character url, only 5 characters would be counted toward that part of the comment.

I don't know if that's possible, but just a thought.
Logged

Tranz

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Female
  • Posts: 6149
Re: BB code in comments
« Reply #7 on: December 21, 2004, 04:50:32 am »

If you want to apply this to your current gallery:

in displayimage.php (for version 1.32)

FIND:
Code: [Select]
'{MSG_BODY}' => &$comment_body,

REPLACE with:
Code: [Select]
'{MSG_BODY}' => bb_decode($comment_body),
Logged
Pages: [1]   Go Up
 

Page created in 0.019 seconds with 19 queries.