PDA

View Full Version : Extended submit checks mod requested


Nobody
11-14-2005, 02:43 PM
Requested validation extension, when sumbiting links:

Check if Title/URL/Description already exists in active/pending/other links in the directory
Validate that there is a description at all
Check description length, set minium/maximum (possibility to extend maximum of actual version)
Check description if there are more than one (1) "!" characters or other odd characters wich are in general unsuitable, like more than one (1) "?" and other similar. Maybe warn even when using (TM) (R) and smilar characters - if the link directory (like mine) is supposed to only inform of the content on the links, and not the actual product names of it is a commercial site.
Check description for CAPS misuse - like checking if there are more than three (3) WORDS USING CAPS or something like that.
Check if unappropriate title, in the same way as description check mentioned above - with the addition of having it minimized to, let's say, 2 separate words? This should be just fine. It's really an annoying thing having every single sumbission containing keywords stuffing in the title that needs to be taken care of and sorted out - this is, of course, in case you are running a serious link directory, rather than just existing for some silly SEO purposes. :roll:
Possibility to have a user confirmation e-mail that physically checks if the e-mail adress exists and is in use - this also prevents people from submiting e-mail adresses others than their own! I know this is an issue for some directory owners these days
Check if name contains at least two separate words - if full name wanted
Check if IP adress isn't banned (by admin)
Just a silly idea: If the user has no check link sumbitted, he comes to a page saying "you should have, here's the benifits". This page should contain two options: 1) a rec link field AGAIN, and 2)"sumbit my link without rec" or something like that. This should maybe add some percentage of the total amount of link sumbitters adding rec link - this should also of course, in the end, gain the phpLnkDirectory project in general of obvious reasons - link popularity of the pages linking ot phpLinkDirectory. :D
As an alternative to the above, simply having a javascript alarming "Do you really not want to add a rec link to your site? You will miss the benefits of A, B and C" sort of...
These last 2 points should, of course, be optional from admin. I'm not sure I would even use this, but probably you SEO directories webmasters would like to have it as a solution in between the actual options of requiring a rec link or not.

Just my 2 cent. Hope this inspires the good guys with the good know-how! And also gains the project in general, as ideas for making an even better script. :D

At least some of these I think should be considered beeing released as an open source mod.

The above are some ideas, that I really think should save us all some time managing our directories.

Keep up the good work all of you and good luck with your directories!

scottlarockman
11-16-2005, 08:33 AM
Email comfirmation before the link being submitted would be nice. Though if they gave you a legit link then I guess it doesn't matter much.
I also want a "is this URL cached by google" check? They submit xyz.com/blah/links.html, it should then be checked to make sure it is cached by google. Just because it has a PR0 doesn't mean that it is or isn't cached. A link to you is worthless if it isn't being indexed by the search engines. Also, in the recip check it should verify that they do not have a "no follow" to it. Also the "validate links" should check for "cached by google" each time (configurable by user, whether they desire this feature or not), and check for nofollow etc.

I've written a php script that checks a link, it makes sure that there is SOME description, it makes sure that the link does NOT have a nofollow etc. Feel free to use this. Even migrate into code if you want it. I thought about writing up the google cache check but never got around to it.

#!/usr/local/bin/php
<?php
$nofollow="/rel=['|\"]nofollow['|\"]/i"; //string for checking to make sure that the link doesn't have nofollow (worthless link)
$program_name = $argv[0];
$file_name = $argv[1];
$domain_name = $argv[2]; $email = $argv[3];
$your_link = "/<a.*?href=['|\"]http:\/\/".$domain_name."(.+?)>.*?<\/a>/i";
$data_replace = array ("/\n/",
"/ /");
for ($i=1; $i<=3; $i++)
{
if (!$argv[$i])
{
print "Command-line: $program_name [linkfile] [www.yourdomain.com] [your@email.com]\n";
exit;
}
}
$fp = fopen($file_name, "r");
if (filesize($file_name) > 0)
{
$badlinks = 0;
while (!feof($fp))
{
$web_site_link = fgets($fp, 300);
print "testing $web_site_link";
if(strlen($web_site_link) < 2) break;
$web_site_link = preg_replace("/\n/", "", $web_site_link);
$link = file_get_contents("$web_site_link"); // open the link site
$link = preg_replace($data_replace, "", $link); //remove all the links from the page
if (!preg_match_all($your_link, $link, $array) || preg_match_all($nofollow, $array[1][0], $junk))
{
$badlinks++;
$links_to_email[$badlinks]=$web_site_link;
}
}
}
if($badlinks > 0)
{
mail($email, '$badlinks links don't exist', print_r($links_to_email,true));
}

?>