Jump to content
FWR Media

ULTIMATE Seo Urls 5 - by FWR Media

Recommended Posts

<br />In the downloaded package look in extras/character_conversion_pack/<br /><br />You need to make a file like one of these and add it to the ultimate_seo_urls/includes/character_conversion/ directory.<br /><br />The file must be named the same as your osCommerce language.<br />
<br /><br /><br />

 

Yes, I insert this package and my language is french. All is ok.

The pb is the conversion utf8 the link in href balise.

 

I ue debug module I see that on result Seo Urls: cache (filesytem)

 

My product name is téstà3

http://....../boutique/téstà3-p-2.html

http://....../boutique/téstà3-p-2.html

http://....../boutique/téstà3-p-2.html

 

If my latest post, the result is not the same. In my html code, the href has this http:......../boutique/téstà 3-p-2.html

 

I need to decode all utf8 synthax (ex é) and change the decode (é = é) and a = e (your module extras/character_conversion_pack will the job).

 

just a precision :

database encoding : utf 8 and no latin1

charset in french is utf 8 and no iso-8859-1



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

<br /><br /><br />

 

Yes, I insert this package and my language is french. All is ok.

The pb is the conversion utf8 the link in href balise with w3c norms (on true).

 

 

 

My product name is téstà3 (inside database field : téstà 3)

 

I use debug module I see that on result Seo Urls: cache (filesytem)

http://....../boutique/téstà3-p-2.html (I don't no if it's ok)

http://....../boutique/téstà3-p-2.html

http://....../boutique/téstà3-p-2.html

 

In my latest post, the result is not the same. In my html code, the href has this http:......../boutique/téstà 3-p-2.html

 

I need to decode all utf8 synthax (ex é) and change the decode (é = é) and a = e (your module extras/character_conversion_pack will do the job).

 

It produce also this error when I click on url : The requested URL /......./boutique/teéstà3-p-2.html was not found on this server.

 

 

I try to change this in usu.php line 307

 

	switch( SEO_URLS_USE_W3C_VALID ) {
	case 'true':
	self::$performance['seo_url_array'][] = $link;
	return htmlspecialchars( utf8_encode( $link ) ); 								
	break;

====> htmlspecialchars( utf8_encode( $link ) ); 
change by htmlspecialchars( utf8_decode( $link ) ); ==> I see a modification in href but i don't found a good solution.

 

 

 

just a precision :

database encoding : utf 8 and no latin1

charset in french is utf 8 and no iso-8859-1



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

You shouldn't need to change any code.

 

If the character conversion file is correct (and UTF-8) and the site charset is UTF-8.

 

Reset the cache to lose the legacy links and it should work fine.

 

I would be grateful if you could send me the correct french character conversion file as I am not multi lingual.

Share this post


Link to post
Share on other sites

You shouldn't need to change any code.

 

 

I would be grateful if you could send me the correct french character conversion file as I am not multi lingual.

 

Ok it's not a pb, i look the french character. :lol:



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

French caracter, just two modifications


$char_convert = array('à' => 'a', 'â' => 'a', 'æ' => 'ae', 'ç' => 'c',
	'é' => 'e', 'è' => 'e', 'ê' => 'e', 'ë' => 'e',
	'î' => 'i', 'ï' => 'i', 'œ' => 'oe', 'ô' => 'o',
	'ö' => 'o', 'ù' => 'u', 'û' => 'u', 'À' => 'A', 
	'Â' => 'A', 'Æ' => 'AE', 'Ç' => 'C', 'È' => 'E', 
	'É' => 'E', 'Ê' => 'E', 'Ë' => 'E', 'Î' => 'I',
	'Ï' => 'I', 'Œ' => 'OE', 'Ô' => 'O', 'Ù' => 'U',
	'Û' => 'U', 'ü' => 'u', 'ÿ' =>'y',
	'€' => 'Euros');



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

Hi

 

This have worked realy nice but now after a week this came up when i entered the homepage.

 

Warning: Attempt to assign property of non-object in /hsphere/local/home/swehealth/swehealth.se/includes/modules/ultimate_seo_urls5/classes/usu.php on line 73 Fatal error: Call to a member function merge() on a non-object in /hsphere/local/home/swehealth/swehealth.se/includes/modules/ultimate_seo_urls5/modules/Usu_Categories.php on line 38

 

I got it to work again when i Reset SEO URLs Cache , but do you now what the problem with this is ?

 

/mvh Marcus

Share this post


Link to post
Share on other sites

Hi

 

This have worked realy nice but now after a week this came up when i entered the homepage.

 

Warning: Attempt to assign property of non-object in /hsphere/local/home/swehealth/swehealth.se/includes/modules/ultimate_seo_urls5/classes/usu.php on line 73 Fatal error: Call to a member function merge() on a non-object in /hsphere/local/home/swehealth/swehealth.se/includes/modules/ultimate_seo_urls5/modules/Usu_Categories.php on line 38

 

I got it to work again when i Reset SEO URLs Cache , but do you now what the problem with this is ?

 

/mvh Marcus

 

Odd, I can't replicate this Marcus. Line 73 is stating that the $registry is not an object but the $registry object is created two lines above (indirectly) with $this->loadRegistry();

 

I will think further on this but please let me know if it happens again.

Share this post


Link to post
Share on other sites

So, Robert, do you think I should move the .htaccess file from the include folder to the root? How can I get this thing to work? Thanks so much :-)

 

Sabrina

Share this post


Link to post
Share on other sites

So, Robert, do you think I should move the .htaccess file from the include folder to the root? How can I get this thing to work? Thanks so much :-)

 

Sabrina

 

Create a blank .htaccess put in it the code shown in the contribution .. upload it to site root.

Share this post


Link to post
Share on other sites

If you use the ut8 encoding, you need convert all files in /includes/caracter_conversion in ut8 because the encoding is in ISO.

 

Thanl for your help Robert . I propose you to create in your add on a speciel directory in utf 8 for that



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

If you use the ut8 encoding, you need convert all files in /includes/caracter_conversion in ut8 because the encoding is in ISO.

 

Thanl for your help Robert . I propose you to create in your add on a speciel directory in utf 8 for that

 

Hi Robert

I install your again first class contribution but I would like to know if I need to install other your contribution like "Google Duplicate Content Manager vs 1.0 alpha" and "Independent SEO URL Validation (for ULTIMATE SEO URLs)" or is already in the new "LTIMATE Seo Urls 5 - by FWR Media"

Thank you

Share this post


Link to post
Share on other sites

Hi Robert

I install your again first class contribution but I would like to know if I need to install other your contribution like "Google Duplicate Content Manager vs 1.0 alpha" and "Independent SEO URL Validation (for ULTIMATE SEO URLs)" or is already in the new "LTIMATE Seo Urls 5 - by FWR Media"

Thank you

 

All the functionality is included and bettered in the USU5 and KissMT packages you have installed.

Share this post


Link to post
Share on other sites

