Jump to content
Sign in to follow this  
mig7

Sts Mega Power Pack

Recommended Posts

hi matt, great contribution.

 

i have spent the day installing it on RC1 as that is what was available on the oscommerce site and i had already made many mods and was reluctant to take my site back to ground zero i wish someone would build a top ten list of mods to make before any others... probably would become pretty political. anyway, it can become a bit of a house of cards when one's knowledge is limited to just enough to break things.

 

i too am having these errors and removing white spaces ( a suggestion i found from way back too) did not work for me. i am not sure i can re-do the database given that i have made mods already. however, if you are really sure about that approach, i will restore the original...

 

i manually installed the powerpack and excluded the globals as i was concerned about conflicts given that this is RC1.

 

any thoughts on what i should do at this point would be appreciated. thanks.

 

please keep us updated on your rc1 install as i have not attempted it yet, however there is much code in the register globals contrib, dispersed accross many files and it would be a right pig to remove it all. better still i can give you all the additional contribs together without reglobs but it will take a couple of days filtering through it myself.

 

this contrib is currently UNTESTED OR IS NOT BUILD FOR RC1. the reason being, i only heard about rc1 yesterday approx and had virtually completed this contrib for the previous version of osc. sorry a little behind the times still myself.

Share this post


Link to post
Share on other sites
please keep us updated on your rc1 install as i have not attempted it yet, however there is much code in the register globals contrib, dispersed accross many files and it would be a right pig to remove it all. better still i can give you all the additional contribs together without reglobs but it will take a couple of days filtering through it myself.

 

this contrib is currently UNTESTED OR IS NOT BUILD FOR RC1. the reason being, i only heard about rc1 yesterday approx and had virtually completed this contrib for the previous version of osc. sorry a little behind the times still myself.

 

so far, i am having some trouble with the dynamenu portion but i believe it is my error with configuring the proper root directory in the configure.php file. my hosting service, siteground, only shows me my root directory and then into pubic_html etc... but again, that is something i will investigate further.

 

as i mentioned, i installed your contribution manually using winmerge. i tried to avoid any changes that were GLOBAL in nature, no pun intended...

 

however, i am not familiar with all of the changes in RC1, nor am i anywhere near the comptency level required to understand all of the implications. i have to say that this site can be frustrating as it like joining a long running soap opera and not understanding the history.

 

for example, i installed the STS v4.5.2 / Dynamenu combination manually. now i see that i should have used v4.5.3 STS

 

i will continue to test, but boy, i have affected so many files at this point.... at least i backed everything up first!

 

thanks for your help so far.


Gregg Kittell

Technology Consultant

902.665.4067

Gregg@GreggKittell.com

Share this post


Link to post
Share on other sites
default setup:

 

just incase i mistyped or copied something accross here is what it should be:

 

Files for normal template

Files to include for a normal template, separated by semicolon

 

sts_user_code.php;headertags.php

 

what i think you have done is:

 

Default template file

Name of the default template file

 

sts_template.html;headertags.php

 

headertags.php is a file to be included the same way as sts_user_code whereas sts_template.html is the actual template file that you edit depending upon you particular layout/design/style etc

 

i believe that if you check this and admend you will have things working properly including htc

 

matt

 

yes, you are ban on matt. thanks again.


Gregg Kittell

Technology Consultant

902.665.4067

Gregg@GreggKittell.com

Share this post


Link to post
Share on other sites
so far, i am having some trouble with the dynamenu portion but i believe it is my error with configuring the proper root directory in the configure.php file. my hosting service, siteground, only shows me my root directory and then into pubic_html etc... but again, that is something i will investigate further.

 

as i mentioned, i installed your contribution manually using winmerge. i tried to avoid any changes that were GLOBAL in nature, no pun intended...

 

however, i am not familiar with all of the changes in RC1, nor am i anywhere near the comptency level required to understand all of the implications. i have to say that this site can be frustrating as it like joining a long running soap opera and not understanding the history.

 

for example, i installed the STS v4.5.2 / Dynamenu combination manually. now i see that i should have used v4.5.3 STS

 

i will continue to test, but boy, i have affected so many files at this point.... at least i backed everything up first!

 

thanks for your help so far.

 

alright, i am going to start again and install your powerpack contribution on to my modifed RC1 configuration. i will avoid globals and see how it goes. i hope it will be of some assistance to others and it is chance for me to contribute some time (if not expertise...) to the OScommerce community. i will keep you posted on my progress. wish me luck!


Gregg Kittell

Technology Consultant

902.665.4067

Gregg@GreggKittell.com

Share this post


