Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

KissMT Dynamic SEO Meta Tags


FWR Media

Recommended Posts

Multi language stopwords now increased to 9.

 

Spanish

German

Dutch

Danish

Italian

Romanian

French

Swedish

Norwegian

Link to comment
Share on other sites

More stopwords here: http://members.unine.ch/jacques.savoy/clef/index.html

or here http://stanford.edu/dept/itss/docs/oracle/10g/text.101/b10730/astopsup.htm

 

Is it possible to filter numbers without having to list every individual number?

 

Filter for what? numbers on their own should already be filtered from keywords e.g.

 

A product called Wiggit 150

 

Should create the keyword wiggit only.

 

whereas a product called Wiggit150

 

Would create a keyword wiggit150 as it is part and parcel of the product name.

Edited by FWR Media
Link to comment
Share on other sites

The numbers only occur in the description...

 

<meta name="description" content="Gistcultuur, pot, Ondersteunende supplementen, Paardenvoer-by St-Hippolyt. Hefekultur Levende gist culturen gecombineerd met hoog bio beschikbare sporenelementen leveren natuurlijke B- vitaminen, zoals voedingsstoffen ter ondersteuning van de dikke darmflora en voor de opbouw van een gezonde darmslijmvlies. Zo kan het hele voederrantsoen optimaal worden benut.     Samenstelling   Bijkomend voormengsel Yea- Sacc 1026, Biergist, Lijnzaad fijn gemalen, Lijn- zonnebloemoliemengsel,   Druivenpitextract, Kruiden Gember, Anijs, Venkel , Magnesiumfumaraat, Gerstentopjes      Inhoudsstoffen en verteerbaarheid   Ruwe proteïne   Ruwe vezels   Ruw vet   Ruwe as         14,0   2,8   9,0   6,8   Hoeveelheidselementen   Calcium   Fosfor   Magnesium   Natrium   Kalium         0,20   0,40   0,35   0,10   0,90       Andere   Saccharomyces cerevisiae 1026     Wateroplosbare vitamines per kg   Vitamine B1   Vitamine B2   Vitamine B6   Biotine   Nicotinezuur Foliumzuur Calcium-pantothenaat Cholinchloride     130 mg   85 mg   70 mg   2.000 mcg   320 mg   8 mg   70 mg   2.500 mg      Sporenelementen per kg   IJzer   Zink   Mangaan   Koper       500 mg   100 mg   50 mg   42 mg       Kobalt   Seleen     100 mg   0,05 mg      De sporenelementen zijn ook aanwezig in   organische complexe verbindingen.      Aanbevolen voedering   ca. 30 g voor grote paarden dag, bij kleine paarden de hoeveelheid dienovereenkomstig aanpassen.." /> 
<meta name="keywords" content="gistcultuur,pot,ondersteunende,supplementen,paardenvoer-by,st-hippolyt,hefekultur,levende,gist,culturen,gecombineerd,bio,beschikbare,sporenelementen,leveren,natuurlijke,b-,vitaminen,zoals,voedingsstoffen,ter,ondersteuning,dikke,darmflora,en,opbouw,gezonde,darmslijmvlies,zo,kan,hele,voederrantsoen,optimaal,worden,benut,samenstelling,bijkomend,voormengsel,yea-,sacc,biergist,lijnzaad,fijn,gemalen,lijn-,zonnebloemoliemengsel,druivenpitextract,kruiden,gember,anijs,venkel,magnesiumfumaraat,gerstentopjes,inhoudsstoffen,verteerbaarheid,ruwe,proteïne,vezels,ruw,vet, ,hoeveelheidselementen,calcium,fosfor,magnesium,natrium,kalium,andere,saccharomyces,cerevisiae,wateroplosbare,vitamines,vitamine,b1,b2,b6,biotine,nicotinezuur,foliumzuur,calcium-pantothenaat,cholinchloride,mcg,ijzer,zink,mangaan,koper,kobalt,seleen,zijn,aanwezig,organische,complexe,verbindingen,aanbevolen,voedering,grote,paarden,dag,kleine,hoeveelheid,dienovereenkomstig,aanpassen" />

Link to comment
Share on other sites

The numbers only occur in the description...

 

