Jump to content
DiamondSea

[contribution] Simple Template System (sts)

Recommended Posts

Try "require_once" instruction instead of "require".

 

- Rigadin

 

 

In case you were replying me, where do you exactly mean? - in the application_top.php in the following code?

 

require (DIR_WS_CLASSES.'sts.php'); $sts= new sts(); $sts->start_capture();

 

If so, it doesnt work...

 

If you ment to another file, can you tell which one?

( Thanks and sorry for the hassle...)

 

minnutes from being desprate and leaving this important contribution aside... : (

 

Sharon.


Installed contributions:

Ultimate_SEO, Article Manager 1.5, Dynamic SiteMap 2.0, Infopages, Google SiteMap XMl w/admin 2.1, HeaderTagControler 2.6.1, FCKosc 2.21, X-sell 2.3, Google Analytics Modul, All Products, Page Cache 1.5, EasyPopulate2.7d, Multi Product Manager 2.5, Define Main Page, and probably few others...

Share this post


Link to post
Share on other sites

Thanks Rigadin, it worked...

 

(Im a bit slow today...)

 

: )

 

Sharon.


Installed contributions:

Ultimate_SEO, Article Manager 1.5, Dynamic SiteMap 2.0, Infopages, Google SiteMap XMl w/admin 2.1, HeaderTagControler 2.6.1, FCKosc 2.21, X-sell 2.3, Google Analytics Modul, All Products, Page Cache 1.5, EasyPopulate2.7d, Multi Product Manager 2.5, Define Main Page, and probably few others...

Share this post


Link to post
Share on other sites
Hello..

 

After I relocated my entire database and pages to a new server, my index.php_0.html no longer works! What have I done? All my other specialty pages (ie index.php_12.html ) are working fine. Please help!!!

 

Thanks!

 

Can anyone help me with this? I cannot figure out what is going on. Nothing has changed in my store yet my homepage template no longer works. :(

Share this post


Link to post
Share on other sites
Can anyone help me with this? I cannot figure out what is going on. Nothing has changed in my store yet my homepage template no longer works. :(
When relocating to a new server, you will need to manually configure the following files:

 

/includes/configure.php

/admin/includes/configure.php

 

You will also need to re-configure STS in the admin modules as you had them on the prior server.

 

Also, if you are still having problems, check this link for detailed transfer methods.


Bill Kellum

 

Sounds Good Productions

STS Tutorials & more: STSv4.6, STS Add-ons (STS Power Pack), STS V4 Forum STS Forum FREE TEMPLATE

Share this post


Link to post
Share on other sites

Hi

 

I just downloaded the zip file and the

 

Three PDF documents included:

STS History

STS Installation

STS User Manual

 

Don't seem to be in the zipped folder.

 

Can you pls advise as to which files i need to upload ie. the "all files" or "new files only"

 

Thanks

Andrea :)

Share this post


Link to post
Share on other sites
Hi

 

I just downloaded the zip file and the

 

Three PDF documents included:

STS History

STS Installation

STS User Manual

 

Don't seem to be in the zipped folder.

 

Can you pls advise as to which files i need to upload ie. the "all files" or "new files only"

 

Thanks

Andrea :)

Andrea, you missed an important statement on the download page:

 

You need to download a separate contribution (STSv4.3.2 with HTCv2.6.0) that was just below the document contribution. They had to be separated because of the 300k file size limitation on osCommerce.com.

 

So...to install STSv4.3.2 with HTCv2.6.0, you will need two files:

 

1. STS v4.3.2 with Header Tags Controller v2.6.0 DOCUMENTS (which is what you already have)

 

2. STS v4.3.2 with Header Tags Controller v2.6.0 (which you still need to download)


Bill Kellum

 

Sounds Good Productions

STS Tutorials & more: STSv4.6, STS Add-ons (STS Power Pack), STS V4 Forum STS Forum FREE TEMPLATE

Share this post


Link to post
Share on other sites

