Gossamer Forum
Home : Products : DBMan : Customization :

Password for Long Display

Quote Reply
Password for Long Display
I am using DBman and have been for years... This project, I am using the Short/Long mod. What I am trying to do is make the Short display available to anyone and the Long display only available to peple that are Logged In... in other words, I want people to have to enter a Username and Password to be able to view the Long display. I searched the forums and could not find anything that did this, but any input and help would be greatly appreciated. Thanks!

-Ryan
Quote Reply
Re: [bisch] Password for Long Display In reply to
I'd do the relational db with one db containing the "short display" info and the the other db containing the "long display" info (some of which may be repeated). The short display could be set to allow a default user (anyone) and the link to the long display would require authentication?

Hmm... not sure how that would work. You'd need two default.cfg files.

Or, maybe you could do the standard short/long display and simply add "&auth_no_authentication=0" to the URL (have it set to "1" in the default.cfg)

Either way - would it take you directly to the record you selected after logging in? Probably not. You'd have to do some kind of hack for that.

How about having "username/password" boxes on the short display page where a viewer must type in user/pass and when clicking on the link it calls a copy of the authentication sub which if returns true displays the record or if it returns false gives an error page?

Good Luck! I'm curious to what you find out.
Quote Reply
Re: [Watts] Password for Long Display In reply to
In your sub html_record where you have the link to the long display you could use for example:

|;
if ($db_userid eq "default") {
print qq|<TD><$font>$rec{'Title'}</font></TD>|;
}
else {
print qq|<TD><$font><A HREF="$long_url">$rec{'Title'}</A></font></TD>|;
}
print qq|

Then you could on your home page for instance state that they need to be logged in to view the full listing information.

Hope this helps

Unoffical DBMan FAQ

http://creativecomputingweb.com/dbman/index.shtml/
Quote Reply
Password for Long Display - On the Way! In reply to
Thanks a lot for the prompt response... I am going to try those hacks and see what I can get. Like I said, I have been hacking the program for years in all sorts of ways, so now I am going to take these suggestions and play around with them... I also checked out the "Add Permissions" mod on JPDeni's site...

http://www.jpdeni.com/dbman/Mods/AddPermission.txt

I am trying to integrate this as well, so I will be hacking away for awhile, but I will definitely let you all know what the outcome is and let you check it out... It should be really cool when it is all together. Thanks again... Peace!

-Ryan