zenphoto forums » Usage Support

Tell PHP to display admin-editable custom image data?

(8 posts)
  1. arduino

    Junior
    Joined: Jun '09
    Posts: 9

    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

    Posted 3 years ago #
  2. Zenphoto development team
    sbillard

    Chief Developer
    Joined: May '07
    Posts: 9,766

    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.

    Don't forget to read the Forum rules and usage resources
    Posted 3 years ago #
  3. arduino

    Junior
    Joined: Jun '09
    Posts: 9

    No custom data shows up on the page. However, it does create a span element to fill with data:
    <span class="zp_uneditable zp_uneditable_image_custom_data"></span>

    This leads me to believe that the custom_data field that it's referring to is not passing on data like it should.

    Posted 3 years ago #
  4. arduino

    Junior
    Joined: Jun '09
    Posts: 9

    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?

    Posted 3 years ago #
  5. Zenphoto development team
    acrylian

    Developer
    Joined: Jul '07
    Posts: 13,341

    I don't remember but that might be done via CSS.

    Don't forget to read the Forum rules and usage resources
    Posted 3 years ago #
  6. arduino

    Junior
    Joined: Jun '09
    Posts: 9

    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.

    Posted 3 years ago #
  7. Zenphoto development team
    acrylian

    Developer
    Joined: Jul '07
    Posts: 13,341

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

    Don't forget to read the Forum rules and usage resources
    Posted 3 years ago #
  8. arduino

    Junior
    Joined: Jun '09
    Posts: 9

    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!

    Posted 3 years ago #

RSS feed for this topic

Reply

You must log in to post.