Jump to content
DiamondSea

[contribution] Simple Template System (sts)

Recommended Posts

I'm using STS version 2.1 and every category on my site has his own template.

I wonder how I could make a template for the specials page.

So instead of a category I want to use a template for a link to specials.php.

 

Is this possible?!?

 

Greetings from Holland!

Share this post


Link to post
Share on other sites

Hi there,

Just installed STS. This is a fantastic contribution - probably one of the most useful I've ever found for OSC!

 

Using v. 3.0 Beta (maybe that's my problem?)

 

The trouble I'm having is apparently with the table setup for the column. I'm not sure what's going on. My template is set up just fine, but the output is all screwy and seems to have closed/opened various tables and not closed/opened others.

 

My download did not included an STS_template.html for the root, only for the 2 different themes included, so I'm not sure I'm handling that aspect of things correctly.

 

Would someone be willing to take a look at my page and see if they can tell what's going wrong? I'd surely appreciate it:

 

My Webpage

STS Template

or

STS Template within Template directory

 

My client would like to launch this site by tomorrow (argh!) so I'm on a bit of a hard deadline here. Any help you can give would be VERY much appreciated!

 

Thanks in advance.

 

~Laura

Share this post


Link to post
Share on other sites

Hi there this forum is too big to find the information i was looking for so maybe one of you can help me

I installed sts_template 3 but when i click an image to popup it goes to

javascript:popupWindow('http://sts.diamondsea.com/sts3/popup_image.php?pID=3')

could some1 tell me how to change that to my localhost/popup_image.php?

HELP ME PLEASE! :thumbsup:

Share this post


Link to post
Share on other sites

p_angel0,

 

On your product_info.php.html page, check the html reference or link on the "Click to Enlarge" text.

Share this post


Link to post
Share on other sites
Funky output:

 

see

 

http://chriskofer.com/wwp2/

 

just installed sts 2.01, any idea of what went wrong? Using default template. I tried writing my own with Golive and it got even worse.

 

ck

 

Yes it looks terrible, you know why?? I havent install STS yet, but is it difficult to use?


Wanwan -- %_%_

Share this post


Link to post
Share on other sites

hi there everybody one more question is there any posibility to use flash buttons of some kind in sts_template contrib because every time i use some kind of flash link it loses it's sessions how can i use flash without losing my sessions hope some1 can help me one more time

Share this post


Link to post
Share on other sites
Yes it looks terrible, you know why?? I havent install STS yet, but is it difficult to use?

 

It seems easy to install and modify. I am trying to figure out why I got these results. The concept is great and others seem to be able to use it successfully.

Share this post


Link to post
Share on other sites
It seems easy to install and modify. I am trying to figure out why I got these results. The concept is great and others seem to be able to use it successfully.

 

I went back to the stock, or near-stock, layout without sts. I think that I may have caused problems because I was using a modified right column and wasn't applying sts correctly. I can see the value of this product but need to learn more.

 

ck

Share this post


Link to post
Share on other sites
hi there everybody one more question is there any posibility to use flash buttons of some kind in sts_template contrib because every time i use some kind of flash link it loses it's sessions how can i use flash without losing my sessions hope some1 can help me one more time

 

p_angel0,

 

Yes, flash can be used. I'm not sure why you'd be losing your sessions though. Can you post a link?

Share this post


Link to post
Share on other sites

Sorry leathel i just deleted my domain name so dont have an internet adress just my localhost sorry

but if i get a new one i'll PM you ASAP.

Thanks a lot and i'll try to get it working! :thumbsup:

Share this post


Link to post
Share on other sites

By the way my problem is not using any flash movie just when i create flash buttons there is a problem with losing my sessions

Share this post


Link to post
Share on other sites

Hey guys. This is very silly but i need help.

 

I just uploaded a template from another contrib and STS beta2 - successful.

 

Now, how do I change sts_template.html? All I see in the sts_template.html files are image scripts :-(

 

*sigh...don't know diddly squat but I'm trying... (really hard!) ;-)

 

Anyway, if there's a simplier way of explaining it w/o the tech lingo....Maybe if someone speaks english? lol..just the do this do that, maybe?

 

Here's the test site

 

Thanks for reading & Kudos to the creator.

 

 

Danes

Share this post


Link to post
Share on other sites
Simple Template System (STS) README.txt v1.3

Contribution Author: Brian Gallagher @ DiamondSea.com

Contribution Author Email: brian@diamondsea.com

 

-----------------------------------------------------------------------------

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 this thread.

Share this post


Link to post
Share on other sites

I still hope someone has the answer to my question:

I'm using STS version 2.1 and every category on my site has his own template.

I wonder how I could make a template for the specials page.

So instead of a category I want to use a template for a link to specials.php.

 

Is this possible?!?

 

Greetings from Holland!

Share this post


Link to post
Share on other sites

Things are getting closer at my practice store: http://www.chriskofer.com/wwp2/

 

The width formatting I used in Golive on the left column seems messed up: it gets wider than the 135 pixels that I thought I specified. Also, when you choose a product, the images go to pieces. (eg http://www.chriskofer.com/wwp2/product_inf...products_id/147 ) . While we're at it, perhaps I can get some idea why the table on that page looks so poorly formatted. This may be fundamental to css vs html but I thought it would look better (see the source code).

 

I also seem to have lost my formatting for this contrib (Page Editor):

 

http://www.oscommerce.com/community/contributions,2841

 

It used to show extra static pages in the information box. Do I need to hack the info box for sts to make this work?

 

Thanks so much in advance.

 

ck

Share this post


Link to post
Share on other sites
Hi,

 

I installed a fresh OSC with a register_globals (patched files) fix. After installing STS (latest 3 beta I found) I got again:

Is there a fix or workaround to use OSC with STS and the register_globals fix?

 

Many thanks

kind regards

Yogie

 

I am also having this problem. i have been crawling through these forums and this is the one i have been looking for. I get the register error again when i fixed it with a patch. I made sure i add to the code of the patch with the sts and not overwrite and now i still get the

 

FATAL ERROR: register_globals is disabled in php.ini, please enable it!

 

Please hELP

Share this post


Link to post
Share on other sites

OK- half way there but need a wee bit of help if at all possible!

 

The development copy is on my backup server (php5), here:

http://server.re-create-it.co.uk/dev/gravity-slaves/shop/

 

The STS skin is mostly there and it seems to match my site BUT a couple (only found two so far) of files just give a totally blank output, with the debug options not showing anything different...

 

Product - nothing!

 

Payment - I added this in the same way as I added another of my boxes - they all work but the payment one!

 

Any idea what to look for when there is a totally blank screen?

Share this post


Link to post
Share on other sites

Would it be reasonable to state that sts has difficulty with some of the other contrib's? At my test site chriskofer.com/wwp2 it seems to be rendering most pages okay-until you get to products page. I think I have a contrib that changes the title of the page to the product name. Could this be a source of problems?

 

ck

Share this post


Link to post
Share on other sites

Bingo!

Just came back to post an quick fix and saw you have posted too, CK!

 

I have the header tags contribution installed. I had to take out

 

<?php
// BOF: WebMakers.com Changed: Header Tag Controller v2.5.2
// Replaced by header_tags.php
if ( file_exists(DIR_WS_INCLUDES . 'header_tags.php') ) {
 require(DIR_WS_INCLUDES . 'header_tags.php');
} else {
?> 
 <title><?php echo TITLE; ?></title>
<?php
}
// EOF: WebMakers.com Changed: Header Tag Controller v2.5.2
?>

 

from the offending pages.

 

Weirdly, that code is on other pages, that work fine. Oh well! It seems to be fixed - I am going to play more then make the move to the live site!

Share this post


Link to post
Share on other sites

Hi,

 

I have an annoying problem with the latest release of STS. When I install STS I get a syntaxis error on every page of my store. Take a look at my Store for an example

Is this caused by my designed templates? Or is this a bug?

 

Help appreciated :thumbsup:

 

Thanks

Edited by meules

Share this post


Link to post
Share on other sites
Hi,

 

I have an annoying problem with the latest release of STS. When I install STS I get a syntaxis error on every page of my store. Take a look at my Store for an example

Is this caused by my designed templates? Or is this a bug?

 

Help appreciated :thumbsup:

 

Thanks

 

I don't see any syntax errors. The only problem I see is that your images are not loading. Try using the full path for your images.

 

Instead of this

<img src="Images/AA_01.jpg"

 

Try something like this

<img src="http://www.vermoolen.com/catalog/Images/AA_01.jpg"

Share this post


Link to post
Share on other sites
I don't see any syntax errors. The only problem I see is that your images are not loading. Try using the full path for your images.

 

Instead of this

<img src="Images/AA_01.jpg"

 

Try something like this

<img src="http://www.vermoolen.com/catalog/Images/AA_01.jpg"

 

Though that would seem to be an answer, I think that there is more to it. I am working on this and only my products_info.php seems to generate corrupted image links.

Share this post


Link to post
Share on other sites

I've just installed STS Beta2 (STS-3_00b2.zip) on a clean install and I am having a bit of trouble with its display. At the top of every page it is inserting this last string from the english.php file:

rrect, we do not accept that type of credit card.

If it is wrong, please try again.'); define('FOOTER_TEXT_BODY', 'Copyright ? ' . date('Y') . ' ' . STORE_NAME . '

Powered by osCommerce'); ?> ends tableBox { function productListingBox($contents) { $this->table_parameters = 'class="productListing"'; $this->tableBox($contents, true); } } ?> return $trail_string; } } ?>

See http://www.hulasupplycenter.com/catalog/

 

I can't figure this out, can you please help me?

 

Thank you!

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

×