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
You are here: TWiki> Support Web>HowToViewRawText (05 Dec 2003, DickFurnas)
Tags:
create new tag
, view all tags

Question

Is there a possibility that TWiki users have only Read access to a topic like TWikiPreferences to view raw text? I could image to have a similar page as when I want to edit a topic is locked by an other user. There I have the possibility to view raw data. What must be done to make it possible.

I think that it can be very helpful that users can see how a specific Topic is written to learn from it.

Environment

TWiki version: TWikiRelease01Feb2003
TWiki plugins: DefaultPlugin, CalendarPlugin, ChartPlugin, EditTablePlugin, GaugePlugin, InterwikiPlugin, LocalTimePlugin, PowerEditPlugin, SlideShowPlugin, SmiliesPlugin, TWikiDrawPlugin, TablePlugin
Server OS: Solaris
Web server: apache 1.3.27
Perl version: 5.6.1
Client OS: Windows NT
Web Browser: MS Internet Explorer 5.5

-- ThomasKurz - 02 Sep 2003

Answer

Click on the "More" link and checkmark "view raw" to view the raw text of a topic without a need to edit it.

You can do the same by appending ?raw=on to any topic's view URL. E.g. for this topic, http://twiki.org/cgi-bin/view/Support/HowToViewRawText?raw=on

-- PeterThoeny - 03 Sep 2003

I have put the following in twiki.tmpl :

%TMPL:DEF{"viewraw"}%<a href="http://validator.w3.org/check/referer">&radic;w3c</a>&nbsp;<a href="%TOPICURL%?raw=on"><img src="%PUBURLPATH%/icn/txt.gif" border="0" width="16" height="16" alt="raw text" /></a>%TMPL:END%
and then reference it as follows in view.tmpl :

view.tmpl-%TMPL:P{"standardfooter"}%
view.tmpl-<table width="100%" border="0" cellpadding="3" cellspacing="0">
view.tmpl- <tr>
view.tmpl-  <td valign="top">
view.tmpl:   %TMPL:P{"viewraw"}%
view.tmpl-   Revision %REVINFO% &nbsp;
view.tmpl-   %META{"parent" prefix="<br />Parents: "}%
view.tmpl-  </td>
view.tmpl-  <td width="40%" valign="top">

Note that this adds not only the ability to view the raw text, but also a quick trip to the w3c.org validator for the page.

-- DickFurnas - 05 Dec 2003

Topic revision: r3 - 05 Dec 2003 - 17:21:00 - DickFurnas
 
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