ZpFocus13- Comments- SlideShow+description

I'm testing zpFocus13 theme. ZpFocus13 does not seem as mature as Zenpage but the look is interesting and I like the way used for its slideshow.

Two questions:
1- The comments are not displayed at first. The is the label "Comments (x)", x being the number of comments. When clicking on the label, it expands itself and display all the comments plus the form to add a new one. Is it possible to display at first expanded ?
The code is:
`
[code]<?php if (function_exists('printCommentForm')) { ?>
<?php echo gettext('Comments'); ?> (<?php echo getCommentCount(); ?>)

<?php printCommentForm(); ?>

<?php } ?>
`
2- Is it possible to easily display the description of the photo when running the slideshow, either over it, either below it ?

Thanks,

Gaston

Comments

  • acrylian Administrator, Developer
    Just to note, the slideshow of zpfocus uses the Colorbox script (while the standard slideshow uses the Cycle script) that also comes with Zenphoto. It would quite be possible to set that up for the Zenpage theme as well. Just some work, maybe even possible to copy it over.

    However, zpfocus is indeed a great theme as is gjr's 2nd zpGalleriffic. And we really appreciate that he maintains both actively.
  • Thanks Malte

    I'm right now reading the Howto theme docum

    There is a reference to toggleComments(), but (it's probably me)I don't see how to display expanded at first. You know how to do it ?

    Gaston
  • gjr Member
    1. zpFocus does not use the same engine to toggle comments as the standard supported themes. It shows the comment box hidden via css {display:none;}, then uses js to show/slide {display:block;} when the link is clicked. You would need to change the css and js to show initially (display:block}.

    2. I guess you could add the image/album print (or echo get) description function where it just shows the image title now.
  • Thanks JGR. It's a very good theme. Congratulations!.

    1-Therefore, in ZpFocus31 directories, I would have to make a change to the CSS and js ? Would it be possible to add an argument to toggleComments() in order to tell the function to start expanded or compressed ?
    2-Your suggestion of looking at the way the title is displayed is a very good... I should have thought about it by myself...:-(
    Do you think there is a way, with Colorbox, to have the description "over" the picture ?

    Thanks,

    Gaston
  • Finally, I'm unable (at this time) to add the description to the title so I would have both displayed on every slide-show image. I don't understand the process going around ColorBox.

    Could someone give me a hand ?

    Thanks

    Gaston
  • Ok, I got it after some try&error

    `" rel="slideshow" href="<?php echo htmlspecialchars(getFullImageURL());?>" title="<?php echo "[".getBareImageTitle()."]"." ".getBareImageDesc();?>"><?php echo gettext('Diaporama'); ?>`

    But this not very nice if the description is too long for the picture width: the description goes over slideshow controls.

    Somebody can help me with that one ?

    Thanks

    Gaston
  • You can use a function to truncate the desciption. Probably the best choice would be the `shortenContent()` one, but there is also `truncate_string()`
  • acrylian Administrator, Developer
    Colorbox is just not meant to show longer texts. If you want more space on the slide you probably have to make your own theme. (Colorbox is themable!).
  • In fact the length is dependent on the picture width...
    When the photo is wider, there is no problem, but sometimes, they are narrow and the description doesn't fit the available space.

    Therefore I think I have to get the width of the picture, estimate the number on characters I can fit on the first line,cut the description, do a new line and print the remaining characters on a second line ?

    Gaston
Sign In or Register to comment.