Thanks me gona have a look and sorry :blush:

Andrea, you missed an important statement on the download page:

 

You need to download a separate contribution (STSv4.3.2 with HTCv2.6.0) that was just below the document contribution. They had to be separated because of the 300k file size limitation on osCommerce.com.

 

So...to install STSv4.3.2 with HTCv2.6.0, you will need two files:

 

1. STS v4.3.2 with Header Tags Controller v2.6.0 DOCUMENTS (which is what you already have)

 

2. STS v4.3.2 with Header Tags Controller v2.6.0 (which you still need to download)

Share this post


Link to post
Share on other sites

LOCALIZATION ISSUE:

 

I am installing a multilanguage site (will be in UTF-8 as i will work with chinese russian japanese on the same site) .

 

I am interesting in having different layout for different country.

 

Has anyone consider this application of STS before?

if not, anyone interested in working on it with us?

thanks!

jacopo


Expresionario.com | Pura Sub-cultura!

Share this post


Link to post
Share on other sites

Hey all,

 

I've got a heavily modified site that I recently very easily converted to templating with STSv2.0 (yeah I know - sooo old) :)

 

I have built my desired templates and feel of the shop and have it working perfectly.

But then I was lulled into the cool attributes of the newer STS4.3.2 version - admin control, on/off, various template modes etc..

 

So, I decided to upgrade.... and now I can't get STS to work with my old designs. I can easily back out, but would rather have the newer version with all it's bells and whistles.

It may be an upgrade incompatibility, or simply my inexperience with STS, but the core STS files seems to have fundamentally diffferent tags and coding in them. I've read the user and install guides, but still lost as to how to convert my old STS templates to be recognised byt he new STS system.

 

With STS 4.3.2, whether I have STS Default turned on or off, my website doesn't change. Even if I specify for STS to use the /test directory with the test templates

 

These are the upgrade/install steps I took:

 

1. BACKED UP all my files :)

2. Replaced ALL the new files as mentioned for a FRESH install

3. Copied my old sts_template.html to a new directory in \catalog\includes\sts_templates

4. In ADMIN: turned ON STS DEFAULT, specified new directory

 

That's it, and now I have the oscommerce header, footer, banner, column left and column right. Granted that I copied over my old column left/right, header and footer files, however STS2 template was not referring to these files anyway.

 

Any help, muchly appreciated!!

Share this post


Link to post
Share on other sites

Hi there... This is a very nice Contrib (maybe the best?!)

I've got a little problem:

I style the shop with one template file and a css file. That worx really fine, but I try to get my shop

more or less tableless. Is there any chance to make a template for the $content#?

The design-tables for the main content (with the text: "The text shown here can be modified in the following file, on each language basis: [path to catalog]/includes/languages/english/index.php" after a new install) explodes my complete design....

How can I remove the tables or change the table design? I'm new here and not so experienced with oscommerce (but of course with html/css :-) )

Is ist possible to make a template for the content area in the middle of the page?

 

Thank you for your answers...

Greetings from germany

Share this post


Link to post
Share on other sites
Hi there... This is a very nice Contrib (maybe the best?!)

I've got a little problem:

I style the shop with one template file and a css file. That worx really fine, but I try to get my shop

more or less tableless. Is there any chance to make a template for the $content#?

The design-tables for the main content (with the text: "The text shown here can be modified in the following file, on each language basis: [path to catalog]/includes/languages/english/index.php" after a new install) explodes my complete design....

How can I remove the tables or change the table design? I'm new here and not so experienced with oscommerce (but of course with html/css :-) )

Is ist possible to make a template for the content area in the middle of the page?

 

Thank you for your answers...

Greetings from germany

 

 

I have been researching this topic as well and I am afraid you are not going to like the answer. You can't do it unless you are willing to go through the entire package and redo the html yourself. The $content simply captures the output stream from the original code and puts it into your template and that stuff is full of tables. So what you have to do is trace back all the html generating parts of the site and replace that code and it is not a simple task.

 

