Limiting Description Length In Thumbnail Galleries Limiting Description Length In Thumbnail Galleries
 

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Main Menu

Limiting Description Length In Thumbnail Galleries

Started by FishGuy876, September 23, 2006, 03:23:08 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

FishGuy876

Hi, I hope this is the right place to put this category.

I have been using Coppermine(great program!) for a little bit now, and have a question about the thumbnail galleries. Some of the pictures I have been working with have long descriptions, which isn't a problem. What is a problem, is whwn the image thumbnails are viewed in galleries and the random files section etc. with the descriptions underneath them. The entire description is shown causing the user to have to scroll down a couple of pages to get to the end of the description (its sharnk to the width of the column for the thumbnail). Is there a way/known way to say restrict this to the first 256 characters, yet leaving the description preserved when they click to view the actual image?

I tried to search the forums and couldn't find anything that fit exactly what I was referring to. Thank-you.

Andy Kellett

xplicit

If you want to limit textual things like description, title, comment etc you can use the standard strlen to define the lengt combined with a substr function. if the lenght is longer than the desired one

Use for instance as an example for limiting a string at 200 char. called $text the following

$text = strlen($text ) > 200 ? @substr($text ,0,200)."...": $text ;[code]

the ... part is used for filling up the end of the text


[/code]
Don't ask me: Can you do this .... or Give me that...or I need Quick help in PM's. I'm not Santaclaus so post your questions on the board so it will be in the benefit for everyone.

FishGuy876

Hi,

Thats pretty much what I had figured on doing. I was hoping there was an easy way to do it, however the template files for the skin doesn't seem to make the job easy =) I don't suppose anyone knows which exact files I should be changing so I don't screw it up =)

Thanks =)

Sami

It's look like a support thread to me! posted on a No support board ...
Moving ...
‍I don't answer to PM with support question
Please post your issue to related board

jessemagano

We'll where does this code go??? What file do I edit, thanks.

Gizmo

Did you read the manual first???? Taking 2 minutes to backup your files can save you hours of wondering what you screwed up.
Billy Bullock - BullsEyePhotos Blog of Indecision