The day is finally here! I ‘finished’ my very first add-on and decided to share it with y’all.
While I said I ‘finished’ it, it is far from perfect. But what better way to perfect smething by getting feedback from other people? I know it is still missing some features like managing tags amongst others, but that was outside the scope of this add-on. For the moment it is not yet compatible with Brandon Kelly’s Gypsy extension, but I’m planning on including that in a future version.
You can grab a copy from github to play with.
Description
Tagging weblog entries Twitter-style. Adding tags to a weblog entry is as simple as prefixing a word with a hash (#). You can specify per weblog if a field should be harvested for tags. Tags are accesible through a {tags} loop when displaying entries, very much similar to the {categories} loop.
Info
This extension makes use of the fabulous Morphine theme made by Leevi Graham from Newism which you will need to download and install as per instruction.
For now this extension is only available for ExpressionEngine 1.6.x
Usage
After installing and enabling the Twagger extensions, you can choose which weblogs and which fields you want to harvest tags from. This can be done on the extension settings page. (See attached screenshot)
Twagger doesn’t require you to learn a new set of tags as it ties right into the weblog module. Displaying tags is very similar to displaying categories.
{tags}
{twagger:tag},
{/tags}Parameters
I’ve tried to keep it as simple as possible and used parameters also available in native EE modules.
limit => Limits the amount of tags displayed, defaults to 25
sort => Sets the sorting of tags, defaults to ASC
backspace => Remove characters from the last iteration of the tags loopVariables
All the variables are prefixed with twagger:. This was necessary to prevent any conflicts with the native EE variables. The {tag} variable didn’t have a need for this, but I did it anyway for the sake of consistency.
twagger:tag => Text of the tag
twagger:total_results => The total number of tags being displayed
twagger:count => The "count" out of the current tags being displayed
twagger:switch => Works identical to the switch tag in the weblog entries loopExample
<section id="articles">
{exp:weblog:entries}
<article>
<h5>{title}</h5>
{summary}
{body}
{extended}
{tags limit='5' sort='desc'}
{if twagger:count == 1}<ul>{/if}
<li class="{twagger:switch='odd|even'}">{twagger:count}. {twagger:tag}</li>
{if twagger:total_results == twagger:count}</ul>{/if}
{/tags}
</article>
{/exp:weblog:entries}
</section>
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.