<meta name="description" content="Gistcultuur, pot, Ondersteunende supplementen, Paardenvoer-by St-Hippolyt. Hefekultur Levende gist culturen gecombineerd met hoog bio beschikbare sporenelementen leveren natuurlijke B- vitaminen, zoals voedingsstoffen ter ondersteuning van de dikke darmflora en voor de opbouw van een gezonde darmslijmvlies. Zo kan het hele voederrantsoen optimaal worden benut.     Samenstelling   Bijkomend voormengsel Yea- Sacc 1026, Biergist, Lijnzaad fijn gemalen, Lijn- zonnebloemoliemengsel,   Druivenpitextract, Kruiden Gember, Anijs, Venkel , Magnesiumfumaraat, Gerstentopjes      Inhoudsstoffen en verteerbaarheid   Ruwe proteïne   Ruwe vezels   Ruw vet   Ruwe as         14,0   2,8   9,0   6,8   Hoeveelheidselementen   Calcium   Fosfor   Magnesium   Natrium   Kalium         0,20   0,40   0,35   0,10   0,90       Andere   Saccharomyces cerevisiae 1026     Wateroplosbare vitamines per kg   Vitamine B1   Vitamine B2   Vitamine B6   Biotine   Nicotinezuur Foliumzuur Calcium-pantothenaat Cholinchloride     130 mg   85 mg   70 mg   2.000 mcg   320 mg   8 mg   70 mg   2.500 mg      Sporenelementen per kg   IJzer   Zink   Mangaan   Koper       500 mg   100 mg   50 mg   42 mg       Kobalt   Seleen     100 mg   0,05 mg      De sporenelementen zijn ook aanwezig in   organische complexe verbindingen.      Aanbevolen voedering   ca. 30 g voor grote paarden dag, bij kleine paarden de hoeveelheid dienovereenkomstig aanpassen.." /> 
<meta name="keywords" content="gistcultuur,pot,ondersteunende,supplementen,paardenvoer-by,st-hippolyt,hefekultur,levende,gist,culturen,gecombineerd,bio,beschikbare,sporenelementen,leveren,natuurlijke,b-,vitaminen,zoals,voedingsstoffen,ter,ondersteuning,dikke,darmflora,en,opbouw,gezonde,darmslijmvlies,zo,kan,hele,voederrantsoen,optimaal,worden,benut,samenstelling,bijkomend,voormengsel,yea-,sacc,biergist,lijnzaad,fijn,gemalen,lijn-,zonnebloemoliemengsel,druivenpitextract,kruiden,gember,anijs,venkel,magnesiumfumaraat,gerstentopjes,inhoudsstoffen,verteerbaarheid,ruwe,proteïne,vezels,ruw,vet, ,hoeveelheidselementen,calcium,fosfor,magnesium,natrium,kalium,andere,saccharomyces,cerevisiae,wateroplosbare,vitamines,vitamine,b1,b2,b6,biotine,nicotinezuur,foliumzuur,calcium-pantothenaat,cholinchloride,mcg,ijzer,zink,mangaan,koper,kobalt,seleen,zijn,aanwezig,organische,complexe,verbindingen,aanbevolen,voedering,grote,paarden,dag,kleine,hoeveelheid,dienovereenkomstig,aanpassen" />

 

Odd .. that description has multiple spaces in it .. they should have been stripped to single spaces.

 

Re: The numbers it wouldn't be correct for the description to be stripped of numbers, the most important aspect is to ensure that the first 156 - 161 characters contain the main keywords and an attractive description for SE displayed results.

Link to comment
Share on other sites

Preparing for an initial release (following feedback from the beta testers, thanks guys)

 

I am now adding support for the major contributions.

 

Current:

Added support for Articles Manager.

Link to comment
Share on other sites

I still wasn't able to integrate the contribution in STS.

Maybe you could check the STS manual? As you are a coder maybe you can understand what needs to be done.

 

I think many people use STS and could benefit from this contribution.

 

 

Yes many people use STS. But it's beyond my understanding as to why.

 

I think the STS forum should be the place to handle why valid contributions do not work when that particular code is in place.

 

[edit]I'll probably have a look tomorrow though as it's you :) [/edit]

Edited by FWR Media
Link to comment
Share on other sites

Odd .. that description has multiple spaces in it .. they should have been stripped to single spaces.

 

Re: The numbers it wouldn't be correct for the description to be stripped of numbers, the most important aspect is to ensure that the first 156 - 161 characters contain the main keywords and an attractive description for SE displayed results.

 

Maybe because of the table? http://www.horsewellness.nl/product_info.php/gistcultuur-p-314

Link to comment
Share on other sites

Installation online (standard rc2a and online) was without problems as far as i can see.

Will re-read the docs and this thread in next few days.

 

Also here spaces in decription:

<meta name="description" content="Disciples Sacred Lands, PC-DISC, Strategy, Software, by GT Interactive. A new age ...

Edited by berkedam

"If you're working on something new, then you are necessarily an amateur."

Link to comment
Share on other sites

Installation online (standard rc2a and online) was without problems as far as i can see.

Will re-read the docs and this thread in next few days.

 

Also here spaces in decription:

<meta name="description" content="Disciples Sacred Lands, PC-DISC, Strategy, Software, by GT Interactive. A new age ...

 

Thanks for reporting your initial findings back John.

 

Re: spaces .. spaces are fine it was multiple spaces that are not. The issue I think with the post above yours is that KissMT strips up to 9 spaces and in his description it seems there were more.

Link to comment
Share on other sites

Hello, i'm interested too to try this contrib. My shop has 3 different languages and my metatags are poor.

 

Hi Luca

 

Link sent, thanks for testing.

Link to comment
Share on other sites

Installed it. I have a 5.3.1 php hosting. Installed also the extensions

 

I have an issue in the product_info.php page.

 

The meta description reports the entire text of the product description. There is a way to set a maximum number of characters?

 

The same for the keyword meta tag.

Link to comment
Share on other sites

Installed it. I have a 5.3.1 php hosting. Installed also the extensions

 

I have an issue in the product_info.php page.

 

The meta description reports the entire text of the product description. There is a way to set a maximum number of characters?

 

The same for the keyword meta tag.

 

there possibly will be, but the general thought at the moment is that although e.g. Google has a "favoured" number of decription characters/keywords characters it makes no difference at all whether yours is longer.

 

All that happens is that Google truncates down to the length they accept.

 

This is also a very important lesson in writing such things imo as in the description if Google accepts (last time I looked) 165 characters then the author must ensure that the keywords are not only within that length but human readable and human attractive as well.

Example of the length discrepency

 

Also there are thoughts that if every metric meets exact Google guidelines then your site is in danger of being tagged "an SEO site" Google doesn't like Seo sites it likes sites built for humans.

Edited by FWR Media
Link to comment
Share on other sites

 