Link to post
Share on other sites
alright, i am going to start again and install your powerpack contribution on to my modifed RC1 configuration. i will avoid globals and see how it goes. i hope it will be of some assistance to others and it is chance for me to contribute some time (if not expertise...) to the OScommerce community. i will keep you posted on my progress. wish me luck!

 

good luck... ;o)

 

for anyone else... the contribution will work as is with the old version of osc named ms2.2 060817.

 

to find your.... as quoted above...

 

so far, i am having some trouble with the dynamenu portion but i believe it is my error with configuring the proper root directory in the configure.php file. my hosting service, siteground, only shows me my root directory and then into pubic_html etc... but again, that is something i will investigate further.

 

 

try making up a new php file and put into it something like this:

 

<?php

echo '<br>****************************************************************************';

echo '<br>Variables for sts_external_pages_templates setup';

echo '<br>Please see your catalog/includes/configure.php file.';

echo '<br>****************************************************************************';

 

$catalog_dir_name = substr(dirname(getenv('SCRIPT_NAME')), 1, -8);

ECHO '<bR>catalog_dir_name = '.$catalog_dir_name;

 

$script_filename = getenv('PATH_TRANSLATED');

if (empty($script_filename)) {

$script_filename = getenv('SCRIPT_FILENAME');

}

$script_filename = str_replace('\\', '/', $script_filename);

$script_filename = str_replace('//', '/', $script_filename);

$dir_fs_www_root_array = explode('/', dirname($script_filename));

$dir_fs_www_root = array();

for ($i=0, $n=sizeof($dir_fs_www_root_array)-1; $i<$n; $i++) {

$dir_fs_www_root[] = $dir_fs_www_root_array[$i];

}

 

$dir_fs_www_root = implode('/', $dir_fs_www_root) . '/';

$dm_root = $dir_fs_www_root;

$dm_root = substr($dm_root, 0, 0);

echo '<br>dm root = '.$dm_root;

 

echo '<br>****************************************************************************';

?>

essentially what you want to do is echo to the screen the full root path. there are examples of this being done through the install files. the above code i adopted and placed in install/templates/pages/install_7.php so that the defined variable in configure has the correct setting.

 

as for dm_header.php in dynamenu, because i have already done the variable build, you then need define it in configure.php or another file say path.php(after install) then put this varaible name in the correct place in dm_header.php as mentioned above.

 

to start with --- the variable name you need is $dm_root in the example above.

 

$dm_root = substr($dm_root, 0, -1); ------

-------substr() will cut bits out from the start and end but ive set this to 0,0 so nothing will get cut. so dont worry about that.

 

this is only a very quick write up but should give you an idea of how to go about it. the above code will therefore need some tinkering but tinkering is what makes us learn so have fun....

 

matt

Share this post


Link to post
Share on other sites

.SQL FILES what are they all about?

 

ive been playing again and have come across a nifty technique of editing all your product info altogether reasonably easilly. when uploaded to mysql via phpmyadmin all your products are edited within 0.3 seconds...... depending on the size of your catalog of course.

 

what ive done is from admin, download a backup of your catalog. make a copy as it is. take the copy and edit it through admin tools - this separates it out with spaces so you can read it easilly. what you have here is a full backup of you catalog. now go through it an cutout everything not related to your products. essentially there are three table builds you need...

 

products

product_descriptions

products_to_catagories.

 

something like that.

 

edit and make readable without deleating any necessary ():"@ bla bla bla code stuff. now you have one file from which to update everything to do with your products. follow the layout and you shouldnt go wrong.... test on new osc install on localhost and new populaTED DB so you dont distroy anything first. easy update the prices, description etc. i.e. everything you would do through many admin clicks but all thourgh one file

 

next copy and paste your new sql code into myphpadmin under the sql tab i believe, and hey presto updated products.

 

though you might like to play with this one..... ;o)

 

matt

Share this post


Link to post
Share on other sites

above is harder if your catalog is really really really really really really really really really really really really really BIG!

 

oh and yea - you need to drop the tables first before reloading product info - i think - because it will try to reload over already existing data which may through up loadsa horrid errors.

 

p.s. dont ask me for a contrib for this..... ;o)

 

p.p.s been watching DOCTOR WHO which is cool and im quite hiped --- thus the spelling mistakes ;o0

Edited by MatthewRitchie

Share this post


Link to post
Share on other sites

looke ere --- OSCOMMERCE/STS_M_P_P_V2.zip 155 --- THATS 155 DOWNLOADS OF MY CONTRIB TO DATE

 

COOL! AWSTATS!

 

see it pays to have contribs on your own server! you can see how many people are interested! have fun all.... ;o)

Edited by MatthewRitchie

Share this post


