Indexhibit
Index + Exhibit

Login:

Created by
Daniel Eatock
Jeffery Vaska
And You

Indexhibit was updated to version 2.1.4 on April 10, 2017.

Longer Captions?

 

Indexhibit version: Legacy
Thread is not resolved.

rahsanca
UNITED STATES
10 year(s) ago
Permalink Post

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!

Vaska A
UNITED STATES
10 year(s) ago
Permalink Post

You can edit the system code and allow it to be longer.

rahsanca
UNITED STATES
10 year(s) ago
Permalink Post

Ok how do you do that? I have never edited system code. ;) Thanks.

Vaska A
UNITED STATES
10 year(s) ago
Permalink Post

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.

Vaska A
UNITED STATES
10 year(s) ago
Permalink Post

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.

v5z1m9
UNITED KINGDOM
10 year(s) ago
Permalink Post

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.

Vaska A
UNITED STATES
10 year(s) ago
Permalink Post

It's coming...it's coming.

;)

v5z1m9
UNITED KINGDOM
10 year(s) ago
Permalink Post

Cheers.
Not trying to rush you, but any idea when?
Need to find a workaround (or organize our indexhibit hierarchy) in the meantime...
Thanks.

Vaska A
UNITED STATES
10 year(s) ago
Permalink Post

When it happens.

tgawad
UNITED STATES
10 year(s) ago
Permalink Post

is there a solution yet?

electrolibrary
UNITED STATES
10 year(s) ago
Permalink Post

i'm having the same issue here...

Vaska A
UNITED STATES
10 year(s) ago
Permalink Post

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...

wesduvall77
UNITED STATES
10 year(s) ago
Permalink Post

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.

sylvainman
CANADA
9 year(s) ago
Permalink Post

Excellent, it is what I was looking for.

alexdriver
UNITED KINGDOM
9 year(s) ago
Permalink Post

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

Vaska A
UNITED STATES
9 year(s) ago
Permalink Post

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.

shauniqua
UNITED STATES
9 year(s) ago
Permalink Post

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

  1. $body .= ips($this->lang->word('image caption'), 'input', 'media_caption', 
  2. $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?

shauniqua
UNITED STATES
9 year(s) ago
Permalink Post

uh, i meant textarea every time i put commentarea. :)

shauniqua
UNITED STATES
9 year(s) ago
Permalink Post

tried this:

  1. $body .= ips($this->lang->word('image caption'), 'textarea', 'media_caption', 
  2. $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?

shauniqua
UNITED STATES
9 year(s) ago
Permalink Post

so simply replacing 'input' with 'textarea' wreaks strange havoc on the generated source of that form:

  1. textarea name=" id=" maxlength="255" media_caption=""

i cannot make heads or tails as to why it is jumbling things like that.

Vaska A
UNITED STATES
9 year(s) ago
Permalink Post

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.

shauniqua
UNITED STATES
9 year(s) ago
Permalink Post

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?

easynow
UNITED KINGDOM
9 year(s) ago
Permalink Post

i just tried bubblegum. it didn't work :(

next i'll try fish sauce.

timowest
UNITED KINGDOM
9 year(s) ago
Permalink Post

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!)

Vaska A
UNITED STATES
9 year(s) ago
Permalink Post

You can edit the exhbition formats themselves - they are all a bit different. Add p tags where needed...styles...etc...

timowest
UNITED KINGDOM
9 year(s) ago
Permalink Post
Do you mean adding tags to the input fields? (eg blah blah etc) or editing the index.php file?

(thanks for answering & feel free to ignore!)

adroitmachine
UNITED STATES
9 year(s) ago
Permalink Post

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.

jarin
UK
9 year(s) ago
Permalink Post

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'

Vaska A
UNITED STATES
9 year(s) ago
Permalink Post

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.

kaoz3000
GERMANY
8 year(s) ago
Permalink Post

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:

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

with:

  1. $body .= label($this->lang->word('image title').' '.span($this->lang->word('html allowed')));
  2. load_helpers(array('editortools', 'output'));
  3. ¬†¬†¬†¬†¬†¬†¬†¬†$body .= textarea(stripForForm($rs['media_caption'], 1), "id='media_caption' style='height:99px;'", 'media_caption');
  1. then in <strong>ndxz-studio/asset/js/ndxz.exhibit-edit.js</strong> delete the "input" in line 48:
  2. var caption = encodeURIComponent( $('input#media_caption').val() );
  3. to:
  4. 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.

kaoz3000
GERMANY
8 year(s) ago
Permalink Post

oh sorry.
read careful somethings messed up with the code styling and the instructions...

LeslieOA
UNITED KINGDOM
8 year(s) ago
Permalink Post

@kaoz3000: - "Divide Exhibit Into Sections" mod.

;-)

elfneedsfoodbadly
IRELAND
8 year(s) ago
Permalink Post

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!

srod
UNITED STATES
8 year(s) ago
Permalink Post

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?

roe
MEXICO
8 year(s) ago
Permalink Post

Cool Thanks KAOZ works very well.

tiemen
BELGIUM
8 year(s) ago
Permalink Post

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

petermclane
UNITED STATES
8 year(s) ago
Permalink Post

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!!! ;>

rgfunderburk
UNITED STATES
8 year(s) ago
Permalink Post

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.

rickykappa
ITALY
8 year(s) ago
Permalink Post

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 ;-)

maarten09
NETHERLANDS
7 year(s) ago
Permalink Post

i don't seem to be able to edit the module/exhibits/index.php.
it say's the file is locked.
does anyone have a solution?

JENXUTO
UNITED STATES
6 year(s) ago
Permalink Post

I got a parse error and can't access my site.

JENXUTO
UNITED STATES
6 year(s) ago
Permalink Post

Sorry, to be specific my error is:
Parse error: syntax error, unexpected $end in /home2/theorih6/public_html/ndxz-studio/module/exhibits/index.php on line 1

My site still appears but I can't access the editing side. All I did was alter the line for caption extension and now I can't shake this parse error. I even undid my edit and uploaded the index.php back to the module folder. Can someone help?

Thanks.

pernin
SWEDEN
6 year(s) ago
Permalink Post

and what is your site? ;)

JENXUTO
UNITED STATES
6 year(s) ago
Permalink Post

theoriginalcopy.net

pernin
SWEDEN
6 year(s) ago
Permalink Post

if your problem is that you can no longer login, you should try first to reset your user/password, there's a reset script here in the downloads section

Showing 1 - 45 of 45 posts in Forum » Customize » Longer Captions?
 

This thread has been closed, thank you.