- Roger

Share this post


Link to post
Share on other sites

Hello,

 

I have been searching for templates for osCommerce online. I like a couple of them at TemplateMonster.com and feel that I can use one or two. However, when I downloaded their free version, I noticed that it came incorporated into a full version of oscommerce.

 

Is there an easy way to convert Template Monster templates to STS? Are there STS only sites out there?

 

The reason I am asking is that I also want to purchase an osCommerce package as I do not want to merge 50 different modules myself ( I know I am a lazy SOB ). I would rather put in STS and load the template that way and try out different designs without having to change the main store.

 

Thanks for your help,

 

- Roger Huston

Share this post


Link to post
Share on other sites

I have not seen sites selling STS templates. To make an STS template out of an osCommerce template, run the store and then save the html code. Use this html code as default template and start replacing the different elements by their corresponding STS placeholder. Use the boxes class (includes/classes/boxes.php) from the template you bought.

 

When buying a store with contributions already installed, be aware that it does not include BTS (Basic Template System) as it is totally incompatible with STS.

 

- Rigadin


STS v4.5 SP5 is out, and check the STS Power Pack contribution too!

New thumbnailer using phpThumb: oscThumb. Works great.

Share this post


Link to post
Share on other sites
In sts_display_output.php change these lines:

 

// 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;
}

 

to this:

That should keep STS from using the template on the printorder file.

 

- Brian

 

 

Hi there, I have tried your suggestions regarding adding printorder to the 'normal' template list in sts_display_output, however unfortunately this creates the following error:

Parse error: syntax error, unexpected T_BOOLEAN_OR in /home/xxxxxxx/public_html/catalog/includes/sts_display_output.php on line 40

 

 

This is my changed code below.... where have I gone wrong?

// Override if we need to show a pop-up window
$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)|| strpos($scriptname, "printorder.php") !== false)   {
$display_normal_output = 1;
$display_template_output = 0;
}

Share this post


Link to post
Share on other sites

hey all,

 

I have just installed the STS 4.3.2 and am quite pleased so far. Still a little work for me to do, but overall I am very satisfied.

 

One problem that I have run into though, is that I have a consistent look for all of my infoboxes except the "categories" one, and I cannot make the categories box look like the others. Here is what I mean:

 

http://www.sonic-depot.com/osCommerce/index.php

 

The rest of them have rounded tops and no borders, which is exactly how I want them, but I cannot get the categories box to give up its border or squared corners.

 

Any suggestions?


Brian Quinney

Share this post


Link to post
Share on other sites

Hi again. I guess I should have looked more closely. I am having more problems than I thought. Any time that I try to access a page where the customer should be logged in (i.e. account_edit.php), it comes with the following error messages:

 

Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /home/sonic-de/public_html/osCommerce/catalog/includes/functions/general.php:2525) in /home/sonic-de/public_html/osCommerce/catalog/includes/functions/sessions.php on line 67

 

Warning: Cannot modify header information - headers already sent by (output started at /home/sonic-de/public_html/osCommerce/catalog/includes/functions/general.php:2525) in /home/sonic-de/public_html/osCommerce/catalog/includes/functions/general.php on line 57

 

What is the deal with these, and how do I fix them. Thanks in advance for any help on this one.


Brian Quinney

Share this post


Link to post
Share on other sites
I have been researching this topic as well and I am afraid you are not going to like the answer. You can't do it unless you are willing to go through the entire package and redo the html yourself. The $content simply captures the output stream from the original code and puts it into your template and that stuff is full of tables. So what you have to do is trace back all the html generating parts of the site and replace that code and it is not a simple task.

 

- Roger

Roger, content templates can be made and using CSS as well. STS by default uses tables but it can be converted over to CSS entirely if that is your bag.

 

Checkout the following CSS contribution to be used with STS:

 

http://www.oscommerce.com/community/contri...h,tableless+CSS

 

Have fun,

 

Bill Kellum


Bill Kellum

 