Link to post
Share on other sites
alright, i am going to start again and install your powerpack contribution on to my modifed RC1 configuration. i will avoid globals and see how it goes. i hope it will be of some assistance to others and it is chance for me to contribute some time (if not expertise...) to the OScommerce community. i will keep you posted on my progress. wish me luck!

 

Hi Matt,

 

here's an update of my progress with installation on RC1:

 

i'm afraid that having used a modified OScommerce that my results may not be truly representational....

i manually installed your contribution and excluded all the GLOBAL fixes.

 

GLOBALS portion: not applicable

 

STS: installed and working well except for a conflict with another contribution (country-state selector) that does not refresh properly. this is a known issue with STS and i am still working on it. it is supposed to have something to do with the formcheck.js.php not being used by STS. refresh works fine when STS is not installed. could STS being using its own form for refreshing?

 

STS_EXTERNAL:

"home" directory in root needs to be changed to "Home" in order to work properly.

 

not clear on final path.php as i installed manually. have had some trouble with path resolution on application_top.php when accessed from the root directory

rather than the "catalog" directory. modifications to application_top.php creating errors... again, dependent on the path.php final look. you mentioned in your installation instructions that path.php would change(?) unsure about this point. will review your latest posting about this.

 

DYNAMENU

menu boxes appear but do not appear as drop downs. just as a more regular looking menu tree. could be something i am doing.


Gregg Kittell

Technology Consultant

902.665.4067

Gregg@GreggKittell.com

Share this post


Link to post
Share on other sites
default setup:

 

just incase i mistyped or copied something accross here is what it should be:

 

Files for normal template

Files to include for a normal template, separated by semicolon

 

sts_user_code.php;headertags.php

 

what i think you have done is:

 

Default template file

Name of the default template file

 

sts_template.html;headertags.php

 

headertags.php is a file to be included the same way as sts_user_code whereas sts_template.html is the actual template file that you edit depending upon you particular layout/design/style etc

 

i believe that if you check this and admend you will have things working properly including htc

 

matt

This is actually incorrect...

 

In order for STS and HTC to be configured properly in the STS Modules, it should be setup as the following:

 

For example:

For the Default module, you have a parameter named “Files for normal template”. By default it contains only “sts_user_code.php”. If you modify this parameter to “sts_user_code.php;headertags.php”, you will have Header Tags Controller working for all of the pages using the default template.

 

Do the same for the other STS modules below:

For the Index module, the parameter is called “Files for index.php template”.

For Product Info module, there are 2 parameters:

“Files for normal template”

“Files for content template”.


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
STS_EXTERNAL:

"home" directory in root needs to be changed to "Home" in order to work properly.

yup! forgot to mention it but is easilly ammended in filenames.php - from memory i believe i put in Home.php. YUP AGAIN just checked:

define('FILENAME_HOME', 'Home.php' );

 

not clear on final path.php as i installed manually. have had some trouble with path resolution on application_top.php when accessed from the root directory rather than the "catalog" directory. modifications to application_top.php creating errors... again, dependent on the path.php final look. you mentioned in your installation instructions that path.php would change(?) unsure about this point. will review your latest posting about this.

 

[[[me: ive kept osc deliberately separate because root will soon get very messy with loads of files. by keeping root organised as you would with your my_documents or home/burt folders it makes site planing and "cleanup" much easier]]]

 

path.php is updated during the install process as you can see in install/templates/pages/install_7.php.

prior to install it will only serve to allow the configuration file to be read. ie it does exactly what application top does i.e.

require(includes/configure.php)

after install it should be:

define('CATALOG_DIR_NAME', 'catalog');

this is to make sure that your catalog directories name is correctly inserted is the right files to make externatl pages templates work.

 

from what you say above it sounds like you are putting all you catalog folder files into the root folder ie htdocs(apache) for instance.

you will therefore have to jiggle all the files relating to external templates to make sure the paths are being created correctly. my suggestions of adding your own debug code will helf extensively. i believe i left some in place in the sts_template.html file.

 

if all files including the osc files are in root you shouldnt need the fixes to html_output.php, application top.php and others that are using the ifelse(is this the catalog folder? yes do){this}otherwise{make your links flow from root} statements that amend the paths appropriately. if you edit these out you should be able to simply use amendments to the filename.php defined filenames so that the these point to the correct folders and files.

 

because you have likely installed into htdocsroot. configure.php has no reference to /catalog/ or /shop/ etc and you dont need to learn how to juggle 'behind my back' like i did.

 

define('CATALOG_DIR_NAME', 'catalog'); is part of the juggling act and you may be able to dispense with it.

 

