Gossamer Forum
Home : Products : Links 2.0 : Discussions :

Please help! Subscribe questions.

Quote Reply
Please help! Subscribe questions.
I'm doing a number of low-tech modifications to my engine, to combine it with the search engine. All is going well so far... apart form one thing. How can I include in the add form the ability to choose whether to subscribe or not to the mailing list.

When you add a listing via the admin pages, or validate a record, you have an option to choose yes/no for the mailing list. I want to include that in the main form. They won't actually have a choice, I'll do it as a hidden field. But I need to know the name of the field and the value it should be to indicate yes or no. I've tried a couple of options with no luck. Can anyone help please?

Antony

------------------
------------------------
http://www.stcentral.com
Star Trek starts here
------------------------
Quote Reply
Re: Please help! Subscribe questions. In reply to
If you are talking about the mailing list for all the link owners in Links v2, there is nothing you really need to do. By default, everyone that adds a link is subscribed to it.

The only reason to add the field to the add form (even as a hidden field) would be if you change the field to an optional one. If you want to turn it off completely, just change all the ReceiveMail fields you now have to No and change the default in %db_def (in links.def) to No, as well as reversing the setting in %add_system_fields (also in links.def).

Since you said they really wouldn't have a choice anyway, I won't go into how to make the field optional so they can choose whether or not they want to receive email about their link(s).

Unless the ReceiveMail field is made optional, no <input> tag will affect it because the defaults are always added to the record via add.cgi.
Quote Reply
Re: Please help! Subscribe questions. In reply to
Many thanks for your reply. Well, from your comments I went into the links.def file and removed the reference to to the mailing list in %add_system_fields. I can now subscribe people to the list when they go via one route and not subscribed when they go via another route, allowing me to have two databases effectively.

Thank you for putting me on the right track and your fast reply, it was appreciated. It was the last piece of my puzzle and I can now really get on with my plans! Thanks again.

Antony

------------------
------------------------
http://www.stcentral.com
Star Trek starts here
------------------------