[contribution] Simple Template System (sts)
#81
Posted 25 September 2003, 01:22
Warning: main(STS_START_CAPTURE): failed to open stream: No such file or directory in /hsphere/local/home/cyberimp/impactapparel.biz/catalog/includes/application_top.php on line 511
Fatal error: main(): Failed opening required 'STS_START_CAPTURE' (include_path='.:/usr/local/lib/php') in /hsphere/local/home/cyberimp/impactapparel.biz/catalog/includes/application_top.php on line 511
Thanks,
Mike
#82
Posted 25 September 2003, 07:29
Quote
Warning: main(STS_START_CAPTURE): failed to open stream: No such file or directory in /hsphere/local/home/cyberimp/impactapparel.biz/catalog/includes/application_top.php on line 511
Fatal error: main(): Failed opening required 'STS_START_CAPTURE' (include_path='.:/usr/local/lib/php') in /hsphere/local/home/cyberimp/impactapparel.biz/catalog/includes/application_top.php on line 511
Thanks,
Mike
Mike,
I had the same problem with version 1.5, until I realized that I didn't add the neccessary lines to the config.php file (see below). After I added the lines to the config.php file, it worked perfectly. (thanks for the template solution Brian!)
---From version 1.5 readme.txt---
NOTE: configure-SAMPLE.php is included in the ZIP file, but you will have to
reenter all your configuration settings if you use it. It is easier
to just add the following lines to the bottom of your existing
/catalog/includes/configure.php:
// STS: ADD: Define Simple Template System files
define('STS_START_CAPTURE', DIR_WS_INCLUDES . 'sts_start_capture.php');
define('STS_STOP_CAPTURE', DIR_WS_INCLUDES . 'sts_stop_capture.php');
define('STS_RESTART_CAPTURE', DIR_WS_INCLUDES . 'sts_restart_capture.php');
define('STS_TEMPLATE', DIR_WS_INCLUDES . 'sts_template.html');
define('STS_DISPLAY_OUTPUT', DIR_WS_INCLUDES . 'sts_display_output.php');
define('STS_USER_CODE', DIR_WS_INCLUDES . 'sts_user_code.php');
// STS: EOADD
#83
Posted 25 September 2003, 10:17
I am having great problems trying to modify the 'breadcrumbs' navigation - I have the STS template contrib installed.
Is there a known problem with this? or has anyone had problems with it and know how to fix it? I've been searching the forums and trying different code for hours and I just can't get it to work.
#84
Posted 25 September 2003, 12:33
Just thought I'd add that when I try to add something to included/header.php (no matter what it is) it does not show up on the page.
I urgently need help with this - if someone could be so kind
thanks
#85
Posted 25 September 2003, 13:11
I don't need to edit the header.php file at all!
I knew that!
#86
Posted 25 September 2003, 15:57
veetkam, on Sep 24 2003, 03:09 PM, said:
. . . . . .
. . . . . .
If you have an old version, install the new one that fixes it. I think this was fixed in v1.3, current version is 1.4.
- Brian
. . . . . .
Actually, I have v1.5 with this problem.
I have the exactly same problem and - on some Pages (on checkout-process) there is an empty line on place for the "stylesheet-line" the result is therefore not "exactly" what i wish to see
I hope on a hint for a solution - aehm - did i mentioned that i find this contribution veeryyy helpfull (beside this actual problem) and that i wish to thank for that
In sts_template.php I have
<html> <head> <!--$headcontent--> </head> <body>
and in sts_display_output.php I uncommented the stylesheet line and commented out the get_javascript line
// Load up the <head> content that we need to link up everything correctly $template['headcontent'] .= '<meta http-equiv="Content-Type" content="text/html; charset=' . CHARSET . '">' . "\n"; $template['headcontent'] .= $sts_block['headertags']; $template['headcontent'] .= '<base href="' . (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG . '">' . "\n"; $template['headcontent'] .= '<link rel="stylesheet" type="text/css" href="stylesheet.css">' . "\n"; // $template['headcontent'] .= get_javascript($sts_block['applicationtop2header'],'get_javascript(applicationtop2header)');
and I get the following html
<html> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <title>My Title</title><base href="http://www.mysite.com/"> <link rel="stylesheet" type="text/css" href="stylesheet.css"> </head> <body>
HTH
#87
Posted 25 September 2003, 18:21
speckados, on Sep 24 2003, 10:05 PM, said:
Warning: session_start(): Cannot send session cookie - headers already sent by (output started at /home/hostin2/public_html/compras/includes/configure.php:54) in /home/hostin2/public_html/compras/includes/functions/sessions.php on line 67 Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /home/hostin2/public_html/compras/includes/configure.php:54) in /home/hostin2/public_html/compras/includes/functions/sessions.php on line 67
I had the same error. I fixed it by moving the ?> to the end of the file instead of leaving it before the sts modification.
BeerCan
In what file move ?> on cofigure.php ? I don't understand
#88
Posted 25 September 2003, 19:54
best,
Murray
#89
Posted 25 September 2003, 20:28
travisb, on Sep 25 2003, 10:57 AM, said:
veetkam, on Sep 24 2003, 03:09 PM, said:
. . . . . .
. . . . . .
If you have an old version, install the new one that fixes it. I think this was fixed in v1.3, current version is 1.4.
- Brian
. . . . . .
Actually, I have v1.5 with this problem.
I have the exactly same problem and - on some Pages (on checkout-process) there is an empty line on place for the "stylesheet-line" the result is therefore not "exactly" what i wish to see
I hope on a hint for a solution - aehm - did i mentioned that i find this contribution veeryyy helpfull (beside this actual problem) and that i wish to thank for that
In sts_template.php I have
<html> <head> <!--$headcontent--> </head> <body>
and in sts_display_output.php I uncommented the stylesheet line and commented out the get_javascript line
// Load up the <head> content that we need to link up everything correctly $template['headcontent'] .= '<meta http-equiv="Content-Type" content="text/html; charset=' . CHARSET . '">' . "\n"; $template['headcontent'] .= $sts_block['headertags']; $template['headcontent'] .= '<base href="' . (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG . '">' . "\n"; $template['headcontent'] .= '<link rel="stylesheet" type="text/css" href="stylesheet.css">' . "\n"; // $template['headcontent'] .= get_javascript($sts_block['applicationtop2header'],'get_javascript(applicationtop2header)');
and I get the following html
<html> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <title>My Title</title><base href="http://www.mysite.com/"> <link rel="stylesheet" type="text/css" href="stylesheet.css"> </head> <body>
HTH
Also, from your code snippets you aren't using the v1.5 code (no stylesheet tag in sts_template.html, and the stylesheet code is not commented out in sts_display_output.php.
I would try updating your files to the latest version of STS (v1.5 at the moment) and see if you still have the problems.
If the latest version doesn't fix it, It could be that my get_javascript() routine isn't working correctly please post a URL for me to look at the source of?
- Brian
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
#90
Posted 25 September 2003, 20:37
MurrayM, on Sep 25 2003, 02:54 PM, said:
best,
Murray
On my site I'm probably not going to use the $categorybox as the primary naviagation on my site. I might have it somewhere on the side, but I'll probably make a graphical menu system (like I put on http://jewelrydays.com [not my site, I just created it] ) as a simpler, more user-friendly navigation system. That's why I added the $urlcat_XXX links in v1.5 so that I could make links from my imagemaps.
Basically, my goal is to get osC to the point where it can do all the things that I've done with custom code before. It's a very powerful foundation, but I need something simple enough for my novice users to use, and the stock osC, um, isn't it. God help me trying to explain to someone how to use the Attributes!
Maybe I'll tackle that next...
- Brian
Edited by DiamondSea, 25 September 2003, 20:40.
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
#91
Posted 25 September 2003, 20:37
speckados, on Sep 25 2003, 06:21 PM, said:
speckados, on Sep 24 2003, 10:05 PM, said:
Warning: session_start(): Cannot send session cookie - headers already sent by (output started at /home/hostin2/public_html/compras/includes/configure.php:54) in /home/hostin2/public_html/compras/includes/functions/sessions.php on line 67 Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /home/hostin2/public_html/compras/includes/configure.php:54) in /home/hostin2/public_html/compras/includes/functions/sessions.php on line 67
I had the same error. I fixed it by moving the ?> to the end of the file instead of leaving it before the sts modification.
BeerCan
In what file move ?> on cofigure.php ? I don't understand
BC
#92
Posted 25 September 2003, 20:56
The programming/logic parts of OSC are written in PHP and are stored in what are basically HTML files.
The <? and ?> tags separate the PHP programming code from the HTML display code. If you want it to be a "programming command" as opposed to a "display command" you need the code to be between the <? and ?> tags.
In most of the header files, the entire file is enclosed in the <? and ?> tags, which means that it is all PHP programming code, not HTML display code.
For example, if you have this in a file "demo.php":
It would print out in your browser
That help at all?
- Brian
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
#93
Posted 25 September 2003, 21:13
Quote
Also, from your code snippets you aren't using the v1.5 code (no stylesheet tag in sts_template.html, and the stylesheet code is not commented out in sts_display_output.php.
I would try updating your files to the latest version of STS (v1.5 at the moment) and see if you still have the problems.
If the latest version doesn't fix it, It could be that my get_javascript() routine isn't working correctly please post a URL for me to look at the source of?
- Brian
I am using v1.5, I was showing the changes I made to get it to work for me. You can the output from my stock v1.5 in my first post here: http://forums.oscommerce.com/index.php?sho...ndpost&p=233195
#94
Posted 26 September 2003, 14:42
for example - $myaccount - shows "My Account", can I define one like $myhistory = "My History" ?
#95
Posted 26 September 2003, 15:02
beercan, on Sep 25 2003, 09:37 PM, said:
speckados, on Sep 25 2003, 06:21 PM, said:
speckados, on Sep 24 2003, 10:05 PM, said:
Warning: session_start(): Cannot send session cookie - headers already sent by (output started at /home/hostin2/public_html/compras/includes/configure.php:54) in /home/hostin2/public_html/compras/includes/functions/sessions.php on line 67 Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /home/hostin2/public_html/compras/includes/configure.php:54) in /home/hostin2/public_html/compras/includes/functions/sessions.php on line 67
I had the same error. I fixed it by moving the ?> to the end of the file instead of leaving it before the sts modification.
BeerCan
In what file move ?> on cofigure.php ? I don't understand
BC
define('STORE_SESSIONS', 'mysql'); // leave empty '' for default handler or set to 'mysql'
define('STS_START_CAPTURE', DIR_WS_INCLUDES . 'sts_start_capture.php');
define('STS_STOP_CAPTURE', DIR_WS_INCLUDES . 'sts_stop_capture.php');
define('STS_RESTART_CAPTURE', DIR_WS_INCLUDES . 'sts_restart_capture.php');
define('STS_TEMPLATE', DIR_WS_INCLUDES . 'sts_template.html');
define('STS_DISPLAY_OUTPUT', DIR_WS_INCLUDES . 'sts_display_output.php');
define('STS_USER_CODE', DIR_WS_INCLUDES . 'sts_user_code.php');
?>
And error show line 51. This it's >?.
I'm looking for a returb carriage or any stupid problem, but all code it's well. All lines end with a CR return.
I'm lost.
Error page
#96
Posted 27 September 2003, 02:47
Did I miss a solution? I do need Javascript to work as I use javascript rollovers for navigation so commenting out that portion won't be good for me.
Just to be sure I did a second clean install on a different server/domain, and but this time I added WebMakers.com's Header Tag Controller contribution afterwords to see the results...
The first HTML/Header tags include the header tag controller contents,
The second set are normal HTML/Head/ Etc. but not the content in the meta tags.
Granted I have not yet had time to dig through yet.... SO does anyone have a correction?
#97
Posted 27 September 2003, 06:44
This is how mine appears
<html> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <title>Shop</title> <base href="http://www.mydomain.com.au/catalog/"> <!-- start get_javascript(applicationtop2header) //--> <!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN"> <html dir="LTR" lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <title>Shop</title> <base href="http://www.mydomain.com.au/catalog/"> <link rel="stylesheet" type="text/css" href="stylesheet.css"> </head> <body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0"> <!-- header //--> <!-- end get_javascript(applicationtop2header) //-
Edited by coiL, 27 September 2003, 06:46.
#98
Posted 27 September 2003, 11:55
coiL, on Sep 27 2003, 01:44 AM, said:
I just uploaded a new version 1.6 which corrects this problem.
Here's the (stupid) fix for the (stupid) mistake I made in the file:
In sts_display_output.php line 354 in the get_javascript function remove the variable $tmpstr from the returned string.
Replace:
return "\n<!-- start $commentlabel //-->\n$tmpstr\n<!-- end $commentlabel //-->\n";With this:
return "\n<!-- start $commentlabel //-->\n\n<!-- end $commentlabel //-->\n";It was a stupid, stupid error. I apologize to everyone for the hassle.
- Brian
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
#99
Posted 27 September 2003, 12:27
// If empty, return nothing
if ($tablestart === false) {
return "\n";
}
Great fix
Is it possible to use php in the sts_template? or does anyone know how I could make it so that the "My Account" etc only displays when the user is logged in?
I don't need to know the code, just where abouts I could edit it.
thanks
#100
Posted 27 September 2003, 16:00
Warning: main(includes/sts_restart_capture.php): failed to open stream: No such file or directory in /home/jim/public_html/catalog/includes/header.php on line 15
Fatal error: main(): Failed opening required 'includes/sts_restart_capture.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/jim/public_html/catalog/includes/header.php on line 15














