chrometweaks.org

Can anyone reccomend a good free iPage web host?

Click Here To View All Answers...


My first question is Can anyone reccomend a good free iPage web host? Many thanks for any comment. 2nd question I got is.. Hello guys , I have log off gif that I wana use. what I need is a code that displayes log off button only when customers are logged in the account..

Any help is greatly appreciated.

Thankyou..

Comments (58)

Of course! but you might wanna make sure and wait for another person here to confirm my answer as I am not confident. Better yet, why don't you contact the iPage guys because they can help better...

Comment #1

Hey todd , still dont get this , have no php skills.

Well I am not sure where to add the logoff.gif file so when customers are not logged , it should disapper and once they are logged in it shows up..

Please help me out.

Thankyou..

Comment #2

Np, here you go ... I'm coding this from memory so hope I have the function syntax right for the image, etc..

<?php if (tep_session_is_registered('customer_id')) {.

Echo '<a href="'tep_href_link(FILENAME_LOGOFF, '', 'SSL')'" class="headerNavigation">'tep_image('logoff.gif', 'Logoff')'</a>';.

} else {.

 echo '<a href="'tep_href_link(FILENAME_LOGIN, '', 'SSL')'" class="headerNavigation">'tep_image('login.gif', 'Log In')'</a>';.

?>.

You would put that in /catalog/includes/header.php In that file right at the start of the HTML, there are 2 columns <td> ... the first is the store logo, the 2nd is the set of images like My Account, etc. You would add your code there. The code I used will show 'Logoff' when they're logged in, 'Login' when they are not...

Comment #3

Hey this is the error I am getting.

[QUOTE].

Parse error: parse error in /home2/mghatwor/public_html/stock/includes/header.php on line 93.

[QUOTE]..

Comment #4

Missing a curly bracket after the 2nd echo..

<?php if (tep_session_is_registered('customer_id')) {.

Echo '<a href="'tep_href_link(FILENAME_LOGOFF, '', 'SSL')'" class="headerNavigation">'tep_image('logoff.gif', 'Logoff')'</a>';.

} else {.

Echo '<a href="'tep_href_link(FILENAME_LOGIN, '', 'SSL')'" class="headerNavigation">'tep_image('login.gif', 'Log In')'</a>';.

}.

?>..

Comment #5

Hello guys , I have log off gif that I wana use. what I need is a code that displayes log off button only when customers are logged in the account..

Any help is greatly appreciated.

Thankyou..

Comment #6

It can't be done. j/k of course..

Just an example:.

If (tep_session_is_registered('customer_id')) {.

 echo '<a href="'tep_href_link(FILENAME_LOGOFF, '', 'SSL')'" class="headerNavigation">'HEADER_TITLE_LOGOFF'</a>';.

} else {.

 do this;.

}.

It can be done other ways as well. For instance, I have created a few new variables on my iPage site and echo them ithem in the header. Above the echo, I added:.

 if (tep_session_is_registered('customer_id')) {.

   $accthdtxt = '<a href="'tep_href_link(FILENAME_ACCOUNT, '', 'SSL')'" class="headerNavigation">'HEADER_TITLE_MY_ACCOUNT'</a>';.

   $lohdtxt = '&nbsp;&nbsp;<a href="'tep_href_link(FILENAME_LOGOFF, '', 'SSL')'" class="headerNavigation">'HEADER_TITLE_LOGOFF'</a>';.

 } else {.

   $accthdtxt = '<a href="'tep_href_link(FILENAME_LOGIN, '', 'SSL')'" class="headerNavigation">'HEADER_TITLE_NEW_CUSTOMER'</a>';.

   $lohdtxt = '';.

 }..

Comment #7


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