create new tag
, view all tags
It would be nice for those public pages. Basically, if selected, It would look and feel like a normal web page to anyone NOT on the specified User list. IE If It was a newsgroup-based site, and the Admin's user name was Joe, and he's the only Twiki user, then only he is capable of seeing the editing bar. It may give more of a professional look from the front lines, but from the editing lines, it would be the easy to use Twiki interface.

-- JakeGardner - 26 Aug 2003

Similar result by other means - my SimpleSkin is set up with support "Help" skin without most wiki functions, no user might think she is on standard site, yet one click brings other skin with (most - simplified) wiki functions. My goal was exactly as you mentined to create a skin where users do not bother edit - as most of them certainly does.

-- PeterMasiar - 27 Aug 2003

At work we have a setup on selected webs where only certain people can see the edit link. We solved that with a conditional $IF() of the SpreadSheetPlugin. The same technique can be used to show a login prompt if the user is not logged in, or a welcome 'Main.FirstnameLastname' if the user is. Some Plugins like the ConditionalPlugin and SmartSessionPlugin also support conditional rendering.

An alternative is to show a small 6x6 pixel transparent gif image that links to the edit script. This is hide by obscurity, but can be enforced with TWikiAccessControl.

-- PeterThoeny - 27 Aug 2003

That's Easy! Provided you are talking about being authenticated. Lest solve that problem first, eh?

Jut a few tweaks of the template. First make the top bar conditional on being authenticated.

This may need some changes as the details of the template changes with time, but the key things are:

  • Define a slice out of the tool bar or button bar contianing the items you don't want displayed if the user is not logged in
  • Use the "=context=authenticated=' mechanism to conditionally make it visible.

This is the diff wrt the Dakar code of today

*** twiki.pattern.tmpl  2005-10-13 20:34:01.525578555 -0400
--- twiki.pattern.tmpl.noedit   2005-10-13 20:53:41.748214944 -0400
*** 217,223 ****

! %TMPL:DEF{"topicaction"}%%TMPL:P{"topicactionbar"}%%TMPL:END%

--- 217,223 ----

! %TMPL:DEF{"topicaction"}%%TMPL:P{context="authenticated" then="topicactionbar"}%%TMPL:END%

Now the difficult bit comes in the view template.
We need to disable edit and attach but leave print in the toolbar. That means we spit it into two parts, the bit that always shows and the bit that only shows if authenticated. The but that only shows if authenticated I call toolbar_edit. It has the active_edit, inactive_edit, active_attach and inactive_attach.

%TMPL:DEF{"toolbar_edit"}%%TMPL:P{context="inactive" then="inactive_edit" else="active_edit"}%<span class="patternButton">
%TMPL:P{context="inactive" then="inactive_attach" else="active_attach"}% </span>%TMPL:END%

Now I redefine the toolbar so that only if authenticated is the toolbar_edit displayed.

<div class="patternToolBarButtons">%TMPL:P{context="authenticated" then="toolbar_edit" }%<span class="patternButton"><a href="%SCRIPTURLPATH%/view%SCRIPTSUFFIX%/%WEB%/%TOPIC%?skin=print.pattern,pattern%REVARG%" accesskey="P" title="%_{"Printable version of this topic"}%" rel="nofollow">%_{"&Printable"}%</a></span></div>

-- AntonAylward - 14 Oct 2005

Edit | Attach | Watch | Print version | History: r6 < r5 < r4 < r3 < r2 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r6 - 2006-04-29 - 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-2018 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.