Arc Forumnew | comments | leaders | submitlogin
Create a "sticky" post in news.arc
2 points by thisisdallas 4417 days ago | 3 comments
Hi, I am trying to get an installation of news.arc up and running. So far, everything is going great but I do have a quick question. Is there a way to create a post that has comments turned off and is always at the #1 spot? This is for a FAQ/guidelines post.

I thought about just making the post and then adding a lot of karma but, karma decreases in value as time goes on. Looking at the generated file for the store, there seems to be certain keys e.g. locked and nokill. Would a key be what I am looking for?

Thanks for the help!



2 points by akkartik 4417 days ago | link

The list of stories on the frontpage is generated by the function topstories. That's where you'll want to join a sticky post, either hardcoded or saved in a separate file like the arc/news/topstories file.

Disabling comments seems a little more involved. You'll need to add an attribute (say allowcomments) to the item deftem, and then check for it in:

a) displaying the commentlink in display-story, and

b) comments-active, which is checked before displaying the comment-form

Let me know if this makes sense. If you get it working, send a pull request to https://github.com/arclanguage/anarki!

-----

2 points by thisisdallas 4417 days ago | link

Ok, great, thanks for reply! I'm still really new to arc so, to be honest, it doesn't really make sense without looking at the actual. Hopefully, later today/this week, I will have some time to sit down and really look into things. Once I get something functioning I will definitely send a pull request.

-----

1 point by akkartik 4416 days ago | link

Great. Definitely ask us more questions as they come up. I wasn't sure how much you already knew but we can dig into details as you need them.

Also, you might find this site useful for documentation about join and other arc vocabulary: http://arclanguage.github.io/ref/fnindex.html

-----