Top 10 v1.9 and v1.9.1

Top 10 widget

The latest version of my popular posts plugin Top 10 is now available for download. Existing users can quickly upgrade this from within your WordPress Dashboard. New users can get the plugin by searching for “Top 10″ from Plugins > Add New.

Top 10 will count the number of page views on your single posts on a daily as well as overall basis. You can then display the page view count on individual posts and pages as well as display a list of most popular posts based on page views.

 New WordPress widgets

If you’ve been using the Top 10 WordPress widgets, you’ll notice that you can now customise the widgets. This version consolidates both widgets into a single one and you have several different options available to you.

Top 10 widget

Change the drop down from Overall to Custom Time Period and you can switch to the Daily widget. Note that this upgrade will require you to re-add the Daily widget and update the preferences of your normal Popular Posts widget.

Custom CSS

If you’ve been using my other plugin Contextual Related Posts, you will be familiar with this option. You can add your own custom CSS code here that will allow you to style the output of the plugin. Check out the FAQ for various CSS classes and IDs available to style.

Top 10 Custom CSS

Maintenance options

Using this period of a long period of time causes your daily posts database to accumulate a lot of historic data. This has its performance impact, especially on highly active sites.

v1.9 brings you the option of regularly cleaning up the daily posts database at fixed intervals of time.

Top 10 - Maintenance

Future versions will include a more advanced cleaner that will retain select amounts of historic data.

If you’re using more than 1 Day as your “Daily” option please do not use the scheduler as this resets the daily table when run.

Note: WordPress automatically executes the cron job when it is scheduled the first time. Hitting “Save Options” will clean your daily post table when the options are saved if you have the “Enable scheduled maintenance” active.

If you have any support questions, please post these in the support forum.

Summary of changes in v1.9

  • Added: Option to use timthumb to resize thumbnails
  • Added: New variable %overallcount% that will display the total pageviews on the blog across all posts
  • Added: Post thumbnails are now properly resized based on width and height settings in the Top 10 settings page
  • Added: Customise what to display when there are no top posts detected
  • Added: New scheduled maintenance to clear up daily tables and optimise performance
  • Added: Custom CSS code to style the output. Check out the available styles in the FAQ
  • Modified: New “default.png” file based on from KDE’s Oxygen icon set
  • Modified: Dashboard list of posts now displays all the top posts and pages instead of the filtered list based on Settings.
  • Modified: Dashboard widget now has options to customise the widget. Old widgets have been deleted
  • Modified: When fetching the first image, plugin ignores external images
  • Modified: Minor performance tweaks

Summary of changes in v1.9.1

  • Fixed: Plugin will now only reschedule the cron job if there any settings are changed related to it
  • Modified: If timthumb is disabled, WordPress post thumbnails are no longer resized using timthumb
  • Modified: Extra check for post featured thumbnails to ensure that the src is not missed

 

