Couple questions (tags, theming)

Hi guys,

I've upgraded to the latest night build (1285) and I've got some issues:

1) I can't make tags to show. Each album (not photos) has its own tag(s) but nothing is displayd on the archive page. What could be wrong?

2) Is there way how to change layout of printLatestComments() function except editing the function itself? I'd like to replace link to a photo with small thumb and make another small modifications.

3) Is there a way that logged on zenphoto user (admin) is not asked for the user name (captcha, email) when adding a new comment? He/she would just has to edit only comment field.

4) I'd like to add gravatar support. There's hack somewhere mentioned but the changes to source will be overwritten by a new zenphoto build. Any hint how to make it easier for me? :)

Thanks

Petr

Comments

  • acrylian Administrator, Developer
    1) Could it be that you have less than 10 albums with those tags? 10 is the minimum default value for recognizing tags. It's a template funciton option, so you can change it:
    http://www.zenphoto.org/documentation/Zenphoto/_template-functions.php.html#functionprintAllTagsAs

    2) I don't understand, that function prints thumbnails in form of a html list. Put a div around that function and style it with CSS like you like it.

    3) Makes sense, please open a ticket for that, so that we don't forget it.

    4) What is gravatar?
  • 1) Nope, 19 albums have at least some tag. `<?php printAllTagsAs('list'); ?>` shows nothing. Btw when I go to each album I can see those tags.

    2) yes, at the moment (w/o any CSS style applied) it shows something like that:
    ` by

    `
    Well I'd like have it something like this:
    `: `
    I suppose I'll have to change the function in template-functions.php, right?

    3) I'll do that.

    4) http://www.gravatar.com/ = globally recognized avatar. You register your email there and when a blog or a site supports it, it will show your avatar on that site.
  • acrylian Administrator, Developer
    1) Ok, but only if a single tags is used ten times or more it's recognized by the default value of 10. You have to lower that if you need to. So if you have the tag "picture" 5 times its not shown.

    2) My fault, I somehow read "printLatestImages" instead of "printLatestComments()" (I was working on the first yesterday...:-))
    Yes, unfortunatly you have to hack the function. Seems to make sense to add a getLatestComments function then you would not have to hack anything and can do it in your theme. I will add that to tonight's nightly.

    4) Ok, I don't know how to do that, but I guess that can be down in a theme.
  • 1) ahh, ok, that's it!. Thanks for clarifying :)
    2) Great!
    4) Actually it was mentioned here http://www.zenphoto.org/support/topic.php?id=235&replies=12 I can modify my album.php.
  • acrylian Administrator, Developer
    4) Ah, ok, that old thread I did not know and was before my time with zenphoto...:-)
  • acrylian: just a final question regarding my (1) problem, what's the correct syntax for `printAllTagsAs('cloud', 'tags');` when I want to show tags used at least 3 times? I'm not really smart from the documentation:

    `void printAllTagsAs( string $option, [string $class = ''], [string $sort = 'abc'], [bool $counter = FALSE], [bool $links = TRUE], [int $maxfontsize = 2], [int $maxcount = 50], [int $mincount = 10], [int $limit = NULL] )`

    If you could just show me an example involving all the options. :)
  • acrylian Administrator, Developer
    Like this:`printAllTagsAs('cloud', 'tags', 'abc', FALSE, TRUE, 2, 50, 3)`
  • Cool, works like a charm. Thanks!
  • affa Member
    thanks this thread helped me.
    but I believe the example should be
    printAllTagsAs('cloud', 'tag_cloud', 'abc', FALSE, TRUE, 50, 2, 3);

    (reversed the 50 and 2)

    one question, though - how does the function decide how to make the cloud? that is, how do I get the tags in a cloud to be different sizes like I see on some sites?
  • acrylian Administrator, Developer
    Why don't you just look at our functions guide? "cloud" means tag cloud and "list" means list...
    The values I posted are the default values, if you have only a few tags you probably need to adjust them.
    http://www.zenphoto.org/documentation/Zenphoto/_template-functions.php.html#functionprintAllTagsAs
  • affa Member
    Uh... I did read your functions guide. Several times. I agree with the OP that the documentation isn't exactly enlightening, which is why I posted here. Sorry if I sound defensive here but your post reads really condescending to me - if it wasn't meant that way I apologize.

    I'm not talking about 'cloud' vs. 'list'. I get that. That part is clear both in the docs and on this thread. My question was quite different than that -- I was asking how the cloud itself was MADE, not how to 'select' cloud. I already am choosing 'cloud', but all the words are the same size, and I was asking what the function used to determined which words were bigger than others and which order the words went in. In other words, I'm trying to figure out why my cloud looks more like a list than a cloud, despite having chosen cloud.

    I was wrong about the order of variables - I hadn't noticed you omitted $limit so my eyes played tricks on me since I was reading right to left.
  • acrylian Administrator, Developer
    I am sorry, it was really not meant condescending. I agree that you have to get into that documentation a little to understand it.
    So I try to translate the function description:
    `void printAllTagsAs( string $option, [string $class = ''], [string $sort = 'abc'], [bool $counter = FALSE], [bool $links = TRUE], [int $maxfontsize = 2], [int $maxcount = 50], [int $mincount = 10], [int $limit = NULL] )`

    means simply:
    ` printAllTagsAs("","","", "","", "", "", "","", )`

    As I guessed above you probably have only a few tags assigned, probably less than 10. That is the default value for tags to be shown. If you for example have only 5 times the tag "xy" it is not shown. You could try to adjust the values for maxcount and mincount. You can of course take a look at the function itself within zp-core/template-functions.php.
  • affa Member
    i think we're just mis-communicating, grin. Many thanks for all your help in this thread.

    I understand each of the parameters (though your version above is super-extra clear!)... but my cloud is showing up with all words the same size. Unless I'm misunderstanding something, shouldn't they be different sizes based on usage?

    Is this a problem with my CSS? Or am I misunderstanding what causes some tags to use a larger font than others in a cloud?
  • The size of the tag in the cloud is proportional to the releative frequency of the tag appearances. So, if all your tags show up about the same number of times, they will all be the same size.
Sign In or Register to comment.