Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Article Manager v1.0


RobAnderson

Recommended Posts

1054 - Unknown column 'sortorder_logo_1' in 'field list'

 

I have the Header Tags SEO V 3.1.8 contrib.

That's a problem with the Header Tags version you have installed. You need to upgrade to the latest version.

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

Ok Jack, thank you for your efforts, I can live without this, but could you help me with the other issue I mention regarding the article manager breadcrumb links, in post 1459

 

I have SEO Urls V 2-2.2d-9 installed, my breadcrumb links are sef throughout the rest of the site but the article manager urls in the breadcrumb trail are the orginal oscommerce urls.

They work correctly for me in my test shop here. Be sure you made the change to the breadcrumb code in includes/application_top.php, that you removed any other header tags code from that file that may have been there from earlier versions and that you have the articles setup as pseudo pages with titles filled in.

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

Hi,

I'm trying to install Article Manager v 1.5.6v1 (I'm not using the header tag SEO contrib). When I try to run article_manager_sql.sql I get this error:

SQL query: Documentation

INSERT INTO configuration( configuration_id, configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function )
VALUES (
'', 'Display New Articles Link', 'DISPLAY_NEW_ARTICLES', 'true', 'Display a link to New Articles in the Articles box?', 456, 1, now( ) , now( ) , NULL , 'tep_cfg_select_option(array(\'true\', \'false\'),'
);

MySQL said: Documentation
#1062 - Duplicate entry '0' for key 1 

 

Could someone please tell me what I need to do to fix it?

 

Thanks :)

Link to comment
Share on other sites

Ok... I don't really understand the Header Tags contrib, thats why I don't use it. Are you able to PM me and explain how it works? I would like to use the Article contrib, so if I have to use header tags too I guess I need to know what it does... Thanks :)

Link to comment
Share on other sites

For your shop to place well in the search engine listings, you have to make certain changes to the code in your shop. If you don't make those changes, it is highly unlikely your shop will ever place well in the listings and so your traffic, and sales, will suffer. Header Tags SEO makes many of those changes for you. Many shops report a quick increase in their index positions, and thus traffic, after installing it. One of its main functions is to control the web browser title of the page being displayed. For example, if you have not changed yours, the web browser is probably displaying oscommerce for your home page - not good. The reason Header Tags SEO is packaged with Article Manager is because, without it, the titles of the articles are not changed, thus reducing their effectiveness. Header Tags SEO is not a quick install but you will be very happy once it is installed and setup.

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

Ok thank you. I don't want to take this thread off topic, but for Article Manager to work I don't have to have Header Tags SEO installed on my product pages? I already have another very simple add-on taking care of the page titles on my product pages.

 

Thanks

 

For your shop to place well in the search engine listings, you have to make certain changes to the code in your shop. If you don't make those changes, it is highly unlikely your shop will ever place well in the listings and so your traffic, and sales, will suffer. Header Tags SEO makes many of those changes for you. Many shops report a quick increase in their index positions, and thus traffic, after installing it. One of its main functions is to control the web browser title of the page being displayed. For example, if you have not changed yours, the web browser is probably displaying oscommerce for your home page - not good. The reason Header Tags SEO is packaged with Article Manager is because, without it, the titles of the articles are not changed, thus reducing their effectiveness. Header Tags SEO is not a quick install but you will be very happy once it is installed and setup.

Link to comment
Share on other sites

Ok thank you. I don't want to take this thread off topic, but for Article Manager to work I don't have to have Header Tags SEO installed on my product pages? I already have another very simple add-on taking care of the page titles on my product pages.

You only have to Header Tags SEO installed if you are using version 1_57 of Article Manager. If you are using a different version, then you're on your own when it comes to problems with it, unless someone decides to support it.

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

Thanks for all your help by the way Jack.

 

What I meant was, if I want to use version 1.57, am I able to install Header Tags SEO, but not use it on my product pages? ie, have it installed to work on the articles, but not the products?

 

Thanks :thumbsup:

Link to comment
Share on other sites

They work correctly for me in my test shop here. Be sure you made the change to the breadcrumb code in includes/application_top.php, that you removed any other header tags code from that file that may have been there from earlier versions and that you have the articles setup as pseudo pages with titles filled in.

 

I have followed your instructions, the code in includes/application_top.php is correct, and the pseduo page is enabled with titles filled in. I still get the orginal oscommerce url in the breadcrumb. The title of the page is there but the url is not an seo url. When you hold mouse of the link it shows as

http://www.mydomain.com/article_info.php?articles_id=8

When clicked on it does redirect to the seo url.

 

I have included my includes/application_top.php, please have a look, thank you.

<?php
/*
 $Id: application_top.php 1833 2008-01-30 22:03:30Z hpdl $

 osCommerce, Open Source E-Commerce Solutions
 http://www.oscommerce.com

 Copyright (c) 2008 osCommerce

 Released under the GNU General Public License
*/

// start the timer for the page parse time log
 define('PAGE_PARSE_START_TIME', microtime());

// set the level of error reporting
 error_reporting( E_ALL & ~E_NOTICE & ~E_DEPRECATED );
 date_default_timezone_set("America/Toronto");

