Tags:
create new tag
view all tags

Question

I want to automatically attach an image to a topic when that topic is created via a form.

I can calculate the URL of the image I want to attach, but can't figure out how to automatically attach it.

Environment

TWiki version: TWikiRelease04x01x02
TWiki plugins: DefaultPlugin, EmptyPlugin, InterwikiPlugin
Server OS:  
Web server:  
Perl version:  
Client OS:  
Web Browser:  
Categories: Forms

-- HelenJohnstone - 28 May 2008

Answer

ALERT! If you answer a question - or someone answered one of your questions - please remember to edit the page and set the status to answered. The status selector is below the edit box.

Maybe DocumentCentricTopicCreation helps.

-- FranzJosefGigler - 28 May 2008

That sounds me a bit of a template topic (skeleton for topics). To use a topic as template set an html form with one textfield (name of topic) and one hidden input to specify the template topic, example:

<form name="newTopic" action="%SCRIPTURLPATH%/edit/%WEB%/" method="get">
   <input name="templatetopic" type="hidden" value="TheTemplateTopic" />
   Topic Name: <input name="topic" type="text" size="40" />
   <input name="subbutton" type="submit" value="Submit" />
</form>

In the template topic you may insert the image tag. Although that do not guarantee a user won't will remove it from there when going to edit the topic. You may like to place this form in a separate topic and include it on topics you think it can stick conventionally.

For more info check for the related docs in TWiki: TWikiScripts.

-- MarcoSilva - 28 May 2008

Look also at Plugins'TopicCreatePlugin's %TOPICATTACH{}% feature.

-- PeterThoeny - 28 May 2008

Change status to:
Edit | Attach | Watch | Print version | History: r4 < r3 < r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r4 - 2008-05-28 - PeterThoeny
 
  • 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.