YOURLS Plugin – Popular Links

UPDATE: This version only works for 1.5-1 and below. Version 1.6 and 1.7 you should go here http://laaatech.com/yourls-plugin-popular-links-1-7

 

Short post, but I have thrown together a short plugin for YOURLS (using a lot of the code from http://gkurl.us/popular) that shows the most popular links created in 1,30,365, and 1000 days on a YOURLS site. It’s based on code from Mrtech, but is now in the form of a plugin.

Download here, save as plugin.php and upload to YOURLS_DIRECTORY/user/plugins/popular-links

 

http://pastebin.com/raw.php?i=NmM9D2Pi

Advanced:

At the bottom of the plugin, you can edit the values

> show_top(1000,5);

1000 means the number of days you are selecting from the database

5 means the number of links you are selecting.

  • david

    I have the following errors, how do you suggest I fix it? Thanks in advance.

    Notice: yourls_plural is deprecated since version 1.6! Use yourls_n instead. in /home/content/44/11042744/html/oxsi.com/s_private/includes/functions.php on line 2023

    Notice: Use of undefined constant host – assumed ‘host’ in /home/content/44/11042744/html/oxsi.com/s_private/user/plugins/popular-links/plugin.php on line 41

  • Laaabaseball

    Doesnt work with 1.6, only 1.5

  • david

    thanks, any pointer as how to fix it? Can you delete my domain name from the public posting as it is still under development. thanks.

  • http://webangel.com.br/ Angélica Costa

    It worked with my 1.6.

  • Dave

    This plugin is no longer compatible with YOURLS as one of the functions it uses (yourls_plural) has been deprecated. You can make the plugin work again by adding the function to plugin.php. Just add the following code:

    function yourls_plural( $word, $count=1 ) {
    return $word . ($count > 1 ? ‘s’ : ”);
    }

    Enjoy.

  • aussiepunter

    Not working with 1.7 but thanks to Dave, adding the yourls_plural function is a simple fix.

    Cheers Dave.