I have now another pb.

 

There my code

 

	 	$link = FILENAME_PAGES . '?pages_id=' . (int)$page['pages_id'];
	$page_liste_box .= '<tr><td class="main"><a target="'.$page['links_target'].'" href="' . tep_href_link($link,'',NONSSL) . '">' . $page['pages_title'] . '</a></td></tr>'; 		

 

After i apply seo my code ?pages_id=' . (int)$page['pages_id'] is deleted

 

Before

page_manager.php?pages_id=4

 

Now

page_manager.php == impossible to see the content.

 

Do you delete something in your code ? Do you have an idea to resolve this.

 

The seo rewriiting is not activate.



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 have now another pb.

 

There my code

 

	$link = FILENAME_PAGES . '?pages_id=' . (int)$page['pages_id'];
	$page_liste_box .= '<tr><td class="main"><a target="'.$page['links_target'].'" href="' . tep_href_link($link,'',NONSSL) . '">' . $page['pages_title'] . '</a></td></tr>'; 		

 

After i apply seo my code ?pages_id=' . (int)$page['pages_id'] is deleted

 

Before

page_manager.php?pages_id=4

 

Now

page_manager.php == impossible to see the content.

 

Do you delete something in your code ? Do you have an idea to resolve this.

 

The seo rewriiting is not activate.

 

I resolve my prob by this (work without seo) :


$page_liste_box .= '<tr><td class="main"><a target="'.$page['links_target'].'" href="' . tep_href_link($link,'',NONSSL) . '">' . $page['pages_title'] . '</a></td></tr>'; 

become

$page_liste_box .= '<tr><td class="main"><a target="'.$page['links_target'].'" href="' . $link . '">' . $page['pages_title'] . '</a></td></tr>'; 

 

but with seo it's does'nt work. An idea ?

 

I create this module and I have updated my htaccess :

 

<?php
/**
*
* ULTIMATE Seo Urls 5
*
* 
* @package Ultimate Seo Urls 5
* @license http://www.opensource.org/licenses/gpl-2.0.php GNU Public License
* @link http://www.fwrmedia.co.uk
* @copyright Copyright 2008-2009 FWR Media
* @copyright Portions Copyright 2005 Bobby Easland
* @author Robert Fisher, FWR Media, http://www.fwrmedia.co.uk 
* @lastdev $Author:: Rob 	$: Author of last commit
* @lastmod $Date:: 2009-11-29 11:13:08 +0000 (Sun, 29 Nov 2009) 	$: Date of last commit
* @version $Rev:: 105 	$: Revision of last commit
* @Id $Id:: Usu_Page_Manager.php 105 2009-11-29 11:13:08Z Rob 	$: Full Details 
*/

class Usu_Pages_Manager extends aDataMap {

const MARKER = '-pm-'; // Could for example be -c- or -l- etc.
const DEPENDENCY = 'pages_id'; // _GET key like e.g. cPath or lPath etc.
const FILENAME = FILENAME_PAGES; // The filename define of the file where this code will be actioned
public $dependency = self::DEPENDENCY;
public $dependency_tags = array( self::MARKER => self::FILENAME ); // key value pair of tag (like e.g. -c-) => filename ( e.g. FILENAME_DEFAULT )
private $page_relations = array( self::FILENAME => 1 ); // Page relation for this module ( e.g. FILENAME_DEFAULT or FILENAME_LINKS )
private $markers = array( self::MARKER => self::DEPENDENCY ); // Markers as key value pair like -c- => cPath or perhaps -l- => lPath
private $base_query; // Template query with placeholders ( :placeholder ) waiting for real values
private $query; // The final query which will be $base_query but with the placeholders replaced with real values
private $pages_title; // property populated in the acquire() method, there may be multiples of these, rename in line with the query results
private $dependency_value; // Dependency value, so if the dependency was cPath and cPath = 27 then this value would be 27
private $installed = false; // Unless it is a core module $installed should only be true if the contribution is installed ( e.g. articles or links manager etc )
private $suppress_underscores = false; // Set to true Produce only base paths like -t-32 not parent paths like 3_5_23

public function __construct(){
if ( defined( 'FILENAME_PAGES' ) && defined( 'TABLE_PAGES_MANAGER_DESCRIPTION' ) ){
	// The items with a colon : are placeholders which must match the $placeholders array in method acquire()
	$this->base_query = "SELECT pages_title FROM " . TABLE_PAGES_MANAGER_DESCRIPTION . " WHERE pages_id=':pages_id' AND language_id=':languages_id' LIMIT 1";
	usu::$registry->merge( 'seo_pages', $this->page_relations );
	usu::$registry->merge( 'markers', $this->markers );
	usu::$registry->addPageDependency( array( self::FILENAME => self::DEPENDENCY ) );
	/**
	* For modules which are optional ( like information pages etc)
	* we would check for the existance of certain defines and if present set $this->installed to true
	* e.g. for the links contribution we would use ..
	* if ( defined( 'FILENAME_LINKS' ) && defined( 'TABLE_LINK_CATEGORIES_DESCRIPTION' ) ) {
	* $this->installed = true;
	* } 
	*/
	$this->installed = true; // xxx Hardcoded to true in this instance - see above comment.
}
}

protected function acquire( $base_path, $full_path ) {
$this->dependency_value = $full_path; // Full path perhaps with underscores
/**
* About placeholders
* 
* The placeholders (items with a colon :) must match those in the query ( $this->base_query in the constructor )
*/
$placeholders = array( ':pages_id', ':languages_id' );
// Do the below values need to be typecast?
$values = array( (int)$base_path, (int)usu::$languages_id ); // xxx These values will replace the placeholders above in $this->base_query
$this->query = str_replace( $placeholders, $values, $this->base_query ); // Replace the placeholders with actual values
$result = usu::query( $this->query ); // Action the query
$this->query = null; // Unset the query for future usage
$row = tep_db_fetch_array( $result ); // Return the array of data ( or false if there are no results )
tep_db_free_result( $result ); // Housekeeping
if ( false === $row ) {
	return false; // No results for the query so abort
}
/**
* Values obtained from the query, these properties will populate the registry via the method getProperties()
* Method $this->linkText() should be used here to convert the text into seo url format e.g.
* my great product .. may become .. my-great-product
* You may have more than one of these like ..
* $this->parentname, $this->catname dependent on how many results you retrieve from your query
*/
$this->pages_title = $this->linkText( $row['pages_title'] );

// If the registry item doesn't exist as a key then set a blank array
if ( false === isset( usu::$registry->{self::DEPENDENCY} ) ) {
	usu::$registry->{self::DEPENDENCY} = array();
}
/**
* Populate the registry with the properties we have set in this class
*/
usu::$registry->attach( self::DEPENDENCY, $this->dependency_value, $this->getProperties() );
} // End method

protected function getProperties() {
	$properties = get_object_vars( $this ); // $properties becomes an array of all properties within this class
	unset( $properties['page_relations'] ); // Get rid of this key as it is not needed in the registry
	return $properties; 
} // End method

private function get_full_path( $path ) {
	// Only used for modules that require paths with parents like .. 2_6_35
	// See Usu_Categories.php for usage
	return $path;
} // End method

private function get_parents() {
	// Only used for modules that require paths with parents like .. 2_6_35
	// See Usu_Categories.php for usage
} // End method

/**
* Builds the seo url
* 
* @param string $page - file name of the calling page e.g. index.php
* @param array $valuepair - key => value pair array containing dependency(e.g. cPath) => value (e.g. 2_24_52)
* @param string $url - $url passed by reference created by the method linkCreate() 
* @param array $added_qs - passed by reference containing key value pairs for _GET
* @param string $parameters - Currently unused
*/
public function buildLink( $page, $valuepair, &$url, &$added_qs, $parameters ) {
	if ( ( $valuepair[0] != self::DEPENDENCY ) || ( false === array_key_exists( 1, $valuepair ) )
	|| ( false === $this->installed )
	|| !tep_not_null( $valuepair[1] ) ) {
	return false; // Either this module is not installed or the value pair does not meet our requirements so abort
	}
	$base_path = $valuepair[1]; // well it might be a single top level item
	if ( false === $this->suppress_underscores ) {
	if ( false !== strpos( $valuepair[1], '_' ) ) { // It is a path with parents? ( has underscores )
	$base_path = ltrim( strrchr( $valuepair[1], '_' ), '_' ); // Grab the base path which is the number at the end of a path with parents ( e.g. 2_23_37_52 = 52 ) 
	}
	}
	// Sanity check - if the $base_path is not numeric then we dump it
	if ( false === is_numeric( str_replace( '_', '', $base_path ) ) ) {
	trigger_error( __CLASS__ . ' Incorrect ' . self::DEPENDENCY . ' presented: ' . $valuepair[1], E_USER_WARNING );
	return false;
	}
	// Get a full path with underscores from the database
	$full_path = $this->get_full_path( $base_path );
	// If this item is not already in the registry we use the acquire() method to query for the data
	if ( !isset( usu::$registry->vars[self::DEPENDENCY][$full_path] ) ) {
	if ( false === $this->acquire( $base_path, $full_path ) ) {
	return false; // Looks like an invalid request so dump it
	}
	} else {
	usu::$performance['queries_saved']++; // Already in the registry so we saved one query
	}
	/**
	* About $reg_item
	* 
	* We grab the array of data from the registry and place it in $reg_item for convenience
	* The data stored in the registry was set in the method acquire as properties of this class
	* These are then set in the registry using the method getProperties()
	* the specific array keys like $reg_item['catname'] will be specific and differ in each module 
	*/
	$reg_item = array();
	$reg_item = usu::$registry->vars[$valuepair[0]][$full_path];

	/**
	* Set the link text from reg_item
	* e.g. $link_text = $reg_item['parentname'] . '-' . $reg_item['catname'];
	*/
	$link_text = $reg_item['pages_title']; // the property added in the acquire function this would have been set in the acquire method like $this->xxxname


	switch( true ){
	case $page == self::FILENAME:
	$url = $this->linkCreate( self::FILENAME, $link_text, self::MARKER, $full_path );
	break;
	default:
	// Add leftovers to the querystring _GET
	$added_qs[filter_var( $valuepair[0], FILTER_SANITIZE_STRING )] = usu::cleanse( $valuepair[1] );
	break;
	} # end switch
}
} 
?>


