Hmm - can't get these code tags to work. I'll try again. (Delete the spaces after the '
Grrrr
Hmm - can't get these code tags to work. I'll try again. (Delete the spaces after the '< ' signs.)
2a. Change lines 507-510 to:
(507) $body .= "< label>Image Title";
(508) $body .= "< textarea name='media_title' id='media_title'>" . $rs['media_title'] . "";
(509) $body .= "< label>Image Caption";
(510) $body .= "< textarea name='media_caption' id='media_caption'>" . $rs['media_caption'] . "";
2b. Change lines 47 and 48 to:
(47) var title = encodeURIComponent( $('#media_title').val() );
(48) var caption = encodeURIComponent( $('#media_caption').val() );
2c. Add these two lines to the end of the CSS file:
textarea#media_title { width: 500px; height: 100px; }
textarea#media_caption { width: 500px; height: 100px; }
That's it.
Let me know if it works for you.
R
One last adjustment.
From line 256 of files.php in /ndxz-studio/module/exhibits delete:
title='$img[media_title]'
(As discussed in this thread)
Sorry, I formatted 2a above incorrectly, and missed the closing textarea tags. This is it - lines 507-510. (Delete the spaces after the '< ' signs):
$body .= "< label>Image Title";
$body .= "< textarea name='media_title' id='media_title'>" . $rs['media_title'] . "< /textarea>";
$body .= "< label>Image Caption";
$body .= "< textarea name='media_caption' id='media_caption'>" . $rs['media_caption'] . "< /textarea>";
God, I'm an idiot. One more try, with added spaces:
$body .= "< label>Image Title< /label>";
$body .= "< textarea name='media_title' id='media_title'>" . $rs['media_title'] . "< /textarea>";
$body .= "< label>Image Caption< /label>";
$body .= "< textarea name='media_caption' id='media_caption'>" . $rs['media_caption'] . "< /textarea>";
Leslie: Thank You so much for this useful tip!
Leslies Hack works perfectly - thanks so much - but my dropdown menue doesnt work any longer. Any ideas?
For those of you who want the line breaks in the media_caption form field to wrap to a new line (aka hitting return in the form field will add a break tag) do this...
In the ndxz.exhibit-edit.js file (ndxz-studio > asset > js folder) around line 47 (I've added code so this is referencing the line numbers in the posts above) add
function return2br(dataStr) {return dataStr.replace(/(r|n)/g, "");}
above function updateImage(ida)
then change var caption = encodeURIComponent( $('textarea#media_caption').val() ); */
to var caption = return2br( $('textarea#media_caption').val() );
so the two functions should look like this…function return2br(dataStr) {return dataStr.replace(/(r|n)/g, "");}
function updateImage(ida)
{
var title = encodeURIComponent( $('textarea#media_title').val() );
var caption = return2br( $('textarea#media_caption').val() );
$.post('?a='+action, { upd_jximg : 'true', v : title, x : caption, id : ida },
function(html) {
//updating(html);
getExhibit();
});
}
Now your lines should wrap in your image caption the same way they do in the edit page text field :)
Hmm, the code tags got away from me there. Just read through the above and ignore the formatting. :)
hello, great thread !
is anybody getting problems with the thickbox plugin and this hack ?
thks
ok forget about it
got it to work
uh oh
I followed the directions from the top and I'm getting the "null" as well --
I'm not super super adept at these things so should I just try to reverse the damage - switch everything back?
I'm using slideshow format fyi
-any help would be appreciated -
-scared to go the difficult-seeming richardn route
I should add that I tried southafrica's solution and that didn't work either-
@yomama
i don't bring it to work combined with the stuff of richardn - can you paste it again in a clean formatting form - that would be nice :) - maybe this is only the problem ...
thanks momper
ok as a fast fix:
$title = ($go['media_title'] == '') ? '' : nl2br($go['media_title']) . ' ';$caption = ($go['media_caption'] == '') ? ' ' : nl2br($go['media_caption']);
I just successfully implemented the changes put forward in LeslieOA's original post (thank you). What fixed the «null»-entry in the caption-field for me was to delete the browser-cache. So here is my advice to everyone that gets the «null»-error: delete your cache (Firefox: Clear Recent History) right after doing the changes and before logging into you indexhibit-installation again. That solved it for me.
You need to be logged in to post.