39 thoughts on “Top 10 v1.9 and v1.9.1

  1. Ajay, it looks like the upgrade may have failed for me. I got these errors:

    ALTER TABLE wp_top_ten DROP COLUMN accessedid
    Can’t DROP ‘accessedid’; check that column/key exists
    ALTER IGNORE TABLE wp_top_ten ADD PRIMARY KEY (postnumber)
    Multiple primary key defined
    ALTER TABLE wp_top_ten_daily DROP COLUMN accessedid
    Can’t DROP ‘accessedid’; check that column/key exists
    ALTER IGNORE TABLE wp_top_ten_daily ADD PRIMARY KEY (postnumber, dp_date)
    Multiple primary key defined

    After that the Daily Popular stopped displaying (I waited for a while for it to get populated but still nothing). So I restored my database and reverted to the previous version for now.

    • Bryan,

      Can you check what’s the database structure is for wp_top_ten_daily database?
      The error above looks like the table was already modified.

        • Bryan, there is one option that needs resetting as well.

          In your wp_options table please find tptn_db_version and edit the value to 2.9.

          Then try to upgrade again.
          Ofcourse. Remember to backup.

          • I changed that number in the database and the install ran fine. After dragging the new widget into the sidebar, everything worked great. However, I’d probably bet a million dollars that the top question is going to be “how do I get the text to wrap around the thumbnail?” I’m familiar with the “Beautify” CSS (I modified it a bit for my own Contextual Posts and it looks great) but I think most people will want the wrap around in this case. I’ll play around with it but if anyone else figures it out I hope they’ll post the CSS. Thanks again for a great upgrade!

          • Bryan, am pretty sure I’ll have a few questions about that even though this feature has existed for a while. The best part about using both Contextual Related Posts and Top 10 is that the code is built exactly the same, which means all you need to do is add , tptn_XXX for its crp equivalent. But, I’ll probably make a post about that.

  2. I think this new upgraded failed to me.. i dont see the widget top 10 at my widget area.. also the count visit not be show at all my post..

      • alright.. i got it.. for the sideabar widget, can the title popular post change to daily popular? or its will count for popular post?

        for the counted visit still not appear at post page.. its will take time? for the maintanance options i follow from your screenshot..

        #sorry for my english

          • Hello Ajay.. Now i know why i dont see total count visit at my post page.. if using cloudflare service, the count visit didnt show at my post page.. did u have a solution for me about this?

          • Haz, am not sure how exactly cloudflare works with your blog. For the count visit all the plugin does is tap into the content of the post and add to it. Isn’t cloudflare only for images etc?

  3. TimThumb doesn’t seem to work for me, so I unchecked it. The question is: do the widgets pay attention to that option? It seems like the widget is still using TimThumb.

        • Hi Ajay,

          Just to clarify a bit, in case there are others with the same problem: I use Plesk, which likes to tag every wordpress file with group owner “psacln”. Since “apache” is running the process, it doesn’t get into the cache directory. In my case I just change the group owner (or get your admin to do it if you don’t have permissions) to “apache” and then set permissions on the cache directory to 775. Problem solved, and the thumbnails come back!

          - Bill

  4. After upgrade, top10 doesn’t display images. It try to get image from path wp-content/plugins/top-10/timthumb/timthumb.php?src=&w=150&h=150&zc=1&q=75 even, when timthumb is unchecked…

  5. Hi at all,

    I think, I’ve made the update to quick. :-( We have many external images in our posts, unlisted in WP. Because our default theme doesn’t support thumbs, it’s not so important. More important is the first pic in the post for listings in social media, rss aso.

    after update to 1.91 we know have the prob, that there is no way to preset an external pic as a thumb with wp. all urls are allowed in timthumb, but there is no result in .urlencode($postimage).

    Top 10 1.91 creates an url like =
    http://www.atase.de/blog/wp-content/plugins/top-10/timthumb/timthumb.php?src=&w=96&h=96&zc=1&q=75

    but it must be=
    http://www.atase.de/blog/wp-content/plugins/top-10/timthumb/timthumb.php?src=http://p51964.typo3server.info/uploads/pics/lebensmittel-spekulation-kriminell.jpg&w=96&h=96&zc=1&q=75

    used with WordPress 3.4.1.

    Regards
    Simone

    • Simone, the new plugin code I had put it excludes the first image if it is external, because timthumb used to break down with this.
      Do you have WordPress post thumbnails set? That is the best option.

      • Hmmm. That’s stupid … In principle? Or you can offer it as an alternative?

        Another question: in 1.8x the thumbssize was proportional scaled, now I’ve only quadertiles and small icons are blowing up to the size 96×96…That’s a feature from top10 or from timthumb?

        Regards Simone

        • Regarding the external images, am not sure why a user would want to link to external images? Unless maybe its from Flickr or similar.

          Am not keen on modifying timthumbs default settings because to do it dynamically would require some headroom on fetching WP settings, which is in turn slows down sites.
          timthumb has the option for a certain default popular external sites. I’m planning to add this set to the plugin so I don’t restrict timthumb.

          Another setting I plan to add is, that if you disable timthumb then the plugin lets you fetch external images (though am not sure it is a good idea that a post needs to have external images)

          About the proportional scaled, it is because timthumb is used to scale thumbnails as well. You can disable this by adding remove_filter('tp10_postimage', 'ald_scale_thumbs'); to your functions.php or just disabling timthumb.

          • Thx. for your answer.

            >> Regarding the external images, am not sure why a user would want to link to external images?
            No, I think, plugs like Press it, reblogging with deeplinks etc. webspace and traffic will support the hosting from external freehosters.

            If I disable timthumb, than I’ve still the prob on pages without wp-thumb or with external pics, that there is only the sign for broken pic. reason: img src=”Array” …

            Regards
            Simone

          • The external pics rule will still apply in this case, until I put the new code in. Am on your blog and I see the images in the left displaying fine?

  6. One issue with the new Daily Popular widget is that it works when I have it set to Overall, but when I select Custom Time Period and enter 1 day, I get no results, even after waiting for hours. The old plugin reset itself at midnight, which was great, and then started new results. That’s how it should work but I can’t get the new one to do that. Is there some other setting that might be affecting this? Thanks.

    • Bryan,

      Can you check your wp_top_ten_daily table to see if it gets updated when you browse your site as a guest, i.e. logged out?

      I think you’ve set it to always display the dynamic widget i.e. “Force daily posts’ list to be dynamic?”. Could you please disable this and check. I think that’s where the problem lies.

      • Once I disabled the “Force daily posts’ list to be dynamic” it starting working properly. It reset itself and started over again with the true daily popular posts. Thanks!

        • Bryan, thanks for the update. In my link above, do you notice the same set of post as is currently on your site?
          The dynamic widget is limited in settings because of security (until I find a better solution)

      • Regarding the SEO benefits, here’s the issue. When I added Contextual Related Posts I set it up to show 9 images on each post. Since I have 9000 posts, that means I suddenly shoved 81,000 thumbnails/links into Google. On top of that, when I added Top Ten on every page that generated 90,000 new links, all of which are duplicate links that are already in Google. We need “no follow” to block Google from spidering these links otherwise we’ll get penalized for spamming.

  7. Hi Ajay,

    thx for visiting. To speed it up we enabled timthumb again and set zc=3.

    If you look for ex. on http://www.atase.de/blog/menschen/hans-zimmer/ you’ll see only inlines from wikipedia. All pics are external. Because german law also forbids thumbs cc-by-sa-30 without the name by the fotographer, we have to generate other free pics for thumbs. Using commons from wikipedia it’s an expensive risk. :-(

    Regards
    Simone

  8. okay so i have edited my widget to custom time period, put 3 days on it and still it doesn’t show daily traffic. Even in dashboard it’s not showing daily traffic.

    What am I doing wrong?

Comments are closed.