Keyword
Please note that official support for commercial extensions & templates is provided in the Subscriber Help Desk.
Support requests should ONLY be directed there and require an active subscription plan.
This forum board is to be used for archive purposes and knowledge exchange ONLY.

Line Break in Description text file

  • Alexander Radin
  • Alexander Radin's Avatar Topic Author
  • Offline
  • New Member
More
17 years 9 months ago #5310 by Alexander Radin
Line Break in Description text file was created by Alexander Radin
Ok. So I get how to add captions to individual files using the labels.txt file in the folder with the images but what I want to do is have a somewhat longer description under a Title of the image. I tried using a line break in the text file by outting in <br> and then the text I want for the next few lines and it works on the pop up slideshow part using slimbox but the thumbnail shows the <br> in the actual text. Is there a work around for this?

An example of the code in the text file is:
3_pomegranates.jpg|Pomegranates   32 x 15   Watercolor on cold press Arches <br> Some text I want under the title area.

The output in the pop up gives the linebreak correctly but on the thumbnail image just displays everything as text.

Let me know if what I want to do with this tool is possible.

Thanks --- Alex

Thanks --- Alex

Please Log in or Create an account to join the conversation.

More
17 years 6 months ago #5311 by Kevin Hyland
Replied by Kevin Hyland on topic Re: Line Break in Description text file
Hi Alex

Did you ever get this sorted?  I've spent the last four hours or so trying to find a way round this problem.....it's now nearly 1am and my brain is fried!

Any assistance appreciated

Kevin
Living in cold, dark Inverness - and dreaming about sleep!

Please Log in or Create an account to join the conversation.

  • Alexander Radin
  • Alexander Radin's Avatar Topic Author
  • Offline
  • New Member
More
17 years 6 months ago #5312 by Alexander Radin
Replied by Alexander Radin on topic Re: Line Break in Description text file
I never got an answer on this so I simply didn't use the captions on the thumbnails so the only thing that shows on the thumbs itself is the image.

Regards --- Alex

Please Log in or Create an account to join the conversation.

More
17 years 6 months ago #5313 by Kevin Hyland
Replied by Kevin Hyland on topic Re: Line Break in Description text file
Aye - I did the same thing but unfortunately the person I'm doing the website for has asked specifically to have captions\titles on the thumbnail.  It's a website for Aberdeen Angus bulls and it's important to show the names of the Parents against each bull.
I thought it was so cool that I could just use <br> to break up the lines...until I saw the thumbnail caption\title showed the <br>!!

Maybe one of the support guys can give some assistance...


Καληµέρα - ξέρετε εάν υπάρχει λύση σε αυτό το πρόßληµα?

Σας ευχαριστούµε


;D

Hopefully there's a simple solution to this problem!

Cheers

Kevin

Please Log in or Create an account to join the conversation.

  • JoomlaWorks Support Team
  • JoomlaWorks Support Team's Avatar
  • Offline
  • Platinum Member
More
17 years 6 months ago - 17 years 6 months ago #5314 by JoomlaWorks Support Team
Replied by JoomlaWorks Support Team on topic Re: Line Break in Description text file
Hi there!

I hope that the next version will have support for multiline captions.

For now you can try that !

Thank you!

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

Please Log in or Create an account to join the conversation.

More
17 years 6 months ago #5315 by Kevin Hyland
Replied by Kevin Hyland on topic Re: Line Break in Description text file
Hi George

Thanks for your assistance.

I changed the settings in plugin_jw_sigpro.php (I'm assuming that's the file when you mentioned "the mambot file") but the thumbnail is still showing the <br> in the caption.

I cleared the cache incase that helped but it didn't make any difference.

I don't even know where to begin with php but do the following lines need to be amended in some way?

// if labels do exist
if ($labels[md5($mosConfig_absolute_path.$rootfolder.$_images_dir_.'/'.$images[$a])]!="") {

and

$final_caption = htmlentities($labels[md5($mosConfig_absolute_path.$rootfolder.$_images_dir_.'/'.$images[$a])],ENT_QUOTES);

???

Thanks again George

Kevin

Please Log in or Create an account to join the conversation.

  • JoomlaWorks Support Team
  • JoomlaWorks Support Team's Avatar
  • Offline
  • Platinum Member
More
17 years 6 months ago - 17 years 6 months ago #5316 by JoomlaWorks Support Team
Replied by JoomlaWorks Support Team on topic Re: Line Break in Description text file
Hi there again!

The <br> tag it isn't displayed in the label
cause the use of the function htmlentities, in the php code, in sig pro file.

I just say with my previous post that need simple to use the <br> tag
and remove the htmlentities function from the code!

Just open the file, find the first block of code and replace it with the second!
If i remember right, you will find the code in the lines 278-280!

Check it out and come back to tell me the results!
If after that doesn't work, just PM me some s.administrator account!

Thank you!

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

Please Log in or Create an account to join the conversation.

More
17 years 6 months ago #5317 by Kevin Hyland
Replied by Kevin Hyland on topic Re: Line Break in Description text file
Hi

I already made the changes to the php file as instructed but I'm still getting the BR html code showing up in the thumbnail caption.  You're right that the code is on 278 to 280...mine reads as follows:-

// if labels do exist
if ($labels[md5($mosConfig_absolute_path.$rootfolder.$_images_dir_.'/'.$images[$a])]!="") {
  $html .= '<b>'.$labels[md5($mosConfig_absolute_path.$rootfolder.$_images_dir_.'/'.$images[$a])].'</b>';
}

which is what I was advised to change the original code to.  I haven't made any other changes.

It's not a problem to send you an Admin logon for the website (Gallery is here 82.110.105.91/findhorn-angus.co.uk/index.php?option=com_content&task=view&id=44&Itemid=59) but I'd like to keep it in the forums so that others (like Alex who started this question!) can see what needs to be done to resolve the problem.

Cheers for the continued support

Kevin

Please Log in or Create an account to join the conversation.

  • JoomlaWorks Support Team
  • JoomlaWorks Support Team's Avatar
  • Offline
  • Platinum Member
More
17 years 6 months ago #5318 by JoomlaWorks Support Team
Replied by JoomlaWorks Support Team on topic Re: Line Break in Description text file
Hi my friend!

OK, send me a PM with a s.admin account
I'll install also the joomlaxlorer component to modify my files

Before all that please
Rename the images with no spaces!
Spaces in the name of a file could be create various problem!
use the character "_" for the space
and change after that the names also to labels.txt

Thank you!  :)

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

