Tell PHP to display admin-editable custom image data?

Hello,
I run the latest version of ZenPhoto on my gallery site. On each image page, in addition to the admin-editable description, I would also like to put an admin-editable custom data field for each image. I've tried to use some function mojo, but was unsuccessful.

What I tried:
`<?php printEditable('image', 'custom_data', true, 'custom_image_data', '', true, '', ''); ?>`

If anyone can help, it would really be appreciated.

Oh, and to the people who worked painstakingly hard long hours on developing ZenPhoto: A BIG THANK YOU! I am so surprised it has so many features in such a simple package! Great job.

Thanks,
Michael

Comments

  • So what happens when you do the above? Just by looking, the only thing I can see is that all the existing calls on `printEditable` have left the 4th parameter empty.
  • No custom data shows up on the page. However, it does create a span element to fill with data:
    ``

    This leads me to believe that the custom_data field that it's referring to is not passing on data like it should.
  • Okay, I changed it and now it works:
    `<?php printEditable('image', 'custom_data', true, 'custom_image_data', '(No custom data...)', true); ?>`

    But, when I click to edit it, it comes up in a single-line edit box. How can I make it multiline, like the editable description field?
  • acrylian Administrator, Developer
    I don't remember but that might be done via CSS.
  • Hmmm... I don't think it's possible to convert a single-line text box into a multi-line text area using CSS. I think CSS would just make the single-line text box appear larger.
  • acrylian Administrator, Developer
    Well, either it is a single line input field then you can't do anything or it is a textarea which can be changed via CSS.

    As said I am not familiar with the details of this function but since this is done via JS it might just be the element you use to display the data that is turned to an editable element. And that would be CSS then again for the height/line number (the 4th parameter).
  • Yeah, I think it is a single line text input field. Anyway, not a very big problem. Thanks for the help, and once again: ZenPhoto rocks!
Sign In or Register to comment.