Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[CONTRIBUTION] Ultimate SEO URLs v2.1 - by Chemo


Recommended Posts

It could be a number of things. If you are using my Header Tags SEO it could mean you have ran fill tags. Possibly the same with other such addons. Or it could be something in your setup. Please post your .htaccess file and includes/configure.php file (without the login details) and I will take a look.

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

  • 2 weeks later...

Hi Jack, 

 

 

I know when an addon is yours it works, but know I have a problem with this one.

Yes, It must be my error or maybe incompactible with other installed addons.

 

But lets try to fix the htaccess file first.

My server is http:/myserver.eu in which I have several sites.

The shop I want to ouse your addon for the first time has is own domainname (http://lalala.fr) but hosted on http://myserver.eu. (no redirects).

OSC is installed immediately in the domainname; http://lalala.fr/index.php.

 

Know I'm a bitconfused about what to use in the htaccess file :

 

I tried ;

 
  # Change RewriteBase dependent on how your shop is accessed as below. 
  # http://www.lalala.fr= RewriteBase / 
 
 
  # Change the following line using the instructions above  
  
RewriteBase /YOU HAVE TO CHANGE ME/
 
I get : ERROR 500 - INTERNAL SERVER ERROR when I want to access the homepage and adminsite
 
The same error when I use :
 
 # Change RewriteBase dependent on how your shop is accessed as below. 
  # http://www.myserver.eu/lalala.fr= RewriteBase / 
 
As I dont have/use catalog or catalog/shop I deleted this lines.
 
An example would be usefull or me and others.
 
Thanks a lot for your help
 
Greatings 
Kozak
Link to comment
Share on other sites

The # at the beginning of the line means to ignore that line so if you are trying it as you post, it won't work. Please post the actual .htaccess file instead.

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 Jack,

 

 

thanks a lot for your quick reply.

Ignore that lines?

You means dont change anything ?

I tried bud same result.

Here my htaccess file

Thanks a lot for your kind help

 

# $Id$

#

# This is used with Apache WebServers

#

# For this to work, you must include the parameter 'Options' to

# the AllowOverride configuration

#

# Example:

#

# <Directory "/usr/local/apache/htdocs">

#   AllowOverride Options

# </Directory>

#

# 'All' with also work. (This configuration is in the

# apache/conf/httpd.conf file)

 

# The following makes adjustments to the SSL protocol for Internet

# Explorer browsers

 

#<IfModule mod_setenvif.c>

#  <IfDefine SSL>

#    SetEnvIf User-Agent ".*MSIE.*" \

#             nokeepalive ssl-unclean-shutdown \

#             downgrade-1.0 force-response-1.0

#  </IfDefine>

#</IfModule>

 

# If Search Engine Friendly URLs do not work, try enabling the

# following Apache configuration parameter

 

# AcceptPathInfo On

 

# Fix certain PHP values

# (commented out by default to prevent errors occuring on certain

# servers)

 

# php_value session.use_trans_sid 0

# php_value register_globals 1

 

# Begin Ultimate SEO V2.2d 

Options +FollowSymLinks

RewriteEngine On 

 

  # RewriteBase instructions 

  # Change RewriteBase dependent on how your shop is accessed as below. 

  # http://www.lalala.eu= RewriteBase / 

 

  # Change the following line using the instructions above  

  

RewriteBase /YOU HAVE TO CHANGE ME/

 

RewriteRule ^(.*)-p-(.*).html$ product_info.php?products_id=$2&%{QUERY_STRING}

RewriteRule ^(.*)-c-(.*).html$ index.php?cPath=$2&%{QUERY_STRING}

RewriteRule ^(.*)-m-(.*).html$ index.php?manufacturers_id=$2&%{QUERY_STRING}

RewriteRule ^(.*)-pi-(.*).html$ popup_image.php?pID=$2&%{QUERY_STRING}

RewriteRule ^(.*)-by-(.*).html$ all-products.php?fl=$2&%{QUERY_STRING}

RewriteRule ^(.*)-t-(.*).html$ articles.php?tPath=$2&%{QUERY_STRING}

RewriteRule ^(.*)-a-(.*).html$ article_info.php?articles_id=$2&%{QUERY_STRING}

RewriteRule ^(.*)-au-(.*).html$ articles.php?authors_id=$2&%{QUERY_STRING}

RewriteRule ^(.*)-pr-(.*).html$ product_reviews.php?products_id=$2&%{QUERY_STRING}

RewriteRule ^(.*)-pri-(.*).html$ product_reviews_info.php?products_id=$2&%{QUERY_STRING}

RewriteRule ^(.*)-f-(.*).html$ faqdesk_info.php?faqdesk_id=$2&%{QUERY_STRING}

RewriteRule ^(.*)-fc-(.*).html$ faqdesk_index.php?faqPath=$2&%{QUERY_STRING}

RewriteRule ^(.*)-fri-(.*).html$ faqdesk_reviews_info.php?faqdesk_id=$2&%{QUERY_STRING}

RewriteRule ^(.*)-fra-(.*).html$ faqdesk_reviews_article.php?faqdesk_id=$2&%{QUERY_STRING}

RewriteRule ^(.*)-i-(.*).html$ information.php?info_id=$2&%{QUERY_STRING}

RewriteRule ^(.*)-links-(.*).html$ links.php?lPath=$2&%{QUERY_STRING}

RewriteRule ^(.*)-pm-([0-9]+).html$ info_pages.php?pages_id=$2&%{QUERY_STRING}

RewriteRule ^(.*)-n-(.*).html$ newsdesk_info.php?newsdesk_id=$2&%{QUERY_STRING}

RewriteRule ^(.*)-nc-(.*).html$ newsdesk_index.php?newsPath=$2&%{QUERY_STRING}

RewriteRule ^(.*)-nri-(.*).html$ newsdesk_reviews_info.php?newsdesk_id=$2&%{QUERY_STRING}

RewriteRule ^(.*)-nra-(.*).html$ newsdesk_reviews_article.php?newsdesk_id=$2&%{QUERY_STRING}

RewriteRule ^(.*)-po-([0-9]+).html$ pollbooth.php?pollid=$2&%{QUERY_STRING}

# End Ultimate SEO V2.2d
Link to comment
Share on other sites

Hi all,

 

I found it  :) .

