Community Add-Ons
Simple Template System (STS)
for osCommerce Online Merchant v2.2
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
Legend:
Download
Report
Simple Template System (STSv4.6)
Update by Bill Kellum (bkellum)
******
Different from download just below this one: Corrected a few errors in the sts_user_code.php file and some of the stylesheets provided with the sample templates.
******
Added new Template Folder drop down menu in the admin to easily select all uploaded template sets similar to how Joomla! installs templates.
Added new Open Source Template Sets to provide visual examples of the STSv4.6 features and ease of use.
Added several new variables in sts_user_code.php.
BUG FIXED: The $templatedir$ tag now works properly in all scripts.
BUG FIXED: Corrected the code for STS Default enabled to prevent errors (includes/classes/sts.php).
BUG FIXED: Corrected method for error messages appearing in the header (Use of $warning_header$ tag)
BUG FIXED: Several lines of code modified in the boxes.php file for seamless infobox template implementation.
Requires the use of Stop End Characters to facilitate proper variable functions.
Built around the idea to separate template sets from dependability of stock osC images and stylesheets.
Allows plug and play functionality to easily switch between properly designed template sets. This allows third party template set designers to easily port their designs.
STS files are still the same for all osCommerce 2.2 versions
Updated all STS documents.
Updated Support Thread links.
This is a Full Package.
------------------------------------------------
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.6:
http://forums.oscommerce.com/topic/295660-contribution-sts-v4/page__view__findpost__p__1484832
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
