We relaunched the TWiki.org project with an expanded TWiki charter, and we invite you to participate! The TWiki.org Code of Conduct agreement took effect on 27 Oct 2008. We ask existing twiki.org users to opt-in. You need to opt-in to participate in the Blog, Codev, Plugins and TWiki webs. -- PeterThoeny - 27 Oct 2008
Tags:
create new tag
, view all tags

Question

Problem: I have a Topic that uses images that are displayed with:

<img src="%ATTACHURLPATH%/intro.jpg" alt="intro.jpg" width='758' height='584' />

I have updated Intro.jpg several times over the months so there are 3 revisions. I have also updated the Topic body with new text. When I go back to a previous revision of the Topic text, the latest and greatest into.jpg is displayed. I would like it to display the attachment revision that was in effect when the topic text revision was saved.

I have tried using:

<img src="%SCRIPTURL{viewfile}%/%WEB%/%TOPIC%?filename=intro.jpg;rev=1" alt="intro.jpg" width='758' height='584' />
This works, but it requires I manually update each link when I update the attachment.

Question: Is there code for a link I can use that looks at the revision date of the topic text, and uses this date to display the attachment that has a date not greater than the topic text date? For example. If I want to go back to r6 of my topic text, which has a date of 6/6/07, the img src= will show the Intro.jpg that has the date closest to 6/6/07 without being newer?

Environment

TWiki version: TWikiRelease04x01x02
TWiki plugins: DefaultPlugin, EmptyPlugin, InterwikiPlugin
Server OS: Linux 2.4.21-9.EL
Web server: Apache 2.0
Perl version: 5.8.0
Client OS: WinXP? SP2
Web Browser: FF 2.0.0.12
Categories: Version control, Missing functionality

-- TWikiGuest - 20 Mar 2008

Answer

ALERT! If you answer a question - or have a question you asked answered by someone - please remember to edit the page and set the status to answered. The status is in a drop-down list below the edit box.

An example of what I want to do:

<img src="%SCRIPTURL{viewfile}%/%WEB%/%TOPIC%?filename=intro.jpg;date<=%REVINFO{"$date"}% alt="intro.jpg" width='758' height='584' />

-- TWikiGuest - 01 Apr 2008

Sounds like a useful FeatureRequest.

-- FranzJosefGigler - 01 Apr 2008

Could someone add this to the FeatureRequest topic. I can't do it as TWikiGuest. Thanks.

-- TWikiGuest - 10 Apr 2008

Closing this question after more than 30 days of inactivity. Feel free to re-open if needed.

-- PeterThoeny - 03 Jun 2008

 
Change status to:
Topic revision: r6 - 03 Jun 2008 - 00:42:42 - PeterThoeny
 
TWIKI.NET
This site is powered by the TWiki collaboration platformCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback