Gossamer Forum
Home : Products : Gossamer Links : Version 1.x :

Tough question?

Quote Reply
Tough question?
Hi,

Just thought I would come back to the GT Forum to post a tough question! Basically we want to limit the number of sites a person can submit. We would like each person (i.e. email address) to only be able to submit a maximum of 10 sites. The mod would check the sites waiting in Validation to see if there were already ten other submissions from the same person there. If there was then the 11th submission would be refused.

How about it? Possible or not?

JeffB
Celebhoo.com


Quote Reply
Re: Tough question? In reply to
Look in the sub process_form in the add.cgi file. Look for $db->hits or something like that. Use the following conditional statement:

Code:

if ($db->hits > 10) {
&site_html_error ({error => "Sorry. You have added the maximum number of links in our directory."}, $in, $dynamic);
}


Of course, you can replace 10 with something like $LINKS{max_links}. Then in your Links.pm add the following variable configuration:

Code:

$LINKS{max_links} = 10;


Regards,

Eliot Lee

Quote Reply
Re: Tough question? In reply to
Wouldn't this solution only allow a total of 10 submissions for everyone?! I wanted something that would only allow each person to have a maximum of 10. Does this do this?

PS - Thanks for the quick response.

JeffB.
Celebhoo.com

PPS - Check out our web site.

Quote Reply
Re: Tough question? In reply to
Code:

Wouldn't this solution only allow a total of 10 submissions for everyone?!


Uh...the query statement before these codes checks for the URL and ID of the link being submitted. If you have a username field, then add that in the query statement.

Good luck!

Regards,

Eliot Lee

Quote Reply
Re: Tough question? In reply to
So is that a yes?! Do you think it would just limit the database to 10 validation sites or would it limit each person to 10 submissions. We don't use usernames and don't really want to. What is DB>Hits? Please help.

Good Luck.

Jeffb

Quote Reply
Re: Tough question? In reply to
Welp...you will need to use some field in the Links table that recognizes users...how else are you going to restrict the number of links? IP Address? I don't think so...not reliable at all.

Good luck!

Regards,

Eliot Lee