Tags:
create new tag
view all tags

Module name TWiki::Access AttachDotPm
Location TWIKIROOT/lib/TWiki/Attach.pm
Summary File attachment functionality
Primary Author PeterThoeny
CVS history CVS:lib/TWiki/Attach.pm
CVS alpha CVSget:lib/TWiki/Attach.pm
Contributing authors (see CVS History)
Is Class NO
First Release to be filled out
File Hierarchy
  TWIKIROOT
  lib
  TWiki
  Attach.pm

Purpose

To manage attachments on TWiki topics

Used by

This module is primarily used by ...

Note: Below documentation is extracted from the currently installed TWiki::Attach Perl module by the PerlDocPlugin

package TWiki::Attach

A singleton object of this class is used to deal with attachments to topics.

ClassMethod new($session)

Constructor.

=begin twiki

ObjectMethod finish()

Break circular references.

ObjectMethod renderMetaData( $web, $topic, $meta, $args ) -> $text

Generate a table of attachments suitable for the bottom of a topic view, using templates for the header, footer and each row.

  • $web the web
  • $topic the topic
  • $meta meta-data hash for the topic
  • $args hash of attachment arguments

ObjectMethod formatVersions ( $web, $topic, $attrs ) -> $text

Generate a version history table for a single attachment

  • $web - the web
  • $topic - the topic
  • $attrs - Hash of meta-data attributes

ObjectMethod getAttachmentLink( $user, $web, $topic, $name, $meta ) -> $html

  • $user - User doing the reading
  • $web - Name of the web
  • $topic - Name of the topic
  • $name - Name of the attachment
  • $meta - Meta object that contains the meta info

Build a link to the attachment, suitable for insertion in the topic.

Please see CodevDocumentationProject and CodevDocumentationProjectDev for comments on the format of these pages.

Contributors:
-- MartinCleaver - 23 Jun 2002
-- PeterThoeny - 02 Feb 2004

Discussions

Switched to using PerlDocPlugin for function-level documentation, and set parent topic to CodevDocumentationProject.

-- WalterMundt - 01 Feb 2004

Any idea why there is a newline before the attachment table? Line 74:

$text = "\n$header$metaText\n\n";

-- ArthurClemens - 10 Apr 2004

Any reason why I shouldn't make Attachment dynamically attach everything found in the appropriate pub directories?

-- MartinCleaver - 15 Oct 2004

Yes, meta-data in the topics. Wait for LocationLocationLocation, which encapsulates attahcment handling code much better and would be a better starting point (good idea, BTW!)

-- CrawfordCurrie - 15 Oct 2004

Should I assume you mean because MetaData can only be accessed if you access the topic as well?

-- MartinCleaver - 15 Oct 2004

Edit | Attach | Watch | Print version | History: r12 < r11 < r10 < r9 < r8 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r12 - 2006-05-01 - SamHasler
 
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2026 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.