Also there are thoughts that if every metric meets exact Google guidelines then your site is in danger of being tagged "an SEO site" Google doesn't like Seo sites it likes sites built for humans.

 

Seeing the google webmaster guidelines at http://www.google.com/support/webmasters/bin/answer.py?hl=en&answer=35264#1

 

my fear is that with a very long description (2065 characters for example on my page) and very long meta keyword Google will tag my site "as Seo site" . A short but descriptive description like:

 

<meta name="description" content="STORE NAME - CATEGORY - PRODUCT NAME - MODEL - MANUFACTURER - 100 character taken from product description ">
<meta name="keywords" content=" STORE NAME - CATEGORY - PRODUCT NAME - MODEL - MANUFACTURER - 50 Keyword taken from product description  ">

 

will be fine, i think.

 

Note also that in Google webmasters tools long meta description (or short meta description ) will be reported. So if google suggest tht your meta description is too long or too short maybe is telling you that your meta are not optimized for a good user experience.

 

I reccomend also to install the extensions, i like to control every addon in the admin panel.

 

For the categories page in index.php the meta generated are very good. In the home page the description meta is very poor for me. It could be good to use in description e and keyword meta the list of the categories shown in the categories box.

Edited by acidvertigo
Link to comment
Share on other sites

Seeing the google webmaster guidelines at http://www.google.com/support/webmasters/bin/answer.py?hl=en&answer=35264#1

 

my fear is that with a very long description (2065 characters for example on my page) and very long meta keyword Google will tag my site "as Seo site" . A short but descriptive description like:

 

<meta name="description" content="STORE NAME - CATEGORY - PRODUCT NAME - MODEL - MANUFACTURER - 100 character taken from product description ">
<meta name="keywords" content=" STORE NAME - CATEGORY - PRODUCT NAME - MODEL - MANUFACTURER - 50 Keyword taken from product description  ">

 

will be fine, i think.

 

Note also that in Google webmasters tools long meta description (or short meta description ) will be reported. So if google suggest tht your meta description is too long or too short maybe is telling you that your meta are not optimized for a good user experience.

 

I reccomend also to install the extensions, i like to control every addon in the admin panel.

 

For the categories page in index.php the meta generated are very good. In the home page the description meta is very poor for me. It could be good to use in description e and keyword meta the list of the categories shown in the categories box.

 

Thanks for taking the time to feed back the info, most appreciated.

 

The homepage meta info can be set in the language file includes/languages/<my language>/kissmt.php

 

You will be seeing the standard meta tags for the homepage which were never intended to stay standard.

 

I will of course be reducing the size of the descriptions and keywords prior to release but am trying to get a feel for it .. for description I'm leaning towards perhaps 300 characters.

Link to comment
Share on other sites

Any idea when this contribution will be released? I switched from the "Article Blog" contribution to the "Article Manager" contribution because this new dynamic meta tag contri will be compatible with it ;-)

Link to comment
Share on other sites

Any idea when this contribution will be released? I switched from the "Article Blog" contribution to the "Article Manager" contribution because this new dynamic meta tag contri will be compatible with it ;-)

 

Shouldn't be too long ... at the moment I am getting additional testing and feedback from live sites and the SEO effect .. looking very good so far.

Edited by FWR Media
Link to comment
Share on other sites

  • 2 weeks later...

Sounds "reads" great.

 

PM me the link :-)and I'll beta test it... :D with pleasure

 

Cheers Fab

 

Link sent, looking forward to your thoughts.

Link to comment
Share on other sites

Hi Rob,

 

Just a little concern.

 

In the optional extras the installer.php and installer_class.php are in conflict with those of USU5.

 

What do you recommend.

 

Cheers Fab

Link to comment
Share on other sites

Hi Rob,

 

Just a little concern.

 

In the optional extras the installer.php and installer_class.php are in conflict with those of USU5.

 

What do you recommend.

 

Cheers Fab

 

There is no conflict, but you don't actually need the DB install unless you add the "optional extras"

 

What makes you think there is a conflict?

Link to comment
Share on other sites

There is no conflict, but you don't actually need the DB install unless you add the "optional extras"

 

What makes you think there is a conflict?

 

At code level, keeping to the optional extras installer.php and installer_class.php one cannot install a cart with pre-complied contribs of USU5 and KissMT as a one single installation, as one db installer would override the other.

 

Ideal to have an merged installer as an extra.

 

What do you think.

 

Cheers Fab

Link to comment
Share on other sites

Hi Rob,

 

An idea of the merged file installer.php

 

<?php
/**
* Generic Installer
*
* Database install script for contributions
* Dependencies -  installer_class.php
* 
* @package Generic Installer
* @link http://www.fwrmedia.co.uk
* @copyright Copyright ©2008, Robert Fisher, FWR Media 
* @author Robert Fisher, FWR Media, http://www.fwrmedia.co.uk 
* @lastdev $Author:: Rob                                              $:  Author of last commit
* @lastmod $Date:: 2009-11-29 21:55:09 +0000 (Sun, 29 Nov 2009)       $:  Date of last commit
* @version $Rev:: 117                                                 $:  Revision of last commit
* @Id $Id:: installer.php 117 2009-11-29 21:55:09Z Rob                $:  Full Details 
* @filesource
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
*/
// Initial set up
// set the level of error reporting
error_reporting( ( E_ALL & ~E_NOTICE ) & ~E_DEPRECATED );
date_default_timezone_set("EUROPE/LONDON");
session_start();
require_once( 'includes/configure.php' );
require_once( 'includes/database_tables.php' );
define( 'FWR_INSTALLER', 1 );
require_once( 'installer_class.php' );
$installer = new installer_class;
$installer->showHeader();
$error = '';
$required_version = '5.1.4';
if ( PHP_VERSION < $required_version ) {
 $error .= '<div class="error">You cannot install this script as your PHP version ("' . PHP_VERSION . '") is too low. The required version is ' . $required_version . '+</div>' . PHP_EOL;
}
if ( false === function_exists( 'filter_var' ) ) {
 $error .= '<div class="error">You cannot install this script as the function filter_var() does not exist in your PHP set up</div>' . PHP_EOL;
}
if ( false === function_exists( 'gzinflate' ) ) {
 $error .= '<div class="error">You cannot install this script as the Zlib functions gzinflate()/gzdeflate() do not exist in your PHP set up</div>' . PHP_EOL;
}
if ( false === class_exists( 'SplFileInfo' ) ) {
 $error .= '<div class="error">You cannot install this script as the SPL (standard PHP Library) does not exist in your PHP set up</div>' . PHP_EOL;
}
if ( false === class_exists( 'DirectoryIterator' ) ) {
 $error .= '<div class="error">You cannot install this script as the class DirectoryIterator does not exist in your PHP set up</div>' . PHP_EOL;
}
if ( !empty($error) ) {
 echo $error;
 $installer->showFooter();
 exit;
}
/**
* Build your install using the arrays below
* 
* @param $config_inserts - configuration group install
* plus configuration being an array of related configuration install values
* @param $tables_to_add - array of tables to be created
* @param $tables_to_alter - array tables we are going to alter
* @param $fields_to_add - array of fields we are going to add to specific tables
* @param $fields_to_alter - array of fields we are going to alter
*/

################## START USER DEFINED INSTALL ARRAYS #####################

