WBCE CMS – Way Better Content Editing.
You are not logged in.
When I enter text in the "caption" dialogue for an item image, it does not show in the lightbox of that image. And this is the resulting html
<span class="lb-caption" style="display: none;"></span>
If I enter text in the "HTML title Attribute" of an item image, the title is shown as the lightbox caption.
<span class="lb-caption" style="display: inline;">test</span>
Is there a reason for this? Is the Caption content used elsewhere?
Offline
Which version of OfA is that?
Sorgen sind wie Nudeln: man macht sich meist zu viele.
Offline
Sorry.
OFA 1_oneforall_v1.0.10 which I downloaded from here:
https://addons.wbce.org/pages/addons.php?do=item&item=9
Offline
This is rather strange. I have no idea where lb-caption does come from. The code which is generated in the view_item.pphp actually reads
<div class="mod_'.$mod_name.'_item_caption_f">
what usually results in <div class="mod_oneforall_item_caption_f">.
On the other hand, in the frontend.css and frontend.js there are classes defined for lb-caption (and lb obviously means lightbox), but it seems as if this was not implemented completely.
Are you sure that that code results from OfA and not from RFG or Minigal or Itemz or sth. like this?
Sorgen sind wie Nudeln: man macht sich meist zu viele.
Offline
It's just OFA as far as I understand. This is what the inspection of the caption on the frontend shows, if that might help:
Offline
Ah, I see. That is dynamically generated HTML by the lightbox script. To add the caption text, change in the view_item.php line ~396
$prepend = '<a href="'.$img_url.$image_file.'" rel="lightbox[image_'.ITEM_ID.']" title="'.$img_title.'"><img src="';
to
$prepend = '<a href="'.$img_url.$image_file.'" rel="lightbox[image_'.ITEM_ID.']" title="'.$img_title.' '.$img_caption.'"><img src="';
Sorgen sind wie Nudeln: man macht sich meist zu viele.
Offline
losttrip
Thank you once again for your kind guidance.
Because I have my lightbox2 set to Overview, not Item Detail:
I also made your suggested addition in line ~ 360 of view_overview.php
from
$img_prepend = '<a href="'.$img_url.$image_file.'" rel="lightbox[image_'.$item_id.']" title="'.$img_title.'"><img src="';
to:
$img_prepend = '<a href="'.$img_url.$image_file.'" rel="lightbox[image_'.$item_id.']" title="'.$img_title.' '.$img_caption.'"><img src="';
And it is working beautifully.
Cheers!
Offline
florian
Pages: 1