Plugin: Recommended
Author: Jon Daley
Release Date: 2006/11/07
Version: 1.1

This plugin prints the "recommended" posts, as assigned by the blog owner.

You can use:
1. $recommended->isEnabled() to check the plugin is enabled or not. 
2. $recommended->getPosts() to get the posts set in the control center.


Example:
Add the following code to panel.template

{if $recommended && $recommended->isEnabled()}
  <div class="sidetitle">{$locale->tr("Recommended")}</div>
  <div class="side">
    <div class="sideitem">
      <ul>
        {assign var=posts value=$recommended->getPosts()}
        {foreach from=$posts item=rec_post}
          <li>
            <a title="{$rec_post->getText()|truncate:150:"..."|strip_tags|escape}"
                href="{$url->postLink($rec_post)}">
               {$rec_post->getTopic()|truncate:32:"..."|strip_tags|escape:"htmlall"}</a>
            [{$rec_post->getNumReads()}]
          </li>
        {/foreach}
      </ul>
    </div>
  </div>
{/if}


TODO:
  Don't require the post ids in the control center administration, but
  maybe a drop down list of posts?
