Tags:
create new tag
view all tags

Question

Hi,

what I want to do is, generate an address list table in the web "Forum" with Name street, city, phone, instrument from registert users pages.

You suggested to create in the register page the items, which becomes bullets on the userpages. These can be searched with %search .... Pardon that I am not that smart to have understood the search syntax fully already. Could you give me a search line what would work for that? I think that would be intesting for many others too and a good help line in the documentary. Thanks a lot.

Environment

TWiki version: TWikiRelease01Sep2004
TWiki plugins: DefaultPlugin, EmptyPlugin, InterwikiPlugin
Server OS: debian/alpha
Web server: apache 1.3.26
Perl version: 5.6.1-8.7
Client OS: linux
Web Browser: mozilla, konqueror
Categories: Search

-- JensRoeder - 29 Oct 2004

Answer

You can do it, but it is fraught with danger. Here's an example, using different field names.

It is dangerous because people alter structure of the page and then the searches fail, or if you want to add new fields then they don't get picked up.

%SEARCH{"Enrolment Type: %URLPARAM{EnrolmentType}%;.*Graduating Year: %URLPARAM{Year}%;" nosummary="on" regex="on" excludetopic="Every.*|Web.*" header=" | *Person* | *Mobile* | *Email* | *Yahoo ID* | *Msn ID* | *Icq ID* | *AOL ID* | " format=" | $topic | $pattern(.*?\*.*?Mobile Number\:\w*([^\n\r]+).*) | $pattern(.*?\*.*?Email\:\w*([^\n\r]+).*) | $pattern(.*?\*.*?Yahoo ID\:\w*([^\n\r]+).*) | $pattern(.*?\*.*?Msn ID\:\w*([^\n\r]+).*) | $pattern(.*?\*.*?Icq ID\:\w*([^\n\r]+).*)| $pattern(.*?\*.*?AOL ID\:\w*([^\n\r]+).*)|"}%

A far better idea is for us to switch to using FormData for registration fields. I was waiting for the CoreTeam to comment RegistrationAsPlugin but it seems that I am never going to get a response, so I'll just abandon that for now. In the meantime, I'll attach the new code onto RegisterCgiScriptRewrite - perhaps you would be good enough to test it.

-- MartinCleaver - 29 Oct 2004

Thanks, that was exactly what I was looking for. I also added the web "Main", as the search takes only place in the user manage web:

%SEARCH{ "   * Course of Studies Name:"  web="Main"   nosearch="on"  header="| *Hilfe.WikiName:* | *Instrument:* | *Telefon:* | *Mobile:* | * Straße:* | *Stadt:* |" format="| Main.$topic | $pattern(.*?\*.*?Instrument Name\:\w*([^\n\r]+).*) | $pattern(.*?\*.*?Phone Number\:\w*([^\n\r]+).*)| $pattern(.*?\*.*?Mobile Number\:\w*([^\n\r]+).*)| $pattern(.*?\*.*?Street Name\:\w*([^\n\r]+).*)| $pattern(.*?\*.*?City Name\:\w*([^\n\r]+).*)| "}%

Again, many thanks.

-- JensRoeder - 15 Nov 2004

Edit | Attach | Watch | Print version | History: r4 < r3 < r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r4 - 2004-11-16 - 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.