forum.coppermine-gallery.net

No Support => Feature requests => Topic started by: panwac on December 18, 2004, 03:41:32 pm

Title: BB code in comments
Post by: panwac 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.
Title: Re: BB code in comments
Post by: Joachim Müller on December 19, 2004, 06:07:24 am
adding this request to todo-list

Joachim
Title: Re: BB code in comments
Post by: panwac on December 19, 2004, 12:14:21 pm
Super - thanks!  :)
Title: Re: BB code in comments
Post by: Tranz 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.
Title: Re: BB code in comments
Post by: Casper 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  :-\\
Title: Re: BB code in comments
Post by: Casper 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.
Title: Re: BB code in comments
Post by: Tranz 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.
Title: Re: BB code in comments
Post by: Tranz 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),