Edited by Gyakutsuki


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 resolve my prob by this (work without seo) :


$page_liste_box .= '<tr><td class="main"><a target="'.$page['links_target'].'" href="' . tep_href_link($link,'',NONSSL) . '">' . $page['pages_title'] . '</a></td></tr>'; 

become

$page_liste_box .= '<tr><td class="main"><a target="'.$page['links_target'].'" href="' . $link . '">' . $page['pages_title'] . '</a></td></tr>'; 

 

All it'works with seo also!

Edited by Gyakutsuki


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 resolve my prob by this (work without seo) :


$page_liste_box .= '<tr><td class="main"><a target="'.$page['links_target'].'" href="' . tep_href_link($link,'',NONSSL) . '">' . $page['pages_title'] . '</a></td></tr>'; 

become

$page_liste_box .= '<tr><td class="main"><a target="'.$page['links_target'].'" href="' . $link . '">' . $page['pages_title'] . '</a></td></tr>'; 

 

All it'works with seo also!

 

After a quick look the module looks fine except ..

const FILENAME = FILENAME_PAGES;

 

FILENAME_PAGES should be the full filename and not a define.

 

I'll have a closer look tomorrow, What is this contribution I've never heard of it?

 

Re: Your code change, it may "seem" like it is working but I think it would be creating a 301 redirect.

Share this post


Link to post
Share on other sites

ame='Gyakutsuki' date='18 January 2010 - 10:34 PM' timestamp='1263854079' post='1476128']

 

 

After a quick look the module looks fine except ..

const FILENAME = FILENAME_PAGES;

 

FILENAME_PAGES should be the full filename and not a define.

 

I'll have a closer look tomorrow, What is this contribution I've never heard of it?

 

Re: Your code change, it may "seem" like it is working but I think it would be creating a 301 redirect.

 

 

Ok thank, I will change

 

there the module created.

 

<?php
/**
*
* ULTIMATE Seo Urls 5
*
* 
* @package Ultimate Seo Urls 5
* @license http://www.opensource.org/licenses/gpl-2.0.php GNU Public License
* @link http://www.fwrmedia.co.uk
* @copyright Copyright 2008-2009 FWR Media
* @copyright Portions Copyright 2005 Bobby Easland
* @author Robert Fisher, FWR Media, http://www.fwrmedia.co.uk 
* @lastdev $Author:: Rob 	$: Author of last commit
* @lastmod $Date:: 2009-11-29 11:13:08 +0000 (Sun, 29 Nov 2009) 	$: Date of last commit
* @version $Rev:: 105 	$: Revision of last commit
* @Id $Id:: Usu_Page_Manager.php 105 2009-11-29 11:13:08Z Rob 	$: Full Details 
*/

