Contributions
Simple Template System (STS)
Simple Template System (STS) README.txt v1.3
-----------------------------------------------------------------------------
WHAT IT DOES:
-----------------------------------------------------------------------------
Lets you create simple HTML templates to customize the look and feel of OSC.
You simply create an HTML page that looks the way you want it to and put in
placeholders for the various elements wherever you want to position them.
For example, you would put "$cartbox" wherever on the page you want the
Shopping Cart box to appear. Put "$categorybox" where you want the Categories
box to appear. Put "$content" wherever you want the main page
content (the central part where all the magic happens) to appear, etc.
It does this by changing only a few /catalog/includes/ files, leaving all
other files untouched, making it easy to add other contributions later.
-----------------------------------------------------------------------------
BONUS FEATURES: Simple HEADER TAG CONTROLLER Integration
-----------------------------------------------------------------------------
This contribution also allows you to use WebMakers.com's
Header Tag Controller contribution without having to modify every file on
the system. Just copy the Header Tag Controller's include files into place
and STS will automatically add them to all pages without having to modify
every PHP script in the /catalog/ directory.
STS will auto-detect if Header Tag Controller is installed and use it if
available.
-----------------------------------------------------------------------------
HOW TO INSTALL:
-----------------------------------------------------------------------------
Installation Instructions are found in the readme.txt file included in the package. Please read the readme.txt file for a list of installation instructions, new features, new variables and other enhancements to STS.
-----------------------------------------------------------------------------
HOW TO USE:
-----------------------------------------------------------------------------
Just modify the
/catalog/includes/sts_template.html
file to look however you want. Use stylesheet settings or HTML setting to
provide a custom look and feel to your site and arrange elements wherever you
like them.
-----------------------------------------------------------------------------
SUPPORTED TAGS:
-----------------------------------------------------------------------------
Here are the tags that are supported so far (more sure to come in later
versions):
$headcontent: Put this string in your <head> section so that it can insert
the dynamic head content and javascript on pages that require it. This will
probably require putting the $headcontent in the <head> section in the source
code. It's a pain to do it this way, but it was the only way I could get it
working. Sorry!
<!--$headcontent--> : You can use this commented format of $headcontent to
keep the word "$headcontent" from displaying in your web authoring software.
NOTE: Do not put <title>...</title> tags in your header. It will be added
as part of the $headcontent variable, along with the Description and Keywords
meta tags if you have the WebMakers.com's Header Tag Controller contribution
installed.
$cataloglogo: The OSC logo and link
$urlcataloglogo: The URL used by the $catalog logo.
$myaccountlogo: The MyAccount graphic and link
$urlmyaccountlogo: The URL used by the My Account function
$cartlogo: The Cart graphic and link
$urlcartlogo: The URL used by the Cart function
$checkoutlogo: The Checkout graphic and link
$urlcheckoutlogo: The URL used by the Checkout function
$breadcrumbs: The "Top > Catalog > whatever..." breadcrumbs text and links
$myaccount: The text version of "My Account" and link. Changes to "Logoff" if logged on.
$urlmyaccount: The URL used by the MyAccount function.
$cartcontents: The text version of the "Cart Contents" function.
$urlcartcontents: The URL used by the MyAccount function.
$checkout: The text version of the "Check Out" function.
$urlcheckout: The URL used by the "Check Out" function.
$categorybox: The Category box
$manufacturerbox: The Manufacturer box
$whatsnewbox: The What's New box
$searchbox: The Search box
$informationbox: The Information box
$cartbox: The Shopping Cart box
$maninfobox: The Manufacturer Info box (blank if not used on a page)
$orderhistorybox: The Order History box (blank if not used on a page, ie: use not logged in)
$bestsellersbox: The Best Sellers box
$specialfriendbox: Either the Specials box or the Tell A Friend box (depending on page viewed)
$reviewsbox: The Reviews box
$languagebox: The Languages box
$currenciesbox: The Currencies box
$content: The main content of the page (the middle of the page)
$date: The current date
$numrequests: The "XXX requests Since DATE" text
$counter: The page view counter
$footer: The footer output from footer.php
$banner: The banner output from footer.php
$sid: The string for the Session ID in the format "SessionIdVarName=WhateverTheSessionIdIs"
-----------------------------------------------------------------------------
DEBUGGING:
-----------------------------------------------------------------------------
In the /catalog/includes/application_bottom.php file you can see the
following settings (near the top of the file):
$display_template_output = 1;
$display_normal_output = 0;
$display_debugging_output = 0;
Display_Template_Output (the default setting) will cause it to display the
template versions of the pages.
Display_Normal_Output will cause it to display the non-template version of
the pages.
Display_Debugging_Output will cause it to display debugging information
showing all of the blocks of data that it is using and how it translates
them into template variables.
You can use any or all of the settings in any combination. If you have both
Normal and Template output, the Template output will be displayed first.
-----------------------------------------------------------------------------
REMOTE DEBUGGING:
-----------------------------------------------------------------------------
You can toggle the debugging options via URL options. You can use the
following parameters in your URL to turn on/off options from your browser
sts_template=1 Turns on the Template display
sts_template=0 Turns off the Template display
sts_normal=1 Turns on the Normal display
sts_normal=0 Turns off the Normal display
sts_debug=1 Turns on the Debugging display
sts_debug=0 Turns off the Debugging display
sts_version=1 Turns on Version Number display
sts_version=0 Turns off Version Number display
-----------------------------------------------------------------------------
SUPPORT:
-----------------------------------------------------------------------------
For support, please post to the Simple Template System thread here:
http://forums.oscommerce.com/index.php?showtopic=58541
Expand All / Collapse All
Complete package with instructions, documentation and manual translated to spanish.
Paquete completo con instrucciones, documentación y manual traducidos al español.
INCLUYE INSTRUCCIONES EN ESPAÑOL PARA INSTALAR STS en la carpeta doc_espanol:
- Instrucciones de Instalación: archivo instalacion.html
- Documentación sobre los 4 modulos de STS en los otros archivos html
- Manual de Usuario STS en español, archivo "Manual de Usuario de STS.doc"
* Este es el mismo pack que el último disponible "STSv4.5.8 for all osC 2.2 versions" de bkellum, fecha 23 Jan 2008, pero con las instrucciones en español.
* This is the same package of the last version:
"STSv4.5.8 for all osC 2.2 versions" by bkellum, date 23 Jan 2008.
but with the instructions in spanish.
If you want the last complete package of STS with instructions in english download that version "STSv4.5.8 for all osC 2.2 versions".
(I dont put the doc folder with instructions in english in this pack for reduce the size of the file.)
Official support forum / Hilo de Soporte oficial - STSv4.5.8:
http://forums.oscommerce.com/index.php?showtopic=295660&view=findpost&p=1157217
Foro Oficial de la Comunidad de osCommerce en español / Official forum of the spanish comunity of osCommerce:
http://oscommerce.qadram.com
As of 23 Jan 2008 uploaded by bkellum. FYI!! The file posted below is a PDF file only uploaded by bkellum ...oops.
Reposted to bury the question below. This is full pacakage as posted by Bkellum on 6-13
The latest version of STS is STSv4.5.8 Dated Jan 23, 2008.
By the way, STSv4.5.8 does not have any "missing files". All the files are there that need to be there.
If you are interested in add-ons for STS, look to the STSv4 Power Pack download site located at: http://www.oscommerce.com/community/contributions,4456. The Power Pack site has new STS tags, tips, other contribution integration, etc.
This was posted so as not to confuse where to download the latest version of the Simple Template System (STS).
13-Apr-08 Raphael Logan - STSv4.5.8_1_2 fix
First of all I must say this contribution is great, I am new at this so please go easy on me.
I have spent ages trying to work out why my lovely jubbly header tags failed to show up on my pages after even reading the docs sideways in desperation.
There appears to a file which should be in
catalog/includes/modules/sts_inc/headertags.php missing from the distribution.
Just copy this file in from the zip if you are also having problems then.........
===========================================================
EDIT: your catalog/includes/modules/sts_inc/general.php file.
INSERT BEFORE: the last ?>
include_once('headertags.php');
=========================================================
ALTERNATIVELY:
Just copy the contents of the catalog/includes/modules/sts_inc/headertags.php to the END of the catalog/includes/modules/sts_inc/general.php file.
===========================================================
Thats it - I hope this helps some else.
Attached is just the missing file
Peace
Simple Template System Support Links
The moderator accidentally changed the STS Support Link so the old links no longer work. Here are the STS Support Links in this forum (dating from newest STS version to oldest):
STS version 4 and later:
STSv4.5.8:
http://forums.oscommerce.com/index.php?s=&showtopic=295660&view=findpost&p=1157217
STSv4.4:
http://forums.oscommerce.com/index.php?showtopic=295660&st=1400&p=1015616&#entry1015616
STSv4.3:
http://forums.oscommerce.com/index.php?showtopic=295660&st=960&p=963185&#entry963185
STSv4.2: http://forums.oscommerce.com/index.php?showtopic=295660&st=480&p=913548&#entry913548
STSv4.1:
http://forums.oscommerce.com/index.php?showtopic=295660&st=0
STS version 3 and earlier:
http://forums.oscommerce.com/index.php?showtopic=58541
*The support link listed in the STS User Manual for STSv4.5.8 is no longer valid. This will be updated with the above information upon the next release of STS.
Download consists of above in DOC and PDF formats.
STSv4.5.8 for osC versions 2.2MS2, RC1 and RC2.
***This STS version does not add any features from the previous STSv4.5.8 release, hence the reason for keeping the same version number.
***THIS IS A FULL PACKAGE***
I have updated and corrected some typos in the STS manual installation instructions, added the RC2 files for an easy copy over for RC2 users, and edited each STS Module configuration text.
The actual files within the contribution are structured correctly for a simple copy over for each osCommerce 2.2 release (MS2, RC1, RC2).
Download this FULL PACKAGE for the most up to date content for STSv4.5.8.
--------------------------------------
Simple Template System v4.5.8
- BUG FIXED: STSv4.5.6 introduced a bug regarding how the buffer was cleaned. STSv4.5.8 reverts back to STSv4.5.5 method of destroying the buffer to allow cascading buffers. Files modified: catalog/includes/classes/sts.php.
- Added new STS placeholder $langid to allow dynamic images according to the language selected by the user.
- Merged STSv4.5.4 and STSv4.5.5 by Rigadin into STSv4.5.8.
- Updated documents.
This is a full package.
Installation text located in the "docs" folder of this contribution. Install instructions included for MS2, RC1 and RC2 shops.
Support is given in the STSv4 Forum:
http://forums.oscommerce.com/index.php?showtopic=204381
Enjoy!
***THIS IS A FULL PACKAGE***
I have updated and corrected some typos in the STS manual installation instructions (the instructions stated to make modifications to files in the includes folder which in fact it meant to point to files in the admin folder). The actual files within the contribution are structured correctly for a simple copy over.
***ONLY the manual instructions were incorrect and with this contribution have been corrected.
Download this FULL PACKAGE for the most up to date content for STSv4.5.8.
--------------------------------------
Simple Template System v4.5.8
- BUG FIXED: STSv4.5.6 introduced a bug regarding how the buffer was cleaned. STSv4.5.8 reverts back to STSv4.5.5 method of destroying the buffer to allow cascading buffers. Files modified: catalog/includes/classes/sts.php.
- Added new STS placeholder $langid to allow dynamic images according to the language selected by the user.
- Merged STSv4.5.4 and STSv4.5.5 by Rigadin into STSv4.5.8.
- Updated documents.
This is a full package.
Installation text located in the "docs" folder of this contribution. Install instructions included for MS2 & RC1 shops.
Support is given in the STSv4 Forum:
http://forums.oscommerce.com/index.php?showtopic=204381
Enjoy!
I have updated and corrected some typos in the STS User Manuel.
Download this FULL PACKAGE for the most up to date content for STSv4.5.8.
--------------------------------------
Simple Template System v4.5.8
- BUG FIXED: STSv4.5.6 introduced a bug regarding how the buffer was cleaned. STSv4.5.8 reverts back to STSv4.5.5 method of destroying the buffer to allow cascading buffers. Files modified: catalog/includes/classes/sts.php.
- Added new STS placeholder $langid to allow dynamic images according to the language selected by the user.
- Merged STSv4.5.4 and STSv4.5.5 by Rigadin into STSv4.5.8.
- Updated documents.
This is a full package.
Installation text located in the "docs" folder of this contribution. Install instructions included for MS2 & RC1 shops.
Support is given in the STSv4 Forum:
http://forums.oscommerce.com/index.php?showtopic=204381
Enjoy!
Simple Template System v4.5.8
- BUG FIXED: STSv4.5.6 introduced a bug regarding how the buffer was cleaned. STSv4.5.8 reverts back to STSv4.5.5 method of destroying the buffer to allow cascading buffers. Files modified: catalog/includes/classes/sts.php.
- Added new STS placeholder $langid to allow dynamic images according to the language selected by the user.
- Merged STSv4.5.4 and STSv4.5.5 by Rigadin into STSv4.5.8.
- Updated documents.
This is a full package.
Installation text located in the "docs" folder of this contribution. Install instructions included for MS2 & RC1 shops.
Support is given in the STSv4 Forum:
http://forums.oscommerce.com/index.php?showtopic=204381
Enjoy!
Complete package with all recent updates;
STS 4.5.4 Full version + STS 4.5 SP5 + STS 4.5.6
No other changes.
Changelog updated.
Replaced ob_end_clean() with ob_clean() so it is now properly using output buffering with appropriate performance.
french translation for sts 4.5.5
Service pack 5 for STS v4.5
BUG fixed where some infoboxes were making mess in the whole template.
BUG fixed (includes/classes/sts.php): changes that should have been made in v4.5.4 for error and info messages where in fact not made, so now they are.
Not a full package, contains only files to copy over STS v4.5.2, v4.5.3 or v4.5.4
Full version with files for osCommerce 2.2MS2 and 2.2RC1
Bug fix: error messages and info messages sent via URL where never displayed. 2 files modified (see changelog).
Sorry Everyone. It has been discovered that several of the sample templates still had some of the bad code inserted by a HTML editor. THIS HAS BEEN CORRECTED!
If you see this, "" in your pages, then you are using some of the old infected templates.
***Download this version. I fixed some bad links in the sample templates. Sorry for not picking this up before hand.
--------------------------------------------------
This new STS v4.5.3 has been created for "osCommerce Online Merchant v2.2 RC1" which was released on July 3, 2007.
You must have the Online Merchant v2.2 RC1 in order to use this version of STS. This version has the same features as STSv4.5.2. Templates from older versions of STS will continue to function in this version.
If you are using an osCommerce version older than the July 3, 2007 Online Merchant RC1 release, then you do not need this contribution.
*All manual edits are the same but the actual files have been updated so as not to remove the newer bug fixes within the osC Online Merchant RC1 release.
Support Forum remains at:
http://forums.oscommerce.com/index.php?s=&showtopic=204381&view=findpost&p=1058282
Full Package with Install Text and STS User Manual.
Enjoy,
Bill Kellum
Sounds Good Productions
***Download this version. I fixed some bad links in the sample templates. Sorry for not picking this up before hand.
--------------------------------------------------
This new STS v4.5.3 has been created for "osCommerce Online Merchant v2.2 RC1" which was released on July 3, 2007.
You must have the Online Merchant v2.2 RC1 in order to use this version of STS. This version has the same features as STSv4.5.2. Templates from older versions of STS will continue to function in this version.
If you are using an osCommerce version older than the July 3, 2007 Online Merchant RC1 release, then you do not need this contribution.
*All manual edits are the same but the actual files have been updated so as not to remove the newer bug fixes within the osC Online Merchant RC1 release.
Support Forum remains at:
http://forums.oscommerce.com/index.php?s=&showtopic=204381&view=findpost&p=1058282
Full Package with Install Text and STS User Manual.
Enjoy,
Bill Kellum
Sounds Good Productions
This new STS v4.5.3 has been created for "osCommerce Online Merchant v2.2 RC1" which was released on July 3, 2007.
You must have the Online Merchant v2.2 RC1 in order to use this version of STS. This version has the same features as STSv4.5.2. Templates from older versions of STS will continue to function in this version.
If you are using an osCommerce version older than the July 3, 2007 Online Merchange release, then you do not need this contribution.
*All manual edits are the same but the actual files have been updated so as not to remove the newer bug fixes within the osC Online Merchant release.
Support Forum remains at:
http://forums.oscommerce.com/index.php?s=&showtopic=204381&view=findpost&p=1058282
Full Package with Install Text and STS User Manual.
Enjoy,
Bill Kellum
Sounds Good Productions
This is a dutch language package for STSv4.5
Full STS v4.5 package with SP1 and SP2 added.
Just a simple hack that allows you to be able to place the quick find search box where ever you want it with an STS Tag or by adding top_search.php in the admin section to the Product info Module (or which ever, where ever) just like the current $search tag. Only I have removed the infobox header and the extra text (Use keywords to find the product you are looking for. and Advanced Search) from it so it is cleaner and more versatile.
Also included is another small optional hack to the search query which will make the quick find search your product's attributes as well as the normal quick find search.
Screen shots included so you can see before you commit.
Hope someone finds this useful!
Gary
This is SP2 for v4.5, it includes SP1 as well as 2 modifications for infobox templates:
- Optional header template will not give error anymore if not existing.
- BUG corrected where header was displaying the content of the previous box.
Not a full package, install STS v4.5 then apply this service pack (3 files)
2 files to copy over your STS 4.5 installation to solve a problem with infoboxes display when using infoboxes templates.
Not a full package, only 2 files to update.
- BUG FIXED: object not existing error when trying to display a message below header. (application_top.php)
- CHANGED footer.php to capture content in case it was not done in column_right.php. This is useful if you have removed the calls of column_right.php in all your catalog files, you don't need to put them back for STS to work.
- BUG FIXED where $productdatelabel was not displaying the date correctly. (general.php).
- ADDED possibility for modules to display their own debug information, below the main debug part. (sts_display_output.php)
- BUG FIXED where $cartcontents was not using SSL. (general.php)
- ADDED method array_capture in class sts to merge an array in format array[placeholder name]=> 'value' with $sts->template array. Only for developers who know what they are doing.
- MODIFIED class sts to not call the function sts_strip_unwanted_tags when infoboxes templates are used. It was causing problems with templates without tables as well as with other contributions that modify the infoboxes (like Dynamenu).
In sts_default.php module (v2.1.1):
- BUG FIXED in module sts_default.php where the default template was used for all pages, even if a template with specific name was existing.
- ADDED possibility to use a content template without creating a specific module, by modifying module sts_default.php. This is useful when creating new pages. See chapter 3.11 of the user's manual for details.
In sts_product_info.php module (v2.1.0)
- BUG FIXED in module sts_product_info.php where the end char logic for the content template was using the constant from the main template.
- ADDED print of debug informations in module sts_product_info.php . Informations displayed are: content template used and list of placeholders.
Full package tested with SSL and GZip compression
Some new features in STS!
- NEW: template for popup_image.php
- NEW: infobox template for the frame around the product listing (option).
- NEW: choose the templates folder from admin, not fixed anymore to includes/sts_templates
- NEW: place images and buttons in your template folder, they will be used instead of the default images and buttons. Thanks to Arnoldl for this one.
Full package with user manual, install and upgrade instructions.
STS version 4.3.3 User Manual
Download 2 of 2 (You will still need to download the core files below for STS v4.3.3- “STS v4.3.3 Core Files”)
I like to create a detailed manual that makes things easy for everyone to understand but unfortunately that makes for a large file.
Because of the 300k file upload limit, I had to split the User Manual from the core files of STS v4.3.3.
This file is the User Manual and STS History documents ONLY for STS v4.3.3 December 28, 2006.
Enjoy,
Bill Kellum
STS version 4.3.3 Core Files
Download 1 of 2 (You will still need to download the User Manual above- STS v4.3.3 User Manual)
A User-Friendly Version of the Simple Template System (STS)
Welcome to the easiest template system to date for the osCommerce solution. STS has recently been ranked 4th among contribution downloads for osCommerce, passing BTS and HTC (Basic Template System and Header Tags Controller).
This update includes STS version 4.3 (Nov 2, 2006) and each of the last 3 Service Packs integrated into one seamless install. We can all thank Chris (Rigadin2) for these fine updates! I have only taken these updates and bundled them into one seamless install package, along with easy to understand updated documentation and additional templates for your convenience.
STS v4.3.3 is an official release of the Simple Template System.
Why this new version 4.3.3?
STS 4.3 has had three major Service Packs and a few bug fixes since its release back in November 2, 2006. Without this update, in order to install a stable STS v4.3, new users would have to download four different files as well as make some additional changes to a few of the PHP files in their store. With version 4.3.3, installation is as simple as downloading this complete package and following the instructions toward one seamless installation. Instructions for manual installation are still available for those who have a heavily modified store.
The support forum will continue to be located at the STSv4 forum that can be found here: http://forums.oscommerce.com/index.php?s=&showtopic=204381&view=findpost&p=913548
If you have kept up with all of the fixes mentioned in the support forum as well as the patches and Service Packs uploaded onto the contribution site, then you already have version 4.3.3, without the updated documentation and additional templates of course.
Main advantages of this version:
- Includes all of the Service Packs below (1-3)
- Includes updated documentation to go along with the file updates
- Includes STS version 4.3
- Includes the osCommerce update 060817 patch for those who may have problems getting STS to work on the admin side.
- This is a full package except for the User Manual that can be downloaded above “STS v4.3.3 User Manual”
Enjoy,
Bill Kellum
This service pack includes 3 files to update in order to make GZip compression working with STS.
Package includes also SP1 and SP2 but is not a full revision.
This is again the service pack 2 for STS 4.3, as the previous one posted by myself contained too many files in the include folder.
This package contains now only the files modified in SP1 and SP2, and is to apply on STS v4.3 or STS v4.3SP1, this is not a complete package!
The instructions provided will guide you through the installation of the Simple Template System version 4.3.2 integrated with the Header Tags Controller version 2.6.0 osCommerce contributions as if they were one contribution. If you follow each step, you should not run into any problems getting this contribution installed on your osCommerce store.
Three PDF documents included:
STS History
STS Installation
STS User Manual
***This contribution is the documentation only.
***You will need to download STSv4.3.2 with Header Tags Controller v2.6.0 Bundle below.
Sorry, I had to split these up because of the file size upload limit.
Have fun, Bill Kellum
STS v4.3.2 with Header Tags Controller 2.6.0
This is a complete package of these two contributions bundled together in one seamless installation. It includes both Service Pack 1 & 2 so this is the most up to date version of STS, just bundled with HTCv2.6.0.
Because of the file size, the documentation is included in a separate contribution above (download the STSv4.3.2 with HTCv2.6.0 DOCUMENTS contribution).
The installation path will be determined by whether you are installing over a clean osCommerce store or one that has been modified with other contributions.
Basically, you will be doing the following to complete the installation:
1. Copy files from the contribution over your store’s files
2. If necessary, you may have to modify some of your stores current files (only if you have a modified osCommerce).
3. Install the database files (using the enclosed script)
4. Configure your store in the osCommerce admin panel.
The code for the specific STS and HTC files are exactly the same as their counterpart contributions so support is provided in the following forums:
The support forum for STS v4.3.2 will continue to be located at the following:
http://forums.oscommerce.com/index.php?s=&showtopic=204381&view=findpost&p=980823
The support forum for HTC v2.6.0 is located at the following:
http://forums.oscommerce.com/index.php?s=&showtopic=51815&view=findpost&p=977681
Have fun everyone, Bill Kellum
No changes added.
I was having a problem installing "v4.3 SP2 again" since there were a few files missing from the archive. I have included all of the files needed for a complete install.
Forget the previous SP2, it contains SP1 files! Take this one instead.
This service pack includes only the files to copy over STS v4.3
If you are using STS v4.3SP1, read the txt file to see the 2 files you need to replace.
In this service pack:
- Bug corrected in boxes class where double headers were appearing.
- Removed osC version check in sts class.
This is the same fix that I posted earlier except that I included the modified files for easy installation. Full documentation is included in this contribution.
If you are experiencing problems getting the STS module to activate in the admin and you are using osCommerce update 060817, use this patch to get it working.
Also:
The official support forum for STSv4.2 can be found at:
http://forums.oscommerce.com/index.php?s=&showtopic=204381&view=findpost&p=913548
Please use this forum to post all related topics to STSv4.
Thanks, Bill Kellum
This service pack contains only some files to replace the existing ones:
BUG solved where the shopping cart page was displaying the "Empty cart" message inside an infobox with header from the Reviews infobox. Problem only when using infobox templates. Solution: update the boxes.php class and create an infobox template only for the shopping cart page. Example of template included.
BUG corrected for product content template: the product ID tag was not created correctly.
The instructions provided will guide you through the installation of the Simple Template System version 4.3 integrated with the Header Tags Controller version 2.5.9 osCommerce contributions as if they were one contribution. If you follow each step, you should not run into any problems getting this contribution installed on your osCommerce store.
Three PDF documents included:
STS History
STS Installation
STS User Manual
***This contribution is the documentation only.
***You will need to download STSv4.3 with Header Tags Controller v2.5.9 Bundle below.
Sorry, I had to split these up because of the file size upload limit.
Have fun, Bill Kellum
STS v4.3 with Header Tags Controller 2.5.9
This is a complete package of these two contributions bundled together in one seamless installation.
Because of the file size, the documentation is included in a separate contribution above (download the STSv4.3 with HTC DOCUMENTS contribution).
The installation path will be determined by whether you are installing over a clean osCommerce store or one that has been modified with other contributions.
Basically, you will be doing the following to complete the installation:
1. Copy files from the contribution over your store’s files
2. If necessary, you may have to modify some of your stores current files (only if you have a modified osCommerce).
3. Install the database files (using the enclosed script)
4. Configure your store in the osCommerce admin panel.
The code for the specific STS and HTC files are exactly the same as their counterpart contributions so support is provided in the following forums:
The support forum for STS v4.3 will continue to be located at the following:
http://forums.oscommerce.com/index.php?s=&showtopic=204381&view=findpost&p=915564
The support forum for HTC v2.5.9 is located at the following:
http://forums.oscommerce.com/index.php?act=ST&f=7&t=51815
Have fun everyone, Bill Kellum
Infoboxes templates:
- Now included in the release, no need to download a separate package.
- BUG FIXED: Default infobox template was used around product listing, not really nice looking.
- BUG FIXED: Error message when STS was disabled but not infoboxes templates.
- CHANGED: boxes class now allows using one template for the whole box, instead of 2 (header + content). Still works with 2 templates.
- ADDED: cache for the default templates. No need to read them from file for each box.
- REMOVED module sts_infobox.php from catalog/includes/modules/sts. It was used only to know if infobox templates are enabled.
- CHANGED default module to include the infobox template enable/disable parameter.
- REMOVED the 'mobile' template. Was not sure of the copyrights for it.
In general.php:
- Several changes in the tags construction: 1 corrected, 4 modified for better languages support, 2 added, 4 removed because built twice under different names.
Class sts.php:
- CHANGED: sts_restart_capture and sts_stop_capture methods now return the content of the buffer to the calling function. This can be useful when creating tags for content templates.
Cosmetic or invisible things:
- Tags previously created in sts_footer.php moved to general.php
- sts_footer.php removed from the package.
- Call of sts_display_output.php is now in application_bottom.php
This is a full package with install and upgrade instructions.
If you upgrade from a previous version of STS, read well the installation document as some tags have changed or been removed!
If you are experiencing problems getting the STS module to activate in the admin and you are using osCommerce update 060817, use this patch to get it working.
Also:
The official support forum for STSv4.2 can be found at:
http://forums.oscommerce.com/index.php?s=&showtopic=204381&view=findpost&p=913548
Please use this forum to post all related topics to STSv4.2.
Thanks, Bill Kellum
This sts_template.html file makes your STS site look like a standard oscommerce site. This is useful if you just want to use the "STS v4.2 with Header Tags Controller 2.5.9" package as a simpler way of getting Header Tags Controller installed, and otherwise want a "normal" looking site to start building from. This is all I wanted STS for, at least at first, since Bill's done such a great job of bundling the two.
The sts_template.html which ships with "STS v4.2 with Header Tags Controller 2.5.9" is, well, ugly; it has some silly HTML in it as well, apparently generated by a GUI HTMl editor of some sort (note the rowspan, for instance, and all the font tags overriding the css...) -- not a good place to start from when making your own template. I nearly de-installed STS after seeing what I was going to have to clean up; this file is the result of that cleanup. This one looks better, uses the css, and is also much easier to start with if you prefer hand-editing HTML.
It's my own humble opinion that this file, or something like it, should be the standard sts_template.html shipped with STS. From what I've seen so far, STS is otherwise a fine package, well-written, with great documentation. Don't let the initial appearance of STS chase you away; try this file instead.
This is yet another great contribution that adds features to the Simple Template System.
Grigory Kopanev has done a great job with this. I only modified it so that it would work well with STS v4.2 and rewrote the documentation. I also modified the templates included in this contribution to make it easier to get started using your own “custom” templates.
You should find using this contribution is very straight forward and very easy to understand.
Only two osCommerce files modified: stylesheet.css and includes/boxes.php. Both files are fully commented to allow for easy integration into existing modified stores.
This is a STS Add-on contribution. You must have STS version 4.1 or 4.2 already installed.
This contribution will work with Header Tags Controller.
User Manual Included.
Enjoy, Bill Kellum
STS v4.2 with Header Tags Controller 2.5.9
This is a complete package of these two contributions bundled together in one seamless installation.
I feel that STS v4.2 and Header Tags Controller v2.5.9 should be a part of any osCommerce store. However, getting them both to work together can be quite a hurdle. This contribution provides a user friendly method of getting both of these contributions installed and working on your store.
The instructions provided will guide you through the installation of the Simple Template System version 4.2 integrated with the Header Tags Controller version 2.5.9 osCommerce contributions as if they were one contribution. If you follow each step, you should not run into any problems getting this contribution installed on your osCommerce store.
The installation path will be determined by whether you are installing over a clean osCommerce store or one that has been modified with other contributions.
Basically, you will be doing the following to complete the installation:
1. Copy files from the contribution over your store’s files
2. If necessary, you may have to modify some of your stores current files (only if you have a modified osCommerce).
3. Install the database files (using the enclosed script)
4. Configure your store in the osCommerce admin panel.
The code for the specific STS and HTC files are exactly the same as their counterpart contributions so support is provided in the following forums:
The support forum for STS v4.2 will continue to be located at the following:
http://forums.oscommerce.com/index.php?s=&showtopic=204381&view=findpost&p=915564
The support forum for HTC v2.5.9 is located at the following:
http://forums.oscommerce.com/index.php?act=ST&f=7&t=51815
Have fun everyone, Bill Kellum
A User-Friendly Version of the Simple Template System (STS)
Welcome to the easiest template system to date for the osCommerce solution. STS has recently been ranked 5th among contribution downloads for osCommerce, passing BTS (Basic Template System).
The Simple Template System (STS) has seen a lot of great changes over the years, changes for the better and has drawn a huge fan base. I hope that this version will continue that trend as well as bring in the novice who may have considered previous STS versions “too taunting”.
This update includes the "Footer” patch, as well as the "Product info module v1.0.6" and “Index module v1.0.3” updates, integrated into one seamless install. We can all thank Chris (Rigadin2) for these fine updates! I have only taken these updates and bundled them into one seamless install package, along with easy to understand documentation and additional templates for your convenience.
With the author's blessing, STS v4.2 is an official release of the Simple Template System.
Why this new version 4.2?
STS 4.1 has seen three major changes and a few bug fixes since its release back in April 2006. Without this update, in order to install a stable STS v4.1, new users would have to download four different files as well as make some additional changes to a few of the PHP files in their store. With version 4.2, installation is as simple as downloading this complete package and following the instructions toward one seamless installation. Instructions for manual installation are still available for those who have a heavily modified store.
The support forum will continue to be located at the STSv4 forum that can be found here: http://forums.osCommerce.com/index.php?showtopic=204381
If you have kept up with all of the fixes mentioned in the support forum as well as the patches and new modules uploaded onto the contribution site, then you already have version 4.2, without the updated documentation and additional templates of course.
Main advantages of this version:
-Integrated all bug fixes and updates to this fine contribution into one seamless package.
-Updated the install text as well as the contribution’s documentation to make the installation and use of STS 4 more user-friendly.
-Added a new “blank” template with all of the required code for ease of use to create your own STS v4.2 templates from scratch.
-Added install instructions for the “Infobox Templates for STS” contribution as an STS4.2 add-on.
STS 4.2, differences with STS 4.1:
-Updated “includes/modules/sts/sts_index.php” (Rigadin2, May 8, 2006, Index module v1.0.3 for STS4)
-Updated “includes/sts/sts_product_info.php (Rigadin2, June 5, 2006, Product info module v1.0.6)
-Updated “includes/footer.php” (Rigadin2, July 25, 2006 “Footer Patch”)
-Updated “sts_templates” folder from both the “clean_osc” and “upload” folders (cleaned up discrepancies and remains from STS PLUS)
-Bug fix: “index.php_0.html” template for main page will now work as designed.
-Added: A new module parameter to set in admin.
You now have the choice to set STS to look for templates of parent categories.
-Bug fix: The “sts_product_info.php” module does not call the function sts_strip_content_tags anymore when using a content template, because there is nothing to take away from your content template.
Enjoy,
Bill Kellum
With this additional module you can use custom infobox templates in STS v4.1.
Infobox templates, like other STS templates, contents only plain HTML code, without PHP includes. You can edit them in visual HTML editors, like Dreamweaver etc.
It is possible to create templates for individual infoboxes.
P.S. I hope, that the module will be checked up by STS developers and will include it in the next version.
With this additional module you can use custom infobox templates in STS v4.1.
Infobox templates, like other STS templates, contents only plain HTML code, without PHP includes. You can edit them in visual HTML editors, like Dreamweaver etc.
It is possible to create templates for individual infoboxes.
P.S. I hope, that the module will be checked up by STS developers and will include it in the next version.
With this additional module you can use custom infobox templates in STS v4.1.
Infobox templates, like other STS templates, contents only plain HTML code, without PHP includes. You can edit them in visual HTML editors, like Dreamweaver etc.
It is possible to create templates for individual infoboxes.
P.S. I hope, that the module will be checked up by STS developers and will include it in the next version.
Very small update to the Product info module.
The call of the function sts_strip_content_tag has been removed from the content template processing. This was not needed and gave me once a problem.
Not a full version, only the module.
Changes:
- BUG CORRECTED: index.php_0.html template for main page was not working.
- ADDED: new module parameter to set in admin.
=> You now have the choice to look or not for templates of parent categories, if there is no template for the current category.
small typo in sts.php class on line 87 :/
replace
$this->template_folder = $sts_template_folder[0];
with
$this->template_folder = $template_folder_installed[$sts_template_folder];
or download this zip file (only one file...)
http://forums.oscommerce.com/index.php?showtopic=204381
new sts.php class, sts_default.php module, headertags.php module and an instruction for style-depending-buttons ;)
great contrib! only modified files!
see http://forums.oscommerce.com/index.php?showtopic=204381
This is a major release of this excellent contribution, the code has been changed quite much from STS v2 or v3 and requires that you first uninstall your previous version
before installing this one.
The main advantages of this release are:
- Less code and several improvements, so should be faster..
- All templates are in their own folder, selection of folder is made in admin. Folder choice can be overwritten from URL for testing purposes.
- Use of modules for code specific to some pages (product_info.php for example), parameters accessible from admin (like shipping, payment or order total modules).
- Write own module for checkout, create account or else: easy to share like payment modules.
- Switch STS on/off from admin. When off, you will see your store like it was before STS installation.
- Debug mode still available from URL, but with a code defined by admin => works like a password.
- If STS is off, using debug mode from URL will turn it on only for you. Useful for testing without disturbing visitors.
- Ready for product page caching. Not implemented yet, but doors are open.
- Possibility to avoid sorting a big array (speed optimization), by adding a special char at the end of the placeholders, for example "$languages" becomes "$languages#". (Can be different on each template).
- Installation is still very easy, modifications only at beginning and end of some files.
- Possibility to have a template for header/columns/footer like always + a template for the content area. Useful with product_info: main template comes from the category where the product is, while the content itself is defined according to the product_info template.
- All boxes are now also available separately, no need to show specials if you want to show tell a friend box, no need to show best sellers if you want to show product notifications.
- Boxes that should not appear on certain pages will have an empty tag => customer won't see the placeholder name (try, in v2.x, $banner without having banner or $languages in checkout process page, you'll see what I mean.
- Possibility to write php script in the templates, like in STS v3.
- Compatible with templates made for STS v2 or v3
- Compatible with templates made for STS PLUS (STS v4.1 is based on STS PLUS 4.0.7).
STS v4.1 is based on STS PLUS v4.0.7. STS PLUS itself is based on STS v3 but with so many changes in the code that I released it as a separate contribution.
Now, after positive feedback from the community and the blessing from the original author, Brian (great contribution, thanks Brian!), the code is back to where it belongs: STS.
Changelog from STS PLUS v4.0.7:
- UPDATED class sts.php: renewed some parts of the code. Include template file from within the sts class instead of from a separate function, so the template can use $this-> to access methods and variables from the sts class. Added function add_debug ($text, $br=true) that add text to the $sts->template['debug'] with a line break by default, it helps when you want to debug your store.
- DELETED sts_column_right.php as its 1 line code can be put directly in column_left.php
- UPDATED sts_footer.php: no need to record the variable columnright2footer as it does not contain any usable information. sts_display_output is now called from here.
- UPDATED examples in sts_user_code.php.
- UPDATED sts_display_output.php: do not display the template variable 'template_html' in debug mode because it makes the page very long and it only represents the source code of the page => you can look at the source code instead.
- UPDATED module sts_product_info.php v1.0.5 to use templates for products in a specific categories. Template product_info_c32 for products in category ID32 and in sub-categories. Works also for content templates.
- UPDATED sts_column_left.php to not show the reviews infobox when on the product_reviews_info.php page. The infobox and the page are using same variable names and it put mess when the infobox is called before the content of the page. This is a simple workaround. If you want the infobox to display all the time, you have to change the variable names inside the infobox (or inside the script of the page). I have not tested without STS, but I'm pretty sure that the problem is same, if the reviews infobox is placed in the left column.
I have created a new support thread for STS4, please post only problems related to STS v4, not to previous versions:
http://forums.oscommerce.com/index.php?showtopic=204381
Enjoy!
Rigadin
in /catalog/includes/sts_templates/mysite/product_info.php.html
line 48
change:
('http://sts.diamondsea.com/sts3/popup_image.php?pID=$productsid')
for:
('http://Your_URL/catalog/popup_image.php?pID=$productsid')
I found that using the sts variable $headcontent brings in the default js function with the same name as
my js popup function so mine was overridden and it caused the browser to resize to the same size as the
popup window.
I fixed it by renaming my function in this version.
I couldn't get the click to enlarge popups to work as described in the earlier popups contribs on STS v3 beta 2
I have implemented popups differently and it seems more straightforward.
Hope it's useful to someone
Maybe this is too obvious or there's a better way of doing it. Still I thought I'd share what seems like a simple solution to adding static content through the template system.
The only changes are additions to sts_user_code and creating your static code as files in the modules folder.
The limitation is you can only call one static area per page.
I tried STS 3.00, and STS 2.01 om OSC MS2 and couldn`t get it work anyhow. Could anybody explain what is the problem with this contribution. It seams so simple, but no way to make it work.
>> DO NOT DOWNLOAD THE FILE
Makes SEO Metatags v.1.2 contribution work with STS 2.01
The updates are not friendly towards register_globals and possible php5 incompatabality.
don't download fie.
New: Manufacturer templates (and manufacturer bugfix from old versions)
CHANGELOG.txt from v3.00 Beta 1
CHG: Change samples and live code in sts_user_code to use the defined $sts_block_name variable when assigning values to $template[]
CHG: Detect and user Manufacturer templates when searching by manufacturer. Uses index.php_mfr.html for the default manufacturer template, or index.php_mfr_##.html (replace ## with manufacturer id) for per-manufacturer templates
CHG: Added $templatepath / $templatedir variables for scripting directory location of template files in templates
CHG: Modified .../sts_templates/osc/ templates to use $templatepath variables in templates to specify .js and .css files
ADD: Created copy of .../sts_templates/osc/ in .../sts_templates/mysite/ for a play area, preserving /osc/ for testing
CHG: Modify defaults in configure-SAMPLE.php to use "mysite" template directory
CHG: Quick Install summary in README.txt
ADD: sts_functions.php file for some extra routines that will be used later
This is a beta release of STS 3.00 per request.
CHANGELOG.txt:
v3.00
ADD: Dynamic templating abilities with Inline PHP Code in template files
CHG: Change template structure so all templates are encapsulated within their own directory under /includes/sts_templates/{TEMPLATE}
ADD: New DEFINE in configure.php STS_TEMPLATE_DIR to control the directory to take the template from
ADD: Ability to completely turn off STS processing with $no_sts=1 in /includes/application_top.php or as parameter ?no_sts=1
CHG: Move stock osC javascript functions to external file in /includes/sts_templates/{TEMPLATE}/sts_osc_javascript.js
CHG: Only looks up $url_* and $urlcat_* variables if present in the template file
CHG: Recommend not using $url_* and $urlcat_* variables. Recommend instead just using a direct link to the category with an $sid (ie: /index.php?cPath=10&$sid)
ADD: variable $sysmsgs to contain various osCommerce system error messages (ie: bad perms on configuration.php, etc)
ADD: Category and sub-category-based templates. (ie: if cPath=3_10, it will use the first template found of: index.php_3_10.html, index.php_10.html, index.php_3.html, index.php.html and sts_template.html) This allows per-category templates, as well as sub-category templates (categories below the templated one)
ADD: Per-Product and Product-Category-based templates (ie: if cPath=3_10 and ProductID=12, it will use the first template found of: product_info.php_12.html, product_info.php_c3_10.html, product_info.php_c10.html, product_info.php_c3.html, product_info.php.html, sts_template.html). Note that the Per-Product templates for each category and subcategory have a "c" in front of them to distinguish them from the productID-based templates.
ADD: $regularpricestrike variable for product_info.php.html which contains "<s>$regularprice</s>" if a specialprice is set
ADD: Setting debugging info will show the template files being checked for and the one selected
README.txt:
The readme file has not yet been updated to reflect 3.00 changes
** *do not download this package ***
Please, could anyone upload a fully update working STS files? I'm a rookie and I got lost with so many fixes and files.
I think it would be useful to compile a fully updated STS.
Regardes
This is code that worked for me and also builds on the May 19th 2005 code from Stot. (Thanks Stot)
***Special thanks to the STS Man himself Brian Gallagher for his help with this, Couldn't have done it without him. He asked that I post this update here. So here it is.
I modifed the code that checks for category and subcategory specific templates. If you have a template for a main category, but not a sub category, (ie: cPath=1 vs. cPath=1_10), the default template is displayed. This code will first check for the subcategory, then the main category. So in my example, if index.php_1_10.html does not exist, it will check for index.php_1.html
in sts_display_output.php:
Replace:
// Look for category-specific template file like "index.php_1_17.html"
$sts_check_file = STS_TEMPLATE_DIR . "index.php_$sts_cpath.html";
//echo "$sts_check_file<BR>";
if (file_exists($sts_check_file)) {
// Use it
$sts_template_file = $sts_check_file;
}
With:
while ($sts_cpath != "")
{
// Look for category-subcategory-specific template file like "index.php_1_17.html"
$sts_check_file = STS_TEMPLATE_DIR . "index.php_$sts_cpath.html";
//echo "$sts_check_file<BR>";
if (file_exists($sts_check_file)) {
// Use it
$sts_template_file = $sts_check_file;
break;
}
$sts_cpath = substr($sts_cpath, 0, (strrpos($sts_cpath, "_")));
}
Again I couldnt find a fix to this so if its covered please excuse.
This will allow you to add a $masterproducts tag to yout product_info.php.html template to display the slaves for your masters and the pulldown for your non masters.
Stot
I searched everywhere for a solution to this and never really found one so if this is already covered apologies for posting.
This small mod will add the Click to Enlarge function when using the product_info.php.html template.
Stot
STS has problems creating correct $urlcat variables when using SEF Urls or Chemo's Ultimate SEO Urls. The problem arises when you jump to a sub-category page. From there all the $urlcat links get messed up. I have no idea why this happens, but this fix is a rather crude solution to the problem. It seems to do the trick for my store. This code checks the $cPath var and if it sees that you are in a sub-category, it fixes the STS variables that are created so they are correct.
ITNetwork Designs
IceTheNet.com
Contribution:
The big problem finally solved I have seen many posts regarding using header tags with sts.
This is the big fix.
For those of you having troubles using STS with Dynamic Information Pages contrib (http://www.oscommerce.com/community/contributions,1686)
The easy way I found to fix this problem is to make this function like the product_info.php page.
This is an addon to STS to work with Categories Menu Addon found here:
http://www.oscommerce.com/community/contributions,2844
OPEN sts_user_code.php:
FIND: $template['catmenu'] = $sts_block['catmenu'];
ADD AFTER:
$sts_block_name = 'dhtmlmenu';
require(STS_START_CAPTURE);
echo '<script language="JavaScript" src="external/jscookmenu/jscookmenu.js"></script>';
echo '<link rel="stylesheet" href="external/jscookmenu/themeie/theme.css" type="text/css">';
echo '<script language="javascript" src="external/jscookmenu/themeie/theme.js"></script>';
echo '<script language="JavaScript" type="text/javascript">' . "n";
echo '<!--' . "n";
echo ' cmDraw('mainmenu', menuID, 'vbr', cmThemeIE, 'themeie');' . "n";
echo ' //-->' . "n";
echo '</script>' . "n";
require(STS_STOP_CAPTURE);
$template['dhtmlmenu'] = $sts_block['dhtmlmenu'];
Let me know if there are any problems
*I posted this in the wrong section, but it also had a bug, it's fixed now.*
This addon is ONLY for people who want this feature. It was done using STS version 2.01
File just contains the information below. It's a rar file disguised as a zip file.
What it does
============
Basically it will use generic templates that you want to use for a category and all it's subcategories it.
Example: cPath=1_11_21_31
First it will check if there's a file called: "index.php_1_11_21_31.html"
If there isn't then it'll check for:
""index.php_1_11_21.html"
and so on.
So if you just want 1 generic template for category "1" and all it's subcategories you would just create a index.php_1.html file. All subcateroies of this category will load this template (unless there are templates for the subcategories)
If you want a generic template for 1_11 you'd create a index.php_1_11.html file, and so on.
Simple install:
OPEN
/includes/sts_display_output.php
FIND: (around line 108)
if (file_exists($sts_check_file)) {
// Use it
$sts_template_file = $sts_check_file;
}
ADD AFTER
// Check to see if there are universal templates for parent categories
else {
// get all subcategories and parent category
$sts_all_cats = explode("_", $sts_cpath);
$num_all_cats = count($sts_all_cats);
// Load nearest parent category to the child
for ($i=1; $i<$num_all_cats; $i++) {
array_pop($sts_all_cats);
$sts_cpath = implode("_", $sts_all_cats);
$sts_check_file = STS_TEMPLATE_DIR . "index.php_$sts_cpath.html";
if (file_exists($sts_check_file)) {
// Use it
$sts_template_file = $sts_check_file;
$i=$num_all_cats;
}
}
}
That's it.
BACKUP YOUR FILES FIRST. It hasn't been tested long enough to be considered bug proof.
Enjoy!
NEVER USE THE NAME "LOGINBOX" FOR A CUSTOM ADDED BOX!!!
--------------------------------------------------------
IF YOU USE THE VARIABLE $template['loginbox'], IT CAUSES PROBLEMS WITH THE POPUP_IMAGE.PHP AND IS
SHOWING THE LOGIN BOX AT THE TOP OF THE POPUP.
USE $template['login_box'] INSTEAD. THIS WORKS FINE FOR ME!
GREAT CONTRIB! CONGRATULATIONS!
----------------------------
Reported Bug by: Timm Haas
Some bugs corrected in sts_display_output.php:
The april 2004 update inserted 2 bugs that are corrected here:
1) The page-specific template did not work anymore, basic template always was always used.
2) The page info_shopping_cart.php was not displayed anymore as a popup window.
I also got errors, with some applications only, because of use of ".=" with a variable that was not set or with an array. This is now corrected.
The download contains only the modifications to do, not the complete version.
All credits to the original author, great contrib!
I cannot take credit for any of these updates, I just simply got the contributions to work together. I take no responsiblity, this is just what I did to my store.
If you are using STS Template System (STS) with the Heading Tags Controller, Category Meta Tags and Article Manager - this will get them all working together correctly.
Popup windows with theme fixed.
just replace this lines at line (~40) of the file to the bottom of your
existing /catalog/includes/sts_display_output.php file
/// Replace:
$scriptname = $_SERVER['PHP_SELF'];
$scriptname = getenv('SCRIPT_NAME');
$scriptbasename = substr($scriptname, strrpos($scriptname, '/') + 1);
// If script name contains "popup" then turn off templates and display the normal output
// This is required to prevent display of standard page elements (header, footer, etc) from the template and allow javascript code to run properly
if (strpos($scriptname, "popup") !== false || strpos($scriptname, "info_shopping_cart") !== false) {
$display_normal_output = 1;
$display_template_output = 0;
}
/// With:
$scriptname = $_SERVER['PHP_SELF'];
$scriptname = strstr($scriptname, "popup");
$scriptname2 = strstr($scriptname, "info_shopping_cart");
// If script name contains "popup" then turn off templates and display the normal output
// This is required to prevent display of standard page elements (header, footer, etc) from the template and allow javascript code to run properly
if ($scriptname != false || $scriptname2 != false) {
$display_normal_output = 1;
$display_template_output = 0;
}
Updated copyright notices to osC standards. No functional changes.
CHANGELOG.txt:
v2.01
FIX: Copyright notices
UPG: No functional changes, replace all files to update copyright notices in code to osC standards.
v2.00
ADD: Product_info Templates to manage $content area. New file: sts_product_info.php
ADD: Templates by Category in "index.php_CPATH.html" style, where CPATH is the cPath value (cPath=0 for Catalog Home Page). Thanks to Philip and Chris Langtiw for the idea!
FIX: tep_draw_form() call in sts_user_code - Thanks to Charlie Welf!
CHG: README.txt to include new information
UPG: To upgrade from v1.9, replace: sts_user_code.php, sts_display_output.php, add sts_product_info.php, add new DEFINE for STS_PRODUCT_INFO to configure.php
You can now layout your product_info.php page's content area, and have different templates for different category pages.
See the README.txt for more details.
Here's the changes for v1.9:
CHG: Corrections in README.txt file
ADD: $logoff and $urllogoff to sts_display_output.php. Thanks to Mike Castro Demaria!
ADD: $myaccountlogoff which shows "My Account | Logoff" if logged in or "My Account" if not logged in
ADD: OSC version checking and debugging display
ADD: Shameless plug for STS in HTML source
FIX: Turn off template display for "info_shopping_cart" in sts_display_output. Thanks to Peter Rettinger!
REF: http://forums.oscommerce.com/index.php?showtopic=58541&view=findpost&p=278722
FIX: For bug where clicking on Tell A Friend would add item to shopping cart. Thanks to Pater Rettinger!
REF: http://forums.oscommerce.com/index.php?showtopic=58541&view=findpost&p=278831
UPG: To upgrade from v1.8, simply replace the sts_display_output.php file.
Also, be sure to check out the new STS Support Site here:
http://www.diamondsea.com/sts/
There is also a new mailing list where you can subscribe to get email notices of new releases and other news about STS. It's a great tool for people who don't live on these forums!
Juste to add logoff and account accesse by text link and not account/logoff switching.
Add to your template (sts_template.html)$logoff string near $myaccount
For who need this.
Okay, to try and catch up with the various requests I've received I'm now releasing STS version 1.8. The major new features of this are:
* Multiple Template Files for each site
* A new variable, $catmenu, which gives you a drop-down category menu box to immediately jump to any category. This is implented in sts_user_code.php.
v1.8
ADD: Multiple Templates by putting them in the STS_TEMPLATE_DIR directory with the script name as the file name with a ".html" extension, such as STS_TEMPLATE_DIR/index.php.html file. The HTML on the end is a reminder that no server-side code in it will be executed.
ADD: You must create the directory sts_templates to use the new features
ADD: In sts_user_code.php added a variable for a Drop-Down category selection menu box. The template variable for it is "$catmenu"
CHG: STS_TEMPLATE in configure.php changed to STS_DEFAULT_TEMPLATE
ADD: STS_TEMPLATE_DIR in configure.php to specify where custom template files should be located
-----------------------------------------------------------------------------
USING MULTIPLE TEMPLATE FILES:
-----------------------------------------------------------------------------
Starting with version 1.8 you can now use multiple template files based on
the name of the script being executed. You need to:
1) Create the /catalog/includes/sts_templates/ directory
2) Put your custom template files in it using the name format:
scriptname.php.html
For example, for a custom template file for "product_info.php" would be:
/catalog/includes/sts_templates/product_info.php.html
3) The files will be treated only as HTML files, and no server-side code in
them will be executed. This is why we add the HTML extension to it, as a
reminder.
4) If a custom template file is not defined for the current script, it will
use the STS_DEFAULT_TEMPLATE file instead.
If you don't already, read the CHANGELOG.txt and README.txt files for lists of changes and how to use the new features. RTFM!
Enjoy!
- Brian Gallagher
Fixed a bug with the reviews not displaying correctly.
v1.7
ADD: Shows STS_VERSION when using STS_DEBUGGING mode
FIX: Moved the ReviewsBox include from column_left.php to column_right.php due to it clobbering the values on the product_reviews_info.php page
ADD: Details to README.txt
Just a couple bug fixes.
Simple Template System (STS) CHANGELOG.txt
Copyright (C) Brian Gallagher @ Diamondsea.com (brian@diamondsea.com)
v1.6
ADD: $template[boxname] definition to sts_user_code.php
FIX: Bug in get_javascript() that returned all <head> section instead of nothing if none found
Major Change: Added $urlcat_xxxx variables to let you link directly to a category by Name or by numeric cPath (as seen in the URL).
Minor Changes:
v1.5
CHG: Moved the stylesheet definition from $headcontent to the sts_template.html file
ADD: $template['cat_' . $categorydesc] records for linking to categories
ADD: $template['urlcat_' . $categorydesc] records for linking to categories
ADD: Add a sts_user_code.php file, for things like Adding boxes, etc.
ADD: Add a STS_USER_CODE to configure-SAMPLE.php file
ADD: Display file name of Template page in DEBUG mode
ADD: Display Errors & Warnings in $content
FIX: Sorts the $template[] keys by decreasing length in the array so it works properly
CHG: Updates to the README.txt file
Includes the sts_display_output.php file that was omitted from the v1.3 upload. Oops!
Simple Template System (STS) README.txt v1.3
-----------------------------------------------------------------------------
WHAT IT DOES:
-----------------------------------------------------------------------------
Lets you create simple HTML templates to customize the look and feel of OSC.
You simply create an HTML page that looks the way you want it to and put in
placeholders for the various elements wherever you want to position them.
For example, you would put "$cartbox" wherever on the page you want the
Shopping Cart box to appear. Put "$categorybox" where you want the Categories
box to appear. Put "$content" wherever you want the main page
content (the central part where all the magic happens) to appear, etc.
It does this by changing only a few /catalog/includes/ files, leaving all
other files untouched, making it easy to add other contributions later.
-----------------------------------------------------------------------------
BONUS FEATURES: Simple HEADER TAG CONTROLLER Integration
-----------------------------------------------------------------------------
This contribution also allows you to use WebMakers.com's
Header Tag Controller contribution without having to modify every file on
the system. Just copy the Header Tag Controller's include files into place
and STS will automatically add them to all pages without having to modify
every PHP script in the /catalog/ directory.
STS will auto-detect if Header Tag Controller is installed and use it if
available.
-----------------------------------------------------------------------------
HOW TO INSTALL:
-----------------------------------------------------------------------------
Over a clean OSC 2.2MS2 install, just copy the following files into your
/catalog/includes directory.
application_top.php
header.php
column_left.php
column_right.php
footer.php
application_bottom.php
sts_start_capture.php
sts_stop_capture.php
sts_display_output.php
sts_template.html
NOTE: configure-SAMPLE.php is included in the ZIP file, but you will have to
reenter all your configuration settings if you use it. It is easier
to just add the following lines to the bottom of your existing
/catalog/includes/configure.php:
// STS: ADD: Define Simple Template System files
define('STS_START_CAPTURE', DIR_WS_INCLUDES . 'sts_start_capture.php');
define('STS_STOP_CAPTURE', DIR_WS_INCLUDES . 'sts_stop_capture.php');
define('STS_RESTART_CAPTURE', DIR_WS_INCLUDES . 'sts_restart_capture.php');
define('STS_TEMPLATE', DIR_WS_INCLUDES . 'sts_template.html');
define('STS_DISPLAY_OUTPUT', DIR_WS_INCLUDES . 'sts_display_output.php');
// STS: EOADD
-----------------------------------------------------------------------------
HOW TO USE:
-----------------------------------------------------------------------------
Just modify the
/catalog/includes/sts_template.html
file to look however you want. Use stylesheet settings or HTML setting to
provide a custom look and feel to your site and arrange elements wherever you
like them.
-----------------------------------------------------------------------------
SUPPORTED TAGS:
-----------------------------------------------------------------------------
Here are the tags that are supported so far (more sure to come in later
versions):
$headcontent: Put this string in your <head> section so that it can insert
the dynamic head content and javascript on pages that require it. This will
probably require putting the $headcontent in the <head> section in the source
code. It's a pain to do it this way, but it was the only way I could get it
working. Sorry!
<!--$headcontent--> : You can use this commented format of $headcontent to
keep the word "$headcontent" from displaying in your web authoring software.
NOTE: Do not put <title>...</title> tags in your header. It will be added
as part of the $headcontent variable, along with the Description and Keywords
meta tags if you have the WebMakers.com's Header Tag Controller contribution
installed.
$cataloglogo: The OSC logo and link
$urlcataloglogo: The URL used by the $catalog logo.
$myaccountlogo: The MyAccount graphic and link
$urlmyaccountlogo: The URL used by the My Account function
$cartlogo: The Cart graphic and link
$urlcartlogo: The URL used by the Cart function
$checkoutlogo: The Checkout graphic and link
$urlcheckoutlogo: The URL used by the Checkout function
$breadcrumbs: The "Top > Catalog > whatever..." breadcrumbs text and links
$myaccount: The text version of "My Account" and link. Changes to "Logoff" if logged on.
$urlmyaccount: The URL used by the MyAccount function.
$cartcontents: The text version of the "Cart Contents" function.
$urlcartcontents: The URL used by the MyAccount function.
$checkout: The text version of the "Check Out" function.
$urlcheckout: The URL used by the "Check Out" function.
$categorybox: The Category box
$manufacturerbox: The Manufacturer box
$whatsnewbox: The What's New box
$searchbox: The Search box
$informationbox: The Information box
$cartbox: The Shopping Cart box
$maninfobox: The Manufacturer Info box (blank if not used on a page)
$orderhistorybox: The Order History box (blank if not used on a page, ie: use not logged in)
$bestsellersbox: The Best Sellers box
$specialfriendbox: Either the Specials box or the Tell A Friend box (depending on page viewed)
$reviewsbox: The Reviews box
$languagebox: The Languages box
$currenciesbox: The Currencies box
$content: The main content of the page (the middle of the page)
$date: The current date
$numrequests: The "XXX requests Since DATE" text
$counter: The page view counter
$footer: The footer output from footer.php
$banner: The banner output from footer.php
$sid: The string for the Session ID in the format "SessionIdVarName=WhateverTheSessionIdIs"
-----------------------------------------------------------------------------
DEBUGGING:
-----------------------------------------------------------------------------
In the /catalog/includes/application_bottom.php file you can see the
following settings (near the top of the file):
$display_template_output = 1;
$display_normal_output = 0;
$display_debugging_output = 0;
Display_Template_Output (the default setting) will cause it to display the
template versions of the pages.
Display_Normal_Output will cause it to display the non-template version of
the pages.
Display_Debugging_Output will cause it to display debugging information
showing all of the blocks of data that it is using and how it translates
them into template variables.
You can use any or all of the settings in any combination. If you have both
Normal and Template output, the Template output will be displayed first.
-----------------------------------------------------------------------------
REMOTE DEBUGGING:
-----------------------------------------------------------------------------
You can toggle the debugging options via URL options. You can use the
following parameters in your URL to turn on/off options from your browser
sts_template=1 Turns on the Template display
sts_template=0 Turns off the Template display
sts_normal=1 Turns on the Normal display
sts_normal=0 Turns off the Normal display
sts_debug=1 Turns on the Debugging display
sts_debug=0 Turns off the Debugging display
sts_version=1 Turns on Version Number display
sts_version=0 Turns off Version Number display
-----------------------------------------------------------------------------
SUPPORT:
-----------------------------------------------------------------------------
For support, please post to the Simple Template System thread here:
http://forums.oscommerce.com/index.php?showtopic=58541
Note: Contributions are used at own risk.