1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

[Docs] Setting Up Posts Widgets

Discussion in 'Getting Started with Hotaru CMS' started by Nick, Nov 18, 2009.

  1. Nick

    Nick Well-Known Member

    This guide explains how to set up widgets to show the latest and best posts on your site.

    Getting and activating the right plugins

    First, you'll need SB_Base, Submit, Vote, Widgets and Posts Widget.

    Here's how they work:

    The Posts Widget plugin contains a number widgets that filter the posts differently, e.g. top, latest, upcoming, best this month, etc. For the purposes of this guide, activate the Posts Widget Top and Posts Widget Latest widgets from Admin->Widgets. Turn off any other Posts Widgets.

    The Posts Widgets plugin should show latest posts in the sidebar of the Home page, and top posts in the sidebar of the Latest page. On all other pages it should show both top and latest posts.

    The default Posts Widgets box looks like this:


    In summary, all Posts Widgets show on every page. However, the Top, Latest and Upcoming boxes are hidden on their own pages.

    Enabling and customizing a small vote box

    Chances are that you'd like the number of votes each post has to show before each link. Easy, just go to Admin -> Vote and check the box for "Show vote count before post widget links". If the votes don't show up, go to Admin -> Maintenance and clear the HTML cache, then reload the page.


    The CSS for the little boxes is in /content/plugins/posts_widget/css/posts_widget.css:

    .posts_widget_vote { float: left; width: 1.8em; text-align: center;  margin-right: 0.5em; }
    .posts_widget_link  { display: block; }
    .posts_widget_indent { margin-left: 2.4em; }
    .vote_color_top { border: 1px solid #d0d0d0; background-color: #f0f0f0; color: #000; }
    .vote_color_new { border: 1px solid #d0d0d0; background-color: #ffffff; color: #000; }

Share This Page