Gossamer Forum
Home : Products : DBMan : Customization :

1 account = 1 record and more ?'s

Quote Reply
1 account = 1 record and more ?'s
Hi all, have a few questions to ask

1. What do I need to do to make it so that only one record can be created per account? Also, b/c there's only one record per account, how do you bypass the delete and modify search screens to go directly to the record?

2. What is the URL to the mass mailer mod? I saw some posts about it with the modifications needed in the post, but can you download it somewhere?

3. For the file uploading mod, can you restrict the types of files uploaded to only images and can you restrict it so that there is only one image per account? Also, can you restrict the size of the image?

Thank you for being patient with my ignorance :-)

- Bubba
Quote Reply
Re: 1 account = 1 record and more ?'s In reply to
To set your database up so that each user can have only one record, first have a field to hold the userid. Set the $db_key variable to the name of that field. Set $db_key_track = 0. Set $auth_modify_own = 1. Set $auth_user_field to the number of the userid field.

To bypass the modify/delete searches, change sub html_footer (in the html.pl file)so it looks like this:

Code:
print qq!<P align=center><$font>!;
print qq!| <A HREF="$db_script_link_url">Home</A> !;
print qq!| <A HREF="$db_script_link_url&add_form=1">Add</A> ! if ($per_add);
print qq!| <A HREF="$db_script_link_url&view_search=1">View</A> ! if ($per_view);
if ($per_admin) {
print qq!| <A HREF="$db_script_link_url&delete_search=1">Delete</A> !;
print qq!| <A HREF="$db_script_link_url&modify_search=1">Modify</A> !;
print qq!| <A HREF="$db_script_link_url&admin_display=1">Admin</A> !;
}
else {
print qq!| <A HREF="$db_script_link_url&delete_form=1&$db_key=$db_userid">Delete</A> ! if ($per_del);
print qq!| <A HREF="$db_script_link_url&modify_form=1$db_key=$db_userid">Modify</A> ! if ($per_mod);
}
print qq!| <A HREF="$db_script_link_url&view_records=1&$db_key=*">List All</A> ! if ($per_view);
print qq!| <A HREF="$db_script_link_url&logoff=1">Log Off</A> |!;
print qq!</font></p>!;

I'm not sure about the mass mailer mod. There have been several here, and there's also one within the Links script. What exactly do you want to do?

Regarding question 3, yes, yes and yes.



------------------
JPD





Quote Reply
Re: 1 account = 1 record and more ?'s In reply to
Thanks for the answers :-) I plan on testing it in the morning.

As for the mass mailer mod, I would like it so that I can email everyone that has put their email in any record added. Would I have to install this mod before anyone adds a record or can I install it after people have created records and still be able to include them in the mass emails?

Do you know of a mass mailer mod that will work? If possible, but not required, is that the mod will have an unsubscribe feature. I would like it so that everyone that creates a record is automatically subscribed, but can unsubscribe somehow.
Quote Reply
Re: 1 account = 1 record and more ?'s In reply to
The most recent mass mailer I wrote for someone on the forum used the password file, since they had installed the password lookup modification.

I know that Links has a mailer that is probably better than anything I could write here, and includes a subscribe/unsubscribe option. You might think about checking the code in Links. Possibly you can get some help with it in one of the Links forums, since I don't know much about Links.


------------------
JPD