ZenphotoCMS Forum
zpArdoise: Only last news in frontpage as text - Printable Version

+- ZenphotoCMS Forum (https://forum.zenphoto.org)
+-- Forum: Support (https://forum.zenphoto.org/forum-1.html)
+--- Forum: General support (https://forum.zenphoto.org/forum-4.html)
+--- Thread: zpArdoise: Only last news in frontpage as text (/thread-10759.html)



zpArdoise: Only last news in frontpage as text - kalli - 20-01-2013

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"




zpArdoise: Only last news in frontpage as text - fretzl - 21-01-2013

Use `` in [i]codeblock 1[/i] of your unpublished page.
http://www.zenphoto.org/documentation/plugins/zenpage/_zp-extensions---zenpage---zenpage-template-functions.php.html#functionprintLatestNews

Quote:Can I create within ZP online when I edit the page?
Not sure what you mean.




zpArdoise: Only last news in frontpage as text - acrylian - 21-01-2013

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.




zpArdoise: Only last news in frontpage as text - kalli - 21-01-2013

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




zpArdoise: Only last news in frontpage as text - fretzl - 22-01-2013

Quote:...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 ? ;-)




zpArdoise: Only last news in frontpage as text - kalli - 22-01-2013

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




zpArdoise: Only last news in frontpage as text - kalli - 22-01-2013

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.




zpArdoise: Only last news in frontpage as text - acrylian - 22-01-2013

No, latest new is always by published date as in a blog. You would have to code this using the object model.




zpArdoise: Only last news in frontpage as text - kalli - 01-02-2013

Hello acrylian,
can i do this in codeblock1 ?




zpArdoise: Only last news in frontpage as text - acrylian - 01-02-2013

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.




zpArdoise: Only last news in frontpage as text - kalli - 02-02-2013

thank you very much,
the theme zpAdroise have the call for codeblock1 in that place.
I`ll try to get the object running.




zpArdoise: Only last news in frontpage as text - acrylian - 03-02-2013

Or you just use the print/getLatestNews() functions as mentioned above. Then you don't need to work with the object model directly.




zpArdoise: Only last news in frontpage as text - kalli - 03-02-2013

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.




zpArdoise: Only last news in frontpage as text - acrylian - 04-02-2013

print/getLatestNews as the news loop is always sorted by (publish) date descending only. So getLatestNews(1) will get the latest, newest article.




zpArdoise: Only last news in frontpage as text - kalli - 04-02-2013

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?




zpArdoise: Only last news in frontpage as text - acrylian - 04-02-2013

I have no idea what the "validity date" is, but if you mean the "expiration date", no.




zpArdoise: Only last news in frontpage as text - kalli - 04-02-2013

yes, i mean the expiration date.
online translation is not soo good.




zpArdoise: Only last news in frontpage as text - acrylian - 04-02-2013

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