Discussions
Activity
Sign In
How it works
Newscoop Development
sidebar-most.tpl
Vote Up
0
Vote Down
LAUROVICI Daniel
March 2013
Posts: 9
Member
I have this
list_articles length="5" ignore_section="true" order="bypopularity desc" constraints="type is news"
this code show most popular articles all over the time, but I want to show only the most readed articles on that day.
Ex: I post 30 articles on 19.03.2013 and I want in Most Read to show only the article on that day, and same for the day after.
3 Comments
sorted by
Votes
Date Added
Vote Up
1
Vote Down
ljuba rankovic
March 2013
Posts: 156
Member
You can do like this:
{{ assign var="mydate" value=strtotime('-1 day') }}
{{ $mydate=$mydate|date_format:'%Y-%m-%d' }}
and then ad to list constraints date condition:
list_articles length="5" ignore_section="true" order="bypopularity desc" constraints="type is news publish_date greater_equal $mydate"
--
Ljuba Rankovic
Senior Front End Developer, Sourcefabric
ljuba.rankovic@sourcefabric.org
http://www.sourcefabric.org
http://www.twitter.com/Sourcefabric
Vote Up
0
Vote Down
LAUROVICI Daniel
March 2013
Posts: 9
Member
Ok can you tell me where I can learn the framework? And thank you is working.
Post edited by LAUROVICI Daniel at 2013-03-19 09:41:32
Vote Up
0
Vote Down
ljuba rankovic
March 2013
Posts: 156
Member
Newscoop reference:
https://wiki.sourcefabric.org/display/NsLingo/Newscoop+Template+Reference
Smarty 3:
http://www.smarty.net/docs/en/
Newscoop 3.5 cookbook:
http://www.flossmanuals.net/newscoop-3-cookbook-3-5-2/
also, sample themes (New Custodian) have lot of commented code.
--
Ljuba Rankovic
Senior Front End Developer, Sourcefabric
ljuba.rankovic@sourcefabric.org
http://www.sourcefabric.org
http://www.twitter.com/Sourcefabric
Add a Comment
Start a New Discussion
Howdy, Stranger!
It looks like you're new here. If you want to get involved, click one of these buttons!
Sign In
Apply for Membership
Categories
All Discussions
8,397
Sourcefabric
↳
Announcements
25
Newscoop
↳
Newscoop Support
2,189
↳
Newscoop Development
722
↳
Newscoop Security
13
↳
Newscoop Documentation
17
↳
Newscoop Themes
69
Airtime
↳
Airtime Support
3,139
↳
Airtime Development
1,286
↳
Airtime Français
146
↳
Airtime Documentation
14
↳
Airtime Hacks
102
↳
Promote your station!
37
↳
Airtime Security
11
Booktype
↳
Booktype Support
277
↳
Booktype Development
55
↳
Booktype Documentation
7
Superdesk
↳
Superdesk Development
264
↳
Web Publisher
21
Poll
No poll attached to this discussion.
Top Posters
Albert FR
1978
Martin Konecny
1860
Andrey Podshivalov
1526
Voisses Tech
1423
John Chewter
899
Daniel James
844
Roger Wilco
784
hoerich
627
Paul Baranowski
389
Cliff Wang
339