DYNAMENU menu boxes appear but do not appear as drop downs. just as a more regular looking menu tree. could be something i am doing.

 

paths in boxes/dm_header.php need editing relative for root - also image directory/icons etc paths need editing to reflect the relative paths to your catalog/images directory. this should resolve the dm problems. normally flyouts dont work because the dm_footer is not outputed but i have done this at the bottom of application bottom. other methods did not work quite as well. the other reason for flyouts not working is the absolute and relative paths as mentioned in dm_header above.

Share this post


Link to post
Share on other sites

Dynamenu external pages links are now covered by the session!

 

here is the trick:

 

this is the code that creates your sessions compliant links:

. tep_href_link(FILENAME_DOWNLOADS, '', 'EXT') .

tip: you can copy and paste the above from includes/modules/sts_inc/sts_user_code.php

 

hence it needs to be used with-in the code/.txt that builds the navigation layers in dynamenu; reminder - they look like this at the moment:

 

.|Home|http://bluegreentechnologies.com/index.php|Home

.|Company|http://bluegreentechnologies.com/Home.php|About Us

..|About Us|http://bluegreentechnologies.com/Company/About_Us.php|About Us

..|Contact Us|http://bluegreentechnologies.com/Company/contact.php|Contact Us

..|Technical Info|http://bluegreentechnologies.com/Company/Technical_Info.php|Technical Info

..|Downloads|http://bluegreentechnologies.com/Company/Downloads.php|Downloads

 

but adding tep href to layersmenu-horizontal-1.txt doesnt work because it is not a php file. i did try with changing it to .php and doing the recode but it was not liked!

 

however you can do this:

 

goto ---> boxes/dm_header.php

 

change this

// $mid->setMenuStructureFile(DIR_WS_FUNCTIONS . 'dynamenu/layersmenu-horizontal-1.txt.php');

to this:

 

$navmenu =

 

".|Index|" . tep_href_link(FILENAME_HOME_INDEX, '', 'EXT') . "|Index\n".

".|Home|" . tep_href_link(FILENAME_HOME, '', 'EXT') . "|Home\n".

".|Company|" . tep_href_link(FILENAME_ABOUT_US, '', 'EXT') . "|About Us\n".

"..|About Us|" . tep_href_link(FILENAME_ABOUT_US, '', 'EXT') . "|About Us\n".

"..|Contact Us|" . tep_href_link(FILENAME_CONTACT, '', 'EXT') . "|Contact Us\n".

"..|Technical Info|" . tep_href_link(FILENAME_TECH_INFO, '', 'EXT') . "|Technical Info\n".

"..|Downloads|" . tep_href_link(FILENAME_DOWNLOADS, '', 'EXT') . "|Downloads\n";

 

$mid->setMenuStructureString($navmenu);

 

and all your links will be sessions compliant!

 

a neet trick ;o)

 

matt

Edited by MatthewRitchie

Share this post


Link to post
Share on other sites

does it sometimes seem like i am typing this to myself? hello where is everybody ;o) feel free to simply say hi to let me know this is of help to you.

cheers

matt

Share this post


Link to post
Share on other sites

Hi,

 

I installed the megapowerpack today and when I entered the admin-panel all seemed to be ok. STS and Headertag section was there. I activated STS and than I went to the Headertags, filled the tags and tried to set Title etc for index. But it doesnt change! No warnings (after the initial chmod-warnings which i solved). I can't find the development or documents folder that is talked about in README configuration.txt. Am I missing something? Is there another configuration-round that I missed? is the zip-file not complete?

 

I have been trying to get this HTC and STS combination going for 2 days now. Don't know anymore where to look next.

 

TIA

gina

Share this post


Link to post
Share on other sites
Hi,

 

I installed the megapowerpack today and when I entered the admin-panel all seemed to be ok. STS and Headertag section was there. I activated STS and than I went to the Headertags, filled the tags and tried to set Title etc for index. But it doesnt change! No warnings (after the initial chmod-warnings which i solved). I can't find the development or documents folder that is talked about in README configuration.txt. Am I missing something? Is there another configuration-round that I missed? is the zip-file not complete?

 

I have been trying to get this HTC and STS combination going for 2 days now. Don't know anymore where to look next.

 

TIA

gina

Gina,

I am not the author of the MegaPack but I am an author of STS & HTC bundle. Lets take a look at a few things....

  1. Does everything appear to work except the Page Title and Descriptions for the index page?
  2. If #1 is not your issue, Does your metatags appear to be working as you have set them up in the Header Tags Admin page control settings?

For #1, STS does not add the HTC title code automatically. This is by design since STS allows the designer to create specific category and product templates in which the designer could add whatever "flare" he/she desired.

 

