I am developing a new site in phpwcms and used the new 'lightbox' option witch is lovely
![Smile :)](./images/smilies/icon_smile.gif)
To make the lightbox caption look nice i used {RT}'s like [div_style] & [BR] to format it lovely... it works as expected and looks great.... BUT... the 'on hover tooltip' display's the HTML code
![Sad :(](./images/smilies/icon_sad.gif)
![Smile :)](./images/smilies/icon_smile.gif)
I haven't addressed this issue anywhere other than for my own needs but it will show you the way if you too need this...
first: edit the includes/inc_front/img.func.inc.php fro maprox line 457
FIND...
Code: Select all
// lightbox
$table .= '<a href="'.PHPWCMS_IMAGES.$zoominfo[0].'" rel="lightbox['.$lightbox.']"';
if($capt_cur) {
$table .= ' title="'.parseLightboxCaption($capt_cur).'"';
}
$table .= ' target="_blank">';
Code: Select all
// lightbox
$table .= '<a href="'.PHPWCMS_IMAGES.$zoominfo[0].'" rel="lightbox['.$lightbox.']"';
if($capt_cur) {
$pSoupCaption = preg_replace('/\[BR\]/',', ',$capt_cur);// replare [BR]'s with comma's
$pSoupCaption = preg_replace('/\[(.*?)\]/','',$pSoupCaption);//strip [RT][/RT]'s
$pSoupCaption = preg_replace('/\{(.*?)\}/','',$pSoupCaption);//strip {RT}'s
$table .= ' title="'.parseLightboxCaption($pSoupCaption).'"';//HACK:pSouper: image tooltip sanitiser.
}
$table .= ' target="_blank" name="'.parseLightboxCaption($capt_cur).'">';
FIND... (approx line 82)
Code: Select all
if (j == images.length){
images.push([el.href, el.title]);
if (el.href == link.href) imageNum = j;
}
Code: Select all
if (j == images.length){
images.push([el.href, el.name]);
if (el.href == link.href) imageNum = j;
}
--------
THE WHY'S...
the reason for this is that slimbox.js gets the info for its caption box from the 'title' element of the anchor link BUT so doe the browser when it display the 'on hover tooltip' so we need to change the slimbox.js to use the 'name' attribute for the caption box instead - then clean the 'title' while using the (processed) cation for the 'name' attribute.
hope it helps.