Jump to content
DiamondSea

[contribution] Simple Template System (sts)

Recommended Posts

Sorry if this is a stupid question but i cant find it for the life of me. In the content area where it says "Let's see what we have here"... where do I change that wording at?

 

Installed the STS and those words are too long in my layout.

Share this post


Link to post
Share on other sites

one other thing i just noticed was that the mouse over effcts in "my account" no longer work and causing a error msg to appear on the screen. anyone have that happened? Im not sure if its because my layout is squished or what

Share this post


Link to post
Share on other sites

sorry for 3 posts in a row, i cant find the edit button. 4am no wonder i cant focus.

 

here is the line of code that is conflicting with myabe my CSS file?

 

onMouseOver="rowOverEffect(this)" onMouseOut="rowOutEffect(this)" onClick="document.location.href='account_history_info.php?order_id=9'">

 

Where would i remove the entry so that it takes out he rollover effects at.

Share this post


Link to post
Share on other sites
I don't want to cross-post, so here is my problem.

 

Previous Post

 

My problem involves STS 1.9 and Loginbox v5.21 (contribution)

 

For some dang reason the pop-ups have a loginbox inside of them and the pop-up box is defaulting to the size of the login box's .gif header. It's pretty weird and I'm not sure how to fix it other than simply removing all the adjustments made to get the loginbox working.

 

Can anyone give me a hand?

 

~Ray

What steps did you take to add the loging box to your template? My guess is you have added something that you did not need to and that is causing the problem, I seem to remember having the same or similar problem once but I do not remember what I did to fix it (it was quite a few problems ago and I have slept since then) List what changes you made to your files for the login box and maybe that would help someone spot the problem.


The Knowledge Base is a wonderful thing.

Do you have a problem? Have you checked out Common Problems?

There are many very useful osC Contributions

Are you having trouble with a installed contribution? Have you checked out the support thread found Here

BACKUP BACKUP BACKUP!!! You did backup, right??

Share this post


Link to post
Share on other sites
You need to include the name of the page

 

<a href="conditions.php#mylink">text</a>

 

 

Great, but what if I want to do an anchor link on something like a category template? I think that's a little different... Any suggestions??

Share this post


Link to post
Share on other sites

Well, perhaps I didn't need to follow the exact steps in the loginbox installation. Perhaps I just needed to install the new box in STS then just upload the php for the loginbox.

 

I think I tried to do everything by the book as far as the loginbox goes, then discovered it would not appear by doing that alone because of STS. Then I added what STS needed to add a new box.. the box appears, but it also appears in the pop-up window for larger images.

 

I think you are right though, I added something extra I am assuming.

 

I'll look into it and try to post my findings here. Mixing and matching contributions with STS already installed is difficult.

 

~Ray

Share this post


Link to post
Share on other sites

Edit buttons aren't appearing so I will update you, Richard, on what the fix was...

 

In a previous post of yours actually, you recommended making two specific additions to the sts_display_output.php file.

 

Those changes were unnecessary. I removed those two additonal lines of code and the loginbox works fine, and no longer appears in my pop-ups for larger images.

 

~Ray

Share this post


Link to post
Share on other sites
Edit buttons aren't appearing so I will update you, Richard, on what the fix was...

 

In a previous post of yours actually, you recommended making two specific additions to the sts_display_output.php file.

 

Those changes were unnecessary. I removed those two additonal lines of code and the loginbox works fine, and no longer appears in my pop-ups for larger images.

 

~Ray

What changes did you remove?


The Knowledge Base is a wonderful thing.

Do you have a problem? Have you checked out Common Problems?

There are many very useful osC Contributions

Are you having trouble with a installed contribution? Have you checked out the support thread found Here

BACKUP BACKUP BACKUP!!! You did backup, right??

Share this post


Link to post
Share on other sites

In the immortal words of Dr. Evil (Aqua Teen Hunger Force) - "GENTLEMEN!"

 

Can someone please explain to me how to use a frameset with the STS Template system?

 

I want to have a nested top frame that contains my menu and $breadcrumbs

$myaccountlogoff | $cartcontents | $checkout

 

In the bottom frame, I want to put my $content and some other STS boxes. My aim is that if someone navigates to for example, my photo gallery, they still have $breadcrumbs and their cart status in the top frame....

 

