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
--
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