Next:
Yawns::User
Previous:
Yawns::Submissions
 [Table of Contents]

Yawns::Tags



NAME

Yawns::Tags - A module for working with all the tags used upon the site.

SYNOPSIS

    #!/usr/bin/perl -w

    use Yawns::Tags;
    use strict;

    # Get all tags used upon this site.
    my $holder   = Yawns::Tags->new();
    my $all_tags = $holder->getAllTags();

DESCRIPTION

This module contains code for working with the combined list of tags used upon the site.

Tags may be placed upon three things:

Articles
Pending Article Submissions
Polls
Weblog Entries
Each of these is stored in the same table, with a "type" column which identifies the type of tag. The key is "a"rticles, "s"ubmissions and "w"eblogs respectively.

So far there is a fair amount of duplication within this class, and there is some poor organisation, this will be resolved shortly.

new

  Create a new instance of this object.

getTags

  Return an array of tags used upon a given article, poll, submission,
 or weblog entry.

addTag

  Add a tag to the given article, poll, submission, or weblog entry.

deleteTags

  Delete all tags on the given article, poll, submission, or weblog.

promoteSubmissionTags

  Move any tags which are associated with a pending submission from
 that onto the article which has just been posted.

  This preserves the tag content, and the tag owner.

getAllTags

  Return a hash of all the tags which have been applied upon this
 site.

  This makes no distinction between the target of the tag.

  (The type argument is optional.)

getAllTagsByType

  Return all the tags upon the given element, by type.

getRecent

  Return a hash of all the tags added recently.

  This includes those added to articles, polls, submissions, and weblog
 entries.

getTagTypes

  Return the type of tags which are in use upon the site.

findByTag

  Find all items which match the given tag.

getRelatedTags

  Get tags related to the specified one.

invalidateCache

  Invalidate the cache of recent weblogs.

AUTHOR

Steve Kemp

http://www.steve.org.uk/

LICENSE

Copyright (c) 2005,2006 by Steve Kemp. All rights reserved.

This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. The LICENSE file contains the full text of the license.


[Top] Generated by HTML::FromPod 0.49 on Fri Nov 21 03:03:58 2008