开发者

Making an upcoming / front page view in Drupal 7

I would like to make a site ala failblog.org where users submit content and vote on content

what I would like to do is

a. add a field to node / article called lets say 'front_page_at (date_time)'

b. every say 15 minutes calculate the average score for all nodes created in the last 48 hours and

c. set front_page_at = now for each node with scor开发者_运维知识库e higher then this average.

so now I can have a view showing front_page_at is not null sorted desc for the front page and front_page_at is null sorted by creation datetime for upcoming.

can anyone point me to how to achieve that ? where to run this averaging code etc ?


You could do something approximating what you're looking for by starting with the Voting API module, in conjunction with on of the various voting module, such as Fivestar or Vote Up/Down.

You could then use the Views module to create a view for your front page, which displays items newer than X number of days that reach a particular threshold.

If you have to have the averaging and scheduling, you may be able to do that using the Rules module. If not, you may need to write a custom module for that.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