class Usu_Pages_Manager extends aDataMap {

const MARKER = '-pm-'; // Could for example be -c- or -l- etc.
const DEPENDENCY = 'pages_id'; // _GET key like e.g. cPath or lPath etc.
const FILENAME = 'page_manager.php'; // The filename define of the file where this code will be actioned
public $dependency = self::DEPENDENCY;
public $dependency_tags = array( self::MARKER => self::FILENAME ); // key value pair of tag (like e.g. -c-) => filename ( e.g. FILENAME_DEFAULT )
private $page_relations = array( self::FILENAME => 1 ); // Page relation for this module ( e.g. FILENAME_DEFAULT or FILENAME_LINKS )
private $markers = array( self::MARKER => self::DEPENDENCY ); // Markers as key value pair like -c- => cPath or perhaps -l- => lPath
private $base_query; // Template query with placeholders ( :placeholder ) waiting for real values
private $query; // The final query which will be $base_query but with the placeholders replaced with real values
private $pages_title; // property populated in the acquire() method, there may be multiples of these, rename in line with the query results
private $dependency_value; // Dependency value, so if the dependency was cPath and cPath = 27 then this value would be 27
private $installed = false; // Unless it is a core module $installed should only be true if the contribution is installed ( e.g. articles or links manager etc )
private $suppress_underscores = false; // Set to true Produce only base paths like -t-32 not parent paths like 3_5_23

public function __construct(){
if ( defined( 'FILENAME_PAGES' ) && defined( 'TABLE_PAGES_MANAGER_DESCRIPTION' ) ){
	// The items with a colon : are placeholders which must match the $placeholders array in method acquire()
	$this->base_query = "SELECT pages_title FROM " . TABLE_PAGES_MANAGER_DESCRIPTION . " WHERE pages_id=':pages_id' AND language_id=':languages_id' LIMIT 1";
	usu::$registry->merge( 'seo_pages', $this->page_relations );
	usu::$registry->merge( 'markers', $this->markers );
	usu::$registry->addPageDependency( array( self::FILENAME => self::DEPENDENCY ) );
	/**
	* For modules which are optional ( like information pages etc)
	* we would check for the existance of certain defines and if present set $this->installed to true
	* e.g. for the links contribution we would use ..
	* if ( defined( 'FILENAME_LINKS' ) && defined( 'TABLE_LINK_CATEGORIES_DESCRIPTION' ) ) {
	* $this->installed = true;
	* } 
	*/
	$this->installed = true; // xxx Hardcoded to true in this instance - see above comment.
}
}

protected function acquire( $base_path, $full_path ) {
$this->dependency_value = $full_path; // Full path perhaps with underscores
/**
* About placeholders
* 
* The placeholders (items with a colon :) must match those in the query ( $this->base_query in the constructor )
*/
$placeholders = array( ':pages_id', ':languages_id' );
// Do the below values need to be typecast?
$values = array( (int)$base_path, (int)usu::$languages_id ); // xxx These values will replace the placeholders above in $this->base_query
$this->query = str_replace( $placeholders, $values, $this->base_query ); // Replace the placeholders with actual values
$result = usu::query( $this->query ); // Action the query
$this->query = null; // Unset the query for future usage
$row = tep_db_fetch_array( $result ); // Return the array of data ( or false if there are no results )
tep_db_free_result( $result ); // Housekeeping
if ( false === $row ) {
	return false; // No results for the query so abort
}
/**
* Values obtained from the query, these properties will populate the registry via the method getProperties()
* Method $this->linkText() should be used here to convert the text into seo url format e.g.
* my great product .. may become .. my-great-product
* You may have more than one of these like ..
* $this->parentname, $this->catname dependent on how many results you retrieve from your query
*/
$this->pages_title = $this->linkText( $row['pages_title'] );

// If the registry item doesn't exist as a key then set a blank array
if ( false === isset( usu::$registry->{self::DEPENDENCY} ) ) {
	usu::$registry->{self::DEPENDENCY} = array();
}
/**
* Populate the registry with the properties we have set in this class
*/
usu::$registry->attach( self::DEPENDENCY, $this->dependency_value, $this->getProperties() );
} // End method

protected function getProperties() {
	$properties = get_object_vars( $this ); // $properties becomes an array of all properties within this class
	unset( $properties['page_relations'] ); // Get rid of this key as it is not needed in the registry
	return $properties; 
} // End method

private function get_full_path( $path ) {
	// Only used for modules that require paths with parents like .. 2_6_35
	// See Usu_Categories.php for usage
	return $path;
} // End method

private function get_parents() {
	// Only used for modules that require paths with parents like .. 2_6_35
	// See Usu_Categories.php for usage
} // End method

/**
* Builds the seo url
* 
* @param string $page - file name of the calling page e.g. index.php
* @param array $valuepair - key => value pair array containing dependency(e.g. cPath) => value (e.g. 2_24_52)
* @param string $url - $url passed by reference created by the method linkCreate() 
* @param array $added_qs - passed by reference containing key value pairs for _GET
* @param string $parameters - Currently unused
*/
public function buildLink( $page, $valuepair, &$url, &$added_qs, $parameters ) {
	if ( ( $valuepair[0] != self::DEPENDENCY ) || ( false === array_key_exists( 1, $valuepair ) )
	|| ( false === $this->installed )
	|| !tep_not_null( $valuepair[1] ) ) {
	return false; // Either this module is not installed or the value pair does not meet our requirements so abort
	}
	$base_path = $valuepair[1]; // well it might be a single top level item
	if ( false === $this->suppress_underscores ) {
	if ( false !== strpos( $valuepair[1], '_' ) ) { // It is a path with parents? ( has underscores )
	$base_path = ltrim( strrchr( $valuepair[1], '_' ), '_' ); // Grab the base path which is the number at the end of a path with parents ( e.g. 2_23_37_52 = 52 ) 
	}
	}
	// Sanity check - if the $base_path is not numeric then we dump it
	if ( false === is_numeric( str_replace( '_', '', $base_path ) ) ) {
	trigger_error( __CLASS__ . ' Incorrect ' . self::DEPENDENCY . ' presented: ' . $valuepair[1], E_USER_WARNING );
	return false;
	}
	// Get a full path with underscores from the database
	$full_path = $this->get_full_path( $base_path );
	// If this item is not already in the registry we use the acquire() method to query for the data
	if ( !isset( usu::$registry->vars[self::DEPENDENCY][$full_path] ) ) {
	if ( false === $this->acquire( $base_path, $full_path ) ) {
	return false; // Looks like an invalid request so dump it
	}
	} else {
	usu::$performance['queries_saved']++; // Already in the registry so we saved one query
	}
	/**
	* About $reg_item
	* 
	* We grab the array of data from the registry and place it in $reg_item for convenience
	* The data stored in the registry was set in the method acquire as properties of this class
	* These are then set in the registry using the method getProperties()
	* the specific array keys like $reg_item['catname'] will be specific and differ in each module 
	*/
	$reg_item = array();
	$reg_item = usu::$registry->vars[$valuepair[0]][$full_path];

	/**
	* Set the link text from reg_item
	* e.g. $link_text = $reg_item['parentname'] . '-' . $reg_item['catname'];
	*/
	$link_text = $reg_item['pages_title']; // the property added in the acquire function this would have been set in the acquire method like $this->xxxname


	switch( true ){
	case $page == self::FILENAME:
	$url = $this->linkCreate( self::FILENAME, $link_text, self::MARKER, $full_path );
	break;
	default:
	// Add leftovers to the querystring _GET
	$added_qs[filter_var( $valuepair[0], FILTER_SANITIZE_STRING )] = usu::cleanse( $valuepair[1] );
	break;
	} # end switch
}
} 
?>


 

 

 

 

 

