chrometweaks.org

How does iPage.com and other sites own a domain name?

Click Here To View All Answers...


Question I have... How does iPage.com and other sites own a domain name? Thanks in advance for any answer or 2. Another question I got... Hi,.

I am just wondering when using BTS templating, can we load one template for the index page or other info pages.. and yet another template for the catalog pages, coz like more space for the pictures arrangement...

Comments (19)

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

Comment #1

I want to make some new page but how do I create the "middle section"?? I'm kinda confuse. I dont want to create a new template just new middle parts that are located in content folder. Please advise. thanks.

J...

Comment #2

Sounds like a different question, but maybe I read wrong.

Not sure if it helpes because I don't know what you know about PHP and osC. But I post the new page I use myself to start with, when I want to add a page to my shop. I hope it explains itself a bit, if you ever created a new page without the BTS it should make sense to you I think. If you are totally new to osC and PHP, it might be confusing in the beginning..

/*.

 $Id: new_page.php, 2004/01/12.

 Released under the GNU General Public License.

*/.

Require('includes/application_top.php');.

$pageFileName = basename ($PHP_SELF);.

$pageName = basename ($PHP_SELF,".php"); // needs php => 4.1.

// set the name of the javascript file to load (only if needed) from "includes/javascript/"".

//  $javascript = 'new_page.js';.

If (file_exists(DIR_WS_TEMPLATES'content/'$pageName'.tpl.php')) {.

 // use the template made for this page.

 $content = $pageName;.

}.

Else {.

 // or use 'static.tpl.php', or fill in which other template i.s.o. 'static' should be used.

 $content = 'static';.

}.

$pm_template_path = DIR_WS_TEMPLATES'content/'$content'.tpl.php';.

// load (language dependent) texts defines from "includes/languages/.../new_page.php" if it exists.

If (file_exists(DIR_WS_LANGUAGES$language'/'$pageFileName)) {.

 require(DIR_WS_LANGUAGES$language'/'$pageFileName);.

 $pm_language_path = DIR_WS_LANGUAGES$language'/'$pageFileName;.

}.

Elseif (file_exists(DIR_WS_LANGUAGES$language'/new_page.php')) {.

 require(DIR_WS_LANGUAGES$language'/new_page.php');.

 $pm_language_path = DIR_WS_LANGUAGES$language'/new_page.php';.

}.

// load (language dependent) code files from "includes/languages/.../new_page.code.php" if it exists.

If (file_exists(DIR_WS_LANGUAGES$language'/'$pageName'.code.php')) {.

 $pm_code_path = DIR_WS_LANGUAGES$language'/'$pageName'.code.php';.

}.

$breadcrumb->add(NAVBAR_TITLE, tep_href_link($pageFileName));.

/******************************************************************************/.

// PHP code here, but no output (output code and HTML in template file).

/******************************************************************************/.

// load main_page (the $content template and $javascript are included in main_page.tpl.php).

Require(DIR_WS_TEMPLATESTEMPLATENAME_MAIN_PAGE);.

Require(DIR_WS_INCLUDES'application_bottom.php');.

?>.

Hth.

Paul..

Comment #3

Maby it makes more sense if you also have the new template code, allthough you probably have to change it because I am using a CSS layout i.s.o. the osC tables layout..

<?php.

/*.

 $Id: new_page.tpl.php, 2004/02/11.

 easy new pages for the BTS 2004/01/07.

 Released under the GNU General Public License.

*/.

$pm_date_file = $pm_language_path.

?>.

<div style="position: releative" id="<?PHP echo $pageName'CONTENT' ?>">.

<h1 id="contentTopTitel"><?php echo HEADING_TITLE; ?></h1>.

<div id="infoIcon"><?php echo tep_image(DIR_WS_TEMPLATES'images/icons/'$pageName'.gif', HEADING_TITLE); ?></div>.

<p class="contentText"><?php echo TEXT_INFORMATION; ?></p>.

<?PHP.

If (file_exists($pm_code_path)) {.

 // include languagefile with PHP code.

 include($pm_code_path);.

}.

?>.

</div>.

Note:.

The $pm_code_path loads a file called new_page.code.php from the lanuages directory if it exists. So after the normal language file, a the $pm_code_path file is loaded, which can contain any HTML/PHP or whatever code you like (added this because you can't put any PHP in the normal osC language files). You don't have to use the "code file", if you don't create a file called "new_page.code.php" in the languages directory it does not result in an error but it will only load the normal language file..

Of course you will have to rename "new_page" to the file name you want for the new page..

This post has been edited by.

Paulm2003.

: 13 February 2004, 09:49..

Comment #4

Thanks Paul...that answered my question. However waiting for your response I also solved it by going to the filename.php and adding the define new names. THen I create the newpage.php by copying one of the one like special.php and change the middle code to direct to my newpage $content. Then I go to content folder and create a newpage.tpl.php file. I dont change the langauge since I'm not using it and it all seem to work fine as well....just takes longer than your code since I have to define my pages in filenames.php... You think I did it correctly from a coder perspective?? I Hope this will help others because it stumped me for a few hours...

Thanks again,.

Osc is great.....

J...

Comment #5

I am not really a coder (only rookie level.

), but it seems to me what you have done was the "best way" or "osC way" to do it..

My code is intended to be able to create new pages very fast, skipping the defines, but not following osC coding standards (should have told that in my post)..

Actually I came to my solution because I wanted I bit more (like creating PHP/HTML language files) than the osC way seemed to offer me at that moment. Now I think I can do it following osC standards if I like, but I really don't want to go back to the filename defines etc. anymore..

Glad you found the answer anyway.

Paul.

This post has been edited by.

Paulm2003.

: 13 February 2004, 22:14..

Comment #6

Hi,.

I am just wondering when using BTS templating, can we load one template for the index page or other info pages.. and yet another template for the catalog pages, coz like more space for the pictures arrangement...

Comment #7

Hi Jacob,.

If you use the BTS, by default the files in your catalog root directory call the template "main_page.tpl.php" for the main layout (including page header, colums, pagefooter and the "middle content" area) and a separate template for the "middle content" area (that is the middle part specific for the page which is opened)..

If you only want to change the "middle content" area for some pages you can edit the appropiate files in the content directory within your templates directory..

If you want another main layout for some pages (i.e. without left and/or right columns) you can do it too. But you have to edit the file you want a new main template for, to call the new main template..

For example change the last part of "products_new.php":.

 require(DIR_WS_TEMPLATESTEMPLATENAME_MAIN_PAGE);.

 require(DIR_WS_INCLUDES'application_bottom.php');.

?>.

To:.

 require(DIR_WS_TEMPLATES'products_new-main_page.tpl.php');.

 require(DIR_WS_INCLUDES'application_bottom.php');.

?>.

Now "new_products.php" will call "products_new-main_page.tpl.php" for the main layout. You have to create a template for it of course and save it in the appropiate templates directory as "products_new-main_page.tpl.php" to make it work..

Note: if you only want to do this for one page, and don't need the BTS for other reasons, you might better not to use the BTS (since adding some of the other contribs will be more difficult) and just only edit the page you want to look different. If you want several pages to have the special layout and you want it to be easyer to change the layout the BTS might be handy for you..

I.E. taking out a whole column or switch columns for example or other things like that, for one or more pages, would only take me a couple of minutes now, using the BTS (and the OneTable layout)..

Paul.

This post has been edited by.

Paulm2003.

: 28 January 2004, 12:10..

Comment #8


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