Sounds Good Productions

STS Tutorials & more: STSv4.6, STS Add-ons (STS Power Pack), STS V4 Forum STS Forum FREE TEMPLATE

Share this post


Link to post
Share on other sites
Hi again. I guess I should have looked more closely. I am having more problems than I thought. Any time that I try to access a page where the customer should be logged in (i.e. account_edit.php), it comes with the following error messages:

 

Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /home/sonic-de/public_html/osCommerce/catalog/includes/functions/general.php:2525) in /home/sonic-de/public_html/osCommerce/catalog/includes/functions/sessions.php on line 67

 

Warning: Cannot modify header information - headers already sent by (output started at /home/sonic-de/public_html/osCommerce/catalog/includes/functions/general.php:2525) in /home/sonic-de/public_html/osCommerce/catalog/includes/functions/general.php on line 57

 

What is the deal with these, and how do I fix them. Thanks in advance for any help on this one.

It appears you did your edits by hand and may have misplaced the code or put in a blank space. Check that you have ended your PHP statements with: ?>

Bill Kellum

 

Sounds Good Productions

STS Tutorials & more: STSv4.6, STS Add-ons (STS Power Pack), STS V4 Forum STS Forum FREE TEMPLATE

Share this post


Link to post
Share on other sites

Ok, I solved my bigger problem - it turns out that the problem was just caused by a little whitespace at the end of a couple of documents. I am not sure why, but it fixed it.

 

How ever, I am still having this problem:

 

hey all,

 

I have just installed the STS 4.3.2 and am quite pleased so far. Still a little work for me to do, but overall I am very satisfied.

 

One problem that I have run into though, is that I have a consistent look for all of my infoboxes except the "categories" one, and I cannot make the categories box look like the others. Here is what I mean:

 

http://www.sonic-depot.com/osCommerce/index.php

 

The rest of them have rounded tops and no borders, which is exactly how I want them, but I cannot get the categories box to give up its border or squared corners.

 

Any suggestions?

 

Does anyone know why this box would not respond to the templates the way that the others have?


Brian Quinney

Share this post


Link to post
Share on other sites

I looked your site with Firefox and I see rounded corners and no borders to your categories box. I guess you found the solution.

 

- Rigadin


STS v4.5 SP5 is out, and check the STS Power Pack contribution too!

New thumbnailer using phpThumb: oscThumb. Works great.

Share this post


Link to post
Share on other sites

I have done a fresh install of both OSC and STSv4.3.2 with HTCv2.6.0. This is my first time using OSC. Is there suppose to be a segment in the admin panel now for STS? Ive tried installing 3 times with no luck. Any help would be greately appreciated.

Share this post


Link to post
Share on other sites

Hi there...

one question:

I would like to style the header for the "whats new" box.

How have I to name the file in the "boxes" folder?

I've tried to name it "infobox_whatsnew_header.php.html" but nothing happens....

Share this post


Link to post
Share on other sites

Regarding my previous post: I did finally get the get it all working. Apperantly the admin folder for OSC was moved somehow by the auto installer my server has. Took a little but i got the template working perfectly.

Share this post


Link to post
Share on other sites
Regarding my previous post: I did finally get the get it all working. Apperantly the admin folder for OSC was moved somehow by the auto installer my server has. Took a little but i got the template working perfectly.
Hino, can you please explain the installer that was used on your server? A few weeks back some other users ran into the same issue regarding their host using an installer that put the "admin" folder outside of the standard "catalog" structure of osCommerce. The reason that I am asking is so that I can make a note of this when this comes up again. The only stable auto-installer that I know of is Fantastico but that still does not guarantee that you are getting the latest version of osCommerce. I’ve even come across some installers that get the image paths screwed up right from the beginning because of errant configure.php settings.

Bill Kellum

 

Sounds Good Productions

STS Tutorials & more: STSv4.6, STS Add-ons (STS Power Pack), STS V4 Forum STS Forum FREE TEMPLATE

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×