I try the memcache and i have this error

 


[size="1"]( ! ) Warning: Memcache::connect() [[url="http://test/boutique/memcache.connect"]memcache.connect[/url]]: Can't connect to localhost:11211, Connection refused (111) in /home/www/test/boutique/includes/modules/ultimate_seo_urls5/classes/Usu_Cache_Memcached.php on line [i]28[/i] Call Stack #TimeMemoryFunctionLocation 10.0010134256{main}( )../index.php[b]:[/b]0 20.0030375132require( [color="#00bb00"]'/home/www/ctest/boutique/includes/application_top.php'[/color] )../index.php[b]:[/b]21 30.03882152068usu->__construct( )../application_top.php[b]:[/b]346 40.03932176884usu->loadRegistry( )../usu.php[b]:[/b]71 50.03932177004usu->cacheSystem( )../usu.php[b]:[/b]176 60.03972211104Usu_Cache_Memcached->__construct( )../usu.php[b]:[/b]115 70.03972211432Memcache->connect( )../Usu_Cache_Memcached.php[b]:[/b]28 [/size] 
[size="1"] ( ! ) Warning: Could not connect to memcache server in /home/www/test/boutique/includes/modules/ultimate_seo_urls5/classes/Usu_Cache_Memcached.php on line [i]29[/i] Call Stack #TimeMemoryFunctionLocation 10.0010134256{main}( )../index.php[b]:[/b]0 20.0030375132require( [color="#00bb00"]'/home/www/test/boutique/includes/application_top.php'[/color] )../index.php[b]:[/b]21 30.03882152068usu->__construct( )../application_top.php[b]:[/b]346 40.03932176884usu->loadRegistry( )../usu.php[b]:[/b]71 50.03932177004usu->cacheSystem( )../usu.php[b]:[/b]176 60.03972211104Usu_Cache_Memcached->__construct( )../usu.php[b]:[/b]115 70.04022226140[url="http://www.php.net/trigger_error"]trigger_error[/url] ( )[/size]

 

My configuration php.ini

 


[b]memcache[/b]
memcache supportenabled Version 3.0.1 Revision $Revision: 1.83.2.24 $ 
DirectiveLocal ValueMaster Value memcache.allow_failover11 memcache.chunk_size3276832768 memcache.default_port1121111211 memcache.hash_functioncrc32crc32 memcache.hash_strategyconsistentconsistent memcache.max_failover_attempts2020 memcache.protocolasciiascii memcache.redundancy11 memcache.session_redundancy22

Edited by Gyakutsuki


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

Ok thank, I will change

 

there the module created.

 

<?php
/**
*
* ULTIMATE Seo Urls 5
*
* 
* @package Ultimate Seo Urls 5
* @license http://www.opensource.org/licenses/gpl-2.0.php GNU Public License
* @link http://www.fwrmedia.co.uk
* @copyright Copyright 2008-2009 FWR Media
* @copyright Portions Copyright 2005 Bobby Easland
* @author Robert Fisher, FWR Media, http://www.fwrmedia.co.uk 
* @lastdev $Author:: Rob 	$: Author of last commit
* @lastmod $Date:: 2009-11-29 11:13:08 +0000 (Sun, 29 Nov 2009) 	$: Date of last commit
* @version $Rev:: 105 	$: Revision of last commit
* @Id $Id:: Usu_Page_Manager.php 105 2009-11-29 11:13:08Z Rob 	$: Full Details 
*/