// check support for register_globals
 if (function_exists('ini_get') && (ini_get('register_globals') == false) && (PHP_VERSION < 

4.3) ) {
   exit('Server Requirement Error: register_globals is disabled in your PHP configuration. 

This can be enabled in your php.ini configuration file or in the .htaccess file in your catalog 

directory. Please use PHP 4.3+ if register_globals cannot be enabled on the server.');
 }

// Set the local configuration parameters - mainly for developers
 if (file_exists('includes/local/configure.php')) include('includes/local/configure.php');

// include server parameters
 require('includes/configure.php');

 if (strlen(DB_SERVER) < 1) {
   if (is_dir('install')) {
     header('Location: install/index.php');
   }
 }

// define the project version
 define('PROJECT_VERSION', 'osCommerce Online Merchant v2.2 RC2a');

// some code to solve compatibility issues
 require(DIR_WS_FUNCTIONS . 'compatibility.php');

// set the type of request (secure or not)
 $request_type = (getenv('HTTPS') == 'on') ? 'SSL' : 'NONSSL';

// set php_self in the local scope
 if (!isset($PHP_SELF)) $PHP_SELF = $HTTP_SERVER_VARS['PHP_SELF'];

 if ($request_type == 'NONSSL') {
   define('DIR_WS_CATALOG', DIR_WS_HTTP_CATALOG);
 } else {
   define('DIR_WS_CATALOG', DIR_WS_HTTPS_CATALOG);
 }

// include the list of project filenames
 require(DIR_WS_INCLUDES . 'filenames.php');

// include the list of project database tables
 require(DIR_WS_INCLUDES . 'database_tables.php');

// customization for the design layout
 define('BOX_WIDTH', 193); // how wide the boxes should be in pixels (default: 225)

// include the database functions
 require(DIR_WS_FUNCTIONS . 'database.php');

// make a connection to the database... now
 tep_db_connect() or die('Unable to connect to database server!');

// set the application parameters
 $configuration_query = tep_db_query('select configuration_key as cfgKey, 

configuration_value as cfgValue from ' . TABLE_CONFIGURATION);
 while ($configuration = tep_db_fetch_array($configuration_query)) {
   define($configuration['cfgKey'], $configuration['cfgValue']);
 }

// if gzip_compression is enabled, start to buffer the output
 if ( (GZIP_COMPRESSION == 'true') && ($ext_zlib_loaded = extension_loaded('zlib')) && 

(PHP_VERSION >= '4') ) {
   if (($ini_zlib_output_compression = (int)ini_get('zlib.output_compression')) < 1) {
     if (PHP_VERSION >= '4.0.4') {
       ob_start('ob_gzhandler');
     } else {
       include(DIR_WS_FUNCTIONS . 'gzip_compression.php');
       ob_start();
       ob_implicit_flush();
     }
   } else {
     ini_set('zlib.output_compression_level', GZIP_LEVEL);
   }
 }

// set the HTTP GET parameters manually if search_engine_friendly_urls is enabled
 if (SEARCH_ENGINE_FRIENDLY_URLS == 'true') {
   if (strlen(getenv('PATH_INFO')) > 1) {
     $GET_array = array();
     $PHP_SELF = str_replace(getenv('PATH_INFO'), '', $PHP_SELF);
     $vars = explode('/', substr(getenv('PATH_INFO'), 1));
     for ($i=0, $n=sizeof($vars); $i<$n; $i++) {
       if (strpos($vars[$i], '[]')) {
         $GET_array[substr($vars[$i], 0, -2)][] = $vars[$i+1];
       } else {
         $HTTP_GET_VARS[$vars[$i]] = $vars[$i+1];
       }
       $i++;
     }

     if (sizeof($GET_array) > 0) {
       while (list($key, $value) = each($GET_array)) {
         $HTTP_GET_VARS[$key] = $value;
       }
     }
   }
 }

// define general functions used application-wide
 require(DIR_WS_FUNCTIONS . 'general.php');
 require(DIR_WS_FUNCTIONS . 'html_output.php');

// set the cookie domain
 $cookie_domain = (($request_type == 'NONSSL') ? HTTP_COOKIE_DOMAIN : 

HTTPS_COOKIE_DOMAIN);
 $cookie_path = (($request_type == 'NONSSL') ? HTTP_COOKIE_PATH : 

HTTPS_COOKIE_PATH);

// include cache functions if enabled
 if (USE_CACHE == 'true') include(DIR_WS_FUNCTIONS . 'cache.php');

// include shopping cart class
 require(DIR_WS_CLASSES . 'shopping_cart.php');

// include navigation history class
 require(DIR_WS_CLASSES . 'navigation_history.php');

// check if sessions are supported, otherwise use the php3 compatible session class
 if (!function_exists('session_start')) {
   define('PHP_SESSION_NAME', 'osCsid');
   define('PHP_SESSION_PATH', $cookie_path);
   define('PHP_SESSION_DOMAIN', $cookie_domain);
   define('PHP_SESSION_SAVE_PATH', SESSION_WRITE_DIRECTORY);

   include(DIR_WS_CLASSES . 'sessions.php');
 }

// define how the session functions will be used
 require(DIR_WS_FUNCTIONS . 'sessions.php');

// set the session name and save path
 tep_session_name('osCsid');
 tep_session_save_path(SESSION_WRITE_DIRECTORY);

// set the session cookie parameters
  if (function_exists('session_set_cookie_params')) {
   session_set_cookie_params(0, $cookie_path, $cookie_domain);
 } elseif (function_exists('ini_set')) {
   ini_set('session.cookie_lifetime', '0');
   ini_set('session.cookie_path', $cookie_path);
   ini_set('session.cookie_domain', $cookie_domain);
 }

// set the session ID if it exists
  if (isset($HTTP_POST_VARS[tep_session_name()])) {
    tep_session_id($HTTP_POST_VARS[tep_session_name()]);
  } elseif ( ($request_type == 'SSL') && isset($HTTP_GET_VARS[tep_session_name()]) ) {
    tep_session_id($HTTP_GET_VARS[tep_session_name()]);
  }

// start the session
 $session_started = false;
 if (SESSION_FORCE_COOKIE_USE == 'True') {
   tep_setcookie('cookie_test', 'please_accept_for_session', time()+60*60*24*30, 

$cookie_path, $cookie_domain);

   if (isset($HTTP_COOKIE_VARS['cookie_test'])) {
     tep_session_start();
     $session_started = true;
   }
 } elseif (SESSION_BLOCK_SPIDERS == 'True') {
   $user_agent = strtolower(getenv('HTTP_USER_AGENT'));
   $spider_flag = false;

   if (tep_not_null($user_agent)) {
     $spiders = file(DIR_WS_INCLUDES . 'spiders.txt');

     for ($i=0, $n=sizeof($spiders); $i<$n; $i++) {
       if (tep_not_null($spiders[$i])) {
         if (is_integer(strpos($user_agent, trim($spiders[$i])))) {
           $spider_flag = true;
           break;
         }
       }
     }
   }

   if ($spider_flag == false) {
     tep_session_start();
     $session_started = true;
   }
 } else {
   tep_session_start();
   $session_started = true;
 }

 if ( ($session_started == true) && (PHP_VERSION >= 4.3) && function_exists('ini_get') && 

(ini_get('register_globals') == false) ) {
   extract($_SESSION, EXTR_OVERWRITE+EXTR_REFS);
 }

// set SID once, even if empty
 $SID = (defined('SID') ? SID : '');

// verify the ssl_session_id if the feature is enabled
 if ( ($request_type == 'SSL') && (SESSION_CHECK_SSL_SESSION_ID == 'True') && 

(ENABLE_SSL == true) && ($session_started == true) ) {
   $ssl_session_id = getenv('SSL_SESSION_ID');
   if (!tep_session_is_registered('SSL_SESSION_ID')) {
     $SESSION_SSL_ID = $ssl_session_id;
     tep_session_register('SESSION_SSL_ID');
   }

   if ($SESSION_SSL_ID != $ssl_session_id) {
     tep_session_destroy();
     tep_redirect(tep_href_link(FILENAME_SSL_CHECK));
   }
 }

// verify the browser user agent if the feature is enabled
 if (SESSION_CHECK_USER_AGENT == 'True') {
   $http_user_agent = getenv('HTTP_USER_AGENT');
   if (!tep_session_is_registered('SESSION_USER_AGENT')) {
     $SESSION_USER_AGENT = $http_user_agent;
     tep_session_register('SESSION_USER_AGENT');
   }

   if ($SESSION_USER_AGENT != $http_user_agent) {
     tep_session_destroy();
     tep_redirect(tep_href_link(FILENAME_LOGIN));
   }
 }

// verify the IP address if the feature is enabled
 if (SESSION_CHECK_IP_ADDRESS == 'True') {
   $ip_address = tep_get_ip_address();
   if (!tep_session_is_registered('SESSION_IP_ADDRESS')) {
     $SESSION_IP_ADDRESS = $ip_address;
     tep_session_register('SESSION_IP_ADDRESS');
   }

   if ($SESSION_IP_ADDRESS != $ip_address) {
     tep_session_destroy();
     tep_redirect(tep_href_link(FILENAME_LOGIN));
   }
 }

// create the shopping cart & fix the cart if necesary
 if (tep_session_is_registered('cart') && is_object($cart)) {
   if (PHP_VERSION < 4) {
     $broken_cart = $cart;
     $cart = new shoppingCart;
     $cart->unserialize($broken_cart);
   }
 } else {
   tep_session_register('cart');
   $cart = new shoppingCart;
 }

// include currencies class and create an instance
 require(DIR_WS_CLASSES . 'currencies.php');
 $currencies = new currencies();

// include the mail classes
 require(DIR_WS_CLASSES . 'mime.php');
 require(DIR_WS_CLASSES . 'email.php');

// set the language
 if (!tep_session_is_registered('language') || isset($HTTP_GET_VARS['language'])) {
   if (!tep_session_is_registered('language')) {
     tep_session_register('language');
     tep_session_register('languages_id');
   }

   include(DIR_WS_CLASSES . 'language.php');
   $lng = new language();

   if (isset($HTTP_GET_VARS['language']) && 

tep_not_null($HTTP_GET_VARS['language'])) {
     $lng->set_language($HTTP_GET_VARS['language']);
   } else {
     $lng->get_browser_language();
   }

   $language = $lng->language['directory'];
   $languages_id = $lng->language['id'];
 }

// include the language translations
 require(DIR_WS_LANGUAGES . $language . '.php');
// Ultimate SEO URLs v2.2d
if ((!defined(SEO_ENABLED)) || (SEO_ENABLED == 'true')) {
  include_once(DIR_WS_CLASSES . 'seo.class.php');
  if ( !is_object($seo_urls) ){
    $seo_urls = new SEO_URL($languages_id);
  }
}

// currency
 if (!tep_session_is_registered('currency') || isset($HTTP_GET_VARS['currency']) || ( 

(USE_DEFAULT_LANGUAGE_CURRENCY == 'true') && (LANGUAGE_CURRENCY != 

$currency) ) ) {
   if (!tep_session_is_registered('currency')) tep_session_register('currency');

   if (isset($HTTP_GET_VARS['currency']) && 

$currencies->is_set($HTTP_GET_VARS['currency'])) {
     $currency = $HTTP_GET_VARS['currency'];
   } else {
     $currency = (USE_DEFAULT_LANGUAGE_CURRENCY == 'true') ? 

LANGUAGE_CURRENCY : DEFAULT_CURRENCY;
   }
 }

// navigation history
 if (tep_session_is_registered('navigation')) {
   if (PHP_VERSION < 4) {
     $broken_navigation = $navigation;
     $navigation = new navigationHistory;
     $navigation->unserialize($broken_navigation);
   }
 } else {
   tep_session_register('navigation');
   $navigation = new navigationHistory;
 }
 $navigation->add_current_page();
 /*** Begin All Products SEO ***/
  if (ALL_PRODUCTS_SEO == 'false' && strpos(basename($_SERVER['PHP_SELF']), 

FILENAME_ALLPRODS_SEO) !== FALSE) {
    tep_redirect(tep_href_link(FILENAME_DEFAULT));
  }
 /*** End All Products SEO ***/

// Shopping cart actions
 if (isset($HTTP_GET_VARS['action'])) {
// redirect the customer to a friendly cookie-must-be-enabled page if cookies are disabled
   if ($session_started == false) {
     tep_redirect(tep_href_link(FILENAME_COOKIE_USAGE));
   }

   if (DISPLAY_CART == 'true') {
     $goto =  FILENAME_SHOPPING_CART;
     $parameters = array('action', 'cPath', 'products_id', 'pid');
   } else {
     $goto = basename($PHP_SELF);
     if ($HTTP_GET_VARS['action'] == 'buy_now') {
       $parameters = array('action', 'pid', 'products_id');
     } else {
       $parameters = array('action', 'pid');
     }
   }
   switch ($HTTP_GET_VARS['action']) {
     // customer wants to update the product quantity in their shopping cart
     case 'update_product' : for ($i=0, $n=sizeof($HTTP_POST_VARS['products_id']); 

$i<$n; $i++) {
                               if (in_array($HTTP_POST_VARS['products_id'][$i], 

(is_array($HTTP_POST_VARS['cart_delete']) ? $HTTP_POST_VARS['cart_delete'] : 

array()))) {
                                 $cart->remove($HTTP_POST_VARS['products_id'][$i]);
                               } else {
                                 if (PHP_VERSION < 4) {
                                   // if PHP3, make correction for lack of multidimensional array.
                                   reset($HTTP_POST_VARS);
                                   while (list($key, $value) = each($HTTP_POST_VARS)) {
                                     if (is_array($value)) {
                                       while (list($key2, $value2) = each($value)) {
                                         if (ereg ("(.*)\]\[(.*)", $key2, $var)) {
                                           $id2[$var[1]][$var[2]] = $value2;
                                         }
                                       }
                                     }
                                   }
                                   $attributes = ($id2[$HTTP_POST_VARS['products_id'][$i]]) ? 

$id2[$HTTP_POST_VARS['products_id'][$i]] : '';
                                 } else {
                                   $attributes = 

($HTTP_POST_VARS['id'][$HTTP_POST_VARS['products_id'][$i]]) ? 

$HTTP_POST_VARS['id'][$HTTP_POST_VARS['products_id'][$i]] : '';
                                 }
                                 $cart->add_cart($HTTP_POST_VARS['products_id'][$i], 

$HTTP_POST_VARS['cart_quantity'][$i], $attributes, false);
                               }
                             }
                             tep_redirect(tep_href_link($goto, 

tep_get_all_get_params($parameters)));
                             break;
     // customer adds a product from the products page
     case 'add_product' :    if (isset($HTTP_POST_VARS['products_id']) && 

is_numeric($HTTP_POST_VARS['products_id'])) {
                               $cart->add_cart($HTTP_POST_VARS['products_id'], 

$cart->get_quantity(tep_get_uprid($HTTP_POST_VARS['products_id'], 

$HTTP_POST_VARS['id']))+1, $HTTP_POST_VARS['id']);
                             }
                             tep_redirect(tep_href_link($goto, 

tep_get_all_get_params($parameters)));
                             break;
     // performed by the 'buy now' button in product listings and review page
     case 'buy_now' :        if (isset($HTTP_GET_VARS['products_id'])) {
                               if (tep_has_product_attributes($HTTP_GET_VARS['products_id'])) {
                                 tep_redirect(tep_href_link(FILENAME_PRODUCT_INFO, 

'products_id=' . $HTTP_GET_VARS['products_id']));
                               } else {
                                 $cart->add_cart($HTTP_GET_VARS['products_id'], 

$cart->get_quantity($HTTP_GET_VARS['products_id'])+1);
                               }
                             }
                             tep_redirect(tep_href_link($goto, 

tep_get_all_get_params($parameters)));
                             break;
     case 'notify' :         if (tep_session_is_registered('customer_id')) {
                               if (isset($HTTP_GET_VARS['products_id'])) {
                                 $notify = $HTTP_GET_VARS['products_id'];
                               } elseif (isset($HTTP_GET_VARS['notify'])) {
                                 $notify = $HTTP_GET_VARS['notify'];
                               } elseif (isset($HTTP_POST_VARS['notify'])) {
                                 $notify = $HTTP_POST_VARS['notify'];
                               } else {
                                 tep_redirect(tep_href_link(basename($PHP_SELF), 

tep_get_all_get_params(array('action', 'notify'))));
                               }
                               if (!is_array($notify)) $notify = array($notify);
                               for ($i=0, $n=sizeof($notify); $i<$n; $i++) {
                                 $check_query = tep_db_query("select count(*) as count from " . 

TABLE_PRODUCTS_NOTIFICATIONS . " where products_id = '" . $notify[$i] . "' and 

customers_id = '" . $customer_id . "'");
                                 $check = tep_db_fetch_array($check_query);
                                 if ($check['count'] < 1) {
                                   tep_db_query("insert into " . TABLE_PRODUCTS_NOTIFICATIONS . 

" (products_id, customers_id, date_added) values ('" . $notify[$i] . "', '" . $customer_id . "', 

now())");
                                 }
                               }
                               tep_redirect(tep_href_link(basename($PHP_SELF), 

tep_get_all_get_params(array('action', 'notify'))));
                             } else {
                               $navigation->set_snapshot();
                               tep_redirect(tep_href_link(FILENAME_LOGIN, '', 'SSL'));
                             }
                             break;
     case 'notify_remove' :  if (tep_session_is_registered('customer_id') && 

isset($HTTP_GET_VARS['products_id'])) {
                               $check_query = tep_db_query("select count(*) as count from " . 

TABLE_PRODUCTS_NOTIFICATIONS . " where products_id = '" . 

$HTTP_GET_VARS['products_id'] . "' and customers_id = '" . $customer_id . "'");
                               $check = tep_db_fetch_array($check_query);
                               if ($check['count'] > 0) {
                                 tep_db_query("delete from " . TABLE_PRODUCTS_NOTIFICATIONS 

. " where products_id = '" . $HTTP_GET_VARS['products_id'] . "' and customers_id = '" . 

$customer_id . "'");
                               }
                               tep_redirect(tep_href_link(basename($PHP_SELF), 

tep_get_all_get_params(array('action'))));
                             } else {
                               $navigation->set_snapshot();
                               tep_redirect(tep_href_link(FILENAME_LOGIN, '', 'SSL'));
                             }
                             break;
     case 'cust_order' :     if (tep_session_is_registered('customer_id') && 

isset($HTTP_GET_VARS['pid'])) {
                               if (tep_has_product_attributes($HTTP_GET_VARS['pid'])) {
                                 tep_redirect(tep_href_link(FILENAME_PRODUCT_INFO, 

'products_id=' . $HTTP_GET_VARS['pid']));
                               } else {
                                 $cart->add_cart($HTTP_GET_VARS['pid'], 

$cart->get_quantity($HTTP_GET_VARS['pid'])+1);
                               }
                             }
                             tep_redirect(tep_href_link($goto, 

tep_get_all_get_params($parameters)));
                             break;
   }
 }

// include the who's online functions
 require(DIR_WS_FUNCTIONS . 'whos_online.php');
 tep_update_whos_online();

// include the password crypto functions
 require(DIR_WS_FUNCTIONS . 'password_funcs.php');

// include validation functions (right now only email address)
 require(DIR_WS_FUNCTIONS . 'validations.php');

// split-page-results
 require(DIR_WS_CLASSES . 'split_page_results.php');

// infobox
 require(DIR_WS_CLASSES . 'boxes.php');

// auto activate and expire banners
 require(DIR_WS_FUNCTIONS . 'banner.php');
 tep_activate_banners();
 tep_expire_banners();

// auto expire special products
 require(DIR_WS_FUNCTIONS . 'specials.php');
 tep_expire_specials();

// calculate category path
 if (isset($HTTP_GET_VARS['cPath'])) {
   $cPath = $HTTP_GET_VARS['cPath'];
 } elseif (isset($HTTP_GET_VARS['products_id']) && 

!isset($HTTP_GET_VARS['manufacturers_id'])) {
   $cPath = tep_get_product_path($HTTP_GET_VARS['products_id']);
 } else {
   $cPath = '';
 }

 if (tep_not_null($cPath)) {
   $cPath_array = tep_parse_category_path($cPath);
   $cPath = implode('_', $cPath_array);
   $current_category_id = $cPath_array[(sizeof($cPath_array)-1)];
 } else {
   $current_category_id = 0;
 }

// include the breadcrumb class and start the breadcrumb trail
 require(DIR_WS_CLASSES . 'breadcrumb.php');
 $breadcrumb = new breadcrumb;

 $breadcrumb->add(HEADER_TITLE_CATALOG, tep_href_link(FILENAME_HOME));

/*** Begin Header Tags SEO ***/  
// add category names or the manufacturer name to the breadcrumb trail
 if (isset($cPath_array)) {
   for ($i=0, $n=sizeof($cPath_array); $i<$n; $i++) {
     $categories_query = tep_db_query("select categories_htc_title_tag from " . TABLE_CATEGORIES_DESCRIPTION . " where categories_id = '" . (int)$cPath_array[$i] . "' and language_id = '" . (int)$languages_id . "' LIMIT 1");
     if (tep_db_num_rows($categories_query) > 0) {
       $categories = tep_db_fetch_array($categories_query);
       $breadcrumb->add($categories['categories_htc_title_tag'], tep_href_link(FILENAME_DEFAULT, 'cPath=' . implode('_', array_slice($cPath_array, 0, ($i+1)))));
     } else {
       break;
     }
   }
 } elseif (isset($_GET['manufacturers_id'])) {
   $manufacturers_query = tep_db_query("select manufacturers_htc_title_tag from " . TABLE_MANUFACTURERS_INFO . " where manufacturers_id = '" . (int)$_GET['manufacturers_id'] . "' AND languages_id = '" . (int)$languages_id . "' LIMIT 1");
   if (tep_db_num_rows($manufacturers_query)) {
     $manufacturers = tep_db_fetch_array($manufacturers_query);
     $breadcrumb->add($manufacturers['manufacturers_htc_title_tag'], tep_href_link(FILENAME_DEFAULT, 'manufacturers_id=' . $_GET['manufacturers_id']));
   }
 }

// add the products name to the breadcrumb trail
if (isset($_GET['products_id'])) {
 $products_query = tep_db_query("select pd.products_head_title_tag from " . TABLE_PRODUCTS . " p left join " . TABLE_PRODUCTS_DESCRIPTION . " pd on p.products_id = pd.products_id where p.products_id = '" . (int)$_GET['products_id'] . "' and pd.language_id ='" .  (int)$languages_id . "' LIMIT 1");
 if (tep_db_num_rows($products_query)) {
   $products = tep_db_fetch_array($products_query);
   $breadcrumb->add($products['products_head_title_tag'], tep_href_link(FILENAME_PRODUCT_INFO, 'cPath=' . $cPath . '&products_id=' . $_GET['products_id']));
 }
} 
/*** End Header Tags SEO ***/

// Begin Article Manager
// include the articles functions
 require(DIR_WS_FUNCTIONS . 'articles.php');

// calculate topic path
 if (isset($HTTP_GET_VARS['tPath'])) {
   $tPath = $HTTP_GET_VARS['tPath'];
 } elseif (isset($HTTP_GET_VARS['articles_id']) && 

!isset($HTTP_GET_VARS['authors_id'])) {
   $tPath = tep_get_article_path($HTTP_GET_VARS['articles_id']);
 } else {
   $tPath = '';
 }

 if (tep_not_null($tPath)) {
   $tPath_array = tep_parse_topic_path($tPath);
   $tPath = implode('_', $tPath_array);
   $current_topic_id = $tPath_array[(sizeof($tPath_array)-1)];
 } else {
   $current_topic_id = 0;
 }

 if (isset($_GET['articles_id'])) {
   $articlesPage = FILENAME_ARTICLE_INFO . "?articles_id=" . $_GET['articles_id'];
   $pageTags_query = tep_db_query("select page_name, page_title from " . 

TABLE_HEADERTAGS . " where page_name like '" . $articlesPage . "' and language_id = '" 

. (int)$languages_id . "' LIMIT 1");
   if (tep_db_num_rows($pageTags_query) == 1) {
     $pageTags = tep_db_fetch_array($pageTags_query);
     $breadcrumb->add('Articles', tep_href_link(FILENAME_ARTICLES));
     $breadcrumb->add($pageTags['page_title'], tep_href_link($articlesPage));
   }  
 }
// End Article Manager

// initialize the message stack for output messages
 require(DIR_WS_CLASSES . 'message_stack.php');
 $messageStack = new messageStack;

// set which precautions should be checked
 define('WARN_INSTALL_EXISTENCE', 'true');
 define('WARN_CONFIG_WRITEABLE', 'true');
 define('WARN_SESSION_DIRECTORY_NOT_WRITEABLE', 'true');
 define('WARN_SESSION_AUTO_START', 'true');
 define('WARN_DOWNLOAD_DIRECTORY_NOT_READABLE', 'true');
?>

Link to comment
Share on other sites

What I meant was, if I want to use version 1.57, am I able to install Header Tags SEO, but not use it on my product pages? ie, have it installed to work on the articles, but not the products?

Yes, you can do that, though I can't imagine why you would want to. Just be sure you don't make any changes to the product_info.php file during its installation.

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

I have followed your instructions, the code in includes/application_top.php is correct, and the pseduo page is enabled with titles filled in. I still get the orginal oscommerce url in the breadcrumb. The title of the page is there but the url is not an seo url. When you hold mouse of the link it shows as

http://www.mydomain.com/article_info.php?articles_id=8

When clicked on it does redirect to the seo url.

Completed files are included in the contribution. You can downlaod WinMerge and compare them with yours.

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

Completed files are included in the contribution. You can downlaod WinMerge and compare them with yours.

 

 

I don't mean to be a pest about this, but I really need to resolve this. As you suggested I used WinMerge to check my includes/application_top.php file against completed files which is included in the contribution. The suggested code changes are correct.

 

Just to make certain, I uploaded the completed file which is included in the contribution, to my site at includes/application_top.php and it made no difference, I still do not have seo urls. Is there anything else I can do to get this working as it is supposed to?

Link to comment
Share on other sites

I don't mean to be a pest about this, but I really need to resolve this. As you suggested I used WinMerge to check my includes/application_top.php file against completed files which is included in the contribution. The suggested code changes are correct.

 

Just to make certain, I uploaded the completed file which is included in the contribution, to my site at includes/application_top.php and it made no difference, I still do not have seo urls. Is there anything else I can do to get this working as it is supposed to?

As mentioned already, it works fine for me. Without being able to see the problem, all I can suggest are the obvious things, which I've already done. Not all problems are solvabel in support forums, I'm afraid.

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

Hi, everyone! :)

 

I'm real new here -arrived yesterday. I used to hang out here a bit years ago, but have forgotten more than I ever learned, so looking around again I'm feeling pretty lost. So if I'm in the wrong place, or say something wrong, please forgive me. :)

 

I just installed this add-on yesterday. I installed the SEO Headers stuff, then the Article Manager. I'm installing a brand new store, so I don't have any other changes to the code, and I think I installed everything correctly.

 

The SEO portion was working (as far as I could tell) so I put in the Articles Manager.

 

The heading for it shows up in my admin panel, but it takes me to a blank page. When I come back the list under it shows up, but all the links take me to blank pages except the cofiguration link and the cross-sell articles link. When I type in the URLs to the individual files the pages display. But I can't figure out how to finish configuring everything so I have a list of topics and can actually write an article or two and have them show up on the front page?

 

I'd appreciate any help anyone can give me. Or if you need more information I'll do my best to explain or post screenshots or something.

 

Thanks in advance,

 

DragonLady

Link to comment
Share on other sites

The heading for it shows up in my admin panel, but it takes me to a blank page. When I come back the list under it shows up, but all the links take me to blank pages except the cofiguration link and the cross-sell articles link. When I type in the URLs to the individual files the pages display. But I can't figure out how to finish configuring everything so I have a list of topics and can actually write an article or two and have them show up on the front page?

Blank pages usually mean a mistake in one of the language files. You may have uploaded a non-language file to the languages directory in admin or made some other mistake that is causing the problem. From your description, my guess would be the admin/includes/languages/english.php file is the one causing the problem. Since it is a new install, you can use that file from the Header Tags SEO contribution and then edit it to add the changes needed for Article Manager.

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

Hi,

I'm trying to install Article Manager v 1.5.6v1 (I'm not using the header tag SEO contrib). When I try to run article_manager_sql.sql I get this error:

SQL query: Documentation

INSERT INTO configuration( configuration_id, configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, last_modified, date_added, use_function, set_function )
VALUES (
'', 'Display New Articles Link', 'DISPLAY_NEW_ARTICLES', 'true', 'Display a link to New Articles in the Articles box?', 456, 1, now( ) , now( ) , NULL , 'tep_cfg_select_option(array(\'true\', \'false\'),'
);

MySQL said: Documentation
#1062 - Duplicate entry '0' for key 1 

 

Could someone please tell me what I need to do to fix it?

 

Thanks smile.gif

 

Hello Abbott75,

 

I had the same problem when I installed this contri (Article Manager v 1.5.6v1 ) yesterday.

What was working for me was first installing the second part of the article_manager_sql.sql and after that you install the first part.

So first install;

 

DROP TABLE IF EXISTS `topics`;

CREATE TABLE `topics` (

`topics_id` int(11) NOT NULL auto_increment,

`topics_image` varchar(64) default NULL,

`parent_id` int(11) NOT NULL default '0',

`sort_order` int(3) default NULL,

`date_added` datetime default NULL,

`last_modified` datetime default NULL,

PRIMARY KEY (`topics_id`),

KEY `idx_topics_parent_id` (`parent_id`)

) TYPE=MyISAM;

INSERT INTO topics (topics_id,topics_image, parent_id,sort_order, date_added, last_modified) VALUES (0,NULL, 0, 0, '2007-08-06 08:52:12', NULL);

DROP TABLE IF EXISTS `topics_description`;

CREATE TABLE `topics_description` (

`topics_id` int(11) NOT NULL default '0',

`language_id` int(11) NOT NULL default '1',

`topics_name` varchar(32) NOT NULL default '',

`topics_heading_title` varchar(64) default NULL,

`topics_description` text,

PRIMARY KEY (`topics_id`,`language_id`),

KEY `idx_topics_name` (`topics_name`)

) TYPE=MyISAM;

INSERT INTO topics_description VALUES (0, 1, 'Miscellaneous Articles', 'Miscellaneous', 'Articles that do not fall into a specific category.');

DROP TABLE IF EXISTS `articles`;

CREATE TABLE `articles` (

`articles_id` int(11) NOT NULL auto_increment,

`articles_date_added` datetime NOT NULL default '0000-00-00 00:00:00',

`articles_last_modified` datetime default NULL,

`articles_date_available` datetime default NULL,

`articles_status` tinyint(1) NOT NULL default '0',

`authors_id` int(11) default NULL,

PRIMARY KEY (`articles_id`),

KEY `idx_articles_date_added` (`articles_date_added`)

) TYPE=MyISAM;

DROP TABLE IF EXISTS `articles_description`;

CREATE TABLE `articles_description` (

`articles_id` int(11) NOT NULL auto_increment,

`language_id` int(11) NOT NULL default '1',

`articles_name` varchar(64) NOT NULL default '',

`articles_description` text,

`articles_url` varchar(255) default NULL,

`articles_viewed` int(5) default '0',

`articles_head_title_tag` varchar(80) default NULL,

`articles_head_desc_tag` text,

`articles_head_keywords_tag` text,

PRIMARY KEY (`articles_id`,`language_id`),

KEY `articles_name` (`articles_name`)

) TYPE=MyISAM;

DROP TABLE IF EXISTS `articles_to_topics`;

CREATE TABLE `articles_to_topics` (

`articles_id` int(11) NOT NULL default '0',

`topics_id` int(11) NOT NULL default '0',

PRIMARY KEY (`articles_id`,`topics_id`)

) TYPE=MyISAM;

DROP TABLE IF EXISTS `authors`;

CREATE TABLE `authors` (

`authors_id` int(11) NOT NULL auto_increment,

`authors_name` varchar(32) NOT NULL default '',

`authors_image` varchar(64) default NULL,

`date_added` datetime default NULL,

`last_modified` datetime default NULL,

PRIMARY KEY (`authors_id`),

KEY `IDX_AUTHORS_NAME` (`authors_name`)

) TYPE=MyISAM;

DROP TABLE IF EXISTS `authors_info`;

CREATE TABLE `authors_info` (

`authors_id` int(11) NOT NULL default '0',

`languages_id` int(11) NOT NULL default '0',

`authors_description` text,

`authors_url` varchar(255) NOT NULL default '',

`url_clicked` int(5) NOT NULL default '0',

`date_last_click` datetime default NULL,

PRIMARY KEY (`authors_id`,`languages_id`)

) TYPE=MyISAM;

DROP TABLE IF EXISTS `article_reviews`;

CREATE TABLE `article_reviews` (

`reviews_id` int(11) NOT NULL auto_increment,

`articles_id` int(11) NOT NULL default '0',

`customers_id` int(11) default NULL,

`customers_name` varchar(64) NOT NULL default '',

`reviews_rating` int(1) default NULL,

`date_added` datetime default NULL,

`last_modified` datetime default NULL,

`reviews_read` int(5) NOT NULL default '0',

`approved` tinyint(3) unsigned default '0',

PRIMARY KEY (`reviews_id`)

) TYPE=MyISAM;

DROP TABLE IF EXISTS `article_reviews_description`;

CREATE TABLE `article_reviews_description` (

`reviews_id` int(11) NOT NULL default '0',

`languages_id` int(11) NOT NULL default '0',

`reviews_text` text NOT NULL,

PRIMARY KEY (`reviews_id`,`languages_id`)

) TYPE=MyISAM;

 

DROP TABLE IF EXISTS articles_xsell;

CREATE TABLE articles_xsell (

ID int(10) NOT NULL auto_increment,

articles_id int(10) unsigned NOT NULL default '1',

xsell_id int(10) unsigned NOT NULL default '1',

sort_order int(10) unsigned NOT NULL default '1',

PRIMARY KEY (ID)

) TYPE=MyISAM;

 

Than the first part.

It worked for me.

Hope it helps.

Greetz Django

Link to comment
Share on other sites

I have a problem I can't figure out.

When I'm on the article page and want to 'tell a friend' about the article I have to fill in his emailaddress.

After that I proceed to the next page where I fill in my own emailaddress and name and a comment.

 

The emailaddress of the friend should automatically be placed in the the designated box. It is,... but without the @ sign. (see picture)

Tellfriend.jpg

 

What bugs me is that it shows right in the url;

http://herbaloutlet....s_id=1&x=5&y=12

 

But not in the form.

 

Can anyone put me in the right direction where I can adjust this.

 

Thanx.

Link to comment
Share on other sites

Here I am again.

Going through this thread I saw some pictures of the articles box.

I noticed the RSS link in the box and a link to submit articles. Are these seperate contri's?

 

Because I only have two links; New Articles and All Articles and would like the RSS and submit link present in the box.

 

I'm using Article Manager v 1.5.6v1 (I'm not using the header tag SEO contrib).

Oscommerce 2.2Rc2a with a lot of modifications.

 

Hope someone has an answer to my question.

Link to comment
Share on other sites

Didn't help, still get that errors.

 

i am not sure did you solve the 2nd problem. I have just have a try a simple way and get it done.

what is did is:

phpmyadmin

edit table "topics"

edit the only first entry

topics_id:1

parent_id:1

sort_order:1

last_modified: (add datae)

 

save and will be done

Link to comment
Share on other sites

Hi,

My problem is Google Chrome compatibility with TinyMCE Anywhere as the suggested contribution to use with Article Manager.

It seems that the last update to TinyMCE Anywhere was 17 Sep 2007.

The TinyMCE Anywhere Forum had nothing I could find related to Chrome and is not very active so I'm posting here.

My install works fine with FF and IE on Fedora and XP but when I try to use Chrome none of the buttons in TinyMCE work.

Everything looks fine; they just don't do anything!

I found an Uncaught TypeError: Cannot read property 'baseNode' of undefined

in the java script of tiny_mce.js but that's as far as I can take it.

Does anyone have this combination working with Chrome?

Is anyone maintaining TinyMCE Anywhere?

Thanks,

Ralph

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...