how do i accomplish this - i am lost!

 

TIA!

 

Ryan

SickShooter.com

Share this post


Link to post
Share on other sites
Hi!

 

I just finished a clean install of OSC 2.2. MS2 and installed STS 2.01. Now i get an empty page when i open my shop-mainsite with the following HTML Code:

 

<!-- footer_eof //-->
<br>
</body>
</html>

 

Whats wrong here? I've done everything like it's written in the readme of STS.

Can nobody help me? :(

Share this post


Link to post
Share on other sites

I have a new header that I would like to use on my website. The header is a collection of jpgs and gifs within tables in an html format. Here is how my sts_display_output.php file looks now (it points $cataloglogo to a single file):

 

// catalog: link to catalog's home page

203 $template['cataloglogo'] = '<a href="' . tep_href_link(FILENAME_DEFAUL

T) . '">' . tep_image(DIR_WS_IMAGES . 'banner_logo_no_border.gif ', 'Karlin Enterprises') . '</a>';

 

********************************************************************

Here is a snippet of how I attempted to add in the html code (pointing $cataloglogo to html code):

 

// catalog: link to catalog's home page

203 $template['cataloglogo'] = '<a href="' . tep_href_link(FILENAME_DEFAUL

T) . '">' . tep_image(DIR_WS_IMAGES . '<table border="0" width="102%" cellspacing="0" cellpadding="0">

204 <tr>

205 <td valign="top"><table width="100%" border="0" cellspacing="0" cell

padding="0">

206 <tr valign="top">

207 <td><img src="ke_head_logo_with_bag.jpg" width="244" height="1

28"></td>

208 <td width="100%"><table width="100%" border="0" cellspacing="0

"...etc., etc

 

When the page is displayed in the browser, I get the red X. How do I get the $cataloglogo variable to take html code within the sts_display_output.php file instead of pointing to a single file?

Share this post


Link to post
Share on other sites
I have a new header that I would like to use on my website. The header is a collection of jpgs and gifs within tables in an html format. Here is how my sts_display_output.php file looks now (it points $cataloglogo to a single file):

 

// catalog: link to catalog's home page

203 $template['cataloglogo'] = '<a href="' . tep_href_link(FILENAME_DEFAUL

T) . '">' . tep_image(DIR_WS_IMAGES . 'banner_logo_no_border.gif ', 'Karlin Enterprises') . '</a>';

 

********************************************************************

Here is a snippet of how I attempted to add in the html code (pointing $cataloglogo to html code):

 

// catalog: link to catalog's home page

203 $template['cataloglogo'] = '<a href="' . tep_href_link(FILENAME_DEFAUL

T) . '">' . tep_image(DIR_WS_IMAGES . '<table border="0" width="102%" cellspacing="0" cellpadding="0">

204 <tr>

205 <td valign="top"><table width="100%" border="0" cellspacing="0" cell

padding="0">

206 <tr valign="top">

207 <td><img src="ke_head_logo_with_bag.jpg" width="244" height="1

28"></td>

208 <td width="100%"><table width="100%" border="0" cellspacing="0

"...etc., etc

 

When the page is displayed in the browser, I get the red X. How do I get the $cataloglogo variable to take html code within the sts_display_output.php file instead of pointing to a single file?

You can skip the $cataloglogo and just insert the code itself into the sts_template file. Might be easier.


The Knowledge Base is a wonderful thing.

Do you have a problem? Have you checked out Common Problems?

There are many very useful osC Contributions

Are you having trouble with a installed contribution? Have you checked out the support thread found Here

BACKUP BACKUP BACKUP!!! You did backup, right??

Share this post


Link to post
Share on other sites

You can skip the $cataloglogo and just insert the code itself into the sts_template file. Might be easier.

 

When you say skip $cataloglogo, what exactly do you mean? I am not a php guru by any means, so I have no idea how to modify this part of the code to accomodate your suggestion. Do I remove the $cataloglogo variable? And if I remove it, do I just paste in the html code in its place? What about the rest of the line:

203 $template['cataloglogo'] = '<a href="' . tep_href_link(FILENAME_DEFAUL

T) . '">' . tep_image(DIR_WS_IMAGES . 'banner_logo_no_border.gif ', 'Karlin Enterprises') . '</a>';

 

Do I remove this or modify it somehow?

Share this post


Link to post
Share on other sites
You can skip the $cataloglogo and just insert the code itself into the sts_template file. Might be easier.

 

When you say skip $cataloglogo, what exactly do you mean? I am not a php guru by any means, so I have no idea how to modify this part of the code to accomodate your suggestion. Do I remove the $cataloglogo variable? And if I remove it, do I just paste in the html code in its place? What about the rest of the line:

203 $template['cataloglogo'] = '<a href="' . tep_href_link(FILENAME_DEFAUL

T) . '">' . tep_image(DIR_WS_IMAGES . 'banner_logo_no_border.gif ', 'Karlin Enterprises') . '</a>';

 

Do I remove this or modify it somehow?

All you need to so is remove the varible you do not want from you template. I remove them all the time you do not have to change any other files. There is nothing that says all of your varibles have to be used in the template. Now that $cataloglogo is not in the template you replace it with your new logo using straight html (no php needed) You might need to some adjusting and tweeking of your tables to get it to look like you want but that is all.


The Knowledge Base is a wonderful thing.

Do you have a problem? Have you checked out Common Problems?

There are many very useful osC Contributions

Are you having trouble with a installed contribution? Have you checked out the support thread found Here

BACKUP BACKUP BACKUP!!! You did backup, right??

Share this post


Link to post
Share on other sites

I am trying to use a different template for the main page (catalog/index.php). I followed the readme and put my new template at catalog/includes/sts_templates/index.php_0.html

But it won't use it, it only uses catalog/includes/sts_template.html

 

Did I forget something? Am I supposed to do something else besides just putting my file in the templates folder?

 

Thanks,

Justin

Share this post


Link to post
Share on other sites
All you need to so is remove the varible you do not want from you template.

 

Sounds great. But, I when I removed the variable and placed the html code in its place instead, it says $cataloglogo on the header area of the homepage.

 

Here is exactlywhat I did:

 

$template['<table border="0" width="102%" cellspacing="0" cellpadding=

"0">

204 <tr>

205 <td valign="top"><table width="100%" border="0" cellspacing="0" cell

padding="0">

206 <tr valign="top">

 

Can you please give me an exact way to do this with an example? If you can show me in the code itself instead of just telling me, I think I will have this problem solved. Thanks.

Share this post


Link to post
Share on other sites
All you need to so is remove the varible you do not want from you template.

 

Sounds great. But, I when I removed the variable and placed the html code in its place instead, it says $cataloglogo on the header area of the homepage.

 

Here is exactlywhat I did:

 

$template['<table border="0" width="102%" cellspacing="0" cellpadding=

"0">

204 <tr>

205 <td valign="top"><table width="100%" border="0" cellspacing="0" cell

padding="0">

206 <tr valign="top">

 

Can you please give me an exact way to do this with an example? If you can show me in the code itself instead of just telling me, I think I will have this problem solved. Thanks.

What you need to do is remove the $cataloglogo from you sts_template.html file and if it is still showing up in your header you did not do this. It sounds like you removed the definition for the variable not the variable itself.

The only file you need to make any changes to at all is the sts_template.html file.

 

You are going to go from this

 

<table width="100%" border="1" cellpadding="3" cellspacing="0">

<tr class="header">

<td> $cataloglogo</td>

<td><div align="right">

$myaccountlogo $cartlogo $checkoutlogo</div></td>

</tr>

</table>

<br>

 

To something like this

 

<body>

<table width="100%" border="1" cellpadding="3" cellspacing="0">

<tr>

<!-- start your code -->

<td valign="top"><table width="100%" border="0" cellspacing="0" cell

padding="0">

<tr valign="top">

<td><img src="ke_head_logo_with_bag.jpg" width="244" height="128"></td>

 

<!-- end your code -->

 

<td width="100%"><table width="100%" border="0" cellspacing="0

<td><div align="right">

$myaccountlogo $cartlogo $checkoutlogo</div></td>

</tr>

</table>

<br>

 

Now you will probably need to adjust and tweek the tables so everything fits and looks like you want but that is just plain html.


The Knowledge Base is a wonderful thing.

Do you have a problem? Have you checked out Common Problems?

There are many very useful osC Contributions

Are you having trouble with a installed contribution? Have you checked out the support thread found Here

BACKUP BACKUP BACKUP!!! You did backup, right??

Share this post


Link to post
Share on other sites
All you need to so is remove the varible you do not want from you template.

 

Sounds great. But, I when I removed the variable and placed the html code in its place instead, it says $cataloglogo on the header area of the homepage.

 

Here is exactlywhat I did:

 

$template['<table border="0" width="102%" cellspacing="0" cellpadding=

"0">

204 <tr>

205 <td valign="top"><table width="100%" border="0" cellspacing="0" cell

padding="0">

206 <tr valign="top">

 

Can you please give me an exact way to do this with an example? If you can show me in the code itself instead of just telling me, I think I will have this problem solved. Thanks.

Don't change anything in the PHP files. (Remove anything you added or just copy the original files back).

 

In your TEMPLATE file (the HTML file) remove $cataloglogo and just put in your replacement.

 

For example, in your sts_template.html file, where it says

 

$cataloglogo

 

remove it and put

 

<table width=100%><tr><td>Whatever you want in place of the image</td></tr></table>

 

You don't have to touch any PHP files. Just add whatever HTML you want directly to your Template file.

 

- Brian


Simple Template System (STS)

Layout your site with 1 (or more) HTML file!

Download STS: http://www.oscommerce.com/community/contributions,1524

Support: http://forums.oscommerce.com/index.php?showtopic=58541

Share this post


Link to post
Share on other sites
I am trying to use a different template for the main page (catalog/index.php). I followed the readme and put my new template at catalog/includes/sts_templates/index.php_0.html

But it won't use it, it only uses catalog/includes/sts_template.html

 

Did I forget something? Am I supposed to do something else besides just putting my file in the templates folder?

I still can't figure this out. I'm also having no luck with the alternate product_info template. Everything else with sts works fine except alternate templates. Everything has full read permissions and the paths seem to be correct. Is there some special configuration required other than the default just dropping the new template in sts_templates?

Share this post


Link to post
Share on other sites
I am trying to use a different template for the main page (catalog/index.php). I followed the readme and put my new template at catalog/includes/sts_templates/index.php_0.html

But it won't use it, it only uses catalog/includes/sts_template.html

 

Did I forget something? Am I supposed to do something else besides just putting my file in the templates folder?

I still can't figure this out. I'm also having no luck with the alternate product_info template. Everything else with sts works fine except alternate templates. Everything has full read permissions and the paths seem to be correct. Is there some special configuration required other than the default just dropping the new template in sts_templates?

I am also having the exact same problem with the alternate templating for the main page.

Edited by SeanLee

Share this post


Link to post
Share on other sites

A question about the PRODUCT INFO Page.

 

I have STS and everything works great. I have my site all dolled up and looking fantastic, but there is 1 thing wrong with the product info page. I have the default sts_product_info.php file installed, I double-checked with Winmerge to make sure nothing has changed, but my product pages are pooched!

 

The footer, banner and right column are appearing inside the CONTENT cell BELOW the product picture and description. So the product pic is way on the right margin, kicking the right column down a few inches. One other thing I notices, my BG image also does not appear in product_info mode..., but the rest of my CSS seem to be working... hmmmm....

 

Just this and getting Article Manager to appear and I am set!

 

Any help would be appreciated!

Share this post


Link to post
Share on other sites

When I try to create an account on my website (running latest STS), It gives me the error:

 

Your E-Mail Address does not appear to be valid - please make any necessary corrections.

 

No matter what kind of email address I put in there, it tells me this, and does not allow me to move on.

 

Any comments appreciated!

Share this post


Link to post
Share on other sites

After 2 weeks Article Manager is still not appearing. When I turn of the sts_template and comment out the following code in user_code:

$sts_block_name = 'articlebox';
require(STS_START_CAPTURE);
require(DIR_WS_BOXES . 'articles.php');
require(STS_STOP_CAPTURE);
$template['articlebox'] = strip_unwanted_tags($sts_block['articlebox'], 'articlebox');

 

The box shows up fine. If I uncomment the code above BUT leave the sts_template off, I get an error. Same if I turn the template off. The trigger is the sts_user_code.php.

 

I have other contribs installed and have had no problem with their boxes appearing in STS.

 

Is there another way to create box variables in STS? Because the normal way ain't working for me.

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

×