Gossamer Forum
Home : Products : Links 2.0 : Customization :

Problems with Links Submitted by Foreign People

Quote Reply
Problems with Links Submitted by Foreign People
Hello everyone! Links has a problem everytime a link is submitted by a foreign person. For some reason, it doesn't assign an ID, date, hits, rates, receivemail...everything that the user doesn't fill out in the add.cgi form...to the link and I have to go in and manally fill in the information in valdate.db and reset the linksid.txt to the appropriate number. I would just edit the info right there in the admin but it doesn't let me click on the validate or delete radio buttons (I select and it automatically unselects instantly). So I noticed that this only happens when this one foreign guy submits links to his many websites. I would just edit it manually but it happening practically everyday! Frown

Here is an example (copy) of what the guy submits:

Title: Spielechannel - Die deutsche Gamesite
URL: http://www.the-best-games.de
Category: Entertainment/Games
Description: Der SpieleChannel - Die Gamesite mit dem gewissen Etwas. www the best games de
Contact Name:
Contact Email:

I didn't see anything in it that would mess up the process. Could it be something with his browser? Do I need to install a foreign character mod on my version of Links? Thanks for any help you can give! God bless! Smile

<><-----------------><> Daniel AKA Dan the Great <><-----------------><>

Last edited by:

Alex: Feb 6, 2013, 3:38 PM
Quote Reply
Re: Problems with Links Submitted by Foreign People In reply to
Adding data to the links.db is not a problem.

Make sure that you have hidden fields in your add.html and add_error.html files for the ID, Date, and other fields.

Like the following examples:

Code:

<input type="hidden" name="ID" value="<%ID%>">
<input type="hidden" name="Date" value="<Úte%>">
<input type="hidden" name="Hits" value="0">
<input type="hidden" name="Ratings" value="0">
<input type="hidden" name="Votes" value="0">


Now...for the isNew and isPopular fields, you should add the following codes in your links.def file:

Code:

­d_system_fields = (
isNew => 'No',
isPopular => 'No'
);


For the ReceiveMail field, add the following codes in your add.html file:

Code:

<input type="radio" name="ReceiveMail" value="Yes"> Yes
<input type="radio" name="ReceiveMail" value="No"> No


Then in your sub site_html_add_failure routine, add the following codes before the &html_print_headers codes:

Code:

if ($in{'ReceiveMail'} eq "No") {
$radio .= qq|<input type="radio" name="ReceiveMail" value="Yes"> Yes
<input type="radio" name="ReceiveMail" value="No" CHECKED> No|;
}
elsif ($in{'ReceiveMail'} eq "Yes") {
$radio .= qq|<input type="radio" name="ReceiveMail" value="Yes" CHECKED> Yes
<input type="radio" name="ReceiveMail" value="No"> No|;
}
else {
$radio .= qq|<input type="radio" name="ReceiveMail" value="Yes"> Yes
<input type="radio" name="ReceiveMail" value="No"> No|;
}


Then add the following tag in the tag definition area of this sub-routine:

Code:

radio => $radio


Then in your add_error.html file, add the following codes:

Code:

Receive Email: <%radio%>


Hope this helps.

Regards,

Eliot Lee