Skip to content
This repository has been archived by the owner on Nov 28, 2018. It is now read-only.

nuevephp/tagger

Repository files navigation

License

This plugin is dually licensed under the MIT and GPL license models. For more information view the license_overview.txt file in the license folder.

Introduction and Brief History:

The tags idea was brought to light back in February of 2008, before the functionality was even fully implemented within Frog CMS. The idea was put to the side due to this lack of functionality, but was brought back to centre stage at the end of June, 2008 and blossomed from there. It was quickly picked up as a great idea by BDesign, easylancer (silentworks), and mvdkleijn (in alphabetical order) on the Frog CMS forum and with much discussion between them and help from many others, Tagger was born in its early state at the beginning of July, 2008.

In mid-October, 2008, the plugin was brought back into the spotlight and needed updates to bring it up to speed with the quickly developing Frog. mtylerb and easylancer (silentworks) began working together and fixed issues that had surfaced in the few months it had been around. In mid-November, 2008, the plugin was finally ready for re-release!

After the fork of Wolf CMS from Frog in July 2009, this plugin was first ported to the new system in August 2009.

Credits:

  • BDesign
  • David
  • easylancer (silentworks)
  • Jonas
  • mtylerb
  • mvdkleijn
  • phillipe

Installation:

  1. Place this plugin (as a directory named 'tagger' with all contents) in the Wolf /wolf/plugins directory.
  2. Activate the plugin through the administration screen.
  3. The plugin should automatically be ready to use, go to the next steps only if you can't find the Tags page or Tag snippet.

Use Below for Manual Install Only

  1. Create a snippet with the information in Snippet Code step below.

  2. Use the code(s) below in a page/snippet/layout to produce the desired effect.

    includeSnippet('snippetname'); ?>

Note: snippetname will be the name you give your snippet.

  1. Snippet Code

     <h3>Tag Cloud</h3>
     <?php Tags::render(array('type' => 'cloud')); ?>
    
    • Snippet options are cloud, count and you can also leave it empty.
    • Count is just a list with the number of items tagged with the tag next to it eg. news(1)
    • Leaving it blank is the same as count without the number eg. news
  2. Article Code Create a new article and add this code below inside it:

     <?php $pages = $this->tagger->pagesByTag(); ?>
     <?php if($pages): ?>
     	<h3>You are viewing pages in "<?php echo $this->tagger->tag(); ?>"</h3>
     	<?php foreach ($pages as $page): ?>
     	<div class="entry">
     	  <h3><?php echo $page->link(); ?></h3>
     <?php echo $page->content(); ?>
       <p class="info">Posted by <?php echo $page->author(); ?> on <?php echo $page->date(); ?>  
          <br />tags: <?php echo Tags::tag_links($page->tags(), array('delimiter' => ', ')); ?>
       </p>
     	</div>
     	<?php endforeach ?>
     <?php else: ?>
     <h3>There are no pages tagged with "<?php echo $this->tagger->tag(); ?>"</h3>
     <?php endif ?>
    
  3. Ensure you set this Page Type to Tagger.