$config_inserts = array('group' => array(
                                    array( 'configuration_group_title'       => 'Seo Urls 5',
                                           'configuration_group_description' => 'Options for ULTIMATE Seo Urls 5 by FWR Media',
                                           'sort_order'                      => '99',
                                           'visible'                         => '1',
                                           'configuration' => array(
                                                                array( 'configuration_title'       => 'Enable SEO URLs 5?',
                                                                       'configuration_key'         => 'SEO_URLS_ENABLED',
                                                                       'configuration_value'       => 'true',
                                                                       'configuration_description' => 'Turn Seo Urls 5 on',
                                                                       'configuration_group_id'    => '',
                                                                       'sort_order'                => '99',
                                                                       'last_modified'             => date( "Y-m-d H:i:s" ),
                                                                       'date_added'                => date( "Y-m-d H:i:s" ),
                                                                       'use_function'              => NULL,
                                                                       'set_function'              => "tep_cfg_select_option(array(''true'', ''false''), " ),
                                                                array( 'configuration_title'       => 'Add cPath to product URLs?',
                                                                       'configuration_key'         => 'SEO_URLS_ADD_CPATH_TO_PRODUCT_URLS',
                                                                       'configuration_value'       => 'false',
                                                                       'configuration_description' => 'This setting will append the cPath to the end of product URLs (i.e. - some-product-p-1.html?cPath=xx).',
                                                                       'configuration_group_id'    => '',
                                                                       'sort_order'                => '99',
                                                                       'last_modified'             => date( "Y-m-d H:i:s" ),
                                                                       'date_added'                => date( "Y-m-d H:i:s" ),
                                                                       'use_function'              => NULL,
                                                                       'set_function'              => "tep_cfg_select_option(array(''true'', ''false''), " ),
                                                                array( 'configuration_title'       => 'Add category parent to beginning of URLs?',
                                                                       'configuration_key'         => 'SEO_URLS_ADD_CAT_PARENT',
                                                                       'configuration_value'       => 'true',
                                                                       'configuration_description' => 'This setting will add the category parent name to the beginning of the category URLs (i.e. - parent-category-c-1.html).',
                                                                       'configuration_group_id'    => '',
                                                                       'sort_order'                => '99',
                                                                       'last_modified'             => date( "Y-m-d H:i:s" ),
                                                                       'date_added'                => date( "Y-m-d H:i:s" ),
                                                                       'use_function'              => NULL,
                                                                       'set_function'              => "tep_cfg_select_option(array(''true'', ''false''), " ),     
                                                                array( 'configuration_title'       => 'Filter Short Words',
                                                                       'configuration_key'         => 'SEO_URLS_FILTER_SHORT_WORDS',
                                                                       'configuration_value'       => '1',
                                                                       'configuration_description' => '<b>This setting will filter words.</b><br>1 = Remove words of 1 letter<br>2 = Remove words of 2 letters or less<br>3 = Remove words of 3 letters or less<br>',
                                                                       'configuration_group_id'    => '',
                                                                       'sort_order'                => '99',
                                                                       'last_modified'             => date( "Y-m-d H:i:s" ),
                                                                       'date_added'                => date( "Y-m-d H:i:s" ),
                                                                       'use_function'              => NULL,
                                                                       'set_function'              => "tep_cfg_select_option(array(''1'', ''2'', ''3''), " ),
                                                                array( 'configuration_title'       => 'Output W3C valid URLs?',
                                                                       'configuration_key'         => 'SEO_URLS_USE_W3C_VALID',
                                                                       'configuration_value'       => 'true',
                                                                       'configuration_description' => 'This setting will output W3C valid URLs.',
                                                                       'configuration_group_id'    => '',
                                                                       'sort_order'                => '99',
                                                                       'last_modified'             => date( "Y-m-d H:i:s" ),
                                                                       'date_added'                => date( "Y-m-d H:i:s" ),
                                                                       'use_function'              => NULL,
                                                                       'set_function'              => "tep_cfg_select_option(array(''true'', ''false''), " ),
                                                                array( 'configuration_title'       => 'Choose URL Rewrite Type',
                                                                       'configuration_key'         => 'SEO_URLS_TYPE',
                                                                       'configuration_value'       => 'standard',
                                                                       'configuration_description' => 'Choose SEO URL format:<br><b>rewrite</b><br>mysite.com/great-product-p-3.html<br><b>standard</b><br>mysite.com/product_info.php/great-product-p-3<p><i>Note: mod_rewrite has to be enabled for the rewrite option and AllowOveride set to all.</i></p>',
                                                                       'configuration_group_id'    => '',
                                                                       'sort_order'                => '99',
                                                                       'last_modified'             => date( "Y-m-d H:i:s" ),
                                                                       'date_added'                => date( "Y-m-d H:i:s" ),
                                                                       'use_function'              => NULL,
                                                                       'set_function'              => "tep_cfg_select_option(array(''rewrite'', ''standard''), " ),
                                                                array( 'configuration_title'       => 'Enter special character conversions. (Better to use the file based character conversions.See extras/character_conversion_pack/instructions.txt)',
                                                                       'configuration_key'         => 'SEO_URLS_CHAR_CONVERT_SET',
                                                                       'configuration_value'       => '',
                                                                       'configuration_description' => 'This setting will convert characters.<br><br>The format <b>MUST</b> be in the form: <b>char=>conv,char2=>conv2</b>',
                                                                       'configuration_group_id'    => '',
                                                                       'sort_order'                => '99',
                                                                       'last_modified'             => date( "Y-m-d H:i:s" ),
                                                                       'date_added'                => date( "Y-m-d H:i:s" ),
                                                                       'use_function'              => NULL,
                                                                       'set_function'              => NULL ),
                                                                array( 'configuration_title'       => 'Remove all non-alphanumeric characters?',
                                                                       'configuration_key'         => 'SEO_URLS_REMOVE_ALL_SPEC_CHARS',
                                                                       'configuration_value'       => 'true',
                                                                       'configuration_description' => 'This will remove all non-letters and non-numbers. If your language has special characters then you will need to use the character conversion system.',
                                                                       'configuration_group_id'    => '',
                                                                       'sort_order'                => '99',
                                                                       'last_modified'             => date( "Y-m-d H:i:s" ),
                                                                       'date_added'                => date( "Y-m-d H:i:s" ),
                                                                       'use_function'              => NULL,
                                                                       'set_function'              => "tep_cfg_select_option(array(''true'', ''false''), " ),
                                                                array( 'configuration_title'       => 'Set the number of days to store the cache.',
                                                                       'configuration_key'         => 'SEO_URLS_CACHE_DAYS',
                                                                       'configuration_value'       => '7',
                                                                       'configuration_description' => 'Set the number of days you wish to retain cached data, after this the cache will auto reset.',
                                                                       'configuration_group_id'    => '',
                                                                       'sort_order'                => '99',
                                                                       'last_modified'             => date( "Y-m-d H:i:s" ),
                                                                       'date_added'                => date( "Y-m-d H:i:s" ),
                                                                       'use_function'              => NULL,
                                                                       'set_function'              => NULL ),
                                                                array( 'configuration_title'       => 'Reset SEO URLs Cache',
                                                                       'configuration_key'         => 'SEO_URLS_CACHE_RESET',
                                                                       'configuration_value'       => 'false',
                                                                       'configuration_description' => 'This will reset the cache data for SEO',
                                                                       'configuration_group_id'    => '',
                                                                       'sort_order'                => '99',
                                                                       'last_modified'             => date( "Y-m-d H:i:s" ),
                                                                       'date_added'                => date( "Y-m-d H:i:s" ),
                                                                       'use_function'              => 'tep_reset_cache_data_seo_urls',
                                                                       'set_function'              => "tep_cfg_select_option(array(''reset'', ''false''), " ),
                                                                array( 'configuration_title'       => 'Turn debug reporting on true/false.',
                                                                       'configuration_key'         => 'SEO_URLS_OUPUT_PERFORMANCE',
                                                                       'configuration_value'       => 'false',
                                                                       'configuration_description' => '<span style="color: red;">Debug reporting should <b>NOT</b> be set to ON on a live site</span><br>It is for dev reporting re: performance and queries.',
                                                                       'configuration_group_id'    => '',
                                                                       'sort_order'                => '99',
                                                                       'last_modified'             => date( "Y-m-d H:i:s" ),
                                                                       'date_added'                => date( "Y-m-d H:i:s" ),
                                                                       'use_function'              => NULL,
                                                                       'set_function'              => "tep_cfg_select_option(array(''true'', ''false''), " ),
                                                                array( 'configuration_title'       => 'Select caching system.',
                                                                       'configuration_key'         => 'SEO_URLS_CACHE_SYSTEM',
                                                                       'configuration_value'       => 'FileSystem',
                                                                       'configuration_description' => '<b>Filesystem:</b><br>Zero queries after cache load.<br><b>Database:</b><br>One query after cache load<br><b>Memcached:</b><br>Requires memcached in apache and php.ini.',
                                                                       'configuration_group_id'    => '',
                                                                       'sort_order'                => '99',
                                                                       'last_modified'             => date( "Y-m-d H:i:s" ),
                                                                       'date_added'                => date( "Y-m-d H:i:s" ),
                                                                       'use_function'              => NULL,
                                                                       'set_function'              => "tep_cfg_select_option(array(''FileSystem'', ''Database'', ''Memcached''), " )
                                                                       )
                                           )
                                    ));

