zpArdoise: Only last news in frontpage as text

Hi all.
I use Zenphoto now been a while and I'm absolutely thrilled.
Now I create a website just for a friend complete with Zenphoto. (zpAdroise)
On the frontpage of the website to the latest news entry to be seen.
Here the future homepage:
www.foto-hoerl.de/harald/
Since the frontpage an unpublished page created by ZP is my question:
how can I get the latest news in this page as komplet text.
How it works as a link I know, but as a complete text?
Can I create within ZP online when I edit the page?
My English is not so good and the G *** Translation is not really helpful.

Thanks in advance
kalli

edit:
News is called " Seminare"

Comments

  • fretzl Administrator, Developer
    Use `<?php printLatestNews(); ?>` in codeblock 1 of your unpublished page.
    http://www.zenphoto.org/documentation/plugins/zenpage/_zp-extensions---zenpage---zenpage-template-functions.php.html#functionprintLatestNews
    Can I create within ZP online when I edit the page?
    Not sure what you mean.
  • acrylian Administrator, Developer
    I did modify the the title as it more or less addresses a 3rd party theme.

    Regarding the news you can use the latestnews function but you could also use the next_news loop. But in any case you should read the theming tutorial first to learn the basics of Zenphoto theming.
  • I got it.
    Thanks for help.
    @fretzl:
    all previous changes I've made ??with dreamweaver, so the question is whether the online also go directly to the page. The note with the codblock was exactly the right note. Thank you.
    @acrylian:
    I prefer the printLatestNews, that's exactly what I need. Thank you
    and yes, i tried to learn the basics of ZP. :-)
  • fretzl Administrator, Developer
    ...whether the online also go directly to the page
    If you edit your theme online (via the backend), you are in fact editing the files on the server directly.
    If that's what you wanted to know ? ;-)
  • hello fretzl,
    so like all previous changes I've made directly in the inc_header.php inc_footer.php and in custom.css
    (For example socialshareprivacy of Heisse.de) Now I wanted to know if I can change directly via the "backend" printLatestNews in the side This can be taken to the Codeblock1 I did not know until then
    So I have a lot to read to uncover the secrets of ZP ;-)
    Thanks again
    kalli
  • Hi at all.
    one more question:
    is there the opportunity to latestnews sort by date of its validity date and
    view the news with the shortest expiration date on the front page with printLatestNews?
    background of all is the news should be used as a photo-seminars.
    Since the dates may move should be the news with the shortest validity shown at the top of the news list and of frontpage.
  • acrylian Administrator, Developer
    No, latest new is always by published date as in a blog. You would have to code this using the object model.
  • Hello acrylian,
    can i do this in codeblock1 ?
  • acrylian Administrator, Developer
    Yes, you can use any kind of php within a code block. But the theme must have a call for a code block in that place.
  • thank you very much,
    the theme zpAdroise have the call for codeblock1 in that place.
    I`ll try to get the object running.
  • acrylian Administrator, Developer
    Or you just use the print/getLatestNews() functions as mentioned above. Then you don't need to work with the object model directly.
  • would you please be more specific?
    when I print / getLatestNews () functions use, but then the article appears only with the last ID number.
    The indicator that I need is the validity date with the shortest.
    I could also use sitcky, but then I'd always the product "push up" manually.
  • acrylian Administrator, Developer
    print/getLatestNews as the news loop is always sorted by (publish) date descending only. So getLatestNews(1) will get the latest, newest article.
  • Hello acrylian,
    I previously implemented:
    string printLatestNews ([int $ number = 1], [string $ option = 'none'], [string $ category =''], [bool $ showdate = true], [bool $ show content = true], [int $ contentlength = 70], [bool $ showcat = true], [string $ readmore = NULL], [bool $ sticky = true])

    as it is described in the documentation.

    here there is no possibility to sort the news according to their validity date. I see that right?
  • acrylian Administrator, Developer
    I have no idea what the "validity date" is, but if you mean the "expiration date", no.
  • yes, i mean the expiration date.
    online translation is not soo good.
  • acrylian Administrator, Developer
    Ok, for the next time try setting Zenphoto's backend to the English original language to avoid such misunderstandings.

    Fir the expiration date you can of course use queries like you did. But the big drawback is those will bypass any inherited publish or protection status of items (an unpublished/unprotected album within an protected one is also protected but that is not noted in the db of that item!).
Sign In or Register to comment.