Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"sticky/pinned" posts #186

Closed
nodiscc opened this issue Apr 4, 2015 · 7 comments
Closed

"sticky/pinned" posts #186

nodiscc opened this issue Apr 4, 2015 · 7 comments
Labels
Milestone

Comments

@nodiscc
Copy link
Member

nodiscc commented Apr 4, 2015

add the ability to mark posts as "sticky", always displayed first on the first link list page.

@nodiscc nodiscc added the feature label Apr 4, 2015
@nodiscc nodiscc added this to the future milestone Apr 4, 2015
@nicolasdanelon
Copy link

+1

@nodiscc nodiscc changed the title "sticky" posts "sticky/pinned" posts Apr 14, 2015
@nodiscc
Copy link
Member Author

nodiscc commented Apr 14, 2015

Would a Bump to top button be enough? (in the edit dialog or in the linklist). Everytime you press this button, the link date is set to the current date (therefore it bumps to the top of the linklist). Maybe this breaks permalinks.

Or store a list of sticky posts in a config variable STICKY_POSTS = array('CfcZe5', 'Oxr_A7', 'drd8cb');. Everytime the linklist is rendered, display these posts first.

Core feature or plugin?

@alexisju
Copy link

Bump to top : no. It risk to be diffcult to have a good setting (how do you choose until when sticky post need to be retrieved, or how many time they will be sticked at the top, etc...)

If it is implemented, it needs to work as private links are managed/displayed when logged in : logged user can identify private links into the full linklist and get only private links clicking on ?privateonly.

We need the same without be logged. This function could be nice by default (because is yet pretty commons to "star" liked content : mail clients, github, twitter, etc...)

@nodiscc
Copy link
Member Author

nodiscc commented Jun 19, 2015

"Bump link to top" button: see https://github.com/shaarli/Shaarli/wiki/Datastore-hacks#changing-the-timestamp-for-a-link

Can we start by adding a starred: key to links in the datastore? Then check if a link is starred during template rendering with

$has_starred = isset($row["starred"]) && $row["starred"] === true;

@ghost
Copy link

ghost commented Dec 30, 2015

I created a github account to +1 this. Bump link to top wouldn't work.

What I've been using as a workaround is setting the date timestamp to "2999" with some template hacks, but there should be a better way (like a star or pin button which edits the date in the background, or preferably add that :starred: key)

@aledeg
Copy link

aledeg commented Apr 17, 2018

Any insight on that feature?

@ArthurHoaro
Copy link
Member

The workarounds in this thread are probably outdated because the IDs aren't dates anymore. I'm bumping the milestone because this shouldn't be very hard to implement. PR are appreciated, as always.

@ArthurHoaro ArthurHoaro modified the milestones: 0.10.2, 0.10.1 May 22, 2018
ArthurHoaro added a commit to ArthurHoaro/Shaarli that referenced this issue May 22, 2018
Meaning that they always appear on top of all links

Fixes shaarli#186
@ArthurHoaro ArthurHoaro modified the milestones: 0.10.1, 0.10.2 Jul 29, 2018
@ArthurHoaro ArthurHoaro modified the milestones: 0.10.2, 0.10.3 Aug 11, 2018
ArthurHoaro added a commit to ArthurHoaro/Shaarli that referenced this issue Oct 6, 2018
Meaning that they always appear on top of all links

Fixes shaarli#186
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants