how add some fonction

hi
i have visite somme site use zenphoto script and i have find that there is nice fonction that i do'nt have in my default theme lake

1/Most Popular Images In This Album
2/Top Rated Images In This Album
3/Random Images
4/Latest Images

and more fonction lake in this albums
http://www.wallpaperstock.sk/
plz how can i add this fornction in the default theme

thank you

Comments

  • suxab Member
    Hi josol,

    It is very simple, just use builtin functions of zenphoto (template-functions.php) in Your theme:

    1) `<?php printImageStatistic(6, popular, getAlbumTitle()); ?>`
    2) `<?php printImageStatistic(6, toprated, getAlbumTitle()); ?>`
    3) `<?php printRandomImages($number = 6, $class = 'thumb'); ?>`
    4) `<?php printLatestImages($number = 6); ?>`

    suxab
    http://www.wallpaperstock.eu
  • yosol Member
    sorry but i'm not code in php :(
    plz telme i put the line that you have give to me in any where
    or i change it by the oreginal code in the //template-functions.php//
    i have
    (function printImageStatistic($number, $option, $album='') {
    $images = getImageStatistic($number, $option, $album);
    echo "\n<div id=\"$option\">\n";
    foreach ($images as $image) {
    echo 'getImageLink() . '" title="' . htmlspecialchars($image->getTitle(), ENT_QUOTES) . "\">\n";
    echo '<img src="' . $image->getThumb() . "\" alt=\"" . htmlspecialchars($image->getTitle(),ENT_QUOTES) . "\" />
    \n";
    }
    echo "</div>\n";)
    i change the first line or add this line
    thank you for help
  • suxab Member
    No, dont change template-functions.php, jut add these lines to Your theme files (index.php, album.php, image.php, etc.)

    suxab
    http://www.wallpaperstock.eu
  • yosol Member
    I HAVE TRAY IT BUT I HAVE A BUT RESOLT
    plz can you send me example off your theme to view the change

    thank you a lot
  • acrylian Administrator, Developer
    Where is the problem, just copy the above examples to your theme files. A few small corrections on suxap's examples though:

    1) `<?php printImageStatistic(6, "popular", getAlbumTitle()); ?>`
    2) `<?php printImageStatistic(6, "toprated", getAlbumTitle()); ?>`
    3) `<?php printRandomImages(6); ?>`
    4) `<?php printLatestImages(6); ?>`

    Please take the time to look at our functions guide, too.
  • suxab Member
    Thanks for corrections acrylian, I'm also not a PHP-Guru ;)
    yosol, yes I can send You my theme, but I don`t have any contact to You. It's just a modification of default theme.

    suxab
    http://www.wallpaperstock.eu
  • yosol Member
    ok thank you suxab
    can you use this upload www.awtil.com/kupload

    and send the fils to (lastleonidas[at]gmail[dot]com)
    i hane no way to send you my email by PM becous theresn't personnel messahe in this forum

    thank you a lot for your help i'm very happy for this
    thank you
Sign In or Register to comment.