Thickbox Image Caption Problem

jessmacmillan / 2012-01-25 21:55:09   

Hello!

I just edited my /ndxz-studio/module/exhibits/index.php file to allow for longer image titles and captions. It is working fine, but now something funny is going on: the image caption appears for a second time (in addition to the regular caption) directly underneath the image on the left hand side. It is only happening on my "Text" page:

http://www.jessicamacmillan.com/index.php?/text/text/

Any clue what might be going on? Perhaps I mistakenly messed something up in the index.php file?

All the best,
Jessica

pernin / 2012-01-26 01:38:15   

It depends on what you've done, exactly... what instructions did you follow?

although it looks as if the problem may be in the thickbox plugin itself. If you inspect your website with firebug, you'll see that

lx / 2012-01-26 04:55:44   

It seems to have something to do with the apostrophes, which might get parsed the wrong. Maybe putting in a html entity could help, but I'm not sure.

  1. '

(I hope it displays correctly inside the code tags…)

lx / 2012-01-26 04:58:50   

No, it does not. Here is a link: http://de.wikipedia.org/wiki/HTML-Entity

lx / 2012-01-26 05:03:06   

Just one more try (written with html-entity for &): '

lx / 2012-01-26 06:14:28   

And before getting misunderstood — I mean the apostrophes inside the text (f.i. it'd turn off the headlights and the good things that i've done). And if the problem persists, check out what's happening, when you omit the "em"-tags.

jessmacmillan / 2012-01-28 18:50:37   

lx, thanks a ton for the suggestion, but it unfortunately it doesn't seem to have been the problem.

pernin, I followed some instructions in this thread: (http://www.indexhibit.org/forum/thread/311/) and here is what I did...

I edited the module/exhibits/index.php:

$body .= ips($this->lang->word('image caption'), 'input', 'media_caption',
$rs['media_caption'], "id='media_caption' maxlength='35'", 'text');

to

$body .= ips($this->lang->word('image caption'), 'input', 'media_caption',
$rs['media_caption'], "id='media_caption' maxlength='256'", 'text');

pernin / 2012-01-29 14:17:52   

sorry, took a while...

let's try to track down the problem:
are you putting html code into the caption? for example <em> tags? try without putting any html in, just plain text

jessmacmillan / 2012-01-30 21:27:00   

Hi pernin! There is, in fact, html code in the caption: < em > tags.

Okay, so I tried two things:

1. Removed < em > tags: did not change anything
2. Replaced < em> tags, removed apostrophes: problem fixed!

I would like to use them, do have any idea what might be going on?

Thank you so much!

pernin / 2012-01-31 03:27:16   

apostrophes can get interpreted as single quotes, it may be the system is interpreting them as code. I know ampersand has sometimes the same issues

use entities instead. w3schools.com is an excellent reference and learning site, besides

lx / 2012-01-31 16:30:42   

So I was right then. Did you check out the html entity, that I had mentioned earlier – &apos;, inside your caption? In your case: it&apos;d turn off the headlights.

This thread has been closed, thank you.