If you prefer to do it the HTC way, you will need to add the HTC code for the catalog/index.php file (only this file) as follows:

 

Find the following lines in index.php

 

Around line 70:

 

Find

 

 

if ($category_depth == 'nested') {
$category_query = tep_db_query("select cd.categories_name, c.categories_image from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.categories_id = '" . (int)$current_category_id . "' and cd.categories_id = '" . (int)$current_category_id . "' and cd.language_id = '" . (int)$languages_id . "'");

and replace with

 

 

if ($category_depth == 'nested') {
$category_query = tep_db_query("select cd.categories_name, c.categories_image, cd.categories_htc_title_tag, cd.categories_htc_description from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.categories_id = '" . (int)$current_category_id . "' and cd.categories_id = '" . (int)$current_category_id . "' and cd.language_id = '" . (int)$languages_id . "'");

=============================================

Around line 78:

 

Find

 

 

<td class="pageHeading"><?php echo HEADING_TITLE; ?></td>
<td class="pageHeading" align="right"><?php echo tep_image(DIR_WS_IMAGES . $category['categories_image'], $category['categories_name'], HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT); ?></td>
  </tr>

and replace it with

 

		   <td><h1><?php echo $category['categories_htc_title_tag']; ?></h1></td>
	   <td class="pageHeading" align="right"><?php echo tep_image(DIR_WS_IMAGES . $category['categories_image'], $category['categories_name'], HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT); ?></td>
	  </tr>
	   <?php if (tep_not_null($category['categories_htc_description'])) { ?> 
	  <tr>
	   <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
	  </tr>
	  <tr>
	   <td><h2><?php echo $category['categories_htc_description']; ?></h2></td>
	  </tr>
	  <?php } ?>

=============================================

Around line 247:

 

Find

 

 

?>
<td width="100%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="0">
  <tr>
	<td><table border="0" width="100%" cellspacing="0" cellpadding="0">
	  <tr>
		<td class="pageHeading"><?php echo HEADING_TITLE; ?></td>

and replace it with

 

 

if (isset($HTTP_GET_VARS['manufacturers_id'])) 
  $db_query = tep_db_query("select manufacturers_htc_title_tag as htc_title, manufacturers_htc_description as htc_description from " . TABLE_MANUFACTURERS_INFO . " where languages_id = '" . (int)$languages_id . "' and manufacturers_id = '" . (int)$HTTP_GET_VARS['manufacturers_id'] . "'");
else 
  $db_query = tep_db_query("select categories_htc_title_tag as htc_title, categories_htc_description as htc_description from " . TABLE_CATEGORIES_DESCRIPTION . " where categories_id = '" . (int)$current_category_id . "' and language_id = '" . (int)$languages_id . "'");

$htc = tep_db_fetch_array($db_query);
?>
<td width="100%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="0">
  <tr>
	<td><table border="0" width="100%" cellspacing="0" cellpadding="0">
	  <tr>
		<td><h1><?php echo $htc['htc_title']; ?></h1></td>

Around line 298

 

Find

 

   <td align="right"><?php echo tep_image(DIR_WS_IMAGES . $image, HEADING_TITLE, HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT); ?></td>
 </tr>

REPLACE with

 

		   <td align="right"><?php echo tep_image(DIR_WS_IMAGES . $image, $category['categories_htc_title_tag'], HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT); ?></td>
	  </tr>		   
	  <?php if (tep_not_null($htc['htc_description'])) { ?> 
	  <tr>
	   <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
	  </tr>
	  <tr>
	   <td colspan="2"><h2><?php echo $htc['htc_description']; ?></h2></td>
	  </tr>
	  <?php } ?>

 

For issue #2, Have you run the Fill Tags routine inside the HTC admin?

 

Hope the above helped you out,


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 Bill,

 

I was so focused on getting HTC to work (I got the STS working separately a few weeks ago) that I didn't check the STS part. Turns out that isn't working either. But I am confused about the "STS-way"and the "HTC-way". I just want to be able to have 2 or 3 templates for the whole shop STS-style AND be able to have an adjustable title, description and keyword-tag either inserted by me or generated based on what product is showing. And not only in english, also in dutch. I thought I could do that with HTC and STS together. So I think I need the STS-way, not the HTC-way. I will try to get your bundle working (again). Don't be surprised if I am back in a few days with new questions ;)

 

Thanks again.

 

Gina

Edited by chemjul2005

Share this post


Link to post
Share on other sites
Hi Bill,

 

I was so focused on getting HTC to work (I got the STS working separately a few weeks ago) that I didn't check the STS part. Turns out that isn't working either. But I am confused about the "STS-way"and the "HTC-way". I just want to be able to have 2 or 3 templates for the whole shop STS-style AND be able to have an adjustable title, description and keyword-tag either inserted by me or generated based on what product is showing. And not only in english, also in dutch. I thought I could do that with HTC and STS together. So I think I need the STS-way, not the HTC-way. I will try to get your bundle working (again). Don't be surprised if I am back in a few days with new questions ;)

 

Thanks again.

 

Gina

The confusing part comes in when HTC tries to do more than it should (in my opinion). What I mean is, HTC should focus on metatag data regarding search engines and such and leave design alone (to a template engine such as STS). Keep in mind, both contributions play a very important role and I use both to accomplish what I need from each.

If you want to use HTC in all its glory, then you will need to add the code I mentioned above. This will allow you to add your titles and descriptions via the HTC admin just as other non-sts users do.

If you want to use HTC just for the keyword search engine tags, then leave the above code alone and then use STS to place your titles and descriptions per specific template pages. The STS User Manual has a hack available to insert dynamic page titles according to category & product. It is basically the same thing that HTC does in the above code. I put this in the manual a long time ago to replace the stock osC titles that screwed with the overall design of the templates. Titles such as "What's New" and "Let's see what we have here", etc.

 

Overview: Using HTC to handle your titles and descriptions is not a "bad" thing but it just adds more to the STS $content tag. With that said, STS "will" automatically add the HTC keyword and description metadata without the extra code above by placing the <!--$headcontent--> in the head of each of your template pages. What I mean here is it adds the "invisible" keyword tags that is not seen in the browser but is picked up by the search engines. Search engines will also pick up text within your template page itself.

 

Also, I can not vouch for the integrity of the STS version that is included in the mega pack since I have not had a chance to test it. If all you are wanting is STS and HTC to work together, then I would suggest that you install the latest STS/HTC bundle that I have available on the STS Power Pack site (a site that lists available STS add-ons and STS tips) or use my STS/HTC step by step install guide (see link in my signature below).

Edited by bkellum

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

I"m getting this error after I install oscommerce-2.2ms2-060817 into public_html/catalog_test and the STS MEGA ++

 

Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/XXX/public_html/catalog_test/includes/configure.php:151) in /home/XXX/public_html/catalog_test/includes/functions/sessions.php on line 98

 

what am i doing wrong?

Edited by kenji815

Share this post


Link to post
Share on other sites
I"m getting this error after I install oscommerce-2.2ms2-060817 into public_html/catalog_test and the STS MEGA ++

 

Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/XXX/public_html/catalog_test/includes/configure.php:151) in /home/XXX/public_html/catalog_test/includes/functions/sessions.php on line 98

 