$tables_to_add = array( 'usu_cache' => "CREATE TABLE `usu_cache` (
                                       `cache_name` varchar(32) NOT NULL,
                                       `cache_data` mediumtext NOT NULL,
                                       `cache_date` datetime NOT NULL,
                                       PRIMARY KEY  (`cache_name`)
                                       ) ENGINE=MyISAM;" );

$tables_to_alter = array();

$fields_to_add = array();

$fields_to_alter = array();

################### END USER DEFINED INSTALL ARRAYS ######################

/**
* Stage 1 - Check all database alterations for current existence
*/
$errors = false;
if( $installer->stage == '1' ) {
echo '    <div id="messages_container">' . "\n";
echo '      <ul>' . "\n";
// Check config inserts
if( !empty($config_inserts) ){
 if( $installer->configExists( $config_inserts ) ) {
   echo '        <li class="error">At least one of the configuration values already exists!</li>' . "\n";
   $errors = true;
 } else {
   echo '        <li class="success">All configuration values look good.</li>' . "\n";
   if( false !== $installer->autoIncrement ) {
   echo '        <li class="success">Configuration Group auto increment to start at ' . $installer->autoIncrement . '</li>' . "\n";
   }
 }
} else {
   echo '        <li class="dormant">No configuration values to install it seems.</li>' . "\n";
}
// Check tables to add
if( !empty( $tables_to_add ) ) {                       
 if( $installer->tablesExist( $tables_to_add ) ) {
   echo '        <li class="error">At least one of the tables to insert already exists!</li>' . "\n";
   $errors = true;
 } else {
   echo '        <li class="success">Tables look good to insert.</li>' . "\n";
 }
} else {
   echo '        <li class="dormant">No tables to insert it seems.</li>' . "\n";
}
// Check tables to add
if( !empty( $tables_to_alter ) ) {                       
 if( !$installer->tablesExist( $tables_to_alter ) ) {
   echo '        <li class="error">At least one of the tables to alter does not exist!</li>' . "\n";
   $errors = true;
 } else {
   echo '        <li class="success">Tables to alter look good.</li>' . "\n";
 }
} else {
   echo '        <li class="dormant">No tables to alter it seems.</li>' . "\n";
}
// Check fields to add
if( !empty( $fields_to_add ) ) {
 if( $installer->fields_exist( $fields_to_add ) ) {
   echo '        <li class="error">At least one of the fields to insert already exists!</li>' . "\n";
   $errors = true;
 } else {
   echo '        <li class="success">Fields look good to insert.</li>' . "\n";
 }
} else {
   echo '        <li class="dormant">No fields to insert it seems.</li>' . "\n";
}
// Check fields to alter
if( !empty( $fields_to_alter ) ) {
 if( !$installer->fields_exist( $fields_to_alter ) ) {
   echo '        <li class="error">At least one of the fields to alter does not exist!</li>' . "\n";
    $errors = true;
 } else {
   echo '        <li class="success">Fields to alter look good.</li>' . "\n";
 }
} else {
   echo '        <li class="dormant">No fields to alter it seems.</li>' . "\n";
}
echo '      </ul>' . "\n";
echo '    </div>' . "\n";
$installer->showStatus( $errors );

} elseif( $installer->stage == '2' ) {  // Stage 2 - Install

 $installer->implementInstall( $config_inserts, $tables_to_add, $tables_to_alter, $fields_to_add, $fields_to_alter );
 if( empty( $installer->install['error'] ) ) {
   $installer->outputInstallSuccess();
   $installer_class = str_replace( 'installer.php', '', __FILE__ ) . 'installer_class.php';
   @unlink( $installer_class );
   @unlink( __FILE__ );
   echo '<div style="padding: 0.5em; margin-top: 3em;">' . ( ( !file_exists( __FILE__ ) && !file_exists( $installer_class ) ) ? '<b style="color: green;">This file has self deleted!<b>' : '<b style="color: red;">installer.php and installer_class.php file MUST be deleted!<b>' ) . '</div>' . PHP_EOL;
 } else {
   $installer->outputErrors();
 }

}

if( false === $errors ) {
 $_SESSION['stage'] = 1;
 $_SESSION['token'] = $installer->token;
 if( $installer->stage == '1' ) {
   $installer->drawPostForm( 'Install Database Settings' );
 }
}
$installer->showFooter();
$installer->db->close(); 

### KissMT DB Installer ###

################## START USER DEFINED INSTALL ARRAYS #####################