class Usu_Pages_Manager extends aDataMap {

const MARKER = '-pm-'; // Could for example be -c- or -l- etc.
const DEPENDENCY = 'pages_id'; // _GET key like e.g. cPath or lPath etc.
const FILENAME = 'page_manager.php'; // The filename define of the file where this code will be actioned
public $dependency = self::DEPENDENCY;
public $dependency_tags = array( self::MARKER => self::FILENAME ); // key value pair of tag (like e.g. -c-) => filename ( e.g. FILENAME_DEFAULT )
private $page_relations = array( self::FILENAME => 1 ); // Page relation for this module ( e.g. FILENAME_DEFAULT or FILENAME_LINKS )
private $markers = array( self::MARKER => self::DEPENDENCY ); // Markers as key value pair like -c- => cPath or perhaps -l- => lPath
private $base_query; // Template query with placeholders ( :placeholder ) waiting for real values
private $query; // The final query which will be $base_query but with the placeholders replaced with real values
private $pages_title; // property populated in the acquire() method, there may be multiples of these, rename in line with the query results
private $dependency_value; // Dependency value, so if the dependency was cPath and cPath = 27 then this value would be 27
private $installed = false; // Unless it is a core module $installed should only be true if the contribution is installed ( e.g. articles or links manager etc )
private $suppress_underscores = false; // Set to true Produce only base paths like -t-32 not parent paths like 3_5_23

public function __construct(){
if ( defined( 'FILENAME_PAGES' ) && defined( 'TABLE_PAGES_MANAGER_DESCRIPTION' ) ){
	// The items with a colon : are placeholders which must match the $placeholders array in method acquire()
	$this->base_query = "SELECT pages_title FROM " . TABLE_PAGES_MANAGER_DESCRIPTION . " WHERE pages_id=':pages_id' AND language_id=':languages_id' LIMIT 1";
	usu::$registry->merge( 'seo_pages', $this->page_relations );
	usu::$registry->merge( 'markers', $this->markers );
	usu::$registry->addPageDependency( array( self::FILENAME => self::DEPENDENCY ) );
	/**
	* For modules which are optional ( like information pages etc)
	* we would check for the existance of certain defines and if present set $this->installed to true
	* e.g. for the links contribution we would use ..
	* if ( defined( 'FILENAME_LINKS' ) && defined( 'TABLE_LINK_CATEGORIES_DESCRIPTION' ) ) {
	* $this->installed = true;
	* } 
	*/
	$this->installed = true; // xxx Hardcoded to true in this instance - see above comment.
}
}

protected function acquire( $base_path, $full_path ) {
$this->dependency_value = $full_path; // Full path perhaps with underscores
/**
* About placeholders
* 
* The placeholders (items with a colon :) must match those in the query ( $this->base_query in the constructor )
*/
$placeholders = array( ':pages_id', ':languages_id' );
// Do the below values need to be typecast?
$values = array( (int)$base_path, (int)usu::$languages_id ); // xxx These values will replace the placeholders above in $this->base_query
$this->query = str_replace( $placeholders, $values, $this->base_query ); // Replace the placeholders with actual values
$result = usu::query( $this->query ); // Action the query
$this->query = null; // Unset the query for future usage
$row = tep_db_fetch_array( $result ); // Return the array of data ( or false if there are no results )
tep_db_free_result( $result ); // Housekeeping
if ( false === $row ) {
	return false; // No results for the query so abort
}
/**
* Values obtained from the query, these properties will populate the registry via the method getProperties()
* Method $this->linkText() should be used here to convert the text into seo url format e.g.
* my great product .. may become .. my-great-product
* You may have more than one of these like ..
* $this->parentname, $this->catname dependent on how many results you retrieve from your query
*/
$this->pages_title = $this->linkText( $row['pages_title'] );

// If the registry item doesn't exist as a key then set a blank array
if ( false === isset( usu::$registry->{self::DEPENDENCY} ) ) {
	usu::$registry->{self::DEPENDENCY} = array();
}
/**
* Populate the registry with the properties we have set in this class
*/
usu::$registry->attach( self::DEPENDENCY, $this->dependency_value, $this->getProperties() );
} // End method

protected function getProperties() {
	$properties = get_object_vars( $this ); // $properties becomes an array of all properties within this class
	unset( $properties['page_relations'] ); // Get rid of this key as it is not needed in the registry
	return $properties; 
} // End method

private function get_full_path( $path ) {
	// Only used for modules that require paths with parents like .. 2_6_35
	// See Usu_Categories.php for usage
	return $path;
} // End method

private function get_parents() {
	// Only used for modules that require paths with parents like .. 2_6_35
	// See Usu_Categories.php for usage
} // End method

/**
* Builds the seo url
* 
* @param string $page - file name of the calling page e.g. index.php
* @param array $valuepair - key => value pair array containing dependency(e.g. cPath) => value (e.g. 2_24_52)
* @param string $url - $url passed by reference created by the method linkCreate() 
* @param array $added_qs - passed by reference containing key value pairs for _GET
* @param string $parameters - Currently unused
*/
public function buildLink( $page, $valuepair, &$url, &$added_qs, $parameters ) {
	if ( ( $valuepair[0] != self::DEPENDENCY ) || ( false === array_key_exists( 1, $valuepair ) )
	|| ( false === $this->installed )
	|| !tep_not_null( $valuepair[1] ) ) {
	return false; // Either this module is not installed or the value pair does not meet our requirements so abort
	}
	$base_path = $valuepair[1]; // well it might be a single top level item
	if ( false === $this->suppress_underscores ) {
	if ( false !== strpos( $valuepair[1], '_' ) ) { // It is a path with parents? ( has underscores )
	$base_path = ltrim( strrchr( $valuepair[1], '_' ), '_' ); // Grab the base path which is the number at the end of a path with parents ( e.g. 2_23_37_52 = 52 ) 
	}
	}
	// Sanity check - if the $base_path is not numeric then we dump it
	if ( false === is_numeric( str_replace( '_', '', $base_path ) ) ) {
	trigger_error( __CLASS__ . ' Incorrect ' . self::DEPENDENCY . ' presented: ' . $valuepair[1], E_USER_WARNING );
	return false;
	}
	// Get a full path with underscores from the database
	$full_path = $this->get_full_path( $base_path );
	// If this item is not already in the registry we use the acquire() method to query for the data
	if ( !isset( usu::$registry->vars[self::DEPENDENCY][$full_path] ) ) {
	if ( false === $this->acquire( $base_path, $full_path ) ) {
	return false; // Looks like an invalid request so dump it
	}
	} else {
	usu::$performance['queries_saved']++; // Already in the registry so we saved one query
	}
	/**
	* About $reg_item
	* 
	* We grab the array of data from the registry and place it in $reg_item for convenience
	* The data stored in the registry was set in the method acquire as properties of this class
	* These are then set in the registry using the method getProperties()
	* the specific array keys like $reg_item['catname'] will be specific and differ in each module 
	*/
	$reg_item = array();
	$reg_item = usu::$registry->vars[$valuepair[0]][$full_path];

	/**
	* Set the link text from reg_item
	* e.g. $link_text = $reg_item['parentname'] . '-' . $reg_item['catname'];
	*/
	$link_text = $reg_item['pages_title']; // the property added in the acquire function this would have been set in the acquire method like $this->xxxname


	switch( true ){
	case $page == self::FILENAME:
	$url = $this->linkCreate( self::FILENAME, $link_text, self::MARKER, $full_path );
	break;
	default:
	// Add leftovers to the querystring _GET
	$added_qs[filter_var( $valuepair[0], FILTER_SANITIZE_STRING )] = usu::cleanse( $valuepair[1] );
	break;
	} # end switch
}
} 
?>


 

 

 

 

 

I try the memcache and i have this error

 

I try the memcache and i have this error

 


[size="1"]( ! ) Warning: Memcache::connect() [[url="http://test/boutique/memcache.connect"]memcache.connect[/url]]: 
Can't connect to localhost:11211, Connection refused (111) in /home/www/test/boutique/includes/modules/ultimate_seo_urls5/classes/Usu_Cache_Memcached.php on line [i]28[/i] 
Call Stack #TimeMemoryFunctionLocation 10.0010134256{main}( )../index.php[b]:[/b]0 20.0030375132require( [color="#00bb00"]'/home/www/ctest/boutique/includes/application_top.php'[/color] )../index.php[b]:[/b]21 30.03882152068
usu->__construct( )../application_top.php[b]:[/b]346 40.03932176884
usu->loadRegistry( )../usu.php[b]:[/b]71 50.03932177004usu->cacheSystem( )../usu.php[b]:[/b]176 60.03972211104
Usu_Cache_Memcached->__construct( )../usu.php[b]:[/b]115 70.03972211432Memcache->connect( )../Usu_Cache_Memcached.php[b]:[/b]28 [/size] 

[size="1"] ( ! ) Warning: Could not connect to memcache server in /home/www/test/boutique/includes/modules/ultimate_seo_urls5/classes/Usu_Cache_Memcached.php on line [i]29[/i] 
Call Stack #TimeMemoryFunctionLocation 10.0010134256{main}( )../index.php[b]:[/b]0 20.0030375132require( [color="#00bb00"]'/home/www/test/boutique/includes/application_top.php'[/color] )../index.php[b]:[/b]21 30.03882152068
usu->__construct( )../application_top.php[b]:[/b]346 40.03932176884
usu->loadRegistry( )../usu.php[b]:[/b]71 50.03932177004usu->cacheSystem( )../usu.php[b]:[/b]176 60.03972211104
Usu_Cache_Memcached->__construct( )../usu.php[b]:[/b]115 70.04022226140[url="http://www.php.net/trigger_error"]trigger_error[/url] ( )[/size]

 

My configuration php.ini

 



My configuration php.ini



[b]memcache[/b]
memcache supportenabled Version 3.0.1 Revision $Revision: 1.83.2.24 $ 
DirectiveLocal ValueMaster Value 
memcache.allow_failover11 
memcache.chunk_size3276832768
memcache.default_port1121111211 
memcache.hash_functioncrc32crc32 
memcache.hash_strategyconsistentconsistent 
memcache.max_failover_attempts2020 
memcache.protocolasciiascii
memcache.redundancy11 
memcache.session_redundancy22

 

Edited by Gyakutsuki


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

Ok thank, I will change

 