I'm NOT a programmer, I'm a Dummy, a cook that likes to design websites  :) .

 

Maybe helpfull for others.

This is what I ADD to my htaccess file. The blue market text.

 

Note ! adminoffice MUST BE CHANGED INTO THE NAME OF YOUR ADMIN DIRECTORY !!!

 

# Begin Ultimate SEO V2.2d
Options +FollowSymLinks
RewriteEngine On

RewriteRule ^(.*)-p-(.*).html$ http://www.lalala.eu/adminoffice/product_info.php?products_id=$2&%{QUERY_STRING}
RewriteRule ^(.*)-c-(.*).html$ http://www.lalala.eu/adminoffice/index.php?cPath=$2&%{QUERY_STRING}
RewriteRule ^(.*)-m-(.*).html$ http://www.lalala.eu/adminoffice/index.php?manufacturers_id=$2&%{QUERY_STRING}
RewriteRule ^(.*)-pi-(.*).html$ http://www.lalala.eu/adminoffice/popup_image.php?pID=$2&%{QUERY_STRING}
RewriteRule ^(.*)-by-(.*).html$ http://www.lalala.eu/adminoffice/all-products.php?fl=$2&%{QUERY_STRING}
RewriteRule ^(.*)-t-(.*).html$ http://www.lalala.eu/adminoffice/articles.php?tPath=$2&%{QUERY_STRING}
RewriteRule ^(.*)-a-(.*).html$ http://www.lalala.eu/adminoffice/article_info.php?articles_id=$2&%{QUERY_STRING}
RewriteRule ^(.*)-au-(.*).html$ http://www.lalala.eu/adminoffice/articles.php?authors_id=$2&%{QUERY_STRING}
RewriteRule ^(.*)-pr-(.*).html$ http://www.lalala.eu/adminoffice/product_reviews.php?products_id=$2&%{QUERY_STRING}
RewriteRule ^(.*)-pri-(.*).html$ http://www.lalala.eu/adminoffice/product_reviews_info.php?products_id=$2&%{QUERY_STRING}
RewriteRule ^(.*)-f-(.*).html$ http://www.lalala.eu/adminoffice/faqdesk_info.php?faqdesk_id=$2&%{QUERY_STRING}
RewriteRule ^(.*)-fc-(.*).html$ http://www.lalala.eu/adminoffice/faqdesk_index.php?faqPath=$2&%{QUERY_STRING}
RewriteRule ^(.*)-fri-(.*).html$ http://www.lalala.eu/adminoffice/faqdesk_reviews_info.php?faqdesk_id=$2&%{QUERY_STRING}
RewriteRule ^(.*)-fra-(.*).html$ http://www.lalala.eu/adminoffice/faqdesk_reviews_article.php?faqdesk_id=$2&%{QUERY_STRING}
RewriteRule ^(.*)-i-(.*).html$ http://www.lalala.eu/adminoffice/information.php?info_id=$2&%{QUERY_STRING}
RewriteRule ^(.*)-links-(.*).html$ http://www.lalala.eu/adminoffice/links.php?lPath=$2&%{QUERY_STRING}
RewriteRule ^(.*)-pm-([0-9]+).html$ http://www.lalala.eu/adminoffice/info_pages.php?pages_id=$2&%{QUERY_STRING}
RewriteRule ^(.*)-n-(.*).html$ http://www.lalala.eu/adminoffice/newsdesk_info.php?newsdesk_id=$2&%{QUERY_STRING}
RewriteRule ^(.*)-nc-(.*).html$ http://www.lalala.eu/adminoffice/newsdesk_index.php?newsPath=$2&%{QUERY_STRING}
RewriteRule ^(.*)-nri-(.*).html$ http://www.lalala.eu/adminoffice/newsdesk_reviews_info.php?newsdesk_id=$2&%{QUERY_STRING}
RewriteRule ^(.*)-nra-(.*).html$ http://www.lalala.eu/adminoffice/newsdesk_reviews_article.php?newsdesk_id=$2&%{QUERY_STRING}
RewriteRule ^(.*)-po-([0-9]+).html$ http://www.lalala.eu/adminoffice/pollbooth.php?pollid=$2&%{QUERY_STRING}
# End Ultimate SEO V2.2d
  

Great addon, thanks a lot Jack

 

Kozak

Edited by kozak
Link to comment
Share on other sites

after changing the files and edeting the htaccess file I did'n have problems to access my site.

So I think the htaccess file is right.

 

But i dont see any SEO URL's  :(

 

The only problem I got was the html_output.php due of an other addon.

Here's mine maybe somebody can help me

 

<?php
/*
  $Id$
 
  osCommerce, Open Source E-Commerce Solutions
 
 
  Copyright © 2010 osCommerce
 
  Released under the GNU General Public License
*/
 
////
// Ultimate SEO URLs v2.2d
// The HTML href link wrapper function
 function tep_href_link($page = '', $parameters = '', $connection = 'NONSSL', $add_session_id = true, $search_engine_safe = true) {
   global $seo_urls;                
   if ( !is_object($seo_urls) ){
    if ( !class_exists('SEO_URL') ){
     include_once(DIR_WS_CLASSES . 'seo.class.php');
    }
    global $languages_id;
    $seo_urls = new SEO_URL($languages_id);
   }
   return $seo_urls->href_link($page, $parameters, $connection, $add_session_id);
 }
 
// New HTML image wrapper function modified for KISS Image Thumbnailer by FWR Media
  function tep_image($src, $alt = '', $width = '', $height = '', $parameters = '') {
    // If width and height are not numeric then we can't do anything with it
    if ( !is_numeric ( $width ) || !is_numeric ( $height ) ) return tep_image_legacy( $src, $alt, $width, $height, $parameters );
    require_once DIR_WS_MODULES . 'kiss_image_thumbnailer/classes/Image_Helper.php';
    $attributes = array( 'alt' => $alt, 'width' => $width, 'height' => $height );
    $image = new Image_Helper( array( 'src'                   => $src,
                                      'attributes'            => $attributes,
                                      'parameters'            => $parameters,
                                      'default_missing_image' => DIR_WS_IMAGES . 'no_image_available_150_150.gif',
                                      'isXhtml'               => true,
                                      'thumbs_dir_path'       => DIR_WS_MODULES . 'kiss_image_thumbnailer/thumbs/',
                                      'thumb_quality'         => 75,
                                      'thumb_background_rgb' => array( 'red'   => 0,
                                                                       'green' => 0,
                                                                       'blue'  => 0 ) ) );
    if ( false === $image_assembled = $image->assemble() ) {
      return tep_image_legacy( $src, $alt, $width, $height, $parameters );
    }
    return $image_assembled;
  } // end function
////
// The HTML image wrapper function
  function tep_image_legacy($src, $alt = '', $width = '', $height = '', $parameters = '') {
    if ( (empty($src) || ($src == DIR_WS_IMAGES)) && (IMAGE_REQUIRED == 'false') ) {
      return false;
    }
 
// alt is added to the img tag even if it is null to prevent browsers from outputting
// the image filename as default
    $image = '<img src="' . tep_output_string($src) . '" alt="' . tep_output_string($alt) . '"';
 
    if (tep_not_null($alt)) {
      $image .= ' title="' . tep_output_string($alt) . '"';
    }
 
    if ( (CONFIG_CALCULATE_IMAGE_SIZE == 'true') && (empty($width) || empty($height)) ) {
      if ($image_size = @getimagesize($src)) {
        if (empty($width) && tep_not_null($height)) {
          $ratio = $height / $image_size[1];
          $width = intval($image_size[0] * $ratio);
        } elseif (tep_not_null($width) && empty($height)) {
          $ratio = $width / $image_size[0];
          $height = intval($image_size[1] * $ratio);
        } elseif (empty($width) && empty($height)) {
          $width = $image_size[0];
          $height = $image_size[1];
        }
      } elseif (IMAGE_REQUIRED == 'false') {
        return false;
      }
    }
 
    if (tep_not_null($width) && tep_not_null($height)) {
      $image .= ' width="' . tep_output_string($width) . '" height="' . tep_output_string($height) . '"';
    }
 
    if (tep_not_null($parameters)) $image .= ' ' . $parameters;
 
    $image .= ' />';
 
    return $image;
  }
 
////
// The HTML form submit button wrapper function
// Outputs a button in the selected language
  function tep_image_submit($image, $alt = '', $parameters = '') {
    global $language;
 
    $image_submit = '<input type="image" src="' . tep_output_string(DIR_WS_LANGUAGES . $language . '/images/buttons/' . $image) . '" alt="' . tep_output_string($alt) . '"';
 
    if (tep_not_null($alt)) $image_submit .= ' title=" ' . tep_output_string($alt) . ' "';
 
    if (tep_not_null($parameters)) $image_submit .= ' ' . $parameters;
 
    $image_submit .= ' />';
 
    return $image_submit;
  }
 
////
// Output a function button in the selected language
  function tep_image_button($image, $alt = '', $parameters = '') {
    global $language;
 
    return tep_image(DIR_WS_LANGUAGES . $language . '/images/buttons/' . $image, $alt, '', '', $parameters);
  }
 
////
// Output a separator either through whitespace, or with an image
  function tep_draw_separator($image = 'pixel_black.gif', $width = '100%', $height = '1') {
    return tep_image(DIR_WS_IMAGES . $image, '', $width, $height);
  }
 
////
// Output a form
  function tep_draw_form($name, $action, $method = 'post', $parameters = '', $tokenize = false) {
    global $sessiontoken;
 
    $form = '<form name="' . tep_output_string($name) . '" action="' . tep_output_string($action) . '" method="' . tep_output_string($method) . '"';
 
    if (tep_not_null($parameters)) $form .= ' ' . $parameters;
 
    $form .= '>';
 
    if ( ($tokenize == true) && isset($sessiontoken) ) {
      $form .= '<input type="hidden" name="formid" value="' . tep_output_string($sessiontoken) . '" />';
    }
 
    return $form;
  }
 
////
// Output a form input field
  function tep_draw_input_field($name, $value = '', $parameters = '', $type = 'text', $reinsert_value = true) {
    global $HTTP_GET_VARS, $HTTP_POST_VARS;
 
    $field = '<input type="' . tep_output_string($type) . '" name="' . tep_output_string($name) . '"';
 
    if ( ($reinsert_value == true) && ( (isset($HTTP_GET_VARS[$name]) && is_string($HTTP_GET_VARS[$name])) || (isset($HTTP_POST_VARS[$name]) && is_string($HTTP_POST_VARS[$name])) ) ) {
      if (isset($HTTP_GET_VARS[$name]) && is_string($HTTP_GET_VARS[$name])) {
        $value = stripslashes($HTTP_GET_VARS[$name]);
      } elseif (isset($HTTP_POST_VARS[$name]) && is_string($HTTP_POST_VARS[$name])) {
        $value = stripslashes($HTTP_POST_VARS[$name]);
      }
    }
 
    if (tep_not_null($value)) {
      $field .= ' value="' . tep_output_string($value) . '"';
    }
 
    if (tep_not_null($parameters)) $field .= ' ' . $parameters;
 
    $field .= ' />';
 
    return $field;
  }
 
////
// Output a form password field
  function tep_draw_password_field($name, $value = '', $parameters = 'maxlength="40"') {
    return tep_draw_input_field($name, $value, $parameters, 'password', false);
  }
 
////
// Output a selection field - alias function for tep_draw_checkbox_field() and tep_draw_radio_field()
  function tep_draw_selection_field($name, $type, $value = '', $checked = false, $parameters = '') {
    global $HTTP_GET_VARS, $HTTP_POST_VARS;
 
    $selection = '<input type="' . tep_output_string($type) . '" name="' . tep_output_string($name) . '"';
 
    if (tep_not_null($value)) $selection .= ' value="' . tep_output_string($value) . '"';
 
    if ( ($checked == true) || (isset($HTTP_GET_VARS[$name]) && is_string($HTTP_GET_VARS[$name]) && (($HTTP_GET_VARS[$name] == 'on') || (stripslashes($HTTP_GET_VARS[$name]) == $value))) || (isset($HTTP_POST_VARS[$name]) && is_string($HTTP_POST_VARS[$name]) && (($HTTP_POST_VARS[$name] == 'on') || (stripslashes($HTTP_POST_VARS[$name]) == $value))) ) {
      $selection .= ' checked="checked"';
    }
 
    if (tep_not_null($parameters)) $selection .= ' ' . $parameters;
 
    $selection .= ' />';
 
    return $selection;
  }
 
////
// Output a form checkbox field
  function tep_draw_checkbox_field($name, $value = '', $checked = false, $parameters = '') {
    return tep_draw_selection_field($name, 'checkbox', $value, $checked, $parameters);
  }
 
////
// Output a form radio field
  function tep_draw_radio_field($name, $value = '', $checked = false, $parameters = '') {
    return tep_draw_selection_field($name, 'radio', $value, $checked, $parameters);
  }
 
////
// Output a form textarea field
// The $wrap parameter is no longer used in the core xhtml template
  function tep_draw_textarea_field($name, $wrap, $width, $height, $text = '', $parameters = '', $reinsert_value = true) {
    global $HTTP_GET_VARS, $HTTP_POST_VARS;
 
    $field = '<textarea name="' . tep_output_string($name) . '" cols="' . tep_output_string($width) . '" rows="' . tep_output_string($height) . '"';
 
    if (tep_not_null($parameters)) $field .= ' ' . $parameters;
 
    $field .= '>';
 
    if ( ($reinsert_value == true) && ( (isset($HTTP_GET_VARS[$name]) && is_string($HTTP_GET_VARS[$name])) || (isset($HTTP_POST_VARS[$name]) && is_string($HTTP_POST_VARS[$name])) ) ) {
      if (isset($HTTP_GET_VARS[$name]) && is_string($HTTP_GET_VARS[$name])) {
        $field .= tep_output_string_protected(stripslashes($HTTP_GET_VARS[$name]));
      } elseif (isset($HTTP_POST_VARS[$name]) && is_string($HTTP_POST_VARS[$name])) {
        $field .= tep_output_string_protected(stripslashes($HTTP_POST_VARS[$name]));
      }
    } elseif (tep_not_null($text)) {
      $field .= tep_output_string_protected($text);
    }
 
    $field .= '</textarea>';
 
    return $field;
  }
 
////
// Output a form hidden field
  function tep_draw_hidden_field($name, $value = '', $parameters = '') {
    global $HTTP_GET_VARS, $HTTP_POST_VARS;
 
    $field = '<input type="hidden" name="' . tep_output_string($name) . '"';
 
    if (tep_not_null($value)) {
      $field .= ' value="' . tep_output_string($value) . '"';
    } elseif ( (isset($HTTP_GET_VARS[$name]) && is_string($HTTP_GET_VARS[$name])) || (isset($HTTP_POST_VARS[$name]) && is_string($HTTP_POST_VARS[$name])) ) {
      if ( (isset($HTTP_GET_VARS[$name]) && is_string($HTTP_GET_VARS[$name])) ) {
        $field .= ' value="' . tep_output_string(stripslashes($HTTP_GET_VARS[$name])) . '"';
      } elseif ( (isset($HTTP_POST_VARS[$name]) && is_string($HTTP_POST_VARS[$name])) ) {
        $field .= ' value="' . tep_output_string(stripslashes($HTTP_POST_VARS[$name])) . '"';
      }
    }
 
    if (tep_not_null($parameters)) $field .= ' ' . $parameters;
 
    $field .= ' />';
 
    return $field;
  }
 
