Jump to content

Gyakutsuki

♥Ambassador
  • Content count

    727
  • Joined

  • Last visited

  • Days Won

    15

Everything posted by Gyakutsuki

  1. Gyakutsuki

    ULTIMATE Seo Urls 5 - by FWR Media

    Hello, I wish knwon if you had seen a problem with the box search with your contribution usu. This is for the french language if I insert in search box : baptème, after validate, write that : baptme ====> è desepear but in a search box but the è is ok /advanced_search_result.php?x=0&y=0&keywords=baptème&search_in_description=1 if in url I change : è by è I found my product. I try on oscommerce with no contribution the url is correct and the search is ok also. Have you seen this pb ? Thank you Loic
  2. Gyakutsuki

    Automatic products tab

    Hello, I try to develop a new product tab module. All i seen is manual. If in my description I have <h3> then the tab is created automaticly it does'nt work again fine, but if you can help me, i think it will be a good contriburion. delete line 135 : <?php echo stripslashes($product_info['products_description']); ?> <style> .rte { color: black; text-align: left; } .clear { clear: both; } /*couleur onglet*/ #more_info_tabs li a.selected { background-color: #B5A432; color: #FFFFFF; } #more_info_tabs li a { border-left: 1px solid #FFFFFF; color: #FFFFFF; height: auto; padding: 7px 20px !important; } ul.idTabsShort li a.selected { border: medium none; color: black; padding: 5px 15px 9px 0; } ul.idTabs li a.selected { height: auto; padding-left: 0; } ul.idTabsShort li a { border: medium none; color: #999999; font-weight: normal; padding: 8px 12px 9px 0 !important; width: auto; } ul.idTabs li a { color: #0066CC; display: block !important; font-weight: bold; height: 10px; text-align: center; text-decoration: none; text-transform: uppercase; } ul.idTabsShort li { line-height: 15px !important; } ul.idTabsShort { border-style: solid none dotted; } ul.idTabs { list-style-type: none; } </style> <?php $products_description = stripslashes($product_info['products_description']); $products_description_content .= '<script type="text/javascript">jQuery(document).ready(function () { jQuery(\'#idTab1\').remove(); jQuery(\'#more_info_tab_more_info\').parent().remove(); });</script>' . "\n"; // tab menu $return = ""; $first = true; if (strpos($desc, '<h3>') !== FALSE) { $cut = explode('<h3>', trim($desc)); foreach ($cut as $k => $part) { if (trim($part) != "") { if (strpos($part, "</h3>") !== FALSE) { $t = substr($part, 0, strpos($part, '</h3>')); $return .= '<li><a href="#idTab100' . $k . '"' . ($first ? 'class="selected"' : '' ) . '>' . $t . '</a></li>' . "\n"; $first = false; } } } } // content menu in the tab $return1 = ""; $desc = $products_description; if (strpos($desc, '<h3>') !== FALSE) { $cut = explode('<h3>', trim($desc)); foreach ($cut as $k => $part) { if (trim($part) != "") { if (strpos($part, "</h3>") !== FALSE) { $r = substr($part, strpos($part, '</h3>') + 5); $return1 .= '<div id="idTab100' . $k . '" class="rte">' . $r . '</div>' . "\n"; } } } } // $products_description_content .= '<div class="clear" id="more_info_block">' . "\n"; $products_description_content .= '<div id="more_info_block">' . "\n"; $products_description_content .= '<ul class="idTabs idTabsShort" id="more_info_tabs">' . "\n"; $products_description_content .= ' '.$return . $return1 . "\n"; $products_description_content .= '</ul>' . "\n"; $products_description_content .= '</div>' . "\n"; // $products_description_content .= '</div>' . "\n"; echo $products_description_content; ?> Regards
  3. Gyakutsuki

    ULTIMATE Seo Urls 5 - by FWR Media

    Hello, It's possible to tell where is my error. I created a new files blog_content.php (see an article) and create a new add on in pages_modules called blog_content.php When I want to see my article, I have a page not found : my original url : http://www.mysite.com/boutique/blog_content.php?blog_content_id=26 Thanks. Process : I write in ht access this line : RewriteRule ^([a-z0-9/-]+)-bl-([0-9]+).html$ blog_content.php [NC,L,QSA] and I write this module : class Blog_Content_Page_Module extends aPage_Modules { private static $_singleton = null; /** * Array of _GET key dependencies for this page * - marker is the seo url replacement for the dependent _GET key ( e.g. -c- replaces cPath ) * - query is the query used to extract the link text from the database * - to_replace is an array of texts that are to be replace with real values in the query * @example protected $dependencies = array( 'cPath' => array( 'marker' => '-c-', * @var array $dependencies */ // 'query' => "SELECT pd.blog_content_name FROM :TABLE_BLOG_CONTENT_DESCRIPTION pd INNER JOIN :TABLE_BLOG_CONTENT p ON pd.blog_content_id = p.blog_content_id WHERE pd.blog_content_id=':blog_content_id' AND pd.language_id=':languages_id' LIMIT 1", protected $dependencies = array( 'blog_content_id' => array( 'marker' => '-bl-', 'query' => "SELECT pd.blog_content_name FROM :TABLE_BLOG_CONTENT_DESCRIPTION pd where pd.blog_content_id=':blog_content_id' AND pd.language_id=':languages_id' LIMIT 1", 'to_replace' => array( ':TABLE_BLOG_CONTENT_DESCRIPTION', ':TABLE_BLOG_CONTENT', ':blog_content_id', ':languages_id' ) ) ); /** * The current dependency key extracted from the incoming parameters * * @var string $key - dependency key */ protected $key = null; /** * extracts the key => value pairs from the querystring in order to build a unique cache name for the loaded page * * @var array $cache_name_builder */ // protected $cache_name_builder = array( 'blog_content_id' => 1, 'reviews_id' => 1 ); // xxx = _GET key ( e.g. cPath ), you may want to add "page" if there are paging functions protected $cache_name_builder = array( 'blog_content_id' => 1); // xxx = _GET key ( e.g. cPath ), you may want to add "page" if there are paging functions /** * Class constructor * @access private */ private function __construct() { } // end constructor /** * Returns a singleton instance of this object * * @access public * @return Blog_Content_Page_Module */ public static function i() { if ( !self::$_singleton instanceof self ) { self::$_singleton = new self; } return self::$_singleton; } // end method /** * Retrieve the dependencies array for this page module * * @access public * @return array $dependencies */ public function retrieveDependencies() { return $this->dependencies; } /** * Acquire an array of single or multiple link texts from the query * this will be cached for later retrieval. * * @see Usu_Main::query() * @uses trim() * * @access protected * @return array array of link test */ protected function acquireLinkText() { $result = Usu_Main::i()->query( $this->query ); $text_array = tep_db_fetch_array( $result ); tep_db_free_result( $result ); if ( false === $text_array ) { return false; } $final_text_array = array(); foreach ( $text_array as $key => $text ) { if ( tep_not_null( trim( $text ) ) ) { $final_text_array[$key] = $text; } } // We will cache this result return $final_text_array; } /** * The main method of this class that receives input needed to build a link * then finally returns a fully built seo link if it has not previousluy returned false. * * @see Usu_Main::getVar() * @see Usu_Main::setVar() * @see aPage_Modules::stripPathToLastNumber() * @see aPage_Modules::setQuery() * @see aPage_Modules::unsetProperties() * @see aPage_Modules::getDependencyKey() * @see aPage_Modules::setAllParams() * @see aPage_Modules::validRequest() * @see aPage_Modules::returnFinalLink() * @param string $page - valid osCommerce page name * @param string $parameters - querystring parameters * @param bool $add_session_id - true / false * @param string $connection - NONSSL / SSL * @param array $extract - array of _GET keys to remove from the querystring or bool false to do nothing * @uses trigger_error() * @throws - triggers an error of type E_USER_WARNING for an incorrect or inexistant dependency key * @access public * @return bool false - forces the system to return the standard osCommerce link wrapper * @return string - fully built seo url */ public function buildLink( $page, $parameters, $add_session_id, $connection ) { $extract = array( 'blog_content_id' ); $this->setAllParams( $page, $parameters, $add_session_id, $connection, $extract ); if ( false === $this->validRequest() ) { $this->unsetProperties(); return false; } $this->key = $this->getDependencyKey(); /** * If the shop has issues it may pass in null values, in this case return false to force the standard osCommerce link wrapper */ if ( !array_key_exists( $this->key, $this->keys_index ) || !tep_not_null( $this->keys_index[$this->key] ) ) { return false; } // Switch statement where the correct query and query marker replacements to use are selected via the _GET key detected switch ( true ) { case $this->key == 'blog_content_id': // xxx = _GET key ( e.g. cPath ) // This array contains replacements for the to_replace array ( see the $dependencies array ) $this->setQuery( array( TABLE_BLOG_CONTENT_DESCRIPTION, TABLE_BLOG_CONTENT, $this->stripPathToLastNumber( $this->keys_index[$this->key] ), Usu_Main::i()->getVar( 'languages_id' ) ) ); break; default: trigger_error( __CLASS__ . '::' . __FUNCTION__ . ' Incorrect or inexistant dependency key.', E_USER_WARNING ); break; } // end switch $link_text = $this->acquireLinkText(); // If the query returned false then we return nothing and set $page_not_found to true forcing a 404 page Usu_Main::i()->setVar( 'page_not_found', false ); if ( false === $link_text ) { Usu_Main::i()->setVar( 'page_not_found', true ); $this->unsetProperties(); return; } // Return a fully built seo url return $this->returnFinalLink( Usu_Main::i() ->getVar( 'uri_modules', USU5_URLS_TYPE ) ->createLinkString( $this->page, Usu_Main::i() ->getVar( 'uri_modules', USU5_URLS_TYPE ) ->separateUriText( $this->linktext( $link_text ) ), $this->dependencies[$this->key]['marker'], $this->keys_index[$this->key] ) ); } // end method } // end class
  4. Gyakutsuki

    ULTIMATE Seo Urls 5 - by FWR Media

    Hi, I found a bug : process : create for example a category : bébé in french language and a category bébé in english language you need the add on character conversion installed If you are in french, there is no problem : bébé is write bebe If you are in english : bébé is write bébés Note I am in utf8 : How to solve this : copy the french.php conversion files and renome in english.php files put this file in character conversion directory. Now work fine. note : if you create a category or product in language and you have several other language in your site with the same name and character (for example in english the é character does'nt exist), you will an error. regards.
  5. Hello,

    I see your contribution navigationHistory remembering x number of pages v1.0

    It's interesting.

    just an information,

    I wish display the customer navigation correctly, your print_r($navigation) display all information with the array.

    How to display on the link of navigation history.

    Thanks

    loic

    +

  6. Gyakutsuki

    ULTIMATE Seo Urls 5 - by FWR Media

    Thank you very much Robert, works very fine.
  7. Gyakutsuki

    ULTIMATE Seo Urls 5 - by FWR Media

    Hello fw, is it possible to have a summary on the different modification on the latest code ? i see in this post differents little bug discover and you have include solutions. A little summary will be intereting occasionnaly. that's a suggestion.
  8. Gyakutsuki

    gallery_image_subdirectory_v1_0_1 (install PROBLEM)

    This module has been created only for the image gallery. You can try to customize this add on.
  9. Gyakutsuki

    gallery_image_subdirectory_v1_0_1 (install PROBLEM)

    Also : change tyhis categories.php // Gallery if (tep_not_null($new_dir)) { mkdir($path . $new_dir, 0755, true); $separator = '/'; } by // Gallery if (tep_not_null($new_dir) && !is_dir($new_dir)) { mkdir($root_images_dir . $new_dir, 0755, true); $separator = '/'; } and <?php // place allowed sub-dirs in array, non-recursive // Gallery $dir_array = array(); if ($handle = opendir($path)) { while (false !== ($file = readdir($handle))) { if ($file != "." && $file != "..") { if (is_dir($path.$file) && !in_array($file,$exclude_folders)) $dir_array[] = preg_replace("/\/\//si", "/", $file); } } closedir($handle); sort($dir_array); } else { echo '<tr><td>' .TEXT_PRODUCTS_DIRECTORY_DONT_EXIST . ' ' . $path .'<tr></td>'; } $drop_array[0] = array('id' => '', 'text' => TEXT_PRODUCTS_IMAGE_ROOT_DIRECTORY); foreach (tep_opendir($path) as $file) { if ($file['is_dir']) { $img_dir = substr($file['name'], strlen($path)); $drop_array[] = array('id' => $img_dir, 'text' => $img_dir); } } ?> by <?php // place allowed sub-dirs in array, non-recursive $dir_array = array(); foreach (tep_opendir($root_images_dir) as $file) { if ($file['is_dir']) { $img_dir = substr($file['name'], strlen($root_images_dir)); $drop_array[] = array('id' => $img_dir, 'text' => $img_dir); } } ?> i think that's all. i upload another update soon. Regards
  10. Gyakutsuki

    gallery_image_subdirectory_v1_0_1 (install PROBLEM)

    Hello, My txt is not perfectly clear. i insert another. 1 - insert this function in categories.php // gallery configuration // Gallery $exclude_folders = array(); // folders to exclude from adding new images $root_images_dir = DIR_FS_CATALOG_IMAGES .'products/' ; $new_dir = preg_replace('/[^a-zA-Z0-9_.-]/i', '_',$HTTP_POST_VAR['new_directory']); $dir = 'products/' . (tep_not_null($new_dir) ? $new_dir : $HTTP_POST_VAR['directory']); function tep_opendir($path) { $path = rtrim($path, '/') . '/'; $exclude_array = array('.', '..', '.DS_Store', 'Thumbs.db','.php', '_note'); $result = array(); if ($handle = opendir($path)) { while (false !== ($filename = readdir($handle))) { if (!in_array($filename, $exclude_array)) { $file = array('name' => $path . $filename, 'is_dir' => is_dir($path . $filename), 'writable' => is_writable($path . $filename)); $result[] = $file; if ($file['is_dir'] == true) { $result = array_merge($result, tep_opendir($path . $filename)); } } } closedir($handle); } return $result; } 2/ in sec dir, if you have deleted this function, re insert inside require('includes/application_top.php'); function tep_opendir($path) { $path = rtrim($path, '/') . '/'; $exclude_array = array('.', '..', '.DS_Store', 'Thumbs.db'); $result = array(); if ($handle = opendir($path)) { while (false !== ($filename = readdir($handle))) { if (!in_array($filename, $exclude_array)) { $file = array('name' => $path . $filename, 'is_dir' => is_dir($path . $filename), 'writable' => tep_is_writable($path . $filename)); $result[] = $file; if ($file['is_dir'] == true) { $result = array_merge($result, tep_opendir($path . $filename)); } } } closedir($handle); } return $result; } $whitelist_array = array(); 3 - Delete the same function in includes/functions/general.php (tep_opendir($path)
  11. Gyakutsuki

    ULTIMATE Seo Urls 5 - by FWR Media

    Hi, Thank you for this update, it's really interesting contribution. It work fine. I see a difference between the old contribution seo and the new on html generation on the first line code I think it's the contribution but i am not sure. When I edit the source we see in first the ligne <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> In the old there is no space in the first line: ex <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> In the new code the 3 spaces before the first line ...<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> If you generate a xml (google sitemap ou rss.php) it's does'nt work fine and you have an error xml generated because there is the space before the first line code. Erreur d'analyse XML : instruction de traitement XML ou texte pas au début d'une entité externe Emplacement : http:/mysite.com/boutique/google_sitemap_products.php Numéro de ligne 1, Colonne 3 : <?xml version="1.0" encoding="UTF-8"?> --^ ==> but you see the code generated in the source Source Generated ....<?xml version="1.0" encoding="UTF-8"?> <urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9 http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd"> Correct source <?xml version="1.0" encoding="UTF-8"?> <urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9 http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd"> Could you look your code if you have the same problem. Just edit the source and look the first line in html code and xml code. Thank
  12. Gyakutsuki

    ULTIMATE Seo Urls 5 - by FWR Media

    Hello, There is a bug with memcache when you have several site in the same server dedicate. For example I have a site1 with : http://www.mysite1/product_name-p-1542.html another site 2 with : http://www.test/product_name-p-1542.html The result is when I am on site 1, I see the url of the site 2. regards.
  13. has not set their status

  14. Gyakutsuki

    ULTIMATE Seo Urls 5 - by FWR Media

    Ok memcache works fine
  15. Gyakutsuki

    ULTIMATE Seo Urls 5 - by FWR Media

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

    ULTIMATE Seo Urls 5 - by FWR Media

    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 } } ?>
  17. Gyakutsuki

    ULTIMATE Seo Urls 5 - by FWR Media

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

    ULTIMATE Seo Urls 5 - by FWR Media

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

    ULTIMATE Seo Urls 5 - by FWR Media

    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');
  20. Gyakutsuki

    ULTIMATE Seo Urls 5 - by FWR Media

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

    ULTIMATE Seo Urls 5 - by FWR Media

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