Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Has anyone converted the latest link manager IIV 1.8 for bts yet?


jdice

Recommended Posts

Hi Everyone,

 

I recently uploaded the latest Link Manager IIV 1.8 to my website. I have a BTS template with Ultimate seo Urls. And everything show in the administration just fine. However, the clickable link to the links page is not showing up on the home page...so I guess it is not working. Has anyone converted this to work on a bts template yet?

 

I see in different places that Link Manager 1.0 has been...but Link Manager 1.0 version has disappeared from the contributions section....probably because it is old.

 

Thanks,

Janet

Link to comment
Share on other sites

  • 2 weeks later...
Hi Everyone,

 

I recently uploaded the latest Link Manager IIV 1.8 to my website. I have a BTS template with Ultimate seo Urls. And everything show in the administration just fine. However, the clickable link to the links page is not showing up on the home page...so I guess it is not working. Has anyone converted this to work on a bts template yet?

 

I see in different places that Link Manager 1.0 has been...but Link Manager 1.0 version has disappeared from the contributions section....probably because it is old.

 

Thanks,

Janet

 

Does anyone know a good link manager that will work with bts? Other have done this...just no one is sharing is knowledge. Anyone????

Link to comment
Share on other sites

There's nothing in Links Manager to prevent it from working in a BTS shop. It is just for those shops, you have to split of the files that are in the root and add extra definitions. But that's the same with just about any contribution that adds files to the root.

 

Jack

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

There's nothing in Links Manager to prevent it from working in a BTS shop. It is just for those shops, you have to split of the files that are in the root and add extra definitions. But that's the same with just about any contribution that adds files to the root.

 

Jack

Okay...I am not totally sure I understand. I uploaded folders into respective folders explained in directions. And I made file edits. Some edits were as the instructions...other edits...I had to find in one of the bts folders in the templates section.

 

All I understand is most of files of a bts template go in the fallback/contents folders. That is the bulk folder most the contents of the site are in.

 

Are you saying I should put the links, links_submit, links_submit_success, popup_links_help and links_db_update into the the fallback/contents folder?

 

And then add this:

 

define('CONTENT_LINKS', 'links');

define('CONTENT_LINKS_SUBMIT', 'links_submit');

define('CONTENT_LINKS_SUBMIT_SUCCESS', 'links_submit_success');

define('CONTENT_POPUP_LINKS_HELP', 'popup_links_help');

