Hi-
Sorry one more question...
Is there any way to make the captions beneath images within each exhibit longer? The input field currently limits the amount of text.
Thanks!
You can edit the system code and allow it to be longer.
Ok how do you do that? I have never edited system code. ;) Thanks.
I'm not sure I want to go into this. It's not the kind of thing somebody who hasn't edited code before should do.
In the next release (not sure when this will be) I will add a new parameter in the defaults.php file to allow people to adjust this. I might, as well, add the ability to put html into the field as well.
The reason it is so restricted right now...one some exhibition formats it can cause alot of problems when the page is output if the text is long. But I assume that people test their pages before and after they are published to make sure that text and images output well.
Hello.
I do know how to edit code, and I would like to make the captions longer.
I have 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='1000'", 'text');
but the captions are truncated after 255 characters. What next?
Much appreciated.
It's coming...it's coming.
;)
Cheers.
Not trying to rush you, but any idea when?
Need to find a workaround (or organize our indexhibit hierarchy) in the meantime...
Thanks.
When it happens.
is there a solution yet?
i'm having the same issue here...
What have I said in the past?
And btw, this is not a bug. It works exactly as we want it to work. But we're going to open it up to more soon...
v5z1m9,
I too am trying for longer captions. I updated the module/exhibits/index.php with your code, but couldn't get it to work. Right now I'm using the slideshow plug-in.
Are there any other files that need changing? Tips?
Thanks.
Excellent, it is what I was looking for.
Hi,
255 characters is fine for me, but I don't know how to access the code to change it.
"I have edited the module/exhibits/index.php"
Could you explain how I do this please?
Thanks
You use an ftp application to edit this page...that represents the path (folders) to the page (index.php).
Honestly, if this is too much for you I recommend not doing this because you could possibly mess the entire system up.
text input fields max out at 256 characters. this is not a flaw with Indexhibit, instead a limitation of the input in the form. see http://www.maconstateit.net/tutorials/XHTML/XHTML11/xhtml11-03.htm for more there.
with this in mind, i am wondering how crazy it would be to try to replace the input with a commentarea box instead, as it allows for much more input.
on line 509 of /module/exhibits/index.php, we see
$body .= ips($this->lang->word('image caption'), 'input', 'media_caption',$rs['media_caption'], "id='media_caption' maxlength='255'", 'text');
this is where i get stuck. since commentarea has no type="", the last item in this list 'text' would be moot...
has anyone tried something like this? any tips?
uh, i meant textarea every time i put commentarea. :)
tried this:
$body .= ips($this->lang->word('image caption'), 'textarea', 'media_caption',$rs['media_caption'], "id='media_caption'", '');
things right in the exhibit image editor, but when i save the information, everything entered is replaced by null. hmmm...
any ideas, folks?
so simply replacing 'input' with 'textarea' wreaks strange havoc on the generated source of that form:
textarea name=" id=" maxlength="255" media_caption=""
i cannot make heads or tails as to why it is jumbling things like that.
Of course it causes problems...who said putting 'textarea' would work? Why not put 'bubblegum' in there and see if it works?
;)
What you want to do here is not simple...it's the kind of thing I won't explain to people unless they really know how to program these things. It's too much for us to explain...
In the next version...it is a textarea.
textarea seemed like a pretty good idea to try! surely a little more logical than bubblegum! :)
or wait... are you suggesting i try bubblegum!?
fyi- i was not simply appealing to Vaska on this... from what i understand of a forum, anyone can chime in!
so... anyone?
i just tried bubblegum. it didn't work :(
next i'll try fish sauce.
I have successfully managed to increase the number of characters from 35 to 255 (as discussed above).
Is there a way to format this text so that it wraps into a paragraph instead of appearing in one endless sentence?
Can I use my CSS to do this or does it involve hardcore PHP coding?
(Vaska - please ignore this one as you have warned everyone not to do this!)
You can edit the exhbition formats themselves - they are all a bit different. Add p tags where needed...styles...etc...
(thanks for answering & feel free to ignore!)
Did anybody have any luck with the more complex task of switching the field to one that allows for more then 255 characters without destroying the rest of the system? Trying on my end but haven't cracked it yet... Specifically with the Slideshow format.
you can increase the number of chars from 255 to a much larger amt by using phpmyadmin to change the type of field that 'media_caption' is in the database from 'tinytext' to 'text'
For future viewers...the above answer is not what you really need. You need to change the system files first...255 is alot for an input field as well.
I don't know much about php but I think i figured out how to put in a textarea for the Image caption:
(Maybe its better to wait for the next version of indexhibit if you don't know what you're doing ;-)
in ndxz-studio/module/exhibits/index.php replace:
$body .= ips($this->lang->word('image caption'), 'input', 'media_caption',$rs['media_caption'], "id='media_caption' maxlength='35'", 'text');
with:
$body .= label($this->lang->word('image title').' '.span($this->lang->word('html allowed')));load_helpers(array('editortools', 'output'));$body .= textarea(stripForForm($rs['media_caption'], 1), "id='media_caption' style='height:99px;'", 'media_caption');
then in <strong>ndxz-studio/asset/js/ndxz.exhibit-edit.js</strong> delete the "input" in line 48:var caption = encodeURIComponent( $('input#media_caption').val() );to:var caption = encodeURIComponent( $('#media_caption').val() );
Now you can put in 255 chars in the textarea, if you need more you have to change the Datatype in the mysql Database: ndxz-media : media_caption from tinytext to text then the database field can hold about 65000 characters.
good luck.
oh sorry.
read careful somethings messed up with the code styling and the instructions...
@kaoz3000: - "Divide Exhibit Into Sections" mod.
;-)
worth being careful here ...
i increased my maximum length to 256 (i'm not a programmer but i grew up hexadecimal and it 'felt' right!) bearing in mind previous advice about some clashing exhibition styles (grow was mentioned a long time back).
anyhoo, all was well and i even threw in some styling < strong>words< /strong> and so on which was totally copacetic with slideshow but there are recent clashes with Djuve ... i'm guessing the closing tag gets read as code in some way by the plugin?
as vaska says - test it!
I tried v5z1m9's suggestion:
_______________________________________________
I have 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='1000'", 'text');
_______________________________________________
It worked. And I changed the image title to be longer too:
$body .= ips($this->lang->word('image title'), 'input', 'media_title',
$rs['media_title'], "id='media_title' maxlength='35'", 'text');
to:
$body .= ips($this->lang->word('image title'), 'input', 'media_title',
$rs['media_title'], "id='media_title' maxlength='1000'", 'text');
BUT, now in the image caption I get " : " before my caption (a space, then a colon, then another space)
Any suggestions?
Cool Thanks KAOZ works very well.
Hi,
I changed both length of "image tittle" and "image caption"
to 255, works fine.
But there is a difference in output when i use spaces in the text. In that case he puts some hard returns whithout any reason.
fabriek.org
image 6 to 8, i didn't use a hard return anywhere...
anybody an idea what causes the problem?
tnx
Anyone know if there was ever a fix for this?... would really love a longer caption. Yes, I can program so even a very complex answer would be great!!! ;>
Any news for us without scripting kahunas?.. Good stewards, please please please help us caption images longer, employ a bit of HTML in there... Desperately want to put links in several image captions.
hi, this thread started long time ago and the issue was further developed... actually I've typed the subject in the search box and found this thread that is worth to be read.
when I did it I've followed the steps and got the result, it's all written there ;-)
You need to be logged in to post.
