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

Suggestion: Keep the number of displayed links as the default in all current/future sessions. #2339

Closed
YLSnewb opened this issue Dec 15, 2017 · 1 comment

Comments

@YLSnewb
Copy link

YLSnewb commented Dec 15, 2017

Hi.

Quick request for a feature. The default page length of 15 "links" is annoyingly small. I'd like to set a new default length, and have it persist between sessions. For example, if I log in, I get the first 15 links. If I switch that to 50 then click 'Search', add a few links, then click on the 'Admin Interface' link at the top, it reverts back to 15 items per page.

I'd prefer that there was either an easily accessible pop-up menu, or configuration variable to set the default number of links to show -- either from a short list of prechosen values (50 100 200 ALL) or a user defined value.

Thanks.

@YLSnewb YLSnewb changed the title Keep the number of displayed links as the default in all current/future sessions. Suggestion: Keep the number of displayed links as the default in all current/future sessions. Dec 15, 2017
@ozh
Copy link
Member

ozh commented Dec 15, 2017

There won't be a configurable parameter for this in any future version, because there are 10,000 people who think that tiny option and this little feature should be a parameter, and we would end up with a mammoth setting page.

That's exactly why there is a plugin API: to keep things light

Also, while it's perfectly understandable that you don't think you qualify to write a plugin, just be aware why you should not hack core files.

Simple plugin to modify the default number of links displayed :

<?php
/*
Plugin Name: Custom number of displayed links
Plugin URI: http://yourls.org/
Description: Custom number of displayed links
Version: 0.1
Author: Ozh
Author URI: http://ozh.org/
*/

yourls_add_filter( 'admin_view_per_page', 'ozh_custom_number_of_displayed_links' );
function ozh_custom_number_of_displayed_links() {
    return 99;
}

@ozh ozh closed this as completed Dec 15, 2017
@YOURLS YOURLS deleted a comment from PopVeKind Apr 26, 2021
@YOURLS YOURLS deleted a comment from PopVeKind Apr 26, 2021
@YOURLS YOURLS deleted a comment from YLSnewb Apr 26, 2021
@YOURLS YOURLS deleted a comment Apr 26, 2021
@YOURLS YOURLS deleted a comment from YLSnewb Apr 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants