Jump to content
FWR Media

Ultimate Seo Urls 5 Pro

Recommended Posts

HI all,

 

Does anyone know whether changes need te be made to USU5 in regard to OSC 2.3.4  Improve $PHP_SELF ?

 

For application_top.php the upgrade guide states:

 

$PHP_SELF = (((strlen(ini_get('cgi.fix_pathinfo')) > 0) && ((bool)ini_get('cgi.fix_pathinfo') == false)) || !isset($HTTP_SERVER_VARS['SCRIPT_NAME'])) ? basename($HTTP_SERVER_VARS['PHP_SELF']) : basename($HTTP_SERVER_VARS['SCRIPT_NAME']);

 

change to :

 

$req = parse_url($HTTP_SERVER_VARS['SCRIPT_NAME']);
$PHP_SELF = substr($req['path'], ($request_type == 'NONSSL') ? strlen(DIR_WS_HTTP_CATALOG) : strlen(DIR_WS_HTTPS_CATALOG));

 

 

The USU5 installation reguires :

 

Find ...

// set php_self in the local scope
  
$PHP_SELF = (((strlen(ini_get('cgi.fix_pathinfo')) > 0) && ((bool)ini_get('cgi.fix_pathinfo') == false)) || !isset($HTTP_SERVER_VARS['SCRIPT_NAME'])) ? basename($HTTP_SERVER_VARS['PHP_SELF']) : basename($HTTP_SERVER_VARS['SCRIPT_NAME']);

Replace with ...

/**
  * ULTIMATE Seo Urls 5 PRO by FWR Media
  * function to return the base filename 
  */
  
function usu5_base_filename() {
    
// Probably won't get past SCRIPT_NAME unless this is reporting cgi location
    
$base = new ArrayIterator( array( 'SCRIPT_NAME''PHP_SELF''REQUEST_URI''ORIG_PATH_INFO''HTTP_X_ORIGINAL_URL''HTTP_X_REWRITE_URL' ) );
    while ( 
$base->valid() ) {
      if ( 
array_key_exists(  $base->current(), $_SERVER ) && !empty(  $_SERVER[$base->current()] ) ) {
        if ( 
false !== strpos$_SERVER[$base->current()], '.php' ) ) {
          
preg_match'@[a-z0-9_]+\.php@i'$_SERVER[$base->current()], $matches );
          if ( 
is_array$matches ) && ( array_key_exists0$matches ) )
                                    && ( 
substr$matches[0], -4) == '.php' )
                                    && ( 
is_readable$matches[0] ) ) ) {
            return 
$matches[0];
          } 
        } 
      }
      
$base->next();
    }
    
// Some odd server set ups return / for SCRIPT_NAME and PHP_SELF when accessed as mysite.com (no index.php) where they usually return /index.php
    
if ( ( $_SERVER['SCRIPT_NAME'] == '/' ) || ( $_SERVER['PHP_SELF'] == '/' ) ) {
      return 
'index.php';
    }
    
// Return the standard RC3 code 
    
return ( ( ( strlenini_get'cgi.fix_pathinfo' ) ) > 0) && ( (bool)ini_get'cgi.fix_pathinfo' ) == false ) ) || !isset( $_SERVER['SCRIPT_NAME'] ) ) ? basename$_SERVER['PHP_SELF'] ) : basename$_SERVER['SCRIPT_NAME'] );
  } 
// End function
// set php_self in the local scope
  
$PHP_SELF usu5_base_filename();

 

So should we change this line :

 

// Return the standard RC3 code 
    
return ( ( ( strlenini_get'cgi.fix_pathinfo' ) ) > 0) && ( (bool)ini_get'cgi.fix_pathinfo' ) == false ) ) || !isset( $_SERVER['SCRIPT_NAME'] ) ) ? basename$_SERVER['PHP_SELF'] ) : basename$_SERVER['SCRIPT_NAME'] );

 

to :

 

$req = parse_url($HTTP_SERVER_VARS['SCRIPT_NAME']); // OSC 2.3.4
return substr($req['path'], ($request_type == 'NONSSL') ? strlen(DIR_WS_HTTP_CATALOG) : strlen(DIR_WS_HTTPS_CATALOG));// OSC 2.3.4

Edited by azpro

Share this post


Link to post
Share on other sites

hi to everybody,
until now i use "seo urls by Chemo", yesterday i install "Ultimate Seo Urls 5 Pro" and it work great, but have few question.

Wen i set the url tipe at the "Rewrite", indexed pages from google wont opening (from google search, the page can not displayed ).
In site they work but now do i have to wait google indexed again ?

When set the url type at the "Standard", google search opening with the new url, but then have "index.php" and "product_info.php" in the  address.

Do i have chance to remove "index.php" "product_info.php"  when at the url type is a "standart" ?

If not how to set the "Ultimate Seo Urls 5 Pro" without losing positions on the indexed pages from google ?

 

thanks in advance.

Share this post


Link to post
Share on other sites

Do you have an idea to resolve this problem  when multilanguage is activate

 

When I clic on a link I have that

http://mysite/store/mysitestoreindex.phpen

 

if I change the link http://mysite/store/mysitestoreindex.phpen by that

http://mysite/store/index.php/en work well.

 

I have a problem somewhere but I don't where exactly.

 

Thank



Regards
-----------------------------------------
Loïc

Contact me by skype for business
Contact me @gyakutsuki for an answer on the forum

Tuto for 2.4 :
- How to Display a new page with app
- How to make Header Tags under app APP
- How to make a
boostrap modal with external element
 

 

Share this post


Link to post
Share on other sites

resolved ! 

 

// for language box

// if ( $value['directory'] == $language ) {
if ( $value['directory'] == $_SESSION['language'] ) {

usu5.php

public function initiate( $lng, &$languages_id, &$language, $force_language = false ) {
if ( false !== $force_language ) {
$this->vars['languages_id'] = $_SESSION['languages_id'];
$this->vars['language'] = $_SESSION['$language'];
// $this->vars['languages_id'] = $languages_id;
// $this->vars['language'] = $language;

if you have a problem static function with memcache (memcache.php)

 

change in 

 function iAdmin() {

by

public static function iAdmin() {


Regards
-----------------------------------------
Loïc

Contact me by skype for business
Contact me @gyakutsuki for an answer on the forum

Tuto for 2.4 :
- How to Display a new page with app
- How to make Header Tags under app APP
- How to make a
boostrap modal with external element
 

 

Share this post


Link to post
Share on other sites

I'm trying to install this addon but in the first edit it says-

find:
// include the language translations
  require(DIR_WS_LANGUAGES . $language . '.php');

and directly after place this:
// 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);
   }
 }

but instead of the:

// include the language translations
  require(DIR_WS_LANGUAGES . $language . '.php'); 

I have this

// include the language translations
  $_system_locale_numeric = setlocale(LC_NUMERIC, 0);
  require(DIR_WS_LANGUAGES . $language . '.php');
  setlocale(LC_NUMERIC, $_system_locale_numeric);

has anyone else ran into this issue?

if so please let me know how to fix it...I would like to use this addon.

thanks.

Share this post


Link to post
Share on other sites

I'm trying to install this addon but in the first edit it says-

find:
// include the language translations
  require(DIR_WS_LANGUAGES . $language . '.php');

and directly after place this:
// 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);
   }
 }

but instead of the:

// include the language translations
  require(DIR_WS_LANGUAGES . $language . '.php'); 

I have this

// include the language translations
  $_system_locale_numeric = setlocale(LC_NUMERIC, 0);
  require(DIR_WS_LANGUAGES . $language . '.php');
  setlocale(LC_NUMERIC, $_system_locale_numeric);

has anyone else ran into this issue?

if so please let me know how to fix it...I would like to use this addon.

thanks.

fixed, I just added the code under the first edit

Share this post


Link to post
Share on other sites

Hi!! Can someone help with this issue! I use 2.3.4 oscommerce
When I try accessing product URLS in this format  with id and attribute...
www.radhavallabh.com/radhakrishna-store/product_info.php?products_id=1278{2}83{1}17{38}253{40}289{43}343{36}241{50}430{51}450

it redirects to index page

 

Whereas the seo urls and only product id urls www.radhavallabh.com/radhakrishna-store/product_info.php?products_id=1278
work fine

 

Any clue of what is wrong??
Please help would be greatly appreciated....
Thanks in advance..

Share this post


Link to post
Share on other sites

Yes, with the osc upgrade I convert all to UTF-8. All my sql tables are all in utf8_unicode_ci

 

 

 

Yehhhh... that do the trick. Thank you very much :)

 

 

 

Every day a new lesson. Never eared before about BOM or without BOM. I save the file without BOM and work like a charm. Many thanks once again, you are a master ;)

I was having the same problem. Saving file without BOM did it! Thank you for sharing!


Patty

Share this post


Link to post
Share on other sites

For those who were using a multilangue shop with USU 5 pro and eliminate one or more language, what is the best practice to redirect the url's from the deleted language? Thanks

Share this post


Link to post
Share on other sites

@@radhavallabh

Hi,

I had the same problem with the shopping_cart navbar module of BS Edge, I don't know if I missed something with the rewrite rules. My solution was to ad (int) where the product_id was called. Example:

//change
$products[$i]['id']
//to
(int)$products[$i]['id']

works for me.

 

Best regards

Christoph

Edited by beerbee

Share this post


Link to post
Share on other sites

in Google Webmaster Tools, HTML Improvements. I have almost all my web pages duplicate titles. e.g.

/index.php/pos-system-signature-capture-c-155_185_2093_0_45_252_474
/index.php/pos-system-signature-capture-c-155_45_252_474

another e.g.

/product_info.php/targus-bag-tss588us-156-black-p-6437
/product_info.php?products_id=6437

Why ? and what should I do ? thanks

Share this post


Link to post
Share on other sites

Sorry for posting again but i really have to repair this problem, duplicate URLs in Google Webmaster Tools e.g.

/product_info.php/targus-bag-tss588us-156-black-p-6437
/product_info.php?products_id=6437

Edited by Psytanium

Share this post


Link to post
Share on other sites

Hi,

i'm using ultimate seo urls 5 pro with 2.3.4BS
i have a content module to authorise the account by entering a code that has been sent to the account email before.

The problem is, when i am coming from the shop in language english and enter this module page, it always changes back to default language german.

The authorise module page is here /ext/modules/content/account/authorise.php 
Any idea how to fix this? 

btw: it seemsto be a problem for all content modules behind /ext/modules/conent/ ..etc


 

 

Share this post


Link to post
Share on other sites

Hello Stephan @Stephan Gebbers,

Someone posted a fix for the same problem happening with twitter typeahead autocomplete search module.

It works for me and should be also the solution for your issue.

In application top wrap the following if statement around that USU5 code snippet:

  /**
  * ULTIMATE Seo Urls 5 PRO by FWR Media
  */
if (basename($PHP_SELF) != 'autocomplete.php') {
  Usu_Main::i()->setVar( 'languages_id', $languages_id )
               ->setVar( 'request_type', $request_type ) 
               ->setVar( 'session_started', $session_started ) 
               ->setVar( 'sid', $SID ) 
               ->setVar( 'language', $language )
               ->setVar( 'filename', $PHP_SELF )
               ->initiate( ( isset( $lng ) && ( $lng instanceof language ) ) ? $lng : array(), $languages_id, $language );
}

and change the following line to "authorize.php":

if (basename($PHP_SELF) != 'authorize.php') {

 

 

@piernas, maybe this could be included as a troubleshooting instruction to the package. or better find a global solution based on the entire "ext/" directory.

rgds

Rainer

Edited by raiwa

Share this post


Link to post
Share on other sites

it kinda works but still behaves a little strange. i call that module page and the language stays as it should with your changes (except it is authorise.php). but if i leave that page by clicking on the home link it switches back to german language.

a global solution for all content modules under /ext/ would be nice, right!

Edited by Stephan Gebbers

 

 

Share this post


Link to post
Share on other sites

I do not use authorise, can't check further. If you find a stable fix, let us know. :-)

Share this post


Link to post
Share on other sites

please check this @raiwa

in /includes/modules/ultimate_seo_urls5/includes/usu_general_functions.php

right after 

    $multi_language_valid = true;
    if ( ( false !== strpos( $page, '/' ) ) || ( substr( $page, -4, strlen( $page ) ) != '.php' ) ) {
      $multi_language_valid = false;
    }

add this

    if ((false !== strpos( $page, "ext/modules" ) ) && ( substr( $page, -4, strlen( $page ) ) == '.php' )) $multi_language_valid = true;

It is within the function osc_href_link, wich will be used by usu for non usu links (no page module for this pagename available for example)
Page-Strings that contain a / or that dont end to .php will not be treated as multilanguage. So the new line should set the $multi_language_valid to true for .php files under ext/modules. let me know if that makes sense/works, or if i introduced other problems with this fix.

it creates links for non usu pages that look like that https://www.example.com/ext/modules/content/product_info/ask_question.php/en?products_id=31

Maybe you have further ideas how to make this more beatiful? :)


 

 

Share this post


Link to post
Share on other sites

Share this post


Link to post
Share on other sites

Hi all, just installed over the Chemo's SEO and seems to work.

The main reason I updated was to get the language in URL. But !!! I can't get it to work if I force URL not to have the index.php in URL.

So this URL works http://www.mysite.com/index.php/fr
But this one doesn't http://www.mysite.com/f

Have I missed something or it is a limitation of the module ?
Also did someone find a way to also have the link directly to the correct page (http://www.mysite.com/my_great_article-p-15500.html => http://www.mysite.com/fr/mon_super_article-p-15500.html) ?

Thank you for your help

Share this post


Link to post
Share on other sites

Hello, recently I have installed 2 addons that require some files to run from inside includes folders or ext. but the files where failing to run until I turn off the Seo Urls 5.

Another solution is to move the files to catalog directory. Only the catalog directory which is public_html seems to work.

Any advice ? thankls

Share this post


Link to post
Share on other sites
18 minutes ago, Psytanium said:

Hello, recently I have installed 2 addons that require some files to run from inside includes folders or ext. but the files where failing to run until I turn off the Seo Urls 5.

Another solution is to move the files to catalog directory. Only the catalog directory which is public_html seems to work.

Any advice ? thankls

the 2 addons are Auto Update Currency and Twitter Autocomplete

Share this post


Link to post
Share on other sites

hi how to add  self-referencing hreflang tag to href lang module 

bcz This SEO error show on my website

No self-referencing hreflang tag

This is the most common issue in this section. We found out that if a website has a conflict within a page source code, in 96% of cases, the page doesn’t contain a self-referencing hreflang in its set of hreflang attributes. That means that those attributes may be ignored or interpreted incorrectly.

To fix this mistake, make sure to include the page’s URL and language code in your set of hreflang attributes.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×