define('CONTENT_LINKS_DB_UPDATE, 'links_db_update');

 

to catalog/includes/filenames.php file?

 

I am really trying hard to understand this. I learned alot the past year...but still getting stumped on some things.

 

Janet

Link to comment
Share on other sites

One of the files that comes with Links Manager is links.php and it normally goes in the root of a shop. But with BTS that won't work. If someone came along and did this for you, you would find a file in the root named links.php and another in the template directory named links.php. Most of the content of both of those files come from the original links.php file. So the original file has to be split into two files. The easiest way to do this is to pick one of the existing files, hopefully from another contribution that was added to your shop, and compare the files that way. It is not something that can be explained here without going through the actual files and splitting them.

 

Jack

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

One of the files that comes with Links Manager is links.php and it normally goes in the root of a shop. But with BTS that won't work. If someone came along and did this for you, you would find a file in the root named links.php and another in the template directory named links.php. Most of the content of both of those files come from the original links.php file. So the original file has to be split into two files. The easiest way to do this is to pick one of the existing files, hopefully from another contribution that was added to your shop, and compare the files that way. It is not something that can be explained here without going through the actual files and splitting them.

 

Jack

 

Hello,

 

I am slowly but surely coming along. I spent most of my day yesterday on this. I had split the links.php file incorrectly. The one I was looking on does not look the same...however, with a fresh pair of eyes this morning...I was able to see my mistake. However, now I am getting this error:

 

Fatal error: Cannot redeclare tep_show_category() (previously declared in /home/electron/public_html/catalog/includes/boxes/categories.php:39) in /home/electron/public_html/catalog/includes/boxes/categories.php on line 133

 

my line 39

 

function tep_show_category($counter) {

 

And line 127-133

if ($tree[$counter]['next_id'] != false) {

     tep_show_category($tree[$counter]['next_id']);

   }

 }

 

Somewhere I read suggestion to change category to categories...but when I did that...it just produced more errors. Is there a better solution?

 

Janet

Link to comment
Share on other sites

It is mostly likely caused by the code for loading the categories box being included twice now that you have the files split. Be sure you haven't included the line to load the column_left file from the original links file.

 

Jack

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

It is mostly likely caused by the code for loading the categories box being included twice now that you have the files split. Be sure you haven't included the line to load the column_left file from the original links file.

 

Jack

 

Okay...I had to take out all this below to get it to fit the bts template

 

/*<!-- left_navigation //-->

/*<?php require(DIR_WS_INCLUDES . 'column_left.php'); ?>

/*<!-- left_navigation_eof //-->

 

<!-- right_navigation //-->

<?php require(DIR_WS_INCLUDES . 'column_right.php'); ?>

<!-- right_navigation_eof //-->

 

<!-- footer //-->

<?php require(DIR_WS_INCLUDES . 'footer.php'); ?>

<!-- footer_eof //-->

 

 

One thing I found wierd ...is my links & links_submit page in my fallback folder would not show up until the file extension tpl.php.tpl.php

was added. I am not sure how to just get it back to just tpl.php like all the other files in the fallback folder. Because I have a filling this is affecting

my next issue.

 

When I click the submit link button to test it....I get

 

0 -

 

insert into links_to_link_categories (links_id, link_categories_id) values ('0', '2')

 

[TEP STOP]

 

I don't know...It may not affect it...but I was wondering if those wierd file extensions may affect it when it is time for the links to be submitted by link exchange partners.

 

Also...another issue....is the links link on the home page still does not show up. I have looked all over to figure out where to put it in...but I can only find one folder...and that is the folder given in the directions catalog/includes/boxes/information.php...I'll keep looking...just haven't found a bts file that looks similar to it anywhere.

 

Let me know your thoughts...until...then...I will keep searching.

 

Janet

Link to comment
Share on other sites

Okay...I had to take out all this below to get it to fit the bts template

 

/*<!-- left_navigation //-->

/*<?php require(DIR_WS_INCLUDES . 'column_left.php'); ?>

/*<!-- left_navigation_eof //-->

 

<!-- right_navigation //-->

<?php require(DIR_WS_INCLUDES . 'column_right.php'); ?>

<!-- right_navigation_eof //-->

 

<!-- footer //-->

<?php require(DIR_WS_INCLUDES . 'footer.php'); ?>

<!-- footer_eof //-->

One thing I found wierd ...is my links & links_submit page in my fallback folder would not show up until the file extension tpl.php.tpl.php

was added. I am not sure how to just get it back to just tpl.php like all the other files in the fallback folder. Because I have a filling this is affecting

my next issue.

 

When I click the submit link button to test it....I get

 

0 -

 

insert into links_to_link_categories (links_id, link_categories_id) values ('0', '2')

 

[TEP STOP]

 

I don't know...It may not affect it...but I was wondering if those wierd file extensions may affect it when it is time for the links to be submitted by link exchange partners.

 

Also...another issue....is the links link on the home page still does not show up. I have looked all over to figure out where to put it in...but I can only find one folder...and that is the folder given in the directions catalog/includes/boxes/information.php...I'll keep looking...just haven't found a bts file that looks similar to it anywhere.

 

Let me know your thoughts...until...then...I will keep searching.

 

Janet

 

okay...I had a typo in my information.php folder...that is why the links link would not show up on the home page...I fixed it....silly silly me.

 

But I am still stuck on this:

One thing I found wierd ...is my links & links_submit page in my fallback folder would not show up until the file extension tpl.php.tpl.php

was added. I am not sure how to just get it back to just tpl.php like all the other files in the fallback folder. Because I have a filling this is affecting

my next issue.

 

When I click the submit link button to test it....I get

 

0 -

 

insert into links_to_link_categories (links_id, link_categories_id) values ('0', '2')

 

[TEP STOP]

 

I don't know...It may not affect it...but I was wondering if those wierd file extensions may affect it when it is time for the links to be submitted by link exchange partners.

Link to comment
Share on other sites

okay...I had a typo in my information.php folder...that is why the links link would not show up on the home page...I fixed it....silly silly me.

 

But I am still stuck on this:

One thing I found wierd ...is my links & links_submit page in my fallback folder would not show up until the file extension tpl.php.tpl.php

was added. I am not sure how to just get it back to just tpl.php like all the other files in the fallback folder. Because I have a filling this is affecting

my next issue.

 

When I click the submit link button to test it....I get

 

0 -

 

insert into links_to_link_categories (links_id, link_categories_id) values ('0', '2')

 

[TEP STOP]

 

I don't know...It may not affect it...but I was wondering if those wierd file extensions may affect it when it is time for the links to be submitted by link exchange partners.

Jack...??

 

Is my problem above because of settings here in the catalog/links_setup.php folder? Okay...I tested administrative side a long time ago. It worked. But in order for me to test the store side...I deleted two links to reput them in the system. They were the only two stores I had to sample the system with. So I deleted them. I think the system failed to set back to '0' ...that is why I am getting this error. Is there a reason the links_to_link_categories isn't set to auto-increment like links_id and link_categories_id is?

 

links_setup.php folder below:

<?php
/*
 $Id: links_setup.php,v 1.00 2003/10/02 Exp $

 osCommerce, Open Source E-Commerce Solutions
 [url="http://www.oscommerce.com"]http://www.oscommerce.com[/url]

 Copyright © 2003 osCommerce

 Released under the GNU General Public License
*/

 require('includes/application_top.php');

 // check if links db already installed
 $links_check_query = tep_db_query("select * from configuration_group where configuration_group_title = 'Links'");

 if (tep_db_num_rows($links_check_query) > 0) {
   echo 'Looks like Links Manager is already installed. Aborting...';
   tep_exit();
 }

 $links_sql_array = array(array("DROP TABLE IF EXISTS link_categories"), 
               array("CREATE TABLE link_categories (link_categories_id int NOT NULL auto_increment, parent_id INT(11) NOT NULL DEFAULT '0', link_categories_image varchar(64), link_categories_sort_order int(3), link_categories_date_added datetime, link_categories_last_modified datetime,  link_categories_status tinyint(1) NOT NULL default '1', PRIMARY KEY (link_categories_id), KEY idx_link_categories_date_added (link_categories_date_added))"), 
               array("DROP TABLE IF EXISTS link_categories_description"), 
               array("CREATE TABLE link_categories_description (link_categories_id int DEFAULT '0' NOT NULL, language_id int DEFAULT '1' NOT NULL, link_categories_name varchar(32) NOT NULL, link_categories_description text, categories_description_subtext LONGTEXT NULL, PRIMARY KEY (link_categories_id, language_id), KEY idx_link_categories_name (link_categories_name))"),
               array("DROP TABLE IF EXISTS links_to_link_categories"),
               array("CREATE TABLE links_to_link_categories (links_id int NOT NULL, link_categories_id int NOT NULL, PRIMARY KEY (links_id,link_categories_id))"),
               array("DROP TABLE IF EXISTS links"),
               array("CREATE TABLE links (links_id int NOT NULL auto_increment, links_url varchar(255), links_reciprocal_url varchar(255), links_reciprocal_disable tinyint(0) NOT NULL, links_reciprocal_check_count tinyint(4) NOT NULL DEFAULT '0', links_image_url varchar(255), links_contact_name varchar(64), links_contact_email varchar(96), links_date_added datetime NOT NULL, links_last_modified datetime, links_status tinyint(1) NOT NULL, links_clicked int NOT NULL default '0', links_category_suggest varchar(32) NULL, links_partner_username varchar(64) NOT NULL DEFAULT '', links_partner_password varchar(64) NOT NULL DEFAULT '', PRIMARY KEY (links_id), KEY idx_links_date_added (links_date_added))"),
               array("DROP TABLE IF EXISTS links_description"),
               array("CREATE TABLE links_description (links_id int NOT NULL auto_increment, language_id int NOT NULL default '1', links_title varchar(64) NOT NULL default '', links_description text, PRIMARY KEY  (links_id,language_id), KEY links_title (links_title))"),
               array("DROP TABLE IF EXISTS links_status"),
               array("CREATE TABLE links_status (links_status_id int DEFAULT '0' NOT NULL, language_id int DEFAULT '1' NOT NULL, links_status_name varchar(32) NOT NULL, PRIMARY KEY (links_status_id, language_id), KEY idx_links_status_name (links_status_name))"),
               array("DROP TABLE IF EXISTS links_featured"),
               array("CREATE TABLE links_featured (links_id int not null auto_increment, date_added datetime , expires_date datetime, links_all_pages TINYINT(1) NOT NULL DEFAULT '0', PRIMARY KEY (links_id))"),
               array("DROP TABLE IF EXISTS links_check"),
               array("CREATE TABLE links_check (links_id int not null auto_increment, date_last_checked datetime , link_found tinyint(1) NOT NULL, PRIMARY KEY (links_id))"));

 $db_error = false;

 // create tables
 foreach ($links_sql_array as $sql_array) {
   foreach ($sql_array as $value) {
     //echo $value . '<br>';
     if (tep_db_query($value) == false) {
       $db_error = true;
     }
   }
 }

 $links_sql_array = array(array("INSERT INTO links_status VALUES ( '1', '1', 'Pending')"),
                    array("INSERT INTO links_status VALUES ( '2', '1', 'Approved')"),
                    array("INSERT INTO links_status VALUES ( '3', '1', 'Disabled')"),
                    array("INSERT INTO links_status VALUES ( '4', '1', 'Waiting')"),

                    array("INSERT INTO links_status VALUES ( '1', '2', 'Pending')"),
                    array("INSERT INTO links_status VALUES ( '2', '2', 'Approved')"),
                    array("INSERT INTO links_status VALUES ( '3', '2', 'Disabled')"),
                    array("INSERT INTO links_status VALUES ( '4', '2', 'Waiting')"),

                    array("INSERT INTO links_status VALUES ( '1', '3', 'Pending')"),
                    array("INSERT INTO links_status VALUES ( '2', '3', 'Approved')"),
                    array("INSERT INTO links_status VALUES ( '3', '3', 'Disabled')"),
                    array("INSERT INTO links_status VALUES ( '4', '3', 'Waiting')"),

                    array("INSERT INTO links_status VALUES ( '1', '4', 'Pending')"),
                    array("INSERT INTO links_status VALUES ( '2', '4', 'Approved')"),
                    array("INSERT INTO links_status VALUES ( '3', '4', 'Disabled')"),
                    array("INSERT INTO links_status VALUES ( '4', '4', 'Waiting')"));

 $db_error = false;

 // create tables
 foreach ($links_sql_array as $sql_array) {
   foreach ($sql_array as $value) {
     if (tep_db_query($value) == false) {
       $db_error = true;
     }
   }
 }

 // create configuration group
 $group_query = "INSERT INTO configuration_group (configuration_group_title, configuration_group_description, sort_order) VALUES ('Links', 'Links Manager configuration options', '99')";

 if (tep_db_query($group_query) == false) {
   $db_error = true;
 }

 $configuration_group_id = tep_db_insert_id();

 // create configuration variables
 $config_sql_array = array(array("INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) VALUES ('<font color=blue>Click Count</font>', 'ENABLE_LINKS_COUNT', 'False', 'Enable links click count.', '" . $configuration_group_id . "', '1', 'tep_cfg_select_option(array(\'True\', \'False\'), ', now())"),
                     array("INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) VALUES ('<font color=blue>Spider Friendly Links</font>', 'ENABLE_SPIDER_FRIENDLY_LINKS', 'True', 'Enable spider friendly links (recommended).', '" . $configuration_group_id . "', '2', 'tep_cfg_select_option(array(\'True\', \'False\'), ', now())"),
                     array("INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) VALUES ('<font color=blue>Links Image Width</font>', 'LINKS_IMAGE_WIDTH', '120', 'Maximum width of the links image.', '" . $configuration_group_id . "', '3', now())"),
                     array("INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) VALUES ('<font color=blue>Links Image Height</font>', 'LINKS_IMAGE_HEIGHT', '60', 'Maximum height of the links image.', '" . $configuration_group_id . "', '4', now())"),

                     array("INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) VALUES ('<font color=green>Display Link Image</font>', 'LINK_LIST_IMAGE', '1', 'Do you want to display the Link Image?', '" . $configuration_group_id . "', '5', now())"),
                     array("INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) VALUES ('<font color=green>Display Link URL</font>', 'LINK_LIST_URL', '4', 'Do you want to display the Link URL?', '" . $configuration_group_id . "', '6', now())"),
                     array("INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) VALUES ('<font color=green>Display Link Title</font>', 'LINK_LIST_TITLE', '2', 'Do you want to display the Link Title?', '" . $configuration_group_id . "', '7', now())"),
                     array("INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) VALUES ('<font color=green>Display Link Description</font>', 'LINK_LIST_DESCRIPTION', '3', 'Do you want to display the Link Description?', '" . $configuration_group_id . "', '8', now())"),
                     array("INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) VALUES ('<font color=green>Display Link Click Count</font>', 'LINK_LIST_COUNT', '0', 'Do you want to display the Link Click Count?', '" . $configuration_group_id . "', '9', now())"),

                     array("INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) VALUES ('<font color=fuchsia>Display English Links</font>', 'LINKS_DISPLAY_ENGLISH', 'True', 'Display links in this language in the shop.', '" . $configuration_group_id . "', '10', now())"),
                     array("INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) VALUES ('<font color=fuchsia>Display German Links</font>', 'LINKS_DISPLAY_GERMAN', 'False', 'Display links in this language in the shop.', '" . $configuration_group_id . "', '11', now())"),
                     array("INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) VALUES ('<font color=fuchsia>Display Spanish Links</font>', 'LINKS_DISPLAY_SPANISH', 'False', 'Display links in this language in the shop.', '" . $configuration_group_id . "', '12', now())"),
                     array("INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) VALUES ('<font color=fuchsia>Display French Links</font>', 'LINKS_DISPLAY_FRENCH', 'False', 'Display links in this language in the shop.', '" . $configuration_group_id . "', '13', now())"),

                     array("INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) VALUES ('<font color=Brown>Display Link Title as links</font>', 'TITLES_AS_LINKS', 'False', 'Make the links title a link.', '" . $configuration_group_id . "', '14', 'tep_cfg_select_option(array(\'True\', \'False\'), ', now())"),
                     array("INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) VALUES ('<font color=Brown>Display Links Category images</font>', 'SHOW_LINKS_CATEGORIES_IMAGE', 'True', 'Display the images for the Links Categories.', '" . $configuration_group_id . "', '15', 'tep_cfg_select_option(array(\'True\', \'False\'), ', now())"),
                     array("INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) VALUES ('<font color=Brown>Display in standard format</font>', 'LINKS_DISPLAY_FORMAT_STANDARD', 'True', 'Dislay the links in the standard format (true) or in a vertical listing (false).', '" . $configuration_group_id . "', '16', 'tep_cfg_select_option(array(\'True\', \'False\'), ', now())"),
                     array("INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) VALUES ('<font color=Brown>Display Featured Link</font>', 'LINKS_FEATURED_LINK', 'True', 'Display a randomly selected link.', '" . $configuration_group_id . "', '17', 'tep_cfg_select_option(array(\'True\', \'False\'), ', now())"),
                     array("INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) VALUES ('<font color=Brown>Display Links in Categories</font>', 'LINKS_SHOW_CATEGORIES', 'True', 'Use categories to show the links. If this is disabled, all links are shown on one page.', '" . $configuration_group_id . "', '18', 'tep_cfg_select_option(array(\'True\', \'False\'), ', now())"),
                     array("INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) VALUES ('<font color=Brown>Display Link Count in Categories</font>', 'LINKS_SHOW_CATEGORIES_COUNT', 'False', 'Show the number of links in a category.', '" . $configuration_group_id . "', '19', 'tep_cfg_select_option(array(\'True\', \'False\'), ', now())"),

                     array("INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) VALUES ('<font color=purple>Link Title Minimum Length</font>', 'ENTRY_LINKS_TITLE_MIN_LENGTH', '2', 'Minimum length of link title.', '" . $configuration_group_id . "', '20', now())"),
                     array("INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) VALUES ('<font color=purple>Link URL Minimum Length</font>', 'ENTRY_LINKS_URL_MIN_LENGTH', '10', 'Minimum length of link URL.', '" . $configuration_group_id . "', '21', now())"),
                     array("INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) VALUES ('<font color=purple>Link Description Minimum Length</font>', 'ENTRY_LINKS_DESCRIPTION_MIN_LENGTH', '10', 'Minimum length of link description.', '" . $configuration_group_id . "', '22', now())"),
                     array("INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) VALUES ('<font color=purple>Link Description Maximum Length</font>', 'ENTRY_LINKS_DESCRIPTION_MAX_LENGTH', '200', 'Maximum length of link description.', '" . $configuration_group_id . "', '23', now())"),
                     array("INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) VALUES ('<font color=purple>Link Contact Name Minimum Length</font>', 'ENTRY_LINKS_CONTACT_NAME_MIN_LENGTH', '2', 'Minimum length of link contact name.', '" . $configuration_group_id . "', '24', now())"),
                     array("INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) VALUES ('<font color=purple>Link Maximum to Display</font>', 'MAX_LINKS_DISPLAY', '20', 'How many links should be displayed per page?', '" . $configuration_group_id . "', '25', now())"),

                     array("INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) VALUES ('Links Blacklist', 'LINKS_CHECK_BLACKLIST', '', 'Do not allow links to be submitted if they contain these words. To enter more than one one, use a comma seperator, i.e., bad word a, bad word b.', '" . $configuration_group_id . "', '26', now())"),
                     array("INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) VALUES ('Links Check Phrase', 'LINKS_CHECK_PHRASE', '" . $HTTP_SERVER_VARS['SERVER_NAME'] . "', 'Phrase to look for, when you perform a link check. To enter more than one phase, use a comma seperator, i.e., phase a, phase b.', '" . $configuration_group_id . "', '27', now())"),
                     array("INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) VALUES ('Check Link on Edit', 'LINKS_CHECK_ON_EDIT', 'True', 'Check if a reciprocol link is valid when Edit is clicked. This will slow down the loading of the edit page a little.', '" . $configuration_group_id . "', '28', 'tep_cfg_select_option(array(\'True\', \'False\'), ', now())"),
                     array("INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) VALUES ('Links open in new page', 'LINKS_OPEN_NEW_PAGE', 'True', 'Open links in new page when clicked.', '" . $configuration_group_id . "', '29', 'tep_cfg_select_option(array(\'True\', \'False\'), ', now())"),
                     array("INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) VALUES ('Reciprocal Link required', 'LINKS_RECIPROCAL_REQUIRED', 'True', 'A reciprocal link is required when a link is submitted.', '" . $configuration_group_id . "', '30', 'tep_cfg_select_option(array(\'True\', \'False\'), ', now())"),
                     array("INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) VALUES ('Reciprocal Link Check Count', 'LINKS_RECIPROCAL_CHECK_COUNT', '2', 'How many times a link is checked by the link_check script before it is disabled.', '" . $configuration_group_id . "', '31', now())"),
                     array("INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) VALUES ('Check for Duplicate Links', 'LINKS_CHECK_DUPLICATE', 'True', 'Check if the submitted link is already on file.', '" . $configuration_group_id . "', '32', 'tep_cfg_select_option(array(\'True\', \'False\'), ', now())"),
                     array("INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) VALUES ('Allow Link Editing', 'LINKS_ALLOW_EDITING', 'False', 'Set this option to true to allow link partners to edit their links.', '" . $configuration_group_id . "', '34', 'tep_cfg_select_option(array(\'True\', \'False\'), ', now())"));

 foreach ($config_sql_array as $sql_array) {
   foreach ($sql_array as $value) {
     //echo $value . '<br>';
     if (tep_db_query($value) == false) {
       $db_error = true;
     }
   }
 }

?>
<!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>
<base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>">
<link rel="stylesheet" type="text/css" href="stylesheet.css">
</head>
<body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0">
<!-- header //-->
<?php require(DIR_WS_INCLUDES . 'header.php'); ?>
<!-- header_eof //-->

<!-- body //-->
<table border="0" width="100%" cellspacing="3" cellpadding="3">
 <tr>
   <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2">
<!-- 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="0">
     <tr>
       <td><table border="0" width="100%" cellspacing="0" cellpadding="0">
         <tr>
           <td class="pageHeading"><?php echo 'Links Manager Setup'; ?></td>
         </tr>
       </table></td>
     </tr>
     <tr>
       <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
     </tr>
     <tr>
       <td class="main">
<?php
 if ($db_error == false) {
   echo 'Database successfully updated!!!';
 } else {
   echo 'Error encountered during database update.';
 }
?>
       </td>
     </tr>
     <tr>
       <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
     </tr>
   </table></td>
<!-- body_text_eof //-->
   <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2">
<!-- right_navigation //-->
<?php require(DIR_WS_INCLUDES . 'column_right.php'); ?>
<!-- right_navigation_eof //-->
   </table></td>
 </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'); ?>

Link to comment
Share on other sites

Jack...??

 

Is my problem above because of settings here in the catalog/links_setup.php folder? Okay...I tested administrative side a long time ago. It worked. But in order for me to test the store side...I deleted two links to reput them in the system. They were the only two stores I had to sample the system with. So I deleted them. I think the system failed to set back to '0' ...that is why I am getting this error. Is there a reason the links_to_link_categories isn't set to auto-increment like links_id and link_categories_id is?

 

links_setup.php folder below:

<?php
/*
 $Id: links_setup.php,v 1.00 2003/10/02 Exp $

 osCommerce, Open Source E-Commerce Solutions
 [url="http://www.oscommerce.com"]http://www.oscommerce.com[/url]

 Copyright © 2003 osCommerce

 Released under the GNU General Public License
*/

 require('includes/application_top.php');

 // check if links db already installed
 $links_check_query = tep_db_query("select * from configuration_group where configuration_group_title = 'Links'");

 if (tep_db_num_rows($links_check_query) > 0) {
   echo 'Looks like Links Manager is already installed. Aborting...';
   tep_exit();
 }

 $links_sql_array = array(array("DROP TABLE IF EXISTS link_categories"), 
               array("CREATE TABLE link_categories (link_categories_id int NOT NULL auto_increment, parent_id INT(11) NOT NULL DEFAULT '0', link_categories_image varchar(64), link_categories_sort_order int(3), link_categories_date_added datetime, link_categories_last_modified datetime,  link_categories_status tinyint(1) NOT NULL default '1', PRIMARY KEY (link_categories_id), KEY idx_link_categories_date_added (link_categories_date_added))"), 
               array("DROP TABLE IF EXISTS link_categories_description"), 
               array("CREATE TABLE link_categories_description (link_categories_id int DEFAULT '0' NOT NULL, language_id int DEFAULT '1' NOT NULL, link_categories_name varchar(32) NOT NULL, link_categories_description text, categories_description_subtext LONGTEXT NULL, PRIMARY KEY (link_categories_id, language_id), KEY idx_link_categories_name (link_categories_name))"),
               array("DROP TABLE IF EXISTS links_to_link_categories"),
               array("CREATE TABLE links_to_link_categories (links_id int NOT NULL, link_categories_id int NOT NULL, PRIMARY KEY (links_id,link_categories_id))"),
               array("DROP TABLE IF EXISTS links"),
               array("CREATE TABLE links (links_id int NOT NULL auto_increment, links_url varchar(255), links_reciprocal_url varchar(255), links_reciprocal_disable tinyint(0) NOT NULL, links_reciprocal_check_count tinyint(4) NOT NULL DEFAULT '0', links_image_url varchar(255), links_contact_name varchar(64), links_contact_email varchar(96), links_date_added datetime NOT NULL, links_last_modified datetime, links_status tinyint(1) NOT NULL, links_clicked int NOT NULL default '0', links_category_suggest varchar(32) NULL, links_partner_username varchar(64) NOT NULL DEFAULT '', links_partner_password varchar(64) NOT NULL DEFAULT '', PRIMARY KEY (links_id), KEY idx_links_date_added (links_date_added))"),
               array("DROP TABLE IF EXISTS links_description"),
               array("CREATE TABLE links_description (links_id int NOT NULL auto_increment, language_id int NOT NULL default '1', links_title varchar(64) NOT NULL default '', links_description text, PRIMARY KEY  (links_id,language_id), KEY links_title (links_title))"),
               array("DROP TABLE IF EXISTS links_status"),
               array("CREATE TABLE links_status (links_status_id int DEFAULT '0' NOT NULL, language_id int DEFAULT '1' NOT NULL, links_status_name varchar(32) NOT NULL, PRIMARY KEY (links_status_id, language_id), KEY idx_links_status_name (links_status_name))"),
               array("DROP TABLE IF EXISTS links_featured"),
               array("CREATE TABLE links_featured (links_id int not null auto_increment, date_added datetime , expires_date datetime, links_all_pages TINYINT(1) NOT NULL DEFAULT '0', PRIMARY KEY (links_id))"),
               array("DROP TABLE IF EXISTS links_check"),
               array("CREATE TABLE links_check (links_id int not null auto_increment, date_last_checked datetime , link_found tinyint(1) NOT NULL, PRIMARY KEY (links_id))"));

 $db_error = false;

 // create tables
 foreach ($links_sql_array as $sql_array) {
   foreach ($sql_array as $value) {
     //echo $value . '<br>';
     if (tep_db_query($value) == false) {
       $db_error = true;
     }
   }
 }

 $links_sql_array = array(array("INSERT INTO links_status VALUES ( '1', '1', 'Pending')"),
                    array("INSERT INTO links_status VALUES ( '2', '1', 'Approved')"),
                    array("INSERT INTO links_status VALUES ( '3', '1', 'Disabled')"),
                    array("INSERT INTO links_status VALUES ( '4', '1', 'Waiting')"),

                    array("INSERT INTO links_status VALUES ( '1', '2', 'Pending')"),
                    array("INSERT INTO links_status VALUES ( '2', '2', 'Approved')"),
                    array("INSERT INTO links_status VALUES ( '3', '2', 'Disabled')"),
                    array("INSERT INTO links_status VALUES ( '4', '2', 'Waiting')"),

                    array("INSERT INTO links_status VALUES ( '1', '3', 'Pending')"),
                    array("INSERT INTO links_status VALUES ( '2', '3', 'Approved')"),
                    array("INSERT INTO links_status VALUES ( '3', '3', 'Disabled')"),
                    array("INSERT INTO links_status VALUES ( '4', '3', 'Waiting')"),

                    array("INSERT INTO links_status VALUES ( '1', '4', 'Pending')"),
                    array("INSERT INTO links_status VALUES ( '2', '4', 'Approved')"),
                    array("INSERT INTO links_status VALUES ( '3', '4', 'Disabled')"),
                    array("INSERT INTO links_status VALUES ( '4', '4', 'Waiting')"));

 $db_error = false;

 // create tables
 foreach ($links_sql_array as $sql_array) {
   foreach ($sql_array as $value) {
     if (tep_db_query($value) == false) {
       $db_error = true;
     }
   }
 }

 // create configuration group
 $group_query = "INSERT INTO configuration_group (configuration_group_title, configuration_group_description, sort_order) VALUES ('Links', 'Links Manager configuration options', '99')";

 if (tep_db_query($group_query) == false) {
   $db_error = true;
 }

 $configuration_group_id = tep_db_insert_id();

 // create configuration variables
 $config_sql_array = array(array("INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) VALUES ('<font color=blue>Click Count</font>', 'ENABLE_LINKS_COUNT', 'False', 'Enable links click count.', '" . $configuration_group_id . "', '1', 'tep_cfg_select_option(array(\'True\', \'False\'), ', now())"),
                     array("INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) VALUES ('<font color=blue>Spider Friendly Links</font>', 'ENABLE_SPIDER_FRIENDLY_LINKS', 'True', 'Enable spider friendly links (recommended).', '" . $configuration_group_id . "', '2', 'tep_cfg_select_option(array(\'True\', \'False\'), ', now())"),
                     array("INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) VALUES ('<font color=blue>Links Image Width</font>', 'LINKS_IMAGE_WIDTH', '120', 'Maximum width of the links image.', '" . $configuration_group_id . "', '3', now())"),
                     array("INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) VALUES ('<font color=blue>Links Image Height</font>', 'LINKS_IMAGE_HEIGHT', '60', 'Maximum height of the links image.', '" . $configuration_group_id . "', '4', now())"),

                     array("INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) VALUES ('<font color=green>Display Link Image</font>', 'LINK_LIST_IMAGE', '1', 'Do you want to display the Link Image?', '" . $configuration_group_id . "', '5', now())"),
                     array("INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) VALUES ('<font color=green>Display Link URL</font>', 'LINK_LIST_URL', '4', 'Do you want to display the Link URL?', '" . $configuration_group_id . "', '6', now())"),
                     array("INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) VALUES ('<font color=green>Display Link Title</font>', 'LINK_LIST_TITLE', '2', 'Do you want to display the Link Title?', '" . $configuration_group_id . "', '7', now())"),
                     array("INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) VALUES ('<font color=green>Display Link Description</font>', 'LINK_LIST_DESCRIPTION', '3', 'Do you want to display the Link Description?', '" . $configuration_group_id . "', '8', now())"),
                     array("INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) VALUES ('<font color=green>Display Link Click Count</font>', 'LINK_LIST_COUNT', '0', 'Do you want to display the Link Click Count?', '" . $configuration_group_id . "', '9', now())"),

                     array("INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) VALUES ('<font color=fuchsia>Display English Links</font>', 'LINKS_DISPLAY_ENGLISH', 'True', 'Display links in this language in the shop.', '" . $configuration_group_id . "', '10', now())"),
                     array("INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) VALUES ('<font color=fuchsia>Display German Links</font>', 'LINKS_DISPLAY_GERMAN', 'False', 'Display links in this language in the shop.', '" . $configuration_group_id . "', '11', now())"),
                     array("INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) VALUES ('<font color=fuchsia>Display Spanish Links</font>', 'LINKS_DISPLAY_SPANISH', 'False', 'Display links in this language in the shop.', '" . $configuration_group_id . "', '12', now())"),
                     array("INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) VALUES ('<font color=fuchsia>Display French Links</font>', 'LINKS_DISPLAY_FRENCH', 'False', 'Display links in this language in the shop.', '" . $configuration_group_id . "', '13', now())"),

                     array("INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) VALUES ('<font color=Brown>Display Link Title as links</font>', 'TITLES_AS_LINKS', 'False', 'Make the links title a link.', '" . $configuration_group_id . "', '14', 'tep_cfg_select_option(array(\'True\', \'False\'), ', now())"),
                     array("INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) VALUES ('<font color=Brown>Display Links Category images</font>', 'SHOW_LINKS_CATEGORIES_IMAGE', 'True', 'Display the images for the Links Categories.', '" . $configuration_group_id . "', '15', 'tep_cfg_select_option(array(\'True\', \'False\'), ', now())"),
                     array("INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) VALUES ('<font color=Brown>Display in standard format</font>', 'LINKS_DISPLAY_FORMAT_STANDARD', 'True', 'Dislay the links in the standard format (true) or in a vertical listing (false).', '" . $configuration_group_id . "', '16', 'tep_cfg_select_option(array(\'True\', \'False\'), ', now())"),
                     array("INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) VALUES ('<font color=Brown>Display Featured Link</font>', 'LINKS_FEATURED_LINK', 'True', 'Display a randomly selected link.', '" . $configuration_group_id . "', '17', 'tep_cfg_select_option(array(\'True\', \'False\'), ', now())"),
                     array("INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) VALUES ('<font color=Brown>Display Links in Categories</font>', 'LINKS_SHOW_CATEGORIES', 'True', 'Use categories to show the links. If this is disabled, all links are shown on one page.', '" . $configuration_group_id . "', '18', 'tep_cfg_select_option(array(\'True\', \'False\'), ', now())"),
                     array("INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) VALUES ('<font color=Brown>Display Link Count in Categories</font>', 'LINKS_SHOW_CATEGORIES_COUNT', 'False', 'Show the number of links in a category.', '" . $configuration_group_id . "', '19', 'tep_cfg_select_option(array(\'True\', \'False\'), ', now())"),

                     array("INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) VALUES ('<font color=purple>Link Title Minimum Length</font>', 'ENTRY_LINKS_TITLE_MIN_LENGTH', '2', 'Minimum length of link title.', '" . $configuration_group_id . "', '20', now())"),
                     array("INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) VALUES ('<font color=purple>Link URL Minimum Length</font>', 'ENTRY_LINKS_URL_MIN_LENGTH', '10', 'Minimum length of link URL.', '" . $configuration_group_id . "', '21', now())"),
                     array("INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) VALUES ('<font color=purple>Link Description Minimum Length</font>', 'ENTRY_LINKS_DESCRIPTION_MIN_LENGTH', '10', 'Minimum length of link description.', '" . $configuration_group_id . "', '22', now())"),
                     array("INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) VALUES ('<font color=purple>Link Description Maximum Length</font>', 'ENTRY_LINKS_DESCRIPTION_MAX_LENGTH', '200', 'Maximum length of link description.', '" . $configuration_group_id . "', '23', now())"),
                     array("INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) VALUES ('<font color=purple>Link Contact Name Minimum Length</font>', 'ENTRY_LINKS_CONTACT_NAME_MIN_LENGTH', '2', 'Minimum length of link contact name.', '" . $configuration_group_id . "', '24', now())"),
                     array("INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) VALUES ('<font color=purple>Link Maximum to Display</font>', 'MAX_LINKS_DISPLAY', '20', 'How many links should be displayed per page?', '" . $configuration_group_id . "', '25', now())"),

                     array("INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) VALUES ('Links Blacklist', 'LINKS_CHECK_BLACKLIST', '', 'Do not allow links to be submitted if they contain these words. To enter more than one one, use a comma seperator, i.e., bad word a, bad word b.', '" . $configuration_group_id . "', '26', now())"),
                     array("INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) VALUES ('Links Check Phrase', 'LINKS_CHECK_PHRASE', '" . $HTTP_SERVER_VARS['SERVER_NAME'] . "', 'Phrase to look for, when you perform a link check. To enter more than one phase, use a comma seperator, i.e., phase a, phase b.', '" . $configuration_group_id . "', '27', now())"),
                     array("INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) VALUES ('Check Link on Edit', 'LINKS_CHECK_ON_EDIT', 'True', 'Check if a reciprocol link is valid when Edit is clicked. This will slow down the loading of the edit page a little.', '" . $configuration_group_id . "', '28', 'tep_cfg_select_option(array(\'True\', \'False\'), ', now())"),
                     array("INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) VALUES ('Links open in new page', 'LINKS_OPEN_NEW_PAGE', 'True', 'Open links in new page when clicked.', '" . $configuration_group_id . "', '29', 'tep_cfg_select_option(array(\'True\', \'False\'), ', now())"),
                     array("INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) VALUES ('Reciprocal Link required', 'LINKS_RECIPROCAL_REQUIRED', 'True', 'A reciprocal link is required when a link is submitted.', '" . $configuration_group_id . "', '30', 'tep_cfg_select_option(array(\'True\', \'False\'), ', now())"),
                     array("INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) VALUES ('Reciprocal Link Check Count', 'LINKS_RECIPROCAL_CHECK_COUNT', '2', 'How many times a link is checked by the link_check script before it is disabled.', '" . $configuration_group_id . "', '31', now())"),
                     array("INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) VALUES ('Check for Duplicate Links', 'LINKS_CHECK_DUPLICATE', 'True', 'Check if the submitted link is already on file.', '" . $configuration_group_id . "', '32', 'tep_cfg_select_option(array(\'True\', \'False\'), ', now())"),
                     array("INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) VALUES ('Allow Link Editing', 'LINKS_ALLOW_EDITING', 'False', 'Set this option to true to allow link partners to edit their links.', '" . $configuration_group_id . "', '34', 'tep_cfg_select_option(array(\'True\', \'False\'), ', now())"));

 foreach ($config_sql_array as $sql_array) {
   foreach ($sql_array as $value) {
     //echo $value . '<br>';
     if (tep_db_query($value) == false) {
       $db_error = true;
     }
   }
 }

?>
<!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>
<base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>">
<link rel="stylesheet" type="text/css" href="stylesheet.css">
</head>
<body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0">
<!-- header //-->
<?php require(DIR_WS_INCLUDES . 'header.php'); ?>
<!-- header_eof //-->

<!-- body //-->
<table border="0" width="100%" cellspacing="3" cellpadding="3">
 <tr>
   <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2">
<!-- 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="0">
     <tr>
       <td><table border="0" width="100%" cellspacing="0" cellpadding="0">
         <tr>
           <td class="pageHeading"><?php echo 'Links Manager Setup'; ?></td>
         </tr>
       </table></td>
     </tr>
     <tr>
       <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
     </tr>
     <tr>
       <td class="main">
<?php
 if ($db_error == false) {
   echo 'Database successfully updated!!!';
 } else {
   echo 'Error encountered during database update.';
 }
?>
       </td>
     </tr>
     <tr>
       <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
     </tr>
   </table></td>
<!-- body_text_eof //-->
   <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2">
<!-- right_navigation //-->
<?php require(DIR_WS_INCLUDES . 'column_right.php'); ?>
<!-- right_navigation_eof //-->
   </table></td>
 </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'); ?>

 

Just in case anyone has this problem....

 

On line 30 of the links_setup.php....is says

links_id has an autoincrement...as so...

 

array("CREATE TABLE links (links_id int NOT NULL auto_increment, links_url varchar(255)......

 

However, when I went to my phpadmin and checked the sql...it was not there. For some reason it did not upload properly.

All you have to do is go to your phpadmin....click link_to_link categories in the left column box...

 

Then two fields (links_id & links_categories_id) under the structure tab come up. click a check mark for links_id and scoll to the right under actions and click the PENCIL symbol and then you will be able to click AUTO_INCREMENT from a drop down menu at the right.

 

Hope this helps...someone...as I was scared to death to touch the database...but I finally got the nerve and it worked.

 

Janet

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...