what am i doing wrong?

 

i may be wrong but....

 

This is saying that there is a descrepancy in the functioning of a function, probably because a defined variable which you will find the the file configure.php does not relate correctly to the variable call in a function located in the sessions.php.

 

you may want to open the two files and see what resides on these two lines mentioned.

 

it seems that the problem is to do with the addin header tags contribution. unfortunately I am not well self taught on this contribution yet. but look for code relating to header tags.

 

depending on which contribution pack you have down loaded (you may have a much older contrib) the problem may have been resolved already. or there may be an answer under the header tags contrib threads. let me know what the file name is so i can pin down the problem better.

 

matt

Share this post


Link to post
Share on other sites
I"m getting this error after I install oscommerce-2.2ms2-060817 into public_html/catalog_test and the STS MEGA ++

 

Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/XXX/public_html/catalog_test/includes/configure.php:151) in /home/XXX/public_html/catalog_test/includes/functions/sessions.php on line 98

 

what am i doing wrong?

 

Hi kenji815

 

i am back at it again here. i have just been doing a new site rebuild and what a nightmare working on the remote server.!#?

I have com across the same problem as you have above and will try to resolve it and bring you an answer. so far i think it may be to do with how or more to the point when the database_setup.php is done for headertags. i will try a couple of different techniques and see what i can come up with.

 

matt

Share this post


Link to post
Share on other sites
I"m getting this error after I install oscommerce-2.2ms2-060817 into public_html/catalog_test and the STS MEGA ++

 

Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/XXX/public_html/catalog_test/includes/configure.php:151) in /home/XXX/public_html/catalog_test/includes/functions/sessions.php on line 98

 

what am i doing wrong?

 

Hi again,

 

Yup, found the problem to the above warning message. I dont know why it should matter but you will see when you make the edits.

 

open [catalog]shop/includes/configure.php

 

scroll down to the very bottom and you will see extra line spaces below the closing '?>'.

 

delete these and the problem will vanish into the eather. weird ey!

 

