Tags:
access_control1Add my vote for this tag skin1Add my vote for this tag users1Add my vote for this tag create new tag
view all tags

Question

Would it be possible to set a skin specific to a group rather than to a user?

Example:

  • default skin for myweb = customskin
  • skin for members of group AuthorGroup = customskin1
  • skin for members of group PowerGroup = customskin2
  • etc.
And would it be possible to override the group specific skin through a per usersetting?

So the desired order (lowest to highest priority) would be:

  • skin set in TWikiPreference
  • skin set in WebPreference
  • skin set in TopicPreference
  • skin set in GroupPreference
  • skin set in UserPreference
Note: This question was raised in HowToDisableEditIfNoLogin

Environment

TWiki version: TWikiRelease02Sep2004
TWiki plugins: DefaultPlugin, EmptyPlugin, InterwikiPlugin
Server OS:  
Web server:  
Perl version:  
Client OS:  
Web Browser:  
Categories: Installation, Permissions, Authentication, Security, Authorisation, Skin

-- WolfgangAlper - 23 Feb 2005

Answer

I solved this by creating a custom skin with the following:

ALERT! Note: I reformatted this to make it readable, but it needs to all be on one line in the code!

%TMPL:INCLUDE{"view"}%

%TMPL:DEF{"topbarcontents:logo"}%<span id="twikiLogo" class="twikiImage"><a href="%WEBLOGOURL%">
<img src="%WEBLOGOIMG%" border="0" alt="%WEBLOGOALT%" style="border:none;" /></a></span>%TMPL:END%

%TMPL:DEF{"topbarcontents"}%<div class="twikiTop">%TMPL:P{"topbarcontents:logo"}%%TMPL:END%

%TMPL:DEF{"topicactionbuttons"}%
%IF{"$WIKINAME ingroup 'ContributorGroup'" then='$percntTMPL:P{"action_activatable_edit_or_create"}$percnt' else=""}%
%IF{"$WIKINAME ingroup 'ContributorGroup'" then='$percntTMPL:P{"action_activatable_attach"}$percnt' else=""}%
%TMPL:P{"action_printable"}%%TMPL:P{"action_revisions"}%
%IF{"$WIKINAME ingroup 'EmployeeGroup'" then='$percntTMPL:P{"action_backlinks_simple"}$percnt' else=""}%
%IF{"$WIKINAME ingroup 'EmployeeGroup'" then='$percntTMPL:P{"action_raw_or_view"}$percnt' else=""}%
%IF{"$WIKINAME ingroup 'ContributorGroup'" then='$percntTMPL:P{"action_activatable_raw_edit"}$percnt' else=""}%
%IF{"$WIKINAME ingroup 'ContributorGroup'" then='$percntTMPL:P{"action_activatable_more"}$percnt' else=""}%
%TMPL:END%

%TMPL:DEF{"top:toolbarbuttons"}%
%IF{"$WIKINAME ingroup 'ContributorGroup'" then='$percntTMPL:P{"activatable_edit_or_create"}$percnt' else=""}%
%IF{"$WIKINAME ingroup 'ContributorGroup'" then='$percntTMPL:P{"activatable_attach"}$percnt' else=""}%
%TMPL:END%

The Revisions don't work in an IF Statement, though. If anyone firgures that part out, I'd love to see it!

-- JamieBenjamin - 2009-04-09

Can somebody give me a advise, where is this code located? I guess it is the same place, where should be written the command %TMPL:DEF{"viewleftbar"}%%TMPL:END% from the topic TWiki/PatternSkinCustomization#I_want_to_hide_the_left_bar but where is it ??? Thanks Jaromir Houdek

-- JaromirHoudek - 2009-04-24

Jaromir: Per the instructions in PatternSkinCustomization, I created a new template. Then I looked at (but did not modify) the pattern.view.tmpl file to get the syntax and I copied the parts I needed into my new template before making any modifications. When I was finished, I uploaded my new template to the template directory, and changed the WebPreferences to point to mytemplate,pattern.

-- JamieBenjamin - 2009-04-27

Thank you Jamie, I obtained the rights for work inside PC where TWiki is installed and the things improved. The admin rights for TWiki are not sufficient for the page customization smile

-- JaromirHoudek - 2009-04-28

My question from 4/9/2009 still stands. Anyone know how to restrict view access to the Revision History? Many thanks.

-- JamieBenjamin - 2009-05-11

Closing this question after more than 30 days of inactivity. Feel free to reopen if needed. Consider engaging one of the TWiki consultants if you need timely help. We invite you to get involved with the community, it is more likely you get community support if you support the open source project!

Best to open a new support question with details.

-- PeterThoeny - 2009-07-05

Reopening this question because my question has not been answered. Why post a new support question and start all over, when the history and context is here? What is the incentive, when you'll most likely close that one too, if no one responds?

Please don't refer me to advertisements. I'm not interested in paying someone to do my work. I'm interested in learning how to do it myself, which is what this forum is for (I thought).

If no one has an answer for me, fine. In the past, I thought about finding some other software package that perhaps would be more user-friendly and have better online support. Perhaps I should consider that again.

Convince me otherwise.

-- JamieBenjamin - 2010-08-11

I finally figured it out! Insert the following in place of

%TMPL:P{"action_revisions"}%
%IF{"$WIKINAME ingroup 'ContributorGroup'" then='[[http://YOURURLHERE/twiki/bin/rdiff/%WEB%/%TOPIC%][History]]: %REVISIONS% <span style="color:#eae2ea;">%VBAR%</span> ' else=""}%  

-- JamieBenjamin - 2010-09-14

Thank you Jamie for sharing your solution with the community!

-- PeterThoeny - 2010-09-14

Edit | Attach | Watch | Print version | History: r12 < r11 < r10 < r9 < r8 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r12 - 2010-09-14 - 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-2025 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.