chrometweaks.org

Why Google don't launch a free iPage hosting service mysql & php based?

Click Here To View All Answers...


My question is Why Google don't launch a free iPage hosting service mysql & php based? Looking forward for any response. Another question I got... Is there a way to include a "Category Description" that appears when the user clicks on a category? Like when clicking on "Punched Cards", a description like "All the following products are available in both 80-column and 96-column (system/3) formats. yadda yadda yadda". I don't want to have to duplicate common information in every product description, so if I could move it to a "category" description, this would be a big help...

Comments (108)

Hmm... I need to find out myself. I don't know what is the right answer. I'll do some research and get back to you if I discover an anything. You should email the people at iPage as they probably could give you an answer..

Comment #1

Would this be useful?.

Including a text file (that can contain PHP, HTML, images, links etc. etc.) which is included whenever cPath is in the URL and the file with index_"cPath".inc.php is in the subdirectory /includes/templates..

For orientation I included the part before and after the include section (from the product_listing.php included in Master Products 1.1.5..

           <td align="right"><?php echo tep_image(DIR_WS_IMAGES$image, 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>.

<?php.

/* adapted PHP code from here, to include regular HTML on index.php, based on subcat cPath.

*/.

$other_text_indexfile = $_SERVER['DOCUMENT_ROOT']."/".DIR_WS_CATALOG."includes/templates/index_".$cPath.".inc.php";.

Switch ( isset($cPath) && file_exists($other_text_indexfile) ) {.

Case true:.

Include($other_text_indexfile);.

Break;.

// default: in case index_X_Y.inc.php doesn't exist.

Default:.

Include(DIR_WS_MODULESFILENAME_PRODUCT_LISTING);.

}.

/* end of adapted PHP code */.

        ?>.

</td>.

     </tr>.

   </table></td>.

<?php.

 } else { // default (start) page..

Comment #2

I still don't understand the whole database text file thing. Is that some thing that we should create or download?..

Comment #3

I looked at it as well and the uploads are a mess. You'll need to download a few versions of the contribution to get all relevant pieces...

Comment #4

V1.5, v1.6 and possibly the v1.5 fix as I don't know whether or not it is implemented in v1.6..

Comment #5

You're right this really is a mess. Thanks a lot for your help...

Comment #6

JanZ:.

This sounds like it would do what I want. I have some common, lenghty descriptive text that I want to include for many products. What should I store this text file as [name?], and how would I tell which products should use it in their descriptions? Can the description for the products actually embed an "include filename" type of command, so that only these products would include the common text?..

Comment #7

To be clear, what I suggested is for the pages index.php that normally only show a product listing (in a table) of the products in a certain category..

I use it also to get rid of the product listing in certain categories, but this is probably not what you want..

So either also add:.

Include(DIR_WS_MODULESFILENAME_PRODUCT_LISTING);.

After " include($other_text_indexfile); " or keep that whole line outside, but below this extra piece of PHP..

This modification.

Cannot.

Be used on the pages for individual products (product_info.php?cPath etc.)..

If you use it exactly as I suggested, you would have to make a subdirectory "templates" in "includes" and the text files (containing HTML and/or PHP) would be named index_1_2.inc.php for subcategory 1_2 (so for the page index.php?cPath=1_2). If there is no file for the subcategory, nothing will be "included", so it will just show the default behaviour like you are used to (just the product listing)..

The index_1_2.inc.php is just a text file e.g.:.

<h2>Widgets</h2>.

<p class="main">We produce all these widgets ourselves. See for more widgets our page on <a href="<?php echo tep_href_link('index.php', 'cPath=2_3') ; ?>" class="our_own_class">super widgets</a>. You might also want to look at our <a href="<?php echo tep_href_link('product_info.php', 'cPath=1_7&products_id=310') ; ?>">heavy duty widget</a>..

There is nothing more to it...

Comment #8

Give.

This one.

A go. Written by yours truly...

Comment #9

The Missing catalog_description.php file.

<?php.

////.

//.

// Code: categories_description.

// Author: Brian Lowe <>.

// Date: July 2003.

// ////.

////.

// Get a category heading_title or description.

// These should probably be in admin/includes/functions/general.php, but since.

// this is a contribution and not part of the base code, they are here instead.

////.

Function tep_get_category_heading_title($category_id, $language_id) {.

$category_query = tep_db_query("select categories_heading_title from "TABLE_CATEGORIES_DESCRIPTION" where categories_id = '"$category_id"' and language_id = '"$language_id"'");.

$category = tep_db_fetch_array($category_query);.

Return $category['categories_heading_title'];.

}.

Function tep_get_category_description($category_id, $language_id) {.

$category_query = tep_db_query("select categories_description from "TABLE_CATEGORIES_DESCRIPTION" where categories_id = '"$category_id"' and language_id = '"$language_id"'");.

$category = tep_db_fetch_array($category_query);.

Return $category['categories_description'];.

}.

?>.

Kill any spaces after the ?>..

Comment #10

Is there a way to include a "Category Description" that appears when the user clicks on a category? Like when clicking on "Punched Cards", a description like "All the following products are available in both 80-column and 96-column (system/3) formats. yadda yadda yadda". I don't want to have to duplicate common information in every product description, so if I could move it to a "category" description, this would be a big help...

Comment #11

Thanks, I downloaded this contribution, and the zip file contained only a readme file that describes the changes to be made. It references two non-included files: "db_changes" and "admin/includes/functions/categories_description.pnp", which contains two new service routines and should be installed in "admin/includes/functions". Does anyone have these missing files? Or is there another contribution that would do the same thing?..

Comment #12


This question was taken from a support group/message board and re-posted here so others can learn from it.