Gossamer Forum
Home : Products : DBMan : Customization :

Different views....

Quote Reply
Different views....
Hi!

I'm also trying to have 2 different ways for people to actually view the site: Members can see the whole information and non-members (default) will be able to view only non-critical information (such as email address/phone number, etc).

I thought of simply duplicating and renaming the sub_view_search_success. Would that work? Does anyone know?

Again, thanks in advance! :)

Luis

Quote Reply
Re: Different views.... In reply to
In the Resource Center there is a mod to add another level of permissions that would work for you. I needed another level of permissions for Member and non-member users for our database and JPDeni created the mod as she talked me through implementing on our database. It works perfect !

Hope this helps !
-------------------
donm

Quote Reply
Re: Different views.... In reply to
I don't think you need the "Add Permission" mod, since there are only default and registered users.

You don't need to make a separate sub html_record. (That's where the actual information prints out.)

Let's say your sub html_record looks like this:

Code:

print qq|
<table>
<tr><td>Name</td>
<td>$rec{'Name'}</td></tr>
<tr><td>Address</td>
<td>$rec{'Address'}</td></tr>
<tr><td>City</td>
<td>$rec{'City'}</td></tr>
<tr><td>Email</td>
<td>$rec{'Email'}</td></tr>
<tr><td>Favorite Color</td>
<td>$rec{'Color'}</td></tr>
</table>
|;
and you want default users to only see Name, City and Email. You would change it to:

Code:

print qq|
<table>
<tr><td>Name</td>
<td>$rec{'Name'}</td></tr>|;
unless ($db_userid eq 'default') {
print qq|

<tr><td>Address</td>
<td>$rec{'Address'}</td></tr>|;
}
print qq|

<tr><td>City</td>
<td>$rec{'City'}</td></tr>
<tr><td>Email</td>
<td>$rec{'Email'}</td></tr>|;
unless ($db_userid eq 'default') {
print qq|

<tr><td>Favorite Color</td>
<td>$rec{'Color'}</td></tr>|;
}
print qq|
</table>
|;
Does this help?

JPD
http://www.jpdeni.com/dbman/