there the module created.

 

<?php
/**
*
* ULTIMATE Seo Urls 5
*
* 
* @package Ultimate Seo Urls 5
* @license http://www.opensource.org/licenses/gpl-2.0.php GNU Public License
* @link http://www.fwrmedia.co.uk
* @copyright Copyright 2008-2009 FWR Media
* @copyright Portions Copyright 2005 Bobby Easland
* @author Robert Fisher, FWR Media, http://www.fwrmedia.co.uk 
* @lastdev $Author:: Rob 	$: Author of last commit
* @lastmod $Date:: 2009-11-29 11:13:08 +0000 (Sun, 29 Nov 2009) 	$: Date of last commit
* @version $Rev:: 105 	$: Revision of last commit
* @Id $Id:: Usu_Page_Manager.php 105 2009-11-29 11:13:08Z Rob 	$: Full Details 
*/

class Usu_Pages_Manager extends aDataMap {

const MARKER = '-pm-'; // Could for example be -c- or -l- etc.
const DEPENDENCY = 'pages_id'; // _GET key like e.g. cPath or lPath etc.
const FILENAME = 'page_manager.php'; // The filename define of the file where this code will be actioned
public $dependency = self::DEPENDENCY;
public $dependency_tags = array( self::MARKER => self::FILENAME ); // key value pair of tag (like e.g. -c-) => filename ( e.g. FILENAME_DEFAULT )
private $page_relations = array( self::FILENAME => 1 ); // Page relation for this module ( e.g. FILENAME_DEFAULT or FILENAME_LINKS )
private $markers = array( self::MARKER => self::DEPENDENCY ); // Markers as key value pair like -c- => cPath or perhaps -l- => lPath
private $base_query; // Template query with placeholders ( :placeholder ) waiting for real values
private $query; // The final query which will be $base_query but with the placeholders replaced with real values
private $pages_title; // property populated in the acquire() method, there may be multiples of these, rename in line with the query results
private $dependency_value; // Dependency value, so if the dependency was cPath and cPath = 27 then this value would be 27
private $installed = false; // Unless it is a core module $installed should only be true if the contribution is installed ( e.g. articles or links manager etc )
private $suppress_underscores = false; // Set to true Produce only base paths like -t-32 not parent paths like 3_5_23

public function __construct(){
if ( defined( 'FILENAME_PAGES' ) && defined( 'TABLE_PAGES_MANAGER_DESCRIPTION' ) ){
	// The items with a colon : are placeholders which must match the $placeholders array in method acquire()
	$this->base_query = "SELECT pages_title FROM " . TABLE_PAGES_MANAGER_DESCRIPTION . " WHERE pages_id=':pages_id' AND language_id=':languages_id' LIMIT 1";
	usu::$registry->merge( 'seo_pages', $this->page_relations );
	usu::$registry->merge( 'markers', $this->markers );
	usu::$registry->addPageDependency( array( self::FILENAME => self::DEPENDENCY ) );
	/**
	* For modules which are optional ( like information pages etc)
	* we would check for the existance of certain defines and if present set $this->installed to true
	* e.g. for the links contribution we would use ..
	* if ( defined( 'FILENAME_LINKS' ) && defined( 'TABLE_LINK_CATEGORIES_DESCRIPTION' ) ) {
	* $this->installed = true;
	* } 
	*/
	$this->installed = true; // xxx Hardcoded to true in this instance - see above comment.
}
}

protected function acquire( $base_path, $full_path ) {
$this->dependency_value = $full_path; // Full path perhaps with underscores
/**
* About placeholders
* 
* The placeholders (items with a colon :) must match those in the query ( $this->base_query in the constructor )
*/
$placeholders = array( ':pages_id', ':languages_id' );
// Do the below values need to be typecast?
$values = array( (int)$base_path, (int)usu::$languages_id ); // xxx These values will replace the placeholders above in $this->base_query
$this->query = str_replace( $placeholders, $values, $this->base_query ); // Replace the placeholders with actual values
$result = usu::query( $this->query ); // Action the query
$this->query = null; // Unset the query for future usage
$row = tep_db_fetch_array( $result ); // Return the array of data ( or false if there are no results )
tep_db_free_result( $result ); // Housekeeping
if ( false === $row ) {
	return false; // No results for the query so abort
}
/**
* Values obtained from the query, these properties will populate the registry via the method getProperties()
* Method $this->linkText() should be used here to convert the text into seo url format e.g.
* my great product .. may become .. my-great-product
* You may have more than one of these like ..
* $this->parentname, $this->catname dependent on how many results you retrieve from your query
*/
$this->pages_title = $this->linkText( $row['pages_title'] );

// If the registry item doesn't exist as a key then set a blank array
if ( false === isset( usu::$registry->{self::DEPENDENCY} ) ) {
	usu::$registry->{self::DEPENDENCY} = array();
}
/**
* Populate the registry with the properties we have set in this class
*/
usu::$registry->attach( self::DEPENDENCY, $this->dependency_value, $this->getProperties() );
} // End method

protected function getProperties() {
	$properties = get_object_vars( $this ); // $properties becomes an array of all properties within this class
	unset( $properties['page_relations'] ); // Get rid of this key as it is not needed in the registry
	return $properties; 
} // End method

private function get_full_path( $path ) {
	// Only used for modules that require paths with parents like .. 2_6_35
	// See Usu_Categories.php for usage
	return $path;
} // End method

private function get_parents() {
	// Only used for modules that require paths with parents like .. 2_6_35
	// See Usu_Categories.php for usage
} // End method

/**
* Builds the seo url
* 
* @param string $page - file name of the calling page e.g. index.php
* @param array $valuepair - key => value pair array containing dependency(e.g. cPath) => value (e.g. 2_24_52)
* @param string $url - $url passed by reference created by the method linkCreate() 
* @param array $added_qs - passed by reference containing key value pairs for _GET
* @param string $parameters - Currently unused
*/
public function buildLink( $page, $valuepair, &$url, &$added_qs, $parameters ) {
	if ( ( $valuepair[0] != self::DEPENDENCY ) || ( false === array_key_exists( 1, $valuepair ) )
	|| ( false === $this->installed )
	|| !tep_not_null( $valuepair[1] ) ) {
	return false; // Either this module is not installed or the value pair does not meet our requirements so abort
	}
	$base_path = $valuepair[1]; // well it might be a single top level item
	if ( false === $this->suppress_underscores ) {
	if ( false !== strpos( $valuepair[1], '_' ) ) { // It is a path with parents? ( has underscores )
	$base_path = ltrim( strrchr( $valuepair[1], '_' ), '_' ); // Grab the base path which is the number at the end of a path with parents ( e.g. 2_23_37_52 = 52 ) 
	}
	}
	// Sanity check - if the $base_path is not numeric then we dump it
	if ( false === is_numeric( str_replace( '_', '', $base_path ) ) ) {
	trigger_error( __CLASS__ . ' Incorrect ' . self::DEPENDENCY . ' presented: ' . $valuepair[1], E_USER_WARNING );
	return false;
	}
	// Get a full path with underscores from the database
	$full_path = $this->get_full_path( $base_path );
	// If this item is not already in the registry we use the acquire() method to query for the data
	if ( !isset( usu::$registry->vars[self::DEPENDENCY][$full_path] ) ) {
	if ( false === $this->acquire( $base_path, $full_path ) ) {
	return false; // Looks like an invalid request so dump it
	}
	} else {
	usu::$performance['queries_saved']++; // Already in the registry so we saved one query
	}
	/**
	* About $reg_item
	* 
	* We grab the array of data from the registry and place it in $reg_item for convenience
	* The data stored in the registry was set in the method acquire as properties of this class
	* These are then set in the registry using the method getProperties()
	* the specific array keys like $reg_item['catname'] will be specific and differ in each module 
	*/
	$reg_item = array();
	$reg_item = usu::$registry->vars[$valuepair[0]][$full_path];

	/**
	* Set the link text from reg_item
	* e.g. $link_text = $reg_item['parentname'] . '-' . $reg_item['catname'];
	*/
	$link_text = $reg_item['pages_title']; // the property added in the acquire function this would have been set in the acquire method like $this->xxxname


	switch( true ){
	case $page == self::FILENAME:
	$url = $this->linkCreate( self::FILENAME, $link_text, self::MARKER, $full_path );
	break;
	default:
	// Add leftovers to the querystring _GET
	$added_qs[filter_var( $valuepair[0], FILTER_SANITIZE_STRING )] = usu::cleanse( $valuepair[1] );
	break;
	} # end switch
}
} 
?>


 

 

 

 

 