i think this has been mentioned before in this thread but here it is again just in case.

 

p.s. i built this contrib with all osc catalog files in a folder called 'shop' hence you will get errors in the external files such as index.php, Home.php and also files in the Company folder. you may get around this the easy way by doing the same, i.e. put your osc catalog files in a folder called 'shop' or you may open the external files and edit in you catalog folder name.

this is also the case for the dynamenu files as i have mentioned above but reitterated here again too.

 

dm_header and dm_treemenu in the includes/boxes folder

 

two changes needed

 

(1) change $myDirPath = '/home/****/public_html/'; to your directory path,

it may look like this for microsoft servers:

$myDirPath = '/Program Files/Apache Group/Apache2/htdocs/';

 

(2) change 'shop' in

$mid->setImgdir($myDirPath . 'shop/images/');

$mid->setImgwww($myWwwPath . 'shop/images/');

$mid->setIcondir($myDirPath . 'shop/images/');

$mid->setIconwww($myWwwPath . 'shop/images/');

to your catalog folder name.

 

if you need to restart an install be sure to replace catalog/admin/includes/configure.php and catalog/includes/configure.php with the installation files respectively, this allows the first install screen to open rather than going back to the catalog shop front index.php.

 

hope these tips help

 

matt

Share this post


Link to post
Share on other sites
p.s. i built this contrib with all osc catalog files in a folder called 'shop' hence you will get errors in the external files such as index.php, Home.php and also files in the Company folder. you may get around this the easy way by doing the same, i.e. put your osc catalog files in a folder called 'shop' or you may open the external files and edit in you catalog folder name.

this is also the case for the dynamenu files as i have mentioned above but reitterated here again too.

Matt,

:thumbsup: You could solve the confusion in those files by dynamically calling for the catalog folder name which is already defined in the core osCommerce code. OsCommerce is designed in such a way that once a variable is defined such as the catalog in configure.php, you can call for it in any file without having to manually add the catalog name every time you edit those files. Call for the defined catalog and then it will grab the correct one every time.

 

Simple example:

echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>">

 

Hope this helps you out,


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
Matt,

:thumbsup: You could solve the confusion in those files by dynamically calling for the catalog folder name which is already defined in the core osCommerce code. OsCommerce is designed in such a way that once a variable is defined such as the catalog in configure.php, you can call for it in any file without having to manually add the catalog name every time you edit those files. Call for the defined catalog and then it will grab the correct one every time.

 

Simple example:

echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>">

 

Hope this helps you out,

 

I would like to take this opportunity to elabourate some on the workings of my contribs here.... especially sts_external_template_pages.

 

The majority of my contribs use the config file extensively in this way as you say, however the external template pages need to call the configure.php via applicationtop.php directly before they can use the contained defined variables. i.e. for templates to work externally to the catalog folder the files must call applicationtop via an inclued or require statement. at present there is no function in the install process that will write these path variables because firstly i have only supplied very basic external files for de'monster'ation and secondly i have only gone one folder deep but when new folders goind three/four deep, each new folder will need a local template folder like the sts ones i have provided, as well as an osc layout file. ]the layout file is in which someone would build there ''new page'' acording to the body text areas as done in osc.] in each layout file 'newpage' one would need to edit the path to applicationtop.php found in osc/cat/includes.

 

example: considder the file www[root]/company/about_us.php

 

note my catalog folder is called 'shop'

 

define('DIR_WS_INCLUDES', '../shop/includes/' );------------just predefines where to find the includes folder - it is here because there is no facility for pointing to varying degrees of folder depth outside catalog [this is done ok for www[root] in configure.php - see the if else statement but things get complicated from one folder deep onwards.....]

 

define('STYLESHEET', '../shop/stylesheet.css' );--------not really needed because is done in sts_template.html - redundant?

 

include('../shop/includes/application_top.php'); ----- important for templates to work externally to osc catalog folder, the '../' points to the parent directory i.e. www[root]

 

require('lang_en_About_Us.php'); --------- language file for new external pages is in the same folder --- these are only necessary for defined variables such as HEADING_TITLE and TEXT_INFORMATION but these could be illiminated altogether if desired. p.s. i had problems trying to use the osc includes/languages folder using config defined path variables but it should be an easy work around if desired.

 

$breadcrumb->add(NAVBAR_TITLE, tep_href_link('../'.FILENAME_ABOUT_US)); --- see includes/filenames.php for filename structure - i.e. putting partial paths infront of the file name so that the breadcrum links work correctly. also note the '../' pointing to www[root] as viewed from the catalog folder.

 

apart from the above the layout file is the same as a standard osc file - you need to keep things like:

 

<!-- left_navigation //-->