$config_inserts = array('group' => array(
                                    array( 'configuration_group_title'       => 'KissMT Meta Tags',
                                           'configuration_group_description' => 'Options for KissMT Dynamic Seo Meta Tags by FWR Media',
                                           'sort_order'                      => '99',
                                           'visible'                         => '1',
                                           'configuration' => array(
                                                                array( 'configuration_title'       => 'Turn on the KissMT cache?',
                                                                       'configuration_key'         => 'KISSMT_CACHE_ON',
                                                                       'configuration_value'       => 'true',
                                                                       'configuration_description' => '<b>Recommended:</b><br>This setting will turn on the KissMT cache feature.',
                                                                       'configuration_group_id'    => '',
                                                                       'sort_order'                => '99',
                                                                       'last_modified'             => date( "Y-m-d H:i:s" ),
                                                                       'date_added'                => date( "Y-m-d H:i:s" ),
                                                                       'use_function'              => NULL,
                                                                       'set_function'              => "tep_cfg_select_option(array(''true'', ''false''), " ),
                                                                array( 'configuration_title'       => 'The separator for words in the title bar.',
                                                                       'configuration_key'         => 'KISSMT_TITLE_SEPARATOR',
                                                                       'configuration_value'       => '-',
                                                                       'configuration_description' => 'The way words are separated in the browser title bar like .. My - Shop',
                                                                       'configuration_group_id'    => '',
                                                                       'sort_order'                => '99',
                                                                       'last_modified'             => date( "Y-m-d H:i:s" ),
                                                                       'date_added'                => date( "Y-m-d H:i:s" ),
                                                                       'use_function'              => NULL,
                                                                       'set_function'              => NULL ),     
                                                                array( 'configuration_title'       => 'Output tags in XHTML?',
                                                                       'configuration_key'         => 'KISSMT_XHTML_OUTPUT',
                                                                       'configuration_value'       => 'false',
                                                                       'configuration_description' => 'Outputs tags in XHTML if set to true',
                                                                       'configuration_group_id'    => '',
                                                                       'sort_order'                => '99',
                                                                       'last_modified'             => date( "Y-m-d H:i:s" ),
                                                                       'date_added'                => date( "Y-m-d H:i:s" ),
                                                                       'use_function'              => NULL,
                                                                       'set_function'              => "tep_cfg_select_option(array(''true'', ''false''), " ),
                                                                array( 'configuration_title'       => 'Output KissMT performance data',
                                                                       'configuration_key'         => 'KISSMT_PERFORMANCE_OUTPUT',
                                                                       'configuration_value'       => 'false',
                                                                       'configuration_description' => '<b>Dev only</b> This setting will output performance data at the bottom of the page.',
                                                                       'configuration_group_id'    => '',
                                                                       'sort_order'                => '99',
                                                                       'last_modified'             => date( "Y-m-d H:i:s" ),
                                                                       'date_added'                => date( "Y-m-d H:i:s" ),
                                                                       'use_function'              => NULL,
                                                                       'set_function'              => "tep_cfg_select_option(array(''true'', ''false''), " ),
                                                                array( 'configuration_title'       => 'This setting will output KissMT class properties.',
                                                                       'configuration_key'         => 'KISSMT_CLASS_OUTPUT',
                                                                       'configuration_value'       => 'false',
                                                                       'configuration_description' => '<b>Dev only</b> This will output the KissMT class properties at the bottom of the page<br><b>Output KissMT performance data</b> must be set to true also.',
                                                                       'configuration_group_id'    => '',
                                                                       'sort_order'                => '99',
                                                                       'last_modified'             => date( "Y-m-d H:i:s" ),
                                                                       'date_added'                => date( "Y-m-d H:i:s" ),
                                                                       'use_function'              => NULL,
                                                                       'set_function'              => "tep_cfg_select_option(array(''true'', ''false''), " ),
                                                                array( 'configuration_title'       => 'Output canonical tags for SEO',
                                                                       'configuration_key'         => 'KISSMT_CANONICAL_ON',
                                                                       'configuration_value'       => 'true',
                                                                       'configuration_description' => '<b>Recommended:</b><br>Output canonical tags removing osCsid from search engine indexes and preventing duplicate content.',
                                                                       'configuration_group_id'    => '',
                                                                       'sort_order'                => '99',
                                                                       'last_modified'             => date( "Y-m-d H:i:s" ),
                                                                       'date_added'                => date( "Y-m-d H:i:s" ),
                                                                       'use_function'              => NULL,
                                                                       'set_function'              => "tep_cfg_select_option(array(''true'', ''false''), " ),
                                                                array( 'configuration_title'       => 'Set a limit for products/categories',
                                                                       'configuration_key'         => 'KISSMT_CATEGORIES_PRODUCTS_LIMIT',
                                                                       'configuration_value'       => '30',
                                                                       'configuration_description' => 'This will set a limit for the number of categories/products extracted from the database for description and keywords.',
                                                                       'configuration_group_id'    => '',
                                                                       'sort_order'                => '99',
                                                                       'last_modified'             => date( "Y-m-d H:i:s" ),
                                                                       'date_added'                => date( "Y-m-d H:i:s" ),
                                                                       'use_function'              => NULL,
                                                                       'set_function'              => NULL ),
                                                                array( 'configuration_title'       => 'Enable Categories/Manufacturers descriptions extension.',
                                                                       'configuration_key'         => 'KISSMT_DESCRIPTIONS_EXTENSION_ENABLE',
                                                                       'configuration_value'       => 'false',
                                                                       'configuration_description' => 'Enable the extension for categories/manufacturers descriptions.<br><span style="color: red;">Have you installed the extension?</span>',
                                                                       'configuration_group_id'    => '',
                                                                       'sort_order'                => '99',
                                                                       'last_modified'             => date( "Y-m-d H:i:s" ),
                                                                       'date_added'                => date( "Y-m-d H:i:s" ),
                                                                       'use_function'              => NULL,
                                                                       'set_function'              => "tep_cfg_select_option(array(''true'', ''false''), " ),
                                                                array( 'configuration_title'       => 'Reset KissMT Cache',
                                                                       'configuration_key'         => 'KISSMT_CACHE_RESET',
                                                                       'configuration_value'       => 'false',
                                                                       'configuration_description' => 'This will reset the cache data for KissMT. Actions on the next page load of the front end.',
                                                                       'configuration_group_id'    => '',
                                                                       'sort_order'                => '99',
                                                                       'last_modified'             => date( "Y-m-d H:i:s" ),
                                                                       'date_added'                => date( "Y-m-d H:i:s" ),
                                                                       'use_function'              => NULL,
                                                                       'set_function'              => "tep_cfg_select_option(array(''reset'', ''false''), " )
                                                                       )
                                           )
                                    ));


