View Single Post
  #1   IP: 218.2.66.181
Old 2007-03-19, 01:19 PM
sunshine sunshine is offline
高级会员
 
Join Date: 2006-01-05
Posts: 368
sunshine 正向着好的方向发展
Default PHP Link Directory Automatically Approved Links

Disclaimer: THIS SHOULD NEVER BE INSTALLED ON A SITE THAT IS OPEN TO THE GENERAL PUBLIC!

I had a request for a link directory for a private organization that was not open to the public and therefore not spiderable or anything either. They didn't want to take the time to approve links since any link a member submitted was valid and good anyhow. Since many are non-technical and most wouldn't take the tim eto learn how to approve links, we modified phpld2 to automatically approve the submissions. I thought I would share it in case anyone else had a similar situation.

In submit.php simply modify the two red lines to the shown values:
Quote:
} else {
SmartyValidate :: connect($tpl);
$data = get_table_data('link');
$data['STATUS'] = 2;
$data['IPADDRESS'] = get_client_ip();
$data['VALID'] = 2;
$data['LINK_TYPE'] = $link_type;
Disclaimer: THIS SHOULD NEVER BE INSTALLED ON A SITE THAT IS OPEN TO THE GENERAL PUBLIC!
Reply With Quote