<?php require(DIR_WS_INCLUDES . 'column_left.php'); ?>

<!-- left_navigation_eof //-->

 

and

 

<!-- right_navigation //-->

<?php require(DIR_WS_INCLUDES . 'column_right.php'); ?>

<!-- right_navigation_eof //-->

 

and

 

<!-- footer //-->

<?php require(DIR_WS_INCLUDES . 'footer.php'); ?>

<!-- footer_eof //-->

 

so that all the boxes etc work externally to osc. i experimented a lot! with reducing the files down as much as possible but things started to go very wrong when i removed too much.

 

your file content must go between the following tags:

<!-- body_text //-->

<!-- body_text_eof //-->

this is so that sts can pick up the correct pieces and regurgitate them correctly.

 

within the above body text comment tags, sts will chop out everything before the '<table' and after '</table>' so you need atleast one table written into the content script, which is not a problem because it is osc standard practice.

 

finally you still need <?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?> at the very bottom so that dynamenu etc works flawlessly.

 

ONE MINOR POINT ---

 

<!-- header //-->

<?php require(DIR_WS_INCLUDES . 'header.php'); ?>

<!-- header_eof //-->

 

YOUR WARNINGS FOR SAY THE INSTALL FOLDER STILL PRESENT AND CONFIG.PHP NOT SET WITH CORRECT PERMISSIONS WILL NOT SHOW ON EXTERNAL PAGES - I DONT KNOW WHY! i tried removing the above because i thought it as redundant but things cocked up again! still dont ask! please ;o)

 

below is the full file for reference..........

 

matt

Share this post


Link to post
Share on other sites

www[root]/company/about_us.php

 

<?php

/*

$Id: index.php,v 1.1 2003/06/11 17:37:59 hpdl Exp $

 

osCommerce, Open Source E-Commerce Solutions

http://www.oscommerce.com

 

Copyright © 2003 osCommerce

 

Released under the GNU General Public License

*/

define('DIR_WS_INCLUDES', '../shop/includes/' );

define('STYLESHEET', '../shop/stylesheet.css' );

include('../shop/includes/application_top.php');

require('lang_en_About_Us.php');

$breadcrumb->add(NAVBAR_TITLE, tep_href_link('../'.FILENAME_ABOUT_US));

 

?>

<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">

<html <?php echo HTML_PARAMS; ?>>

<head>

<meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>">

<title><?php echo TITLE; ?></title>

<base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>">

<link rel="stylesheet" type="text/css" href="catalog/stylesheet.css">

</head>

<body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0">

<!-- header //-->

<?php require(DIR_WS_INCLUDES . 'header.php'); ?>

<!-- header_eof //-->

 

<!-- body //-->

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

<tr>

<td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2">

<!-- left_navigation //-->

<?php require(DIR_WS_INCLUDES . 'column_left.php'); ?>

<!-- left_navigation_eof //-->

</table></td>

 

 

 

 

 

<!-- body_text //-->

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

<tr>

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

<tr>

<td class="pageHeading"><?php echo HEADING_TITLE; ?></td>

<td class="pageHeading" align="right"><?php echo tep_image(DIR_WS_IMAGES . 'table_background_default.gif', HEADING_TITLE, HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT); ?></td>

</tr>

</table></td>

</tr>

<tr>

<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>

</tr>

<tr>

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

<tr>

<td class="main"><?php echo TEXT_INFORMATION; ?></td>

</tr>

<tr>

<td class="main" align=center>

 

<br><br>Many Thanks for visiting.

 

<P>Matthew John Ritchie.

<br>www.BlueGreenEnterprises.com

 

<P><P>Site went live: 5th of May 2007

 

</td>

</tr>

</table></td>

</tr>

<tr>

<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>

</tr>

<tr>

<td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox">

<tr class="infoBoxContents">

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

<tr>

<td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>

<td align="right"><?php echo '<a href="' . tep_href_link(FILENAME_DEFAULT) . '">' . tep_image_button('button_continue.gif', IMAGE_BUTTON_CONTINUE) . '</a>'; ?></td>

<td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>

</tr>

</table></td>

</tr>

</table></td>

</tr>

</table></td>

<!-- body_text_eof //-->

<td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2">

<!-- right_navigation //-->

<?php require(DIR_WS_INCLUDES . 'column_right.php'); ?>

<!-- right_navigation_eof //-->

</table></td>

</tr>

</table>

<!-- body_eof //-->

 

<!-- footer //-->

<?php require(DIR_WS_INCLUDES . 'footer.php'); ?>

<!-- footer_eof //-->

<br>

</body>

</html>

<?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>

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
Sign in to follow this  

×