Tags:
create new tag
view all tags

SID-00242: Displaying preference values

Status: Answered Answered TWiki version: 4.1.2 Perl version:
Category: CategorySearch Server OS: Last update: 16 years ago

I would like to show all topics where ALLOWTOPICCHANGE has been set and to also display what users this permission was granted to. Using various types of searches I am able to get the topic names to show, but not the values (ie users). Any ideas on how to do this?

Thank you, Fred

-- FredBarnfield - 02 Apr 2009

Discussion and Answer

You can search and apply a RegularExpression pattern to pull the value of ALLOWTOPICCHANGE. Here is an example with renamed variable for obvious reasons:

Now do a search. Here we search just on the current page, but you can search for all pages:

Do a "raw view" to see how this works. The regular expression needs to be tweaked if you want to catch also topic preferences (set in "more" screen).

See also VarSEARCH, FormattedSearch, RegularExpression, TWikiPreferences, TWikiAccessControl.

-- PeterThoeny - 03 Apr 2009

Thank you Peter. Did forget to mention that I have set the topic preferences in the "more" screen. I still can't get the search to work right yet. Below is my latest attempt where I used the $pattern expression you suggested:

%SEARCH{"%META:PREFERENCE.*[A]LLOWTOPICVIEW.*" nonoise="on" format="|$topic|$pattern(.*\* *Set *ALLOWTOPICVIEW *= *([^\n\r]*).*) |" }%

Thank you for any light that can be shed. Fred

-- FredBarnfield - 03 Apr 2009

Sorry, I didn't put the code in right above:

%SEARCH{"%META:PREFERENCE.*[A]LLOWTOPICVIEW.*" nonoise="on" format="|$topic|$pattern(.*\* Set *ALLOWTOPICVIEW *= *([^\n\r]).*) |" }%

-- FredBarnfield - 03 Apr 2009

Sorry, I checked, you can search for topic preferences, but you can't show the values of meta data unless exposed in FormattedSearch. At this time, a limited number of meta data can be shown, such as topic info ($rev, $date etc) and form fields ($formfield()).

If you are a Perl developer you could contribute a $preference() variable to the SEARCH format="" parameter.

-- PeterThoeny - 03 Apr 2009

Thanks so much for your help! Wish I were a Perl developer so I could help out, but I'm a newbie to that side, just now learning a little php. Maybe some day I'll get there! Thanks again.

-- FredBarnfield - 2009-04-04

      Change status to:
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.
SupportForm
Status Answered
Title Displaying preference values
SupportCategory CategorySearch
TWiki version 4.1.2
Server OS

Web server

Perl version

Edit | Attach | Watch | Print version | History: r6 < r5 < r4 < r3 < r2 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r6 - 2009-04-05 - 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.