[Date Prev][Date Next][Thread Prev][Thread Next][Interchange by date
][Interchange by thread
]
[ic] display userdb contents with one-click search (SOLVED)
Kevin Walsh said:
> > IC 4.8.5. I want to allow fellow classmates to view
> contact info with
> > each other. I want to use a one-click search, but I can
> not get this
> > code to work. It displays a list of users, but clicking
> on any users'
> > name does not display that username on classmate.html:
> >
[snip some stuff]
> Your config change is not persistent; it applies to that page only.
> Once you click on the search link, a new page is called. The search
> is attempted (and fails) before your new page code is seen,
> and before
> you have the chance to unset the config.
>
> My suggestion is to change your first page to use something
> like this:
>
> [search-list]
> <a href="[area href='classmate'
> arg='[item-code]']">[item-code]</a>
> <br />
> [/search-list]
THANK YOU KEVIN WALSH! I got it to work with this search page:
[calc]
$CGI->{mv_todo} = 'search';
$Config->{NoSearch} = '';
[/calc]
[search-region more=1
search="
fi=userdb
ra=yes
ml=200
st=db
"]
[search-list]
<a href="[area href='classmate' arg='[item-data userdb
username]']">[item-data userdb username]</a>
<br>
[/search-list]
[more-list][more][/more-list]
[no-match]
Sorry, no matches for [value mv_searchspec].
[/no-match]
[/search-region]
And this on the results page:
[data session arg]
Just like you said!
> Your classmate.html page would unset the NoSearch config, as before,
> and then initiate a userdb search using [data session arg] as the
> username.
>
> Please think about whether you really want to allow userdb searches.
Well, it is a class reunion-type website and everyone wants to be able
to contact others (and I don't actually display their username). I
have instituted some security like requiring a login, not offering a
'new login' (just those classmates on my 'list' are in the database),
and offering each individual to allow only that information they wish
to share (address, phone, fax, and/or email).
Thanks Kevin, and again, thanks to Mike Heins and the developers of
this great product!
Curt Hauge
//////////////////////////////////////////////////////////////////
// Web Design - Interchange Hosting - Small Business Consulting //
// 1525 Meadowwood Drive www.mnwebdesign.com //
// Brooklyn Park, MN 55444 www.iwantaconsultant.com //
// Phone 612-598-5530 info@mnwebdesign.com //
//////////////////////////////////////////////////////////////////