Contributions
Header Tags Controller
Header Tags Controller allows for unique Header Tags for:
Title
Keywords
Description
on a per page basis.
Expand All / Collapse All
The Header Tags Controller has been replaced with the Header Tags SEO
contribution, which can be found here:
http://addons.oscommerce.com/info/5851
The support thread for it is here:
http://forums.oscommerce.com/index.php?showtopic=298099
Support for this version will continue but no new updates will be
added, at least not by me.
I used this function to collapse descriptions heavy with html markup into text blocks in my header_tags_fill_tags.php since even the first couple hundred characters was pulling a blank description otherwise!
function extractTextString($string)
{
if (!is_string($string))
return false;
$string = preg_replace(array('/n/', '/t/', '/r/'), ' ', trim(strip_tags($string)));
$string = preg_quote($string, '|');
$string = preg_replace('| +|', ' ', $string);
return $string;
}
I stuck this function in the top of the file and then around line 192 replaced like so:
/* if (isset($productsMetaDescLength) && (int)$productsMetaDescLength > 3 && (int)$productsMetaDescLength < strlen($products_tags['products_description']))
$desc = substr($products_tags['products_description'], 0, (int)$productsMetaDescLength);
else //length not entered or too small
$desc = $products_tags['products_description']; //so use the whole description
}
else
$desc = $products_tags['products_name'];
*/
$filtered_desc = extractTextString($products_tags['products_description']);
if (isset($productsMetaDescLength) && (int)$productsMetaDescLength > 3 && (int)$productsMetaDescLength < strlen($filtered_desc))
$desc = substr($filtered_desc, 0, (int)$productsMetaDescLength);
else //length not entered or too small
$desc = $filtered_desc; //so use the whole description
}
else
$desc = $filtered_desc;
if SEF is in use the header tags controller just adds description and keywords from the categories instead of the products. This has changed the header_tags.php to change the meta_tags from description to products. May be helpful.
This does contain a single modified file only. To make it work upload this version of header_tags controller instead off the original file.
Does not make any sense to download this if You do not use SEF.
Das ist die Completversion vom HeaderTags_V_2.6.3
die Anleitung wurde auf Deutsch übersetzt
-> Fixed - code in includes/header_tags.php for index page was not loading the tags correctly for other languages.
-> Fixed problem with functions file being loaded twice in some shops (changed require to require_once in admin/header_tags_controller.php and admin/header_tags_english.php).
-> Fixed - coding mistake in includes/header_tags.php that prevented the manufacturers from being displayed.
-> Fixed coding mistake in admin/includes/header_tags_controller.php as found by jonatanvalencia.
-> Removed unnecessary code from the includes/header_tags.php file for the all products section.
-> Added code to display the correct permissions settings when they are not set correctly.
The support thread is at
http://forums.oscommerce.com/index.php?act=ST&f=7&t=51815
This is a complete package.
Only a small typo in /admin/includes/boxes/header_tags_controller.php
Line 21 aprox:
'link' => tep_href_link(FILENAME_HEADER_TAGS_CONTROLLER, 'selected_box=header tags'));
it has to be: header_tags in the end of the line
FULL PACKAGE
If you're using fck editor you have to add this lines to categories.php
-> Changed - to , in includes/header_tags.php for the keywords tag.
-> Included code for NOODP tag to prevent DMoz from changing site description
-> Changed h1 and h2 classes to eliminate extra space
-> Changed instructions to use an on-page link to increase link exposure for the products
-> Added an infobox that will appear on the product page and contain information about that product. This increases the keyword density count for that page.
-> Added a note to the Install_Admin.txt file to the section of change that seems to trip up most people. Hopefully that will prevent that common mistake.
-> Added a "How To Operate" file to make working with Header Tags easier.
-> Fixed code for font size in Header_tags_fill_tags.php file so it displayed
correctly with IE.
-> Added defines to text in header_tags_fill_tags.php file.
The support thread is at
http://forums.oscommerce.com/index.php?act=ST&f=7&t=51815
This is a complete package.
This is the complete package as contributed by Jack_mcs with an additional fix for the fill tags script.
I found an error in the fill tags script:
/admin/header_tags_fill_tags.php
A variable $updatedDB was set to true when a particular record (category, manafacturer or product) was to be updated (tags filled). This occured if the tag was empty.
However this flag was not set to false at the beginning of th loop due to a spelling mistake. The flag set to false was called 'UpdatedDP'.
This resulted in the filling of tags after a product with an empty tag. Even if those tags were filled.
This package contains the fix.
Any questions let me kow.
-> Fixed mistakes in the install instructions.
-> Fixed problem with the specials page where the default keywords were always being appended to the keywords string, regardless of the HTKA setting.
-> Fixed typo in includes/header_tags.php for about us section.
-> Fixed code in admin/includes/functions/header_tags.php file for write function - misspelled variable
-> Fixed spelling mistake in includes/header_tags.php for product_reviews.
-> Added fix to index code so the category and manufacturer descriptions cover the whole width of the page (per fix mentioned on the forum).
-> Added German and Spanish files provided in other versions.
-> Added missing code in includes/languages/english/header_tags.php
for products_reviews_write.php.
-> Added new switch option, HTPA, for product_info page. When set, the category name for the product will be added to the title and meta tags.
-> Added option to check permissions settings.
-> Removed debug statement from header_tags_controller.php file.
-> Removed code for products_all in includes/header_tags.php since it is for an out-dated contribution.
-> Changed code in Page Control to prevent deletion of special case pages.
-> Changed code to allow page names with a dash to be added in Page Control.
-> Changed fill tags code to account for error found by drachenpaps.
-> Cleaned up instructions, removed unused code from files.
The support thread is at
http://forums.oscommerce.com/index.php?act=ST&f=7&t=51815
This is a complete package.
...jetzt mit deutschen Sprachdateien.
Viel Spass damit.
This is an error fix for Header Tags Controller v2.5.9 and v2.5.9.1
Easy to install.
Error description:
The file
catalog/admin/header_tags_fill_tags.php
contains an error whereby a wrong tag description is written to the database of some products (products_head_desc_tag). These products get the tag description of the previous product in the database.
This a complete package version 2.5.9 Complete of Jack_mcs
+ Spanish file for folder espanol
and spanish Instructions of install and how to work with Header Tags in admin
New Files:
catalog/includes/languages/espanol/header_tags.php
catalog/admin/includes/languages/espanol/header_tags_controller.php
catalog/admin/includes/languages/espanol/header_tags_popup_help.php
Include screenshots for version 2.5.9 in spanish
DEMO:
http://www.oscommerce-demo.com/header_tags_controller/
------
Este en un pack completo de la version 2.5.9 Complete, que incluye ademas intrucciones de instalacion y manejo de Header Tags en espaņol y los archivos para el idioma espaņol que mostraran la seccion Header Tags del admin traducida al espaņol.
carpeta: intrucciones_en_espanol_spanish
archivos nuevos para el catalogo:
catalog/includes/languages/espanol/header_tags.php
catalog/admin/includes/languages/espanol/header_tags_controller.php
catalog/admin/includes/languages/espanol/header_tags_popup_help.php
Incluye imagenes de muestra de Header Tags en el admin
carpeta: ScreenShots_2.5.9_ES
DEMO funcional en:
http://www.oscommerce-demo.com/header_tags_controller/
Esta contribucion crea un titulo y meta-tags unicos para cada pagina:
title
meta description
meta keywords
Se eligen desde el admin y tiene varias funciones de auto-rellenado con el nombre de la categoria / producto / fabricante o la pagina como Ofertas o Novedades
Es util para mejorar el SERP, mejorar puestos en las paginas de resultados de los motores de busqueda, para un mejor indexado por parte de los buscadores. Se puede personalizar cada pagina del catalogo con un titulo y meta descripcion y keywords distintos, incluidos cada pagina de cada producto.
1. chagned index.php, product_info.php...
2. make it clear and easy to install.
3. some minor changes.
Fixed coding errors in the admin/categories.php file.
The support thread is at
http://forums.oscommerce.com/index.php?act=ST&f=7&t=51815
This is a complete package.
This fixes a few mistakes in the includes/header_tags.php file and corrects some install directions. If you have V 2.5.7 installed, just copy the above file over yours, or compare it if you have made changes to your file.
The support thread is at
http://forums.oscommerce.com/index.php?act=ST&f=7&t=51815
This is a complete package.
-> Added code to add title and meta tags to the manufacturers pages. This includes a manufacturers description option like that used for categories.
-> Added code to auto fill the categories title and meta tags when
inserting or updating a category if they are left empty.
-> Added code to auto fill the products title and meta tags when inserting or updating a product if they are left empty.
-> Added code to prevent the deletion of the product_info.php entry in Page Control.
-> Added code to verify the page name entered in Page Control does not contain invalid characters.
-> Added code in Fill Tags to indicate that the operation has finished.
-> Added a comma separator to includes/header_tags.php for instances where keywords are joined with the default keywords.
-> Added missing All Products code in includes/languages/english/header_tags.php.
This is only needed if you have the All Products with Images contribution installed. It can be removed but it won't hurt to have it in. The code for the includes/header_tags.php file has always been there so this was needed to
complete that.
-> Added an option to allow the products meta description tags to be filled in with all or part of the products description, or with the products name, as it has always been done.
-> Added code to highlight the title of a section in Text Control if the file for that section is missing the required Header Tags code.
-> Added code to allow the text (title and meta tags) in the product_info section of Text Control to be added to the appropriate places on the
product_info page. Previously, these items were ignored.
-> Fixed bug in code that cause the AllProds code to be confused with the default tags.
-> Fixed problem with HTTA_CAT switch not setting properly for index.php.
-> Changed the code for admin/categories.php to be compatible with the oscommerce security update patch.
-> Changed text that displays in product edit to indicate tag information.
-> Change code in database_setup.php to use defined constants for table names.
-> Changed code in Fill Tags to use the defined table names instead of hard-coded names.
-> Removed references to non-existent header_tags_includes.php file.
-> Rewrote code that handled the default title and meta tags to try and fix on-going bug.
-> Removed redundant code for switch boxes in header_tags_controller.php.
-> Cleaned up and made corrections of text in instruction files.
The support thread is at
http://forums.oscommerce.com/index.php?act=ST&f=7&t=51815
This is a complete package.
This is a wrap-up of issues found by many, some discussed in the support forum.
Started with: Header Tags Controller v2.5.5 Complete Jack_mcs 7 Sep 2005
Updating to this from 2.5.5 is a simple HTC file replacement.
New items and corrections in this package:
-> added install notes about file permissions from 241 (16 Oct 2005).
-> added install notes about some hosts restricting PHP CHMOD from HenSod (9 Sep 2005)
-> corrections for stores with /admin/ outside the catalog directory. surfalot (2 Oct 2005)
-> added the tep_ function to the (Explain) info links in two pages, without this, the link
didn't work on stores with Administration Access Level Accounts installed. (new)
-> moved remaining admin area language to the language file. (new)
-> included the now complete French language files contributed by: maxime (13 Sep 2005)
-> Merged XHTML compliant header code contributed by: yansfung (10 Sep 2005)
-> Added Missing define('BOX_HEADER_TAGS_FILL_TAGS', 'Fill Tags'); in english.php new-shop replace files
-> removed an error in the catalog_for_new_shop_only/admin/categories.php file. This was step
two of the Install_Admin.php for the admin/categories.php file. Should have been a replacement.
The person making this file instead did an Add After. (would not have affected the functionality)
-> Fixed in admin/header_tags_english.php saving the tags would add extra slashes to any apostrophes in text.
-> Reverted back to original code for line 26 of admin/header_tags_fill_tags.php discussed following this post:
http://forums.oscommerce.com/index.php?showtopic=51815&st=1640# Should be better compatible with multi-language sites.
See Update_Docs/Update_from_V_2.5.5_to_V_2.5.6.txt doc for the simple file replacement procedure.
This is a complete package.
This package contains the last correction document plus the missing install instruction plus the complet package Header Tags Controller v2.5.5 Complete dated 7 sep 2005
There is a vital instruction missing from the install instructions which should tell you to set two files with permissions CHMOD 666
catalog/includes/header_tags.php
catalog/includes/languages/english/header_tags.php
The original admin code for 2.5.5 didn't take into account systems that have the catalog in a different directory then the root. These corrections should make it right for all.
Basic: Header tag controller 2.5.5.d
Full package with french addon.
I have only add french translation (files : /catalog/admin/includes/language/french/).
You might need :
- admin fix (9 sept 2005)
- includes/header)tags.php (10 sept 2005)
It is NOT a bug for HTML 4.0x .
It is just modifiy lines 353 to 355 and 358 so that the rendered output file can also comply with XHTM 1.0 requirement. Particular install with contribution valid XHTML Catalog Side 2.x at
http://www.oscommerce.com/community/contributions,2693/category,all/search,xhtml
Header Control is a great package!!
This is a little fix to the file header_tags.php in catalog/admin/includes/functions. I had some problems with the chmod() php function so I commented that out.
-> Remove the meta tag reply-to (again). It was added back by msitake.
-> AutoInstall instructions didn't explain that a directory needed to be created. Added that instruction.
-> Added fill_tags to admin tool.
-> Fixed problem with admin->English page corrupting the english/header_tags.php file.
-> Fixed problem with admin->Text page corrupting the includes/header_tags.php file.
-> Added text to admin->Header Tags section.
-> Added popup to explain switches.
-> Removed the fill tags directory from the archive.
-> Fixed problem with page name when adding page in admin
-> When a product was displayed, its name and the title would run together. Fixed that.
-> The image for the sub categories displayed the standard text - Let's see what we have here. Change the code so that the sub category name is displayed instead.
-> Changed the sql files used for updates from previous versions to use the new database changes.
This is a complete version
Fixes/Changes:
-> Changed Categories Description field for New Products to use a
larger text area.
-> Added code to have the categorries header tags work in any language
-> Added txt file to explain Header Tags use
-> Fixed coding error in admin/header_tags_controller.php that was
causing a new page title to be set to the page name.
-> Commented out the code for including the email in the source code. Since
this is only used as a spam magnet, it is not recommended to be used.
However, if you want to use it, then just uncomment the code in
includes/header_tags.php at the bottom of the file.
-> Added files with code already installed (for admin only)
-> Update documentation.
Fixed problem with admin->Header Tag controller not adding the code correctly when a new page was added that didn't fit into the sort pattern.
This is a full version.
Support thread: http://forums.oscommerce.com/index.php?act=ST&f=7&t=51815
Just update, files forgotten
Full multilanguage
French Inserted
help Inserted
This complete package just contains two changes:
- there was an error in the Install_Catalog.txt file where it says to change the code around line 78. It said to replace the existing code with that supplied but the supplied code was not complete. This caused the page heading to not show up for that section.
- Added code to make admin->Header Tags work with other languages. There is still a problem with the categories tags not working for all languages. That will be fixed in the next update.
Added categories description option
Fixed fill tags to load for correct language
This release only contains corrections to the instruction files. I received several emails about minor errors in the wording so I decided to upload the changes here to avoid future misunderstandnigs.
I also added instructions for the code change needed for STS users to avoid a comom problem experienced when using Header Tags and STS together.
This is a full release and is the one that should be used, up to this date, for any installations.
There were some references in the files to SEO_ASSISTANT. I replaced these with the proper references.
- Added version number to lines that go in the catalog files so anyone can tell what version they have at a glance
- Added section to admin that allows adding/deleting/editing the code in the header tags files.
included revised fill_tags.php and fill_tags_keyw.php files
Complete package
Changed files moved to admin side for security reasons
Respect
Moved fill_tags.php (changed accordingly) to admin side for security reasons and for not to be abused.
Also for laizy people added fill keywords statement.
Only modified fill_tags.php file in archive!
respect
- I changed the code for Filll Tags to include auto update of the category tags.
- Added instruction file for Fill Tags.
- Fixed typing mistake in includes/functions.php.
Fill Tags file added back - Again.
Which when run will populate:
meta_title with product_name
meta_description with product_description
for all your existing products.
Keywords will still have to be done manually - so that you can target specific keywords.
Added cod efor h1 class
I inserted the old version of code in the index section of includes/header_tags.php in the previous version. This corrects that.
Added code to give more control over how the title and category on the index page are displayed. They were running together in the latest versions.
Added a function that allows for easier adding of code for new pages. The block of code for a page entry in includes/header_tags.php previously required about 15 lines. This reduces it to about a third of that.
I forgot to make the change to the includes/header_tags.php file. This full package just adds that code.
Added the code to generate category meta tags and to display the page title as the header for the categories. The category tags are added in admin when you create.edit a category.
Also fixed some instruction errors, re-worded a lot of the instructions and rearranged the files in the archive to be less confusing (hopefully).
multilanguage support for fill_tags.php
back up current file
try this file
if all right, congratulations
if not, backup
Added an install page for the mysql changes. No other changes were made for current users.
Hi - first change which I have made public so hope it is ok even though it is small.
I hve added the "robots" meta tag so that this gives better S.E.O. on some search engines. Hope people dont mind me making this change people get some use from it.
Fill Tags file added back.
Which when run will populate:
meta_title with product_name
meta_description with product_description
for all your existing products.
Keywords will still have to be done manually - so that you can target specific keywords.
There was an extra quote in one of the meta tags causing some language problems. The only thing changed in this complete package is the line in includes/header_tags.php that reads
echo ' <meta http-equiv="Content-Type" content="text/html; charset="' . CHARSET . '">'."n";
to this
echo ' <meta http-equiv="Content-Type" content="text/html; charset=' . CHARSET . '">'."n";
The only thing added to this package is an AutoInstall script. The script will make all of the necessary changes to the files in the catalog section of your shop. An external program is required but it is a free one. The link for it is in the instructions or you can contact me for a copy.
This is a complete package updating Talon177's v2.3.2 distribution. The following was changed:
-> The instructions still had the missing title; bug. Fixed.
-> Changed the order of how the title is displayed in catalog/header_tags.php.
The previous method displayed the site title before the page title which
partially defeats the purpose of the contribution.
-> Changed the instructions to remove the meta tag http-equiv from the catalog files.
-> Changed the catalog/header_tags.php file to include the meta tag http-equiv.
-> Changed the order of the tags in catalog/header_tags.php so that the title is
displayed first. This provides better results with the search engines.
-> Moved the META NAME="Reply-to" line so that it displays below the title. Note that
this tag should really just be deleted since, nowadays, it only serves to increease
the amount of spam you receive. If you do use it, be sure to encrypt your email
address. See my contribution EmailEncoder on how to do this.
Also contains optional code to add the manufacturers name.
We spend alot of time trying to get this module to work. Much frustration and we want to make life easier for you guys getting this module to work. There are two file that have minor mistakes which have been corrected and are included in this zipfile. They are specifically: README to Operate and README to Admin
P.S. You will still need to download the module but substitute these two files. Much love BROTHERS
Rewrite of the prefill instructions.
I have added a file which when run will populate:
meta_title with product_name
meta_description with product_description
for all existing products.
Keywords will still have to be done manually - so that you can target specific keywords.
This is a little update that dealt with the clean_html_comments issue.
This is an update of Oswaldo Herrera's 30 Dec 2003 - Header Tags Controller v2.2 Complete. I have took the liberty to cross refernce all contributions starting with 11 July 2002 Linda McGrath's Header Tags Controller v1.0 up to 30 Dec 2003 Oswaldo Herrera. Oswaldo has pretty much overall covered all the differences from the contributions before his with the excpetion of extra contributions within.
Fixes:
-> Removed Extra Contributions that don't belong to Header Tags Controller
-> Changed from default.php to FILENAMES_DEFAULT (David Law)
-> Added ; to the end of TITLE
-> Fixed output in admin/catagories.php "Meta Tag Information" was displaying in the wrong area.
-> Added // BoF Header Tag Controller & // EoF Header Tag Controller for easier searching
I have tested this on a fresh osCommerce v2.2 MS2, I have also used the "header.sql" file to update the database.
Please read "General README.txt" for more information.
P.S. Thanks for the great mod!
Tags |
DENNY HUGHES |
19 Mar 2004 |
|
SORRY THIS COPY INCLUDES THE HEADER.SQL
Remember!
1) BACKUP FIRST - NO RESPONIBILITY HELD
2) Run header.sql first
3) Make changes in 'README to Operate.TXT' file
This is not an update, i have simply uploded the files for Header Tags
Controller v2.0, and admin control. Now all you need to do is copy and
paste into the right folders, and upload the header.sql into your sql
admin. These files are from a new oscommerce installation, and may
effect more modded copies. So for the more modded systems please refer
to the other downloads at oscommerce.
Remember!
1) BACKUP FIRST - NO RESPONIBILITY HELD
2) Run header.sql first
3) Make changes in 'README to Operate.TXT' file
This is not an update, i have simply uploded the files for Header Tags
Controller v2.0, and admin control. Now all you need to do is copy and
paste into the right folders, and upload the header.sql into your sql
admin. These files are from a new oscommerce installation, and may
effect more modded copies. So for the more modded systems please refer
to the other downloads at oscommerce.
This is the complete pack of Header Tags Controller v2.2, I did it
because, there are some dummies who want to use it and they got
some confused by the organization of the files and the instructions.
Please, read carefully the README files
I added a title and a bar in the admin tool for a best organization
and i modified the position of the fields for every who use more
than two languages.
OK, I am not submitting a contribution - just some instructions. I was confused in what files to get, and lots of other people as well by the looks of the forum.
To get this to work properly, download both
09/25/2003 - Header Tags Admin MS 2.2
AND
09/05/2003 - Header Tags Controller v2.1
As the names imply, one controls the actual tags and the other allows admin functionality.
I also suggest following the forum thread at http://forums.oscommerce.com/index.php?showtopic=51815&st=0.
Note - I had to change the sql file to read as follows, otherwise it would not work properly
ALTER TABLE products_description ADD products_head_title_tag VARCHAR(80) NULL;
ALTER TABLE products_description ADD products_head_desc_tag LONGTEXT NULL;
ALTER TABLE products_description ADD products_head_keywords_tag LONGTEXT NULL;
This is an addition to the Header Tag Controler. The Header Tag Controler must be installed first. This contribution just adds the ability to insert your product metta tags when adding or editing a product in the admin.
Just updated the install file.
HI
Jsut updated the Install file and i have also included the files which are needed to be edited.
You can compare them with your own. Also, I have other mods installed as well. So dont miss them up.
Discuss here:
http://forums.oscommerce.com/viewtopic.php?t=51815
Update for MS2 - using index.php and not default.php as per http://forums.oscommerce.com/viewtopic.php?t=49512.
Hi
Just an update for Milestone 2.2.
Post any problems here:
http://forums.oscommerce.com/viewtopic.php?t=51911
Hi
I have just updated Richard Fielder Admin mod to be compatible with Milestone 2.2.
let me know if anyone finds any error.
Header Tags Controller allows for unique Header Tags for:
Title
Keywords
Description
on a per page basis.
This includes language support. And see Richard Fielder Admin contribution for this.
This Patch assumes you have the Header Tags Controller v1.0 already installed.
Please install this to correct some bugs that are pretty dumb and could be nasty.
Thanks!
Adds Admin Control to Linda McGarth's Header Tag Controller Contribution.
Header Tags Controller allows for unique Header Tags for:
Title
Keywords
Description
on a per page basis.
I have included a lot of examples of how to use this, and others you may want to make up on your own.
I do not have an Admin side to this for adding/editing Product Title, Keywords and Desction Tags as I need someone to help me or write it for this add-on.
Take your time using this, at first it may seem hard to translate through the IF statements if you want to customize it further, but it really is pretty straight forward.
Keep in mind, this is a first attempt for this so if you have suggestions and comments, please let me know here on this thread :)
Note: Contributions are used at own risk.