I try the memcache and i have this error

 


[size="1"]( ! ) Warning: Memcache::connect() [[url="http://test/boutique/memcache.connect"]memcache.connect[/url]]: Can't connect to localhost:11211, Connection refused (111) in /home/www/test/boutique/includes/modules/ultimate_seo_urls5/classes/Usu_Cache_Memcached.php on line [i]28[/i] Call Stack #TimeMemoryFunctionLocation 10.0010134256{main}( )../index.php[b]:[/b]0 20.0030375132require( [color="#00bb00"]'/home/www/ctest/boutique/includes/application_top.php'[/color] )../index.php[b]:[/b]21 30.03882152068usu->__construct( )../application_top.php[b]:[/b]346 40.03932176884usu->loadRegistry( )../usu.php[b]:[/b]71 50.03932177004usu->cacheSystem( )../usu.php[b]:[/b]176 60.03972211104Usu_Cache_Memcached->__construct( )../usu.php[b]:[/b]115 70.03972211432Memcache->connect( )../Usu_Cache_Memcached.php[b]:[/b]28 [/size] 
[size="1"] ( ! ) Warning: Could not connect to memcache server in /home/www/test/boutique/includes/modules/ultimate_seo_urls5/classes/Usu_Cache_Memcached.php on line [i]29[/i] Call Stack #TimeMemoryFunctionLocation 10.0010134256{main}( )../index.php[b]:[/b]0 20.0030375132require( [color="#00bb00"]'/home/www/test/boutique/includes/application_top.php'[/color] )../index.php[b]:[/b]21 30.03882152068usu->__construct( )../application_top.php[b]:[/b]346 40.03932176884usu->loadRegistry( )../usu.php[b]:[/b]71 50.03932177004usu->cacheSystem( )../usu.php[b]:[/b]176 60.03972211104Usu_Cache_Memcached->__construct( )../usu.php[b]:[/b]115 70.04022226140[url="http://www.php.net/trigger_error"]trigger_error[/url] ( )[/size]

 

My configuration php.ini

 


[b]memcache[/b]
memcache supportenabled Version 3.0.1 Revision $Revision: 1.83.2.24 $ 
DirectiveLocal ValueMaster Value memcache.allow_failover11 memcache.chunk_size3276832768 memcache.default_port1121111211 memcache.hash_functioncrc32crc32 memcache.hash_strategyconsistentconsistent memcache.max_failover_attempts2020 memcache.protocolasciiascii memcache.redundancy11 memcache.session_redundancy22

 

I'm off to bed now but re: memcached you have to open up classes.Usu_Cache_Memcached.php

and make sure the settings are correct for your server.

Share this post


Link to post
Share on other sites

Ok memcache works fine



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 am receiving this error of this page

 

http://shireen.com.au/semi-precious-stones.php

 

 

Warning: USU5 could not find a valid base filename, please inform the developer. in /home/sydneyme/public_html/shireen/includes/functions/compatibility.php on line 199

 

Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/sydneyme/public_html/shireen/includes/functions/compatibility.php:199) in /home/sydneyme/public_html/shireen/includes/functions/sessions.php on line 102

 

Warning: USU5 could not find a valid base filename, please inform the developer. in /home/sydneyme/public_html/shireen/includes/functions/compatibility.php on line 199

 

but not on other pages

 

http://shireen.com.au/sizes.php

 

What exactly is the problem here?

 

Ilan

Share this post


Link to post
Share on other sites

Everything seems to be working but when I try to go to a product page, I get the following error:

 

Not Found

The requested URL /product_info.php was not found on this server.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

 

I'm not sure if it's something to do with the .htaccess file? I've changed the details as needed in that file, though...

Share this post


Link to post
Share on other sites

I am receiving this error of this page

 

http://shireen.com.au/semi-precious-stones.php

 

 

Warning: USU5 could not find a valid base filename, please inform the developer. in /home/sydneyme/public_html/shireen/includes/functions/compatibility.php on line 199

 

Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/sydneyme/public_html/shireen/includes/functions/compatibility.php:199) in /home/sydneyme/public_html/shireen/includes/functions/sessions.php on line 102

 

Warning: USU5 could not find a valid base filename, please inform the developer. in /home/sydneyme/public_html/shireen/includes/functions/compatibility.php on line 199

 

but not on other pages

 

http://shireen.com.au/sizes.php

 

What exactly is the problem here?

 

Ilan

 

Hi Ilan

 

osCommerce filenames are either filename.php or another_file_name.php it does not use underscores (file-name.php_

Share this post


Link to post
Share on other sites

Everything seems to be working but when I try to go to a product page, I get the following error:

 

Not Found

The requested URL /product_info.php was not found on this server.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

 

I'm not sure if it's something to do with the .htaccess file? I've changed the details as needed in that file, though...

 

Well that looks like the root file product_info.php isn't there.

Share this post


Link to post
Share on other sites

Just installed this and want to complete the install. I have Google XML Sitemap and I understand I have to upload 2 files but I am unsure of the last part of the instructions. Could you possibly explain this to me or what I need to do.

 

Cron jobs:

 

Because the cron files now include files the cron will have to be changed to access the file using apache.

 

Like ..

 

* * * * * * wget -q http://www.somesite.com/folder/file.php >/dev/null 2>&1

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

×