$tables_to_add = array();
/*
$tables_to_add = array( 'usu_cache' => "CREATE TABLE `usu_cache` (
                                       `cache_name` varchar(32) NOT NULL,
                                       `cache_data` mediumtext NOT NULL,
                                       `cache_date` datetime NOT NULL,
                                       PRIMARY KEY  (`cache_name`)
                                       ) ENGINE=MyISAM;" );
*/                                                 
$tables_to_alter = array();

$fields_to_add = array( TABLE_CATEGORIES_DESCRIPTION =>
                         array( 'kissmt_categories_description'    => "ALTER TABLE `categories_description` ADD COLUMN kissmt_categories_description TEXT DEFAULT NULL" ),
                       TABLE_MANUFACTURERS_INFO     =>
                         array( 'kissmt_manufacturers_description' => "ALTER TABLE `manufacturers_info` ADD COLUMN kissmt_manufacturers_description TEXT DEFAULT NULL") );

$fields_to_alter = array();

################### END USER DEFINED INSTALL ARRAYS ######################

/**
* Stage 1 - Check all database alterations for current existence
*/
$errors = false;
if( $installer->stage == '1' ) {
echo '    <div id="messages_container">' . "\n";
echo '      <ul>' . "\n";
// Check config inserts
if( !empty($config_inserts) ){
 if( $installer->configExists( $config_inserts ) ) {
   echo '        <li class="error">At least one of the configuration values already exists!</li>' . "\n";
   $errors = true;
 } else {
   echo '        <li class="success">All configuration values look good.</li>' . "\n";
   if( false !== $installer->autoIncrement ) {
   echo '        <li class="success">Configuration Group auto increment to start at ' . $installer->autoIncrement . '</li>' . "\n";
   }
 }
} else {
   echo '        <li class="dormant">No configuration values to install it seems.</li>' . "\n";
}
// Check tables to add
if( !empty( $tables_to_add ) ) {                       
 if( $installer->tablesExist( $tables_to_add ) ) {
   echo '        <li class="error">At least one of the tables to insert already exists!</li>' . "\n";
   $errors = true;
 } else {
   echo '        <li class="success">Tables look good to insert.</li>' . "\n";
 }
} else {
   echo '        <li class="dormant">No tables to insert it seems.</li>' . "\n";
}
// Check tables to add
if( !empty( $tables_to_alter ) ) {                       
 if( !$installer->tablesExist( $tables_to_alter ) ) {
   echo '        <li class="error">At least one of the tables to alter does not exist!</li>' . "\n";
   $errors = true;
 } else {
   echo '        <li class="success">Tables to alter look good.</li>' . "\n";
 }
} else {
   echo '        <li class="dormant">No tables to alter it seems.</li>' . "\n";
}
// Check fields to add
if( !empty( $fields_to_add ) ) {
 if( !$installer->fields_exist( $fields_to_add ) ) {
   echo '        <li class="error">At least one of the fields to insert already exists!</li>' . "\n";
   $errors = true;
 } else {
   echo '        <li class="success">Fields look good to insert.</li>' . "\n";
 }
} else {
   echo '        <li class="dormant">No fields to insert it seems.</li>' . "\n";
}
// Check fields to alter
if( !empty( $fields_to_alter ) ) {
 if( !$installer->fields_exist( $fields_to_alter ) ) {
   echo '        <li class="error">At least one of the fields to alter does not exist!</li>' . "\n";
    $errors = true;
 } else {
   echo '        <li class="success">Fields to alter look good.</li>' . "\n";
 }
} else {
   echo '        <li class="dormant">No fields to alter it seems.</li>' . "\n";
}
echo '      </ul>' . "\n";
echo '    </div>' . "\n";
$installer->showStatus( $errors );

} elseif( $installer->stage == '2' ) {  // Stage 2 - Install

 $installer->implementInstall( $config_inserts, $tables_to_add, $tables_to_alter, $fields_to_add, $fields_to_alter );
 if( empty( $installer->install['error'] ) ) {
   $installer->outputInstallSuccess();
   $installer_class = str_replace( 'installer.php', '', __FILE__ ) . 'installer_class.php';
   @unlink( $installer_class );
   @unlink( __FILE__ );
   echo '<div style="padding: 0.5em; margin-top: 3em;">' . ( ( !file_exists( __FILE__ ) && !file_exists( $installer_class ) ) ? '<b style="color: green;">This file has self deleted!<b>' : '<b style="color: red;">installer.php and installer_class.php file MUST be deleted!<b>' ) . '</div>' . PHP_EOL;
 } else {
   $installer->outputErrors();
 }

}

if( false === $errors ) {
 $_SESSION['stage'] = 1;
 $_SESSION['token'] = $installer->token;
 if( $installer->stage == '1' ) {
   $installer->drawPostForm( 'Install Database Settings' );
 }
}
$installer->showFooter();
$installer->db->close();

?>

 

There are two instances of this

 

$installer->showFooter();
$installer->db->close();

 

Shall I remove any duplicates for the code to work or are they ok as they are..

 

Cheers Fab

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...