chrometweaks.org

How can I access the FTP for my new iPage domain?

Click Here To View All Answers...


First question I have is How can I access the FTP for my new iPage domain? Thanks for any answer or 2. My 2nd question... I removed the question at the top of the Index asking whether you want to sign up or log in..

Now I'd like to put it in the body of the text and am can't find the orignal code that was used. Being a newbie to PHP, I don't know the code..

Can anyone give it to me?.

I'd like to put this in the body:.

You don't have to sign up for an account, but if you create a new account, you will be able to ....

And have create.

A new account.

Be a link..

I don't want to put the URL but rather the appropriate PHP code..

Thanks...

Comments (10)

I'm stumped. I'm not so sure what is the answer. I'll do some research in Google and get back to you if I got an anything. You should email the people at iPage as they probably can help you..

Comment #1

Thanks for your reply. I'm confused. I put the code in like this. (I know how to change the text in english.php but am not sure how the code should look in the body of the index.php. This doesn't work:.

However, if you <?php echo tep_customer_greeting(); ?><a href="%s"><u>create an account</u></a>, your shopping experience at westportartist.com will be faster, easier and customized..

Here is my lame draft so far:.

Http://www.bluemoonp...talog/index.php..

Comment #2

Maybe I didn't make it clear enough..

When you wrote you had "removed the question at the top of the Index", I understood that to mean you had edited out the row of index.php quoted in my reply. If you did, put it back..

After the code of index.php is restored to it's original form, restrict your edits to the language file...

Comment #3

I put this back in:.

<td class="main"><?php echo tep_customer_greeting(); ?></td>.

But I'm not sure where to put the tokens..

"%s".

The link is currently not pointing to anything or working because the tokens aren't right, as witnessed here:.

Http://www.bluemoonp...talog/index.php.

Sorry for the confusion..

This post has been edited by.

Bluemoon.

: 18 April 2004, 16:53..

Comment #4

In /includes/languages/english.php add:.

Define('TEXT_GREETING_GUEST', 'Welcome <span class="greetUser">Guest!</span> Would you like to <a href="http://mail.surfcomputing.com/jump/%s"><u>log yourself in</u></a>? Or would you prefer to <a href="http://mail.surfcomputing.com/jump/%s"><u>create an account</u></a>?');.

This is the original..

In index.php starting around line 291 find:.

           <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="0">.

Add this after:.

         <tr>.

           <td class="main"><?php echo tep_customer_greeting(); ?></td>.

         </tr>.

Hope this helps...

Comment #5

Just looked at earlier post:.

USE instead:.

Define('TEXT_GREETING_GUEST', 'Welcome <span class="greetUser">Guest!</span> Would you like to <a href="%s"><u>log yourself in</u></a>? Or would you prefer to <a href="%s"><u>create an account</u></a>?');.

Sorry about that!..

Comment #6

Any idea why the index.php script uses the following:.

Tep_customer_greeting.

Instead of:.

Tep_TEXT_GREETING_GUEST.

I don't get how it references the former code when that doesn't seem to be defined anywhere..

Just wondered..

~ PHP Novice..

Comment #7

I think is is used as a variable depending on being logged in or not as to what is returned. (Either Welcome Guest or Welcome back Bob or whatever)..

Comment #8

How come it doesn't work when I put the same tokens in the TEXT_MAIN definition of index.php?.

I'd rather have it embedded within the body of the index, rather than at the top..

This post has been edited by.

Bluemoon.

: 19 April 2004, 01:03..

Comment #9

Tep_customer_greeting is a call handled by /includes/functions/general.php by the following:.

////.

// Return a customer greeting.

Function tep_customer_greeting() {.

Global $customer_id, $customer_first_name;.

If (tep_session_is_registered('customer_first_name') && tep_session_is_registered('customer_id')) {.

$greeting_string = sprintf(TEXT_GREETING_PERSONAL, tep_output_string_protected($customer_first_name), tep_href_link(FILENAME_PRODUCTS_NEW));.

} else {.

$greeting_string = sprintf(TEXT_GREETING_GUEST, tep_href_link(FILENAME_LOGIN, '', 'SSL'), tep_href_link(FILENAME_CREATE_ACCOUNT, '', 'SSL'));.

}.

Return $greeting_string;.

}..

Comment #10

No, there is nothing called tep_TEXT_GREETING_GUEST. Follow this step by step..

The function tep_customer_greeting() is called from index.php, which echos the result; the function code is in includes/functions/general.php..

Tep_function_greeting (take a look at it) tests whether the customer is logged in, and returns alternative messages for customers or anonymous guests. The string it returns in either case is constructed with the assistance of a sprintf function (built in to php) whose first parameter is the key to constructing the string, TEXT_GREETING_PERSONAL or TEXT_GREETING_GUEST. These identifiers are mapped to language files based on what is the current language in the session, so you find their define statements in includes/languages/english.php (or german.php, ...). The other parameters of the sprintf function call are used in order, to replace a series of "%s" tokens in TEXT_GREETING_PERSONAL and TEXT_GREETING_GUEST..

So, the sprintf function takes the string.

'Welcome <span class="greetUser">Guest!</span> Would you like to <a href="%s"><u>log yourself in</u></a>? Or would you prefer to <a href="%s"><u>create an account</u></a>?'.

And puts a link to the logon page in place of the first %s, and puts a link to the create account page in place of the second %s..

All you should do is edit the string to your liking, but keeping the first %s as the link to the logon page and the second %s as the link to the create account page..

This may seem peculiar, but a consequence of modularity...

Comment #11


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