spooks Posted November 13, 2008 Share Posted November 13, 2008 Reciprocal Links-2.0 This Contribution is a simple links mod for osC2.2. It provides a easy way to exchange links, if you want something with lots of bells & whistles look at Links Manager II. Clients can submit links that are approved in admin, administrators can also add, edit & delete links. An automatic process in admin can check reciprocal links. The screen shots folder has some sample page views. Its a very easy install. Modifications in this edition (2.0): Corrected a number or errors in the code & language files. Moved the 'submit links' section to its own page Added error checking & display for every submit links input field. Added confirmation of link submission. Commented out the client side Google Page Rank (remove comment marks to show) Commented out the client side Link_codes (remove comment marks to show) Added function to automatically give a nofollow tag to all links not giving a reciprocal. Added headers in admin plus extra fields for 'Link Found' status & date. Added option to check all reciprocal links. Added option to check individual links for reciprocal. Increased field sizes to more suitable amount. Contribution can be found at: http://addons.oscommerce.com/info/6099 Quote Sam Remember, What you think I ment may not be what I thought I ment when I said it. Contributions: Auto Backup your Database, Easy way Multi Images with Fancy Pop-ups, Easy way Products in columns with multi buy etc etc Disable any Category or Product, Easy way Secure & Improve your account pages et al. Link to comment Share on other sites More sharing options...
Guest Posted November 14, 2008 Share Posted November 14, 2008 Hi Sam, I've installed your contrib and I think it's great - but still buggy. The links can't be confirmed by admin check since there's a undefined variable in admin/link_manage.php at line 25 $check_phrase = LM_CHECK_PHRASE; Only if LM_CHECK_PHRASE is replaced by the code that the customer has to add to his page, the link can be verified. Thanks anyway, Anton Quote Link to comment Share on other sites More sharing options...
spooks Posted November 14, 2008 Author Share Posted November 14, 2008 Sorry, its just a missing instruction in the install, if you look at the language file you will find: define('LM_CHECK_PHRASE',''); // Link check phrases seperated by a comma. Like 'osCommerce Online Merchant,www.oscommerce.com' thats where you should set your phrases. Quote Sam Remember, What you think I ment may not be what I thought I ment when I said it. Contributions: Auto Backup your Database, Easy way Multi Images with Fancy Pop-ups, Easy way Products in columns with multi buy etc etc Disable any Category or Product, Easy way Secure & Improve your account pages et al. Link to comment Share on other sites More sharing options...
spooks Posted November 14, 2008 Author Share Posted November 14, 2008 Someone has PM me regading SQL injection, this does use tep_db_prepare_input on all the fields, but it is possible to enter a sql despite that. To fix after: $error=false; add: reset($_POST); while (list($key, $value) = each($_POST)) { if (!is_array($_POST[$key])) { $_POST[$key] = preg_replace("/[^ \/a-zA-Z0-9@:{}_.-]/i", "", urldecode($_POST[$key])); } else { unset($_POST[$key]); } // no arrays expected } Quote Sam Remember, What you think I ment may not be what I thought I ment when I said it. Contributions: Auto Backup your Database, Easy way Multi Images with Fancy Pop-ups, Easy way Products in columns with multi buy etc etc Disable any Category or Product, Easy way Secure & Improve your account pages et al. Link to comment Share on other sites More sharing options...
spooks Posted November 15, 2008 Author Share Posted November 15, 2008 Uploaded new version 2.1 Added missing entries to installation instructions. Added code to sanitise submitted $_POST to prevent injection attacks. Added correction for missed errors on submission date, plus added admin display for same. If updating, dBase data will be invalid, will correct to today's date on edit. Added 'Flip Status' function to Links Manager main page. Changed Files: admin/link_manage.php admin/includes/languages/english/link_manage.php links_submit.php Hope that gets all them bugs this time!! ;) Quote Sam Remember, What you think I ment may not be what I thought I ment when I said it. Contributions: Auto Backup your Database, Easy way Multi Images with Fancy Pop-ups, Easy way Products in columns with multi buy etc etc Disable any Category or Product, Easy way Secure & Improve your account pages et al. Link to comment Share on other sites More sharing options...
spooks Posted November 26, 2008 Author Share Posted November 26, 2008 Uploaded new version 3.0 This features automatic site thumbnail generation. Clients can submit links that are approved in admin, administrators can also add, edit & delete links. An automatic process in admin can check reciprocal links, either all, individual or by category. Links status can be modified from any manager page. Links can be organised by category. A local image can be used in place of the thumbshot. The screen shots folder has some sample page views. Its a very easy install. Modifications in 3.0: Added categories including 1.Ordering (set in admin) 2.Editing (in admin) 3.Submitter can suggest a new category or choose existing. 4.If no categories are active drop down will not appear. 5.Categories can be added on main or edit pages in admin. 6.Reciprocal links check automatically restricts to selected category. Added option of a local image in place of thumbnail, edit mode will show both local and thumbnail images once local is added. Images are saved to images/links, created automatically if not exists. Fixed error in Page rank code, if no data held will now display n/a. Added option to check a new sites page rank, useful if looking for sites to exchange with. Added reciprocal link to main admin page for quicker checking. Modified so links page 'pagination' will only appear if multiple pages exist. Not done in this version: Language files not fully updated: English hard coded within files. Will be corrected on next update. ;) Quote Sam Remember, What you think I ment may not be what I thought I ment when I said it. Contributions: Auto Backup your Database, Easy way Multi Images with Fancy Pop-ups, Easy way Products in columns with multi buy etc etc Disable any Category or Product, Easy way Secure & Improve your account pages et al. Link to comment Share on other sites More sharing options...
jbcobbs Posted December 8, 2008 Share Posted December 8, 2008 Im getting an error when installing the sql "#1064 - You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'DEFAULT CHARSET=latin1 AUTO_INCREMENT=1' at line 18 " Uploaded new version 3.0 This features automatic site thumbnail generation. Clients can submit links that are approved in admin, administrators can also add, edit & delete links. An automatic process in admin can check reciprocal links, either all, individual or by category. Links status can be modified from any manager page. Links can be organised by category. A local image can be used in place of the thumbshot. The screen shots folder has some sample page views. Its a very easy install. Modifications in 3.0: Added categories including 1.Ordering (set in admin) 2.Editing (in admin) 3.Submitter can suggest a new category or choose existing. 4.If no categories are active drop down will not appear. 5.Categories can be added on main or edit pages in admin. 6.Reciprocal links check automatically restricts to selected category. Added option of a local image in place of thumbnail, edit mode will show both local and thumbnail images once local is added. Images are saved to images/links, created automatically if not exists. Fixed error in Page rank code, if no data held will now display n/a. Added option to check a new sites page rank, useful if looking for sites to exchange with. Added reciprocal link to main admin page for quicker checking. Modified so links page 'pagination' will only appear if multiple pages exist. Not done in this version: Language files not fully updated: English hard coded within files. Will be corrected on next update. ;) Quote Link to comment Share on other sites More sharing options...
spooks Posted December 9, 2008 Author Share Posted December 9, 2008 Did you paste the whole sql? I see no error, what version of Mysql do you have? This is tested on Mysql 4 & 5 You can remove those instructions from the sql if you wish, it wont hert Quote Sam Remember, What you think I ment may not be what I thought I ment when I said it. Contributions: Auto Backup your Database, Easy way Multi Images with Fancy Pop-ups, Easy way Products in columns with multi buy etc etc Disable any Category or Product, Easy way Secure & Improve your account pages et al. Link to comment Share on other sites More sharing options...
Guest Posted December 24, 2008 Share Posted December 24, 2008 Installed your latest 3.0 works great, but when I click on the link I added manually it will not got to the link because the URL are both mine and the links? Visit My Website Any idea were I screwed up? Happy Holidays Quote Link to comment Share on other sites More sharing options...
spooks Posted December 24, 2008 Author Share Posted December 24, 2008 all url's must start with http:// you have just www.--, put http:// in front of that Quote Sam Remember, What you think I ment may not be what I thought I ment when I said it. Contributions: Auto Backup your Database, Easy way Multi Images with Fancy Pop-ups, Easy way Products in columns with multi buy etc etc Disable any Category or Product, Easy way Secure & Improve your account pages et al. Link to comment Share on other sites More sharing options...
spooks Posted December 24, 2008 Author Share Posted December 24, 2008 I must admit I though I had added that to the input field, seems I did'nt, to fix alter in link_manage.php: Find:(434) <td><?php echo tep_draw_input_field('url', $e_info['link_url']?$e_info['link_url']:'', 'maxLength=80 size=70') ?></td> replace with: <td><?php echo tep_draw_input_field('url', $e_info['link_url']?$e_info['link_url']:'http://', 'maxLength=80 size=70') ?></td> :blush: Quote Sam Remember, What you think I ment may not be what I thought I ment when I said it. Contributions: Auto Backup your Database, Easy way Multi Images with Fancy Pop-ups, Easy way Products in columns with multi buy etc etc Disable any Category or Product, Easy way Secure & Improve your account pages et al. Link to comment Share on other sites More sharing options...
Guest Posted December 29, 2008 Share Posted December 29, 2008 Thank you Sir, it took care of it Quote Link to comment Share on other sites More sharing options...
spooks Posted January 22, 2009 Author Share Posted January 22, 2009 Uploaded new version 3.1 Modifications : Added missing htttp: in admin Added further check to inputs on links submit Added code to 'Post Load' thumbshots thumbnails as these were slowing page loads somewhat. Quote Sam Remember, What you think I ment may not be what I thought I ment when I said it. Contributions: Auto Backup your Database, Easy way Multi Images with Fancy Pop-ups, Easy way Products in columns with multi buy etc etc Disable any Category or Product, Easy way Secure & Improve your account pages et al. Link to comment Share on other sites More sharing options...
bimbachetuning Posted January 23, 2009 Share Posted January 23, 2009 Hi all, its a good contrib. Can helpme to mod the link in links.php? I would mod the link of the Web Image and Web name, to open in a new window. Thnks a lot!! P.D.: Sorry my bad english, im spanish ;) Quote Link to comment Share on other sites More sharing options...
spooks Posted January 23, 2009 Author Share Posted January 23, 2009 In links.php find: <td width="130" align="center"><?php echo '<a ' . ($links_tree['link_found'] ? '' : 'rel="nofollow" ') . 'href="'.$links_tree['link_url'] . '">'; replace with <td width="130" align="center"><?php echo '<a ' . ($links_tree['link_found'] ? '' : 'rel="nofollow" ') . 'href="'.$links_tree['link_url'] . '" target="_blank" >'; find: <td align="center" width="520"><?php echo '<a ' . ($links_tree['link_found'] ? '' : 'rel="nofollow" ') . 'href="'.$links_tree['link_url'].'"><b>'.$links_tree['link_title'].'</b></a><br />'.nl2br($links_tree['link_description']); ?></td> replace with: <td align="center" width="520"><?php echo '<a ' . ($links_tree['link_found'] ? '' : 'rel="nofollow" ') . 'href="'.$links_tree['link_url'].'" target="_blank" ><b>'.$links_tree['link_title'].'</b></a><br />'.nl2br($links_tree['link_description']); ?></td> B) Quote Sam Remember, What you think I ment may not be what I thought I ment when I said it. Contributions: Auto Backup your Database, Easy way Multi Images with Fancy Pop-ups, Easy way Products in columns with multi buy etc etc Disable any Category or Product, Easy way Secure & Improve your account pages et al. Link to comment Share on other sites More sharing options...
TracyS Posted February 9, 2009 Share Posted February 9, 2009 How would I make it so the links.php page shows the title of the "links category" it is in, rather than just the parent category header? Right now, no matter what I choose under "Links of Interest" - my page header stays "Links of Interest". I would like it to change if I click on the Business Partners category so the page header would then say "Business Partners". I have found tricks for doing this with the categories - but I can't seem to modify the code correctly to get it working with this contribution. Any ideas? Quote ~Tracy Link to comment Share on other sites More sharing options...
spooks Posted February 9, 2009 Author Share Posted February 9, 2009 Assuming your using the latest, the code is already there, just not in the order you want. you have <title><?php echo TITLE . ' Links ' .(!$page ? '' : 'Page ' . $units[$page]). ' - ' . (!$cats ? (!$page ? '' : $categories[$category_array[$page]['id']]) : $categories[$cats]) . (!$page ? ' - ' : ''); ?> </title> replace with: <title><?php echo (!$cats ? (!$page ? '' : $categories[$category_array[$page]['id']]) : $categories[$cats]) . TITLE . ' Links ' .(!$page ? '' : 'Page ' . $units[$page]). ' - ' . (!$page ? ' - ' : ''); ?> </title> Not tersted & I`m on the wine, so I may have messed!! ;) Quote Sam Remember, What you think I ment may not be what I thought I ment when I said it. Contributions: Auto Backup your Database, Easy way Multi Images with Fancy Pop-ups, Easy way Products in columns with multi buy etc etc Disable any Category or Product, Easy way Secure & Improve your account pages et al. Link to comment Share on other sites More sharing options...
spooks Posted February 9, 2009 Author Share Posted February 9, 2009 Oooops, said I'd had a few, perhaps your taking of the page heading?? <td align="center" class="pageHeading"><?php echo LM_TITLE;?></td> becomes <td align="center" class="pageHeading"><?php echo (!$cats ? LM_TITLE : $categories[$cats]);?></td> rider as last!! Quote Sam Remember, What you think I ment may not be what I thought I ment when I said it. Contributions: Auto Backup your Database, Easy way Multi Images with Fancy Pop-ups, Easy way Products in columns with multi buy etc etc Disable any Category or Product, Easy way Secure & Improve your account pages et al. Link to comment Share on other sites More sharing options...
rocdy Posted March 2, 2009 Share Posted March 2, 2009 I have error like this: Warning: set_time_limit() [function.set-time-limit]: Cannot set time limit in safe mode in /home/bnetbtan/public_html/admin/link_manage.php on line 32 anyone can help me? Quote Rocdy Beginner in php programming and still learning from this forums. Special thanks for Oscommerce Community Forums that help me a lot. :-) Link to comment Share on other sites More sharing options...
spooks Posted March 3, 2009 Author Share Posted March 3, 2009 Duplicate Post!! As is says, function not allowed in safe mode, ask host to change or.. Simply comment out the line like : CODE//set_time_limit(300); Quote Sam Remember, What you think I ment may not be what I thought I ment when I said it. Contributions: Auto Backup your Database, Easy way Multi Images with Fancy Pop-ups, Easy way Products in columns with multi buy etc etc Disable any Category or Product, Easy way Secure & Improve your account pages et al. Link to comment Share on other sites More sharing options...
ashvattha Posted March 4, 2009 Share Posted March 4, 2009 Hello Sir Thanks for your pleasant contribution. However I have edited the shop towards a fixed width of 778 with the Basic Design Pack by toybear, Unfortunately all pages of your modification have "the old" dimesions, so it breaks out of the middle section. Can you tell me how to correct this easily? Thank you for your time Best regards Ashvattha https://shop.ashvattha.org Quote Where do I sign? Link to comment Share on other sites More sharing options...
spooks Posted March 4, 2009 Author Share Posted March 4, 2009 I know, it was ammiss of me, I`ve already done a fix, I'll upload new files tomorrow when I've time. PS, 778 seems narrow when around 97% have a screen size of at least 1024 wide? Quote Sam Remember, What you think I ment may not be what I thought I ment when I said it. Contributions: Auto Backup your Database, Easy way Multi Images with Fancy Pop-ups, Easy way Products in columns with multi buy etc etc Disable any Category or Product, Easy way Secure & Improve your account pages et al. Link to comment Share on other sites More sharing options...
spooks Posted March 4, 2009 Author Share Posted March 4, 2009 I have V3.2 ready for upload, I will do so as soon as uploads are working again!!! Quote Sam Remember, What you think I ment may not be what I thought I ment when I said it. Contributions: Auto Backup your Database, Easy way Multi Images with Fancy Pop-ups, Easy way Products in columns with multi buy etc etc Disable any Category or Product, Easy way Secure & Improve your account pages et al. Link to comment Share on other sites More sharing options...
spooks Posted March 4, 2009 Author Share Posted March 4, 2009 Uploaded Version 3.2 Modifications in 3.2: Corrected some minor bugs Cleaned up some of the display & removed 'fixed width' settings Added categories title to page title in category mode. Corrected MS2 compatibility bug This has been tested on PHP 4 & 5, SQL 4 & 5, osC 2.2 ms2, rc1 & rc2a and is register_globals off compatible. ;) Quote Sam Remember, What you think I ment may not be what I thought I ment when I said it. Contributions: Auto Backup your Database, Easy way Multi Images with Fancy Pop-ups, Easy way Products in columns with multi buy etc etc Disable any Category or Product, Easy way Secure & Improve your account pages et al. Link to comment Share on other sites More sharing options...
wimanto Posted March 5, 2009 Share Posted March 5, 2009 I installed it but when I click tools/reciprocal links in admin, blank page? Quote 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.