Jump to content



Latest News: (loading..)

* * * * * 9 votes

[contribution] Simple Template System (sts)


  • Please log in to reply
5820 replies to this topic

#3501   wotsupdoc

wotsupdoc
  • Members
  • 72 posts
  • Real Name:Robert

Posted 24 March 2007 - 03:15 PM

[quote name='bkellum' date='Mar 24 2007, 02:41 PM' post='1048455']
Robert, I don't know if it was a typo on your part but the first line should not have the in it. Change it as so:


Every time I paste it into the codebox it ends up wrong in the page (3 times already).
I guess that the forum software interprets something of the code as its own native lingo.
It should have been something like:

< script language="javascript"><!--
var i=0;
function resize() {
  if (navigator.appName == 'Netscape') i=40;
  if (document.images[0]) window.resizeTo(document.images[0].width +30, document.images[0].height+60-i);
  self.focus();
}
//--></script>




I have added a space in the first sode sentence, between < and script
So it finally ends up on the page

Edited by wotsupdoc, 24 March 2007 - 03:20 PM.


#3502   bkellum

bkellum
  • Members
  • 4,893 posts
  • Real Name:Bill Kellum
  • Gender:Male
  • Location:Chicago

Posted 24 March 2007 - 03:19 PM

Robert,
It appears you are trying to paste your code here in the forums from a WYSIWYG type of editor or from a non-plain text editor.
Try this:
Paste your code into a plain text editor such as Windows NotePad. Then copy that code from NotePad into this forum.
I'm trying to rule out that you are actually calling in the Javascript correctly. With the

Quote

&alt;
at the beginning of that line, you will not get your Javascript called.

As for the STS debug: Post the link to the page that is giving you problems and I will run the debug myself. I'm guessing that you did not do it properly and that is why you are not getting anywhere with it. However, if the debug feature does not work for you, it will tell me that you do not have STS installed correctly. Either way it will tell us something.

Note: Doe your shop work as it should without any errors if STS is turned off in the admin? I would like to rule out whether this is a STS issue or not.
Bill Kellum

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

#3503   wotsupdoc

wotsupdoc
  • Members
  • 72 posts
  • Real Name:Robert

Posted 24 March 2007 - 03:30 PM

View Postbkellum, on Mar 24 2007, 04:19 PM, said:

Robert,
It appears you are trying to paste your code here in the forums from a WYSIWYG type of editor or from a non-plain text editor.
Try this:
Paste your code into a plain text editor such as Windows NotePad. Then copy that code from NotePad into this forum.
I'm trying to rule out that you are actually calling in the Javascript correctly. With the  at the beginning of that line, you will not get your Javascript called.
I open the page, I rightclick the page, >view sourcecode, page opens in Windows wordpad, I copy and paste the text directly into the codebox of this forum's editor. It ends up screwy all the time

View Postbkellum, on Mar 24 2007, 04:19 PM, said:

As for the STS debug: Post the link to the page that is giving you problems and I will run the debug myself. I'm guessing that you did not do it properly and that is why you are not getting anywhere with it. However, if the debug feature does not work for you, it will tell me that you do not have STS installed correctly. Either way it will tell us something.

Note: Does your shop work as it should without any errors if STS is turned off in the admin? I would like to rule out whether this is a STS issue or not.

When I turn off STS in the admin section, the page opend faultless

The page is at
http://www.coloursite.nl/oerbronwerk/catal...8184d4ebcbde45c

#3504   bkellum

bkellum
  • Members
  • 4,893 posts
  • Real Name:Bill Kellum
  • Gender:Male
  • Location:Chicago

Posted 24 March 2007 - 04:17 PM

Did you make the necessary edits to the catalog/includes/header.php file?

 

<?php
/*
  $Id: header.php,v 1.42 2003/06/10 18:20:38 hpdl Exp $

  osCommerce, Open Source E-Commerce Solutions
  [url="http://www.oscommerce.com/"]http://www.oscommerce.com[/url]

  Copyright (c) 2003 osCommerce

  Released under the GNU General Public License
*/

  // START STS 4.4
  $sts->restart_capture ('applicationtop2header'); // Capture header from the actual script, needed to take out javascript
  // END STS 4.4
When I ran the debug, I noticed that you were not picking up the Javascript in your header as well as not including the 'applicationtop2header' information at all.
Please post what you have in the first 10 or so lines in your STS Templates. What I am looking for here is to make sure you are including the required code in the <head> of your HTML template pages.
Bill Kellum

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

#3505   wotsupdoc

wotsupdoc
  • Members
  • 72 posts
  • Real Name:Robert

Posted 24 March 2007 - 05:46 PM

View Postbkellum, on Mar 24 2007, 05:17 PM, said:

Did you make the necessary edits to the catalog/includes/header.php file?

YESSSSSSSSSSS!!!!!!!


The edited file was on my harddrive, but not on the 'net
Doesn't work that way, does it?


Thanks a million!

#3506   wotsupdoc

wotsupdoc
  • Members
  • 72 posts
  • Real Name:Robert

Posted 24 March 2007 - 08:37 PM

View Postbkellum, on Mar 24 2007, 02:41 PM, said:

You should run the STS debug command.
  • For one, it is very easy to do
  • And for another it will give you valuable troubleshooting information regarding what is actually going on behind the scene.
What Rigadin is sugggesting is that you first run the debug command and then check at the very bottom of your page the information that the debug routine will display. In this information, find the data listed for the 'headcontent' and then post it here for the good folks in this forum to try to troubleshoot for you.

**TIP**
To see the debug output of whateverpage.php, write the URL www.yourshop.com/whateverpage.php?sts_debug=debug in your browser address window.

<<just out of curiosity,>>
On whatever page I run it, I always get the
1062 - Duplicate entry '<bladibla> ' for key 1
message
and everything is fine, now.
What does the 1062 msg. mean?

Thanks for helping me out.
It really made a world of difference for me.

#3507   bkellum

bkellum
  • Members
  • 4,893 posts
  • Real Name:Bill Kellum
  • Gender:Male
  • Location:Chicago

Posted 24 March 2007 - 09:16 PM

View Postwotsupdoc, on Mar 24 2007, 03:37 PM, said:

<<just out of curiosity,>>
On whatever page I run it, I always get the
1062 - Duplicate entry '<bladibla> ' for key 1
message
and everything is fine, now.
What does the 1062 msg. mean?

Thanks for helping me out.
It really made a world of difference for me.
In order to run the Debug, keep in mind you need to first get rid of the SID (session ID) in the URL. Add this at the end of the URL:
sts_debug=debug

It should look something like this:
http://www.yourstore.com/catalog/index.php?sts_debug=debug
Bill Kellum

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

#3508   dealindano

dealindano
  • Members
  • 93 posts
  • Real Name:Dan

Posted 25 March 2007 - 02:30 AM

Hi all,

A dynamic horizontal dropdown menu is central to my layout. I have been unsuccessful getting the horizontal dropdown to work with sts v4.4

By chance, does it work with any other sts v4.x versions?

Is there another dynamic menu contribution that will work with sts?

-dano

#3509   dealindano

dealindano
  • Members
  • 93 posts
  • Real Name:Dan

Posted 25 March 2007 - 04:27 AM

Disregard...

I'm just going to go with 4.4 and not use infobox temps till we can find a fix for that.

No Worries,
Dano

#3510   thetechguy

thetechguy
  • Members
  • 6 posts
  • Real Name:Jon

Posted 27 March 2007 - 09:47 PM

ok I have been all over these pages the last few days cutting and pasting code and my head is swimming. I am still getting the ie error on the pop up image when using sts. can anyone please send me the exact code - where to put it on what file to fix this problem I ran the debug on the url and there were no results. please help thank you in advance.

store is on
www.foreversierrarose.com

Edited by thetechguy, 27 March 2007 - 09:50 PM.


#3511   thetechguy

thetechguy
  • Members
  • 6 posts
  • Real Name:Jon

Posted 27 March 2007 - 10:05 PM

View Postthetechguy, on Mar 27 2007, 09:47 PM, said:

ok I have been all over these pages the last few days cutting and pasting code and my head is swimming. I am still getting the ie error on the pop up image when using sts. can anyone please send me the exact code - where to put it on what file to fix this problem I ran the debug on the url and there were no results. please help thank you in advance.

store is on <a href="http://www.foreversierrarose.com" target="_blank">
www.foreversierrarose.com
</a>

also I cant seem to figure out how to change the font colors on links

#3512   thetechguy

thetechguy
  • Members
  • 6 posts
  • Real Name:Jon

Posted 27 March 2007 - 11:03 PM

View Postthetechguy, on Mar 27 2007, 10:05 PM, said:

also I cant seem to figure out how to change the font colors on links


Okay I figured out my pop up problem I just need to figure out the font color now for links thank you

#3513   gmltw

gmltw
  • Members
  • 61 posts
  • Real Name:Gary
  • Gender:Male
  • Location:US - Texas

Posted 28 March 2007 - 12:47 AM

View Postthetechguy, on Mar 27 2007, 05:03 PM, said:

Okay I figured out my pop up problem I just need to figure out the font color now for links thank you
You should be able to change your font colors in your stylesheet.css file located in your root or catalog folder. Just look for the A class like this. Just change to the color you want to.

/*This is the Default Hyperlink Style with brown text and underlines*/
A {
	color: #731F17;
	text-decoration: underline;
	font-weight: bolder;
}

/*This is the Default ACTIVE Hyperlink Style when a mouse is hovering over it, with dusty blue text and no underline*/

A:hover {
  color: #6666CC;
  text-decoration: none;
  font-weight:normal;
}

If for some reason this does not change your link color then you have it set in another place as well (which is not needed).

Good luck,

Gary

#3514   sacaccess

sacaccess
  • Members
  • 9 posts
  • Real Name:Demetre