////
// Hide form elements
  function tep_hide_session_id() {
    global $session_started, $SID;
 
    if (($session_started == true) && tep_not_null($SID)) {
      return tep_draw_hidden_field(tep_session_name(), tep_session_id());
    }
  }
 
////
// Output a form pull down menu
  function tep_draw_pull_down_menu($name, $values, $default = '', $parameters = '', $required = false) {
    global $HTTP_GET_VARS, $HTTP_POST_VARS;
 
    $field = '<select name="' . tep_output_string($name) . '"';
 
    if (tep_not_null($parameters)) $field .= ' ' . $parameters;
 
    $field .= '>';
 
    if (empty($default) && ( (isset($HTTP_GET_VARS[$name]) && is_string($HTTP_GET_VARS[$name])) || (isset($HTTP_POST_VARS[$name]) && is_string($HTTP_POST_VARS[$name])) ) ) {
      if (isset($HTTP_GET_VARS[$name]) && is_string($HTTP_GET_VARS[$name])) {
        $default = stripslashes($HTTP_GET_VARS[$name]);
      } elseif (isset($HTTP_POST_VARS[$name]) && is_string($HTTP_POST_VARS[$name])) {
        $default = stripslashes($HTTP_POST_VARS[$name]);
      }
    }
 
    for ($i=0, $n=sizeof($values); $i<$n; $i++) {
      $field .= '<option value="' . tep_output_string($values[$i]['id']) . '"';
      if ($default == $values[$i]['id']) {
        $field .= ' selected="selected"';
      }
 
      $field .= '>' . tep_output_string($values[$i]['text'], array('"' => '"', '\'' => ''', '<' => '<', '>' => '>')) . '</option>';
    }
    $field .= '</select>';
 
    if ($required == true) $field .= TEXT_FIELD_REQUIRED;
 
    return $field;
  }
 
////
// Creates a pull-down list of countries
  function tep_get_country_list($name, $selected = '', $parameters = '') {
    $countries_array = array(array('id' => '', 'text' => PULL_DOWN_DEFAULT));
    $countries = tep_get_countries();
 
    for ($i=0, $n=sizeof($countries); $i<$n; $i++) {
      $countries_array[] = array('id' => $countries[$i]['countries_id'], 'text' => $countries[$i]['countries_name']);
    }
 
    return tep_draw_pull_down_menu($name, $countries_array, $selected, $parameters);
  }
 
////
// Output a jQuery UI Button
  function tep_draw_button($title = null, $icon = null, $link = null, $priority = null, $params = null) {
    static $button_counter = 1;
 
    $types = array('submit', 'button', 'reset');
 
    if ( !isset($params['type']) ) {
      $params['type'] = 'submit';
    }
 
    if ( !in_array($params['type'], $types) ) {
      $params['type'] = 'submit';
    }
 
    if ( ($params['type'] == 'submit') && isset($link) ) {
      $params['type'] = 'button';
    }
 
    if (!isset($priority)) {
      $priority = 'secondary';
    }
 
    $button = '<span class="tdbLink">';
 
    if ( ($params['type'] == 'button') && isset($link) ) {
      $button .= '<a id="tdb' . $button_counter . '" href="' . $link . '"';
 
      if ( isset($params['newwindow']) ) {
        $button .= ' target="_blank"';
      }
    } else {
      $button .= '<button id="tdb' . $button_counter . '" type="' . tep_output_string($params['type']) . '"';
    }
 
    if ( isset($params['params']) ) {
      $button .= ' ' . $params['params'];
    }
 
    $button .= '>' . $title;
 
    if ( ($params['type'] == 'button') && isset($link) ) {
      $button .= '</a>';
    } else {
      $button .= '</button>';
    }
 
    $button .= '</span><script type="text/javascript">$("#tdb' . $button_counter . '").button(';
 
    $args = array();
 
    if ( isset($icon) ) {
      if ( !isset($params['iconpos']) ) {
        $params['iconpos'] = 'left';
      }
 
      if ( $params['iconpos'] == 'left' ) {
        $args[] = 'icons:{primary:"ui-icon-' . $icon . '"}';
      } else {
        $args[] = 'icons:{secondary:"ui-icon-' . $icon . '"}';
      }
    }
 
    if (empty($title)) {
      $args[] = 'text:false';
    }
 
    if (!empty($args)) {
      $button .= '{' . implode(',', $args) . '}';
    }
 
    $button .= ').addClass("ui-priority-' . $priority . '").parent().removeClass("tdbLink");</script>';
 
    $button_counter++;
 
    return $button;
  }
?>
Link to comment
Share on other sites

Please replace your .htaccess file with this and see if it helps:

# Begin Ultimate SEO V2.2d 
Options +FollowSymLinks
RewriteEngine On 
  
RewriteBase /
 
RewriteRule ^(.*)-p-(.*).html$ product_info.php?products_id=$2&%{QUERY_STRING}
RewriteRule ^(.*)-c-(.*).html$ index.php?cPath=$2&%{QUERY_STRING}
RewriteRule ^(.*)-m-(.*).html$ index.php?manufacturers_id=$2&%{QUERY_STRING}
RewriteRule ^(.*)-pi-(.*).html$ popup_image.php?pID=$2&%{QUERY_STRING}
RewriteRule ^(.*)-by-(.*).html$ all-products.php?fl=$2&%{QUERY_STRING}
RewriteRule ^(.*)-t-(.*).html$ articles.php?tPath=$2&%{QUERY_STRING}
RewriteRule ^(.*)-a-(.*).html$ article_info.php?articles_id=$2&%{QUERY_STRING}
RewriteRule ^(.*)-au-(.*).html$ articles.php?authors_id=$2&%{QUERY_STRING}
RewriteRule ^(.*)-pr-(.*).html$ product_reviews.php?products_id=$2&%{QUERY_STRING}
RewriteRule ^(.*)-pri-(.*).html$ product_reviews_info.php?products_id=$2&%{QUERY_STRING}
RewriteRule ^(.*)-f-(.*).html$ faqdesk_info.php?faqdesk_id=$2&%{QUERY_STRING}
RewriteRule ^(.*)-fc-(.*).html$ faqdesk_index.php?faqPath=$2&%{QUERY_STRING}
RewriteRule ^(.*)-fri-(.*).html$ faqdesk_reviews_info.php?faqdesk_id=$2&%{QUERY_STRING}
RewriteRule ^(.*)-fra-(.*).html$ faqdesk_reviews_article.php?faqdesk_id=$2&%{QUERY_STRING}
RewriteRule ^(.*)-i-(.*).html$ information.php?info_id=$2&%{QUERY_STRING}
RewriteRule ^(.*)-links-(.*).html$ links.php?lPath=$2&%{QUERY_STRING}
RewriteRule ^(.*)-pm-([0-9]+).html$ info_pages.php?pages_id=$2&%{QUERY_STRING}
RewriteRule ^(.*)-n-(.*).html$ newsdesk_info.php?newsdesk_id=$2&%{QUERY_STRING}
RewriteRule ^(.*)-nc-(.*).html$ newsdesk_index.php?newsPath=$2&%{QUERY_STRING}
RewriteRule ^(.*)-nri-(.*).html$ newsdesk_reviews_info.php?newsdesk_id=$2&%{QUERY_STRING}
RewriteRule ^(.*)-nra-(.*).html$ newsdesk_reviews_article.php?newsdesk_id=$2&%{QUERY_STRING}
RewriteRule ^(.*)-po-([0-9]+).html$ pollbooth.php?pollid=$2&%{QUERY_STRING}
# End Ultimate SEO V2.2d

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 Jack,

 

 

1/ I made ALWAYS a copy of my site and database before changing something.

2/ I editing all the files and If there no problems to changing the code I saved them.

3/ I keep al edeting files open in dreamweaver if there is a problem I can undo the modifications.

4/ If something goes wrong I have my backup's. Every day.

 

But I found the problem and It is working like a charm.

 

Thanks a lot Jack

Link to comment
Share on other sites

HI,

 

What is if only two character are not converted?

 

"őű and ŐŰ" another character are converted only those two not. :-(

example:

 

Product name: 

 

TáéóúíüöőűÉÍÁÓÚ

 

and what i get is:

 

taeouiuoeiaou-p-29.html

 

I' have ready page 350 also :( :)

 

T

Link to comment
Share on other sites

I Made some testing.

I have a shop with OSC 2.2 MS2 RC On this site this addon is working great.

But on 2.3.3.4 and 2.3.4 BS Gold not.

Those two character are not corretly displayed in the url. "ű and ő". ( Ony those two)

What I see differents from those sites are:

Old version  with OSC 2.2 MS2 Rc - Seo.class php is saved in utf-8 without BOM

New version - not.

Ms2 version database coding are latin1_swedish

MS 2.3.4 GOLD utf8_unicode_ci

If I made the changes regarding Jack on page 350. I got an error.

" mysql_set_charset() expects parameter 2 to be resource, object given in E:\xampp\htdocs\OSCBS\includes\classes\seo.class.php on line 78 "

 

If I change the table coding to latin_swedish, the problem is still there.

Maybe I need to change some another tables?

 

What I really know is that, the ű and ő character are not in ISO-8859-1 They are only in ISO-8859-2.

On my another site ( 2.3.3.4 ) I'm using FWR SEO, and it is working But Jack Seo I thing is better than that.

Any idea?

Link to comment
Share on other sites

If you are on 2.3.4, the code can't use MySQL calls. That needs to be changed to mysqli, assuming there is a replacement for it. But that's not coming from this addon, at least not my version of it, so you will need to trace that down.

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

If you are on 2.3.4, the code can't use MySQL calls. That needs to be changed to mysqli, assuming there is a replacement for it. But that's not coming from this addon, at least not my version of it, so you will need to trace that down.

 

If I change the mysql to mysqli i still have the problem:

" mysqli_set_charset() expects parameter 1 to be resource, object given in E:\xampp\htdocs\OSCBS\includes\classes\seo.class.php on line 78 "

 

It is Ultimate SEO the lsat one Roaddoctor has made it. :( I dont know why but only those two character are not working (űő) .:(

Link to comment
Share on other sites

  • 2 weeks later...

Hello,

 

For information tested on 2.2rc2a on PHP 5.3.29:

Last Ultimate SEO Roaddoctor seo.class seems to break Header Tags option to "Enable use Header Tags SEO as name" in urls.

When switched on no rewrites occur neither on categories nor products.

 

result = -c-xx-yy.html or -p-xx-yy.html without any names.

 

Further this error appear in logs:

mysqli_free_result() expects parameter 1 to be mysqli_result, boolean given in /aaa/bbb/htdocs/includes/classes/seo.class.php on line 152

 

regards

david

Link to comment
Share on other sites

@@Jack_mcs

I just switched back to this contribution too, and wondered if there is a particular reason to use these direct db calls, and not using the oscommerce provided functions ?

KEEP CALM AND CARRY ON

I do not use the responsive bootstrap version since i coded my responsive version earlier, but i have bought every 28d of code package to support burts effort and keep this forum alive (albeit more like on life support).

So if you are still here ? What are you waiting for ?!

 

Find the most frequent unique errors to fix:

grep "PHP" php_error_log.txt | sed "s/^.* PHP/PHP/g" |grep "line" |sort | uniq -c | sort -r > counterrors.txt

Link to comment
Share on other sites

@@bruyndoncx That's how the addon was originally written and never was a problem prior to mysqli being used. There's no reason not to change the code now except, for me, lack of time.

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

  • 2 weeks later...

@@Jack_mcs

 

Hi Jack, when I set Filter short words to 0 after a few hours when I login to admin again this value changes back to 3 ? Can you please assist since currently Google is seeing Duplicate Title tags since URL's it crawled has 0 short words and other 3 and it is the same product but with different URL.

Link to comment
Share on other sites

The code will re-install itself if it thinks the code has been updated and that sounds like what is happening. But I've no idea why. I vaguely recall a problem similar to this, or may it was this one, that was caused by the servers mod_security module. You can ask your host if that is on and, if it is, if they will turn it off.

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

@Jack_mcs,

 

Hi I have checked with Service provider and mod_security is disabled. Is there a file or database field I can edit to set default Filter Short words to 0 ? This is the only option I change from default config hence other options are fine on default.

Link to comment
Share on other sites

I get 500 Internal server error, after install last version on 234BS Gold and problem was in .htaccess - in install manual is

Options +FollowSymLinks

, but in apache error log was "Option FollowSymLinks not allowed here".

I changed to

Options +SymLinksIfOwnerMatch

 (like in my 234 classic shop) problem was solved...

 

HTTP Server: Apache/2.4.10 PHP Version:

5.6.7-1 (Zend: 2.6.0)

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