Gossamer Forum
Home : Products : DBMan SQL : Discussion :

Short and long view - not everybody

Quote Reply
Short and long view - not everybody
After a search or list all, we have a picture and a short description. Now I would protect the details for evryone, excempt members of our club. Is that possible, and what to change?

Also when the user makes a search : when the result is one item, he need to go to the short description, and if he is a member, he can cgo to the detailed screen.

Is that possible, and what to change ?


Maybe an explanation with the database homes. When I search for a home in New-York, I receive a list ith a lot of houses. For a normal user, it need to stop here. So, the link "more info" or a click on the picture may NOT go to the detailled description. When I am for example a seller, I can go further to the detailled description.

Hope this is clear (?).
Luc
----
Quote Reply
Re: [LucVG] Short and long view - not everybody In reply to
Hi,

In this case, you need to customize the search_results.html template like:


<%if detail and Username ne 'default'%>
<%loop results%>
Print details here
<%endloop%>
<%else%>
<%loop results%>
column1: <%column1%>
column2: <%column2%>
<%if Username ne 'default'%><a href="db.cgi?do=search_results;db=table_name;primary_key=<%primary_key%>;primary_key-opt==;detail=1">Details</a><%endif%>
<%endloop%>
<%endif%>

Hope that helps.

TheStone.

B.
Quote Reply
Re: [TheStone] Short and long view - not everybody In reply to
I am not sure here if it is all understand what I mean.

When you do a search, you need always to come to the long list, even if there is only one record found. But then ... it may not be possible to some users (them with no password) to use the button "more information". Even if possible, to not display this button, and even not to click on a picture for more information.

I think that I need to change then also record.html and maybe also search_results.html. Can you help me further ?

Quote:

this is in record.html

<table width="100%" border="0" cellspacing="1" cellpadding="0">
<tr bgcolor="#FFFFFF"><td valign="top">
<a href="db.cgi?db=<%db%>&do=search_results&detail=yes&Callsign=<%Callsign%>&Callsign-opt==">
<%if Graphic eq 'yes'%>
<img src="http://www.gpscup.be/...lt;%Picture%>.jpg" alt="Photo <%Pict%>" width="78" height="116" border="0">
<%else%>
<img src="http://www.gpscup.be/dlbr/gas.jpg" alt="If you have a picture of this balloon or more information, please contact us at ludobuyle@gasballon.be" width="78" height="116" border="0">
<%endif%>
</a></td>
</tr>
</table>
Luc
----

Last edited by:

LucVG: Aug 8, 2004, 7:15 AM
Quote Reply
Re: [LucVG] Short and long view - not everybody In reply to
Sorry about the late reply.

You should change the search_results.html template like:

<%loop results%>
<%if detail eq 'yes'%>
Include the detail template here
<%else%>
<%include record.html%>
<%endif%>
<%endloop%>

Hope that helps.

TheStone.

B.