Please Log in or Create an account to join the conversation.

  • JoomlaWorks Support Team
  • JoomlaWorks Support Team's Avatar
  • Offline
  • Platinum Member
More
17 years 6 months ago #5319 by JoomlaWorks Support Team
Replied by JoomlaWorks Support Team on topic Re: Line Break in Description text file
OK!

If someone want to use a hack for multilines labels
can do that.

1st at the labels.txt, use the tag <br> to "break" the lines
2nd at the sig pro mambot file
change the code ( 305 line )
$final_caption = htmlentities($labels[md5($mosConfig_absolute_path.$rootfolder.$_images_dir_.'/'.$images[$a])],ENT_QUOTES);

to
$final_caption = $labels[md5($mosConfig_absolute_path.$rootfolder.$_images_dir_.'/'.$images[$a])];

Thank you!

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

Please Log in or Create an account to join the conversation.

More
17 years 6 months ago #5320 by Kevin Hyland
Replied by Kevin Hyland on topic Re: Line Break in Description text file
Thanks very much for your support George - excellent service!!

;D

Cheers

Kevin

Please Log in or Create an account to join the conversation.

  • JoomlaWorks Support Team
  • JoomlaWorks Support Team's Avatar
  • Offline
  • Platinum Member
More
17 years 6 months ago #5321 by JoomlaWorks Support Team
Replied by JoomlaWorks Support Team on topic Re: Line Break in Description text file
Happy to help!  :)

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

Please Log in or Create an account to join the conversation.

More
16 years 11 months ago #5322 by neworange
Replied by neworange on topic Re: Line Break in Description text file
hello,
is there any way to show only the first line in the thumb?
thank you

Please Log in or Create an account to join the conversation.

More
16 years 11 months ago #5323 by Dan G#ran Lunde
Replied by Dan G#ran Lunde on topic Re: Line Break in Description text file
If you patch the file as above, you should have:

$final_caption = $labels[md5($mosConfig_absolute_path.$rootfolder.$_images_dir_.'/'.$images[$a])];

Here $final_caption probably contains something like "some text on first line <br> and another line". Then you could probably just split the line and keep as many lines as you would like:

// split final caption on each occurence of <br>, keep 1 line
$final_caption = split('<br>', $final_caption, 1)

NB: Totally untested code. Try it and see if it works.

Please Log in or Create an account to join the conversation.

More
16 years 11 months ago #5324 by neworange
Replied by neworange on topic Re: Line Break in Description text file
hi danglung,

it almost works  :)
when oppening the image, I can show the lines I want,
but in the thumb instead of the text before <br>, it shows the word Array

any idea?

thank you very much for your help

Please Log in or Create an account to join the conversation.

More
16 years 10 months ago #5325 by Jill Clarke
Replied by Jill Clarke on topic Re: Line Break in Description text file
Dear George

worked like a charm when I worked out the difference between

[color=red/]plugins/content/jwsigpro/sigpro_engine.php      - wrong one[/color]

and the one I needed to change

/plugins/content/jwsigpro.php

This is for Joomla 1.5 users!

So thank you very muchly

J

Please Log in or Create an account to join the conversation.

More
16 years 10 months ago #5326 by Jill Clarke
Replied by Jill Clarke on topic Line Break - HELP - different fonts
Hi George and other experts

I have implemented the code change to enable the <br> to be used in the labels.txt file.

I now have the problem that some labels are in the css font specified (Arial) and some have changed to Times New Roman.

Checked out the labels.txt, some have spaces around the <br> and some not, but it does not correlate to the problem (I have found correct font displayed with spaces around the <br> and removing the spaces does not change the font back to the correct one)

So is it obvious to anyone what altered thing could change this?

Could it be a UTF-8 issue?

Any help will be much appreciated.

J

Please Log in or Create an account to join the conversation.


Powered by Kunena Forum