scottymcloo Posted June 27, 2003 Share Posted June 27, 2003 I have added a reciprocal links checker for VJ's Links Manager contribution. For support, please post here and not to my e-mail address. This is beta code, and works, but needs tidied up to conform to osCommerce coding standards. Good Luck Graeme http://www.oscommerce.com/community/contributions,1322 Quote Link to comment Share on other sites More sharing options...
Guest Posted June 30, 2003 Share Posted June 30, 2003 hi scottymcloo Nice Addition! :-) I think it works well, and also a good/fast way of letting you know which links/ulrs no longer exist.. I made some changes to the layout and over appearance, and made use of the stylesheet.css class in oscommerce admin.. It would be nice if the PHP error generate by non-existant non or functioning urls could be fixed with a custom error or something along those lines. Cheers Lee Quote Link to comment Share on other sites More sharing options...
scottymcloo Posted June 30, 2003 Author Share Posted June 30, 2003 Hello MaxiDVD! Thanks for the feedback. I really only threw this addition together in order to get a links checker working. It does need more work. I agreee that the error checking is basic (non existent!!) - I will do some more work on that in the coming days. If you have done some work on the stylesheets, etc, can you forward that to me and i will include it in the next release? Thanks Graeme Quote Link to comment Share on other sites More sharing options...
Guest Posted June 30, 2003 Share Posted June 30, 2003 hi scottymcloo Sent you 2 PMs one contains admin/checklinks.php the other has includes/languages/english/exchange_links_links.php as I added some custom defines in the language file for you link checker, just jazzed it up a little to my liking. Cheers Mate. Quote Link to comment Share on other sites More sharing options...
ibandyop Posted July 13, 2003 Share Posted July 13, 2003 hi scottymcloo Sent you 2 PMs one contains admin/checklinks.php the other has includes/languages/english/exchange_links_links.php as I added some custom defines in the language file for you link checker, just jazzed it up a little to my liking. Cheers Mate. MaxiDVD, Can you forward the PM to me as well? :P I would like to improve the look as well. Thanks in advance. -ibandyop Quote ibandyop Link to comment Share on other sites More sharing options...
Guest Posted July 14, 2003 Share Posted July 14, 2003 Hi ibandyop. Heres the changed: admin/checklinks.php <?php /* $Id: checklinks.php, v0.1 2003/06/22 Exp $ Links Manager Checker for OSC v0.2 osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Addition to VJ's Links Manager Contribution Written by Graeme Conkie Released under the GNU General Public License */ require('includes/application_top.php'); require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_EXCHANGE_LINKS_LINKS); ?> <!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN"> <html <?php echo HTML_PARAMS; ?>> <head> <meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>"> <title><?php echo TITLE; ?></title> <link rel="stylesheet" type="text/css" href="includes/stylesheet.css"> <script language="javascript" src="includes/general.js"></script> </head> <body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0" bgcolor="#FFFFFF" onload="SetFocus();"> <!-- header //--> <?php require(DIR_WS_INCLUDES . 'header.php'); ?> <!-- header_eof //--> <!-- body //--> <table border="0" width="100%" cellspacing="2" cellpadding="2"> <tr> <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="1" cellpadding="1" class="columnLeft"> <!-- left_navigation //--> <?php require(DIR_WS_INCLUDES . 'column_left.php'); ?> <!-- left_navigation_eof //--> </table></td> <!-- body_text //--> <td width="100%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td><table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td class="pageHeading"><?php echo HEADING_TITLE_LINKBACK; ?></td> <td class="pageHeading" align="right"><?php echo tep_draw_separator('pixel_trans.gif', HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT); ?></td> </tr> </table></td> </tr> <?php $links_query = mysql_query('SELECT `link_category_id` , `link_id` , `link_title` , `link_url` , `link_description` , `link_contact` , `link_email` , `link_reciprocal` , `link_rating` , `link_date` , `link_status` FROM `exchange_links_links`'); if ($row = mysql_fetch_array($links_query)) { do { $found_the_link = "no"; print ("<tr><td class="smalltext" width="40%"><b>" . LINKBACK_VISIT_SITE . "</b> <b><a href=""); print $row["link_reciprocal"]; print ("" target="_blank">"); print $row["link_reciprocal"]; print ("</a></b><br>"); // print ("</td>"); $url = $row["link_reciprocal"]; $link_to_look_for = DIR_WS_CATALOG; if (file($url)) { $file = fopen($url,'r'); $i = 0; do { $i++; $page_line[$i] = trim(fgets($file,4096)); } while (!feof($file)); fclose($file); for($x = 1; $x <= $i; $x++) { $test_line = ereg_replace($link_to_look_for,"test",$page_line[$x]); if ($test_line != $page_line[$x]) { $found_the_link = "yes"; } } if ($found_the_link == "yes") { echo " <font color="#0000FF">" . LINK_CONFIRMED . "</font> <b>" . $row["link_title"] . "<br>" . LINK_EMAIL_CONTACT . "<a href="mailto:" . $row["link_email"] . "?subject=RE: " . HEADING_TITLE_LINKBACK . " at " . TITLE . "&body=" . LINK_EMAIL_NAME . $row["link_contact"] . ",">" . $row["link_contact"] . "</a></b><br><br>n</td></tr>"; } if ($found_the_link != "yes") { echo " <font color="#FF0000">" . LINK_REJECTED . "</font> <b>" . $row["link_title"] . "<br>" . LINK_EMAIL_CONTACT . "<a href="mailto:" . $row["link_email"] . "?subject=RE: " . HEADING_TITLE_LINKBACK . " at " . TITLE . "&body=" . LINK_EMAIL_NAME . $row["link_contact"] . ",">" . $row["link_contact"] . "</a></b><br><br>n</td></tr>"; } } else { print ("<table border="1" cellpadding="5" cellspacing="5" bordercolor="#111111" width="100%"><tr><td width="100%" class="main"><BR><font color="#FF0000"><b>" . LINKBACK_WARNING . "</font> " . $row["link_url"] . "</b><BR><BR><b>" . LINKBACK_WARNING_SUGGESTION . "<a href="" . $row["link_reciprocal"] . "" target="_blank">" . $row["link_reciprocal"] . "</a></font><br><br>" . LINKBACK_WARNING_ERROR . "</b><br><br><font color="#FF0000">" . LINKBACK_WARNING_STATUS . "<font color="#000000"><a href="" . $row["link_url"] . "" target="_blank">" . $row["link_url"] . "</a><br><br><b>" . LINK_EMAIL_CONTACT . "<a href="mailto:" . $row["link_email"] . "?subject=RE: " . HEADING_TITLE_LINKBACK . " at " . TITLE . " ERROR!&body=" . LINK_EMAIL_NAME . $row["link_contact"] . ",">" . $row["link_contact"] . "</a></font><br><BR></td></tr></table></font></td></tr>"); } } while($row = mysql_fetch_array($links_query)); } else {print "Sorry, no records were found!";} ?> </td></tr> <!-- body_text_eof //--> </tr> </table> <!-- body_eof //--> <!-- footer //--> <?php require(DIR_WS_INCLUDES . 'footer.php'); ?> <!-- footer_eof //--> <br> </body> </html> <?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?> Heres the changed: admin/includes/languages/english/exchange_links_links.php <?php /* $Id: exchange_links_links.php, v0.2 2003/05/02 Exp $ Links Manager for OSC v0.2 osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2002 osCommerce Released under the GNU General Public License */ define('HEADING_TITLE', 'Reciprocal Links Manager'); define('HEADING_TITLE_SEARCH', 'Search:'); define('TABLE_HEADING_LINK_TITLE', 'Site Title'); define('TABLE_HEADING_LINK_URL', 'URL'); define('TABLE_HEADING_LINK_CATEGORY', 'Category'); define('TABLE_HEADING_STATUS', 'Status'); define('TABLE_HEADING_ACTION', 'Action'); define('TEXT_DATE_LINK_SUBMITTED', 'Link Submitted:'); define('TEXT_INFO_TITLE', 'Title:'); define('TEXT_INFO_CATEGORY', 'Category:'); define('TEXT_INFO_DESCRIPTION', 'Description:'); define('TEXT_DELETE_INTRO', 'Are you sure you want to delete this link?'); define('TEXT_INFO_HEADING_DELETE_LINK', 'Delete Link'); define('TYPE_BELOW', 'Type below'); define('PLEASE_SELECT', 'Select One'); define('HEADING_TITLE_LINKBACK', 'Reciprocal Link-Back Check'); define('LINK_CONFIRMED', 'Approved!: Linkback was found and confirmed at website:'); define('LINK_REJECTED', 'Rejected: No linkback could be confirmed at website:'); define('LINKBACK_VISIT_SITE', 'Click to visit reciprocal page --> '); define('LINK_EMAIL_CONTACT', 'Email Contact: '); define('LINK_EMAIL_NAME', 'Dear '); define('LINKBACK_WARNING', 'WARNING!! Link Connection Failure at:'); define('LINKBACK_WARNING_SUGGESTION', 'SUGGESTION:</b><br>TEST THIS RECIPROCAL LINK: '); define('LINKBACK_WARNING_ERROR', 'It is responsible for the ERROR ocurring on this page.. Please confirm this link/website is currently active and not temporarily down, before <b>disabling, deleting or changing the details in VJ Links Exchange Manager.'); define('LINKBACK_WARNING_STATUS', 'STATUS RECIPROCAL-PAGE NOT FOUND AT WEBSITE: '); ?>[/b] Cheers Lee Quote Link to comment Share on other sites More sharing options...
penge Posted February 24, 2004 Share Posted February 24, 2004 Hi, This contrib works well, but I have a small problem. I have both .com and .co.uk domains and have used both to link to other sites. The first version of link checker, around line 54 the code was: $url = $row["link_reciprocal"]; $link_to_look_for = 'www.mysite.com'; The new file, line 119 has: $link_to_look_for = DIR_WS_CATALOG; How do I include both domains - .com and .co.uk, so if the checker finds one or the other, it will not return an error? I hope I'm making myself clear! Thanks, Penge Quote Link to comment Share on other sites More sharing options...
Farnastic Posted November 30, 2004 Share Posted November 30, 2004 Hello MaxiDVD, I have updated the file per your code, but I continue getting this error. Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/apadire/public_html/demo/admin/checklinks.php on line 111 Sorry, no records were found! Could you pleasetell me what I'm missing except the 2 codes you posted here. I write a new checklinks.php --- to admin and made a new file called exchanged_links_links.php --- to admin/includes/languages/english I appreciate your help Thanks far Quote Link to comment Share on other sites More sharing options...
Guest Posted November 30, 2004 Share Posted November 30, 2004 Are you running MS1 or MS2? Based on the date of those original posts, I suspect that it was designed for MS1. -jared Quote Link to comment Share on other sites More sharing options...
Farnastic Posted November 30, 2004 Share Posted November 30, 2004 Are you running MS1 or MS2? Based on the date of those original posts, I suspect that it was designed for MS1. -jared <{POST_SNAPBACK}> Thank you for your reply. I'm using MS2. far Quote Link to comment Share on other sites More sharing options...
valley Posted February 5, 2006 Share Posted February 5, 2006 Hello MaxiDVD!Thanks for the feedback. I really only threw this addition together in order to get a links checker working. It does need more work. I agreee that the error checking is basic (non existent!!) - I will do some more work on that in the coming days. If you have done some work on the stylesheets, etc, can you forward that to me and i will include it in the next release? Thanks Graeme Hello , I know 3 years have passed but I haven't seen any update Could you please let me know which is the file to modify for your instruction No 4 below 4. just above this line: <td align="right"><?php echo '<a href="' . tep_href_link(FILENAME_EXCHANGE_LINKS_LINKS, 'page=' . $HTTP_GET_VARS['page'] . '&action=new') . '">' . tep_image_button('button_new_link.gif', IMAGE_NEW_LINK) . '</a>'; ?></td> Add: <td align="right"><?php echo '<a href="' . tep_href_link('checklinks.php') . '">' . tep_image_button('button_check.gif', 'Check Links') . '</a>'; ?></td> Quote Link to comment Share on other sites More sharing options...
Jack_mcs Posted February 5, 2006 Share Posted February 5, 2006 The code is already in Links Manager and has been update to include a mass check. Jack Quote Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. Get the latest versions of my addons Recommended SEO Addons Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.