Posted 28 March 2007 - 02:15 AM

how can i add pages to my OSC that still use the STS place holders  so i can make a custom page that has $checkoutbox or $"whatever"   because if i just put that on a page and upload it it will say the holder not display the box...  i hope this makes sense..  Actualy better yet how do i make it work in my includes/languages/english/index.php

Edited by sacaccess, 28 March 2007 - 02:18 AM.


#3515   bkellum

bkellum
  • Members
  • 4,893 posts
  • Real Name:Bill Kellum
  • Gender:Male
  • Location:Chicago

Posted 28 March 2007 - 04:21 AM

View Postsacaccess, on Mar 27 2007, 09:15 PM, said:

how can i add pages to my OSC that still use the STS place holders so i can make a custom page that has $checkoutbox or $"whatever" because if i just put that on a page and upload it it will say the holder not display the box... i hope this makes sense.. Actualy better yet how do i make it work in my includes/languages/english/index.php
Demetre,
Check out the contribution for adding new pages in the STSv4 Power Pack site (link in my signature below).
Also, keep in mind that in order for the tags to work, you must have the required code in the <head> of your page. See the provided blank sts template in the test folder that came with the STS contribution for an example.
Bill Kellum

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

#3516   thetechguy

thetechguy
  • Members
  • 6 posts
  • Real Name:Jon

Posted 28 March 2007 - 02:47 PM

View Postgmltw, on Mar 28 2007, 12:47 AM, said:

You should be able to change your font colors in your stylesheet.css file located in your root or catalog folder. Just look for the A class like this. Just change to the color you want to.

/*This is the Default Hyperlink Style with brown text and underlines*/
A {
	color: #731F17;
	text-decoration: underline;
	font-weight: bolder;
}

/*This is the Default ACTIVE Hyperlink Style when a mouse is hovering over it, with dusty blue text and no underline*/

A:hover {
  color: #6666CC;
  text-decoration: none;
  font-weight:normal;
}
If for some reason this does not change your link color then you have it set in another place as well (which is not needed).

Good luck,

Gary

first of all my stylesheet does not have this code and next when I change my stylesheet font sizes and color nothing happens - however when I uninstall sts4 I notice that the stylesheet did change the fonts on the lang\eng\index.php - what am I missing? do I also need to make sure that the correct code is in the head of my sts4 template to allow the style sheet to work?

Thanks for your help
Jon

#3517   gmltw

gmltw
  • Members
  • 61 posts
  • Real Name:Gary
  • Gender:Male
  • Location:US - Texas

Posted 28 March 2007 - 06:18 PM

View Postthetechguy, on Mar 28 2007, 08:47 AM, said:

first of all my stylesheet does not have this code and next when I change my stylesheet font sizes and color nothing happens - however when I uninstall sts4 I notice that the stylesheet did change the fonts on the lang\eng\index.php - what am I missing? do I also need to make sure that the correct code is in the head of my sts4 template to allow the style sheet to work?

Thanks for your help
Jon

I can not be sure without looking at your files but more likely than not it sounds like the font is being set in your STS template. Which is OK but in my opinion it is better to make it so that the style sheet does the changes. Can you paste the code from your catalog/includes/sts-templates/YOUR_TEMPLATE/index.php.html (Where YOUR_TEMPLATE is the name of your template you are using, could be full or basic if you have not created one. ) file for us to have a look at.

Gary

#3518   fenizol

fenizol
  • Members
  • 5 posts
  • Real Name:vangelis

Posted 28 March 2007 - 08:29 PM

Hi all,

I have installed the contribution, went to admin section and clicked install.
I then clicked edit and on the question "Do you want to use Simple Template System?", I chose True, and then UPDATE

However, my choice of enabling the STS system is not saved and it automatically returns to False, after everytime I click on the update button.

Any help will be appreciated.
Thanks

#3519   bkellum

bkellum
  • Members
  • 4,893 posts
  • Real Name:Bill Kellum
  • Gender:Male
  • Location:Chicago

Posted 28 March 2007 - 10:17 PM

View Postfenizol, on Mar 28 2007, 03:29 PM, said:

Hi all,

I have installed the contribution, went to admin section and clicked install.
I then clicked edit and on the question "Do you want to use Simple Template System?", I chose True, and then UPDATE

However, my choice of enabling the STS system is not saved and it automatically returns to False, after everytime I click on the update button.

Any help will be appreciated.
Thanks
I posted a response in the STSv4 forum.
Bill Kellum

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

#3520   shaneharper

shaneharper
  • Members
  • 11 posts
  • Real Name:Shane
  • Gender:Male
  • Location:Brampton, ON

Posted 29 March 2007 - 05:18 PM

I am having issues creating a custom template for a specific page.
The instructions in the documentation are not that detailed.
Could you please give me a run down

My understanding is to create a file in the /modules/sts/ folder
and to add a file in the sts_templates/test folder

Reading further into the documentation is tells off creating a specific module type.

Is there a way to customize a specific page without creating a module?


Shane