Jump to content
Sign in to follow this  
pederb

Adding Image to Log Out page

Recommended Posts

Hello,

 

I would like to add a image to our log out page, it looks so bare today (see attachment)

 

Please advise

 

 

Cheers

Doc1.pdf


-Peder Beckman-

Kool Kat Jazz Records

Share this post


Link to post
Share on other sites

@@pederb

 

Simply add an image to the /logoff.php

 

 

 

 

 

Chris


:|: Was this post helpful ? Click the LIKE THIS button :|:

 

See my Profile to learn more about add ons, templates, support plans and custom coding (click here)

Share this post


Link to post
Share on other sites

Hi Chris,

 

Thank you but where in logoff.php ? and what href should i use ? The image is uploaded to /images/

 

Cheers


-Peder Beckman-

Kool Kat Jazz Records

Share this post


Link to post
Share on other sites

Anybody?

 

hi

 

where abouts do you want to put your image, above the main text or after it?

 

First, open your logoff.php file in your main directory,

 

and where it says this

 

<div class="contentContainer">
 <div class="contentText">
<?php echo TEXT_MAIN; ?>
 </div>

 

 

You can add in your image inside the div like ive done below. Just change the image name and alternate text to your own images and it will show up. As long as your image is in the default "images" folder, it will work.

 

<div class="contentContainer">
 <div class="contentText">
<?php echo tep_image(DIR_WS_IMAGES . 'yourimagename.jpg', 'Alt Text For Image');?>
<?php echo TEXT_MAIN; ?>
 </div>

 

So above, you will see your image before the main text.

 

If you want it after it, just move your image to after the <?php echo TEXT_MAIN; ?> tag.

Edited by vampirehunter

Share this post


Link to post
Share on other sites

It looks great but where do i put the code to center the image?

 

Cheers


-Peder Beckman-

Kool Kat Jazz Records

Share this post


Link to post
Share on other sites

It looks great but where do i put the code to center the image?

 

Cheers

 

hi

 

Thats easy. I'll just explain the tep_image function so you can use it again easily.

 

Basically, so you can do this anytime you need a custom specific image on a page,

 

the tep_image function has 5 parameters which you can use.

 

 function tep_image($src, $alt = '', $width = '', $height = '', $parameters = '')

 

So

1) $src refers to the location of your image.

 

2) $alt refers the alternate text which shows if your image for some reason won't display on the page.

 

3) $width to image width (if you want to specify it, but i would just make sure my image is the correct size already rather than declare it in html)

 

4) $height of the image (again, i would just make my image size exact so i don't need to declare it)

 

5) $parameters - this is the bit where you can add your custom text which will show as part of the <img> code. So this is where we put in the class name so that we can call it from our css stylesheet.

 

 

So for your example just do this:

 

  <?php echo tep_image(DIR_WS_IMAGES . 'yourimagename.jpg', 'Alt Text For Image', ' ',' ', 'class="myclass"');?>

 

and your html should look like this when its outputted.

 

<img class="myclass" title="Alt Text For Image" alt="Alt Text For Image" src="images/yourimagename.jpg">

 

So basically, you are putting your

 

1.) Image location = DIR_WS_IMAGES . 'yourimagename.jpg'

2.) Your image alt text = 'Alt Text For Image'

3.) Image width we can leave blank = ' '

4.) Image height we can leave blank = ' '

5.) We add our custom text such as a css class = ' class="myclass" '

 

Now you can open up your stylesheet.css file

 

and at the end just put in this (whatever name you are giving your css class):

 

.myclass {

align:center;

}

 

You could add other stuff for your image class like padding, margins etc as you wanted.

 

 

let me know if you have any trouble.

Edited by vampirehunter

Share this post


Link to post
Share on other sites

Vampire hunter that is the best explanation to a post I have seen so far, and I have looked and looked for some knowledge and failed miserably.

Your makes a little sense to me ( trust me that's good lol ).

 

Can I use the same for my index page.php I have put 4 images on using html and I have tried ahref linking to a product page within osc 2.3 but my site goes down.

 

Thanks in advance and a Happy and Healthy New Year

Share this post


Link to post
Share on other sites

Thank you Vampire for this well described mod. I have used it to add an image to index.php of my site. Simple, quick and effective!

Share this post


Link to post
Share on other sites

Thanks for the quick class on adding images. I would like to add some banner images on my home page which links to the various catalogue links within oscommerce.

Can you help me with the coding. I have added images but when I try adding links my site just crashes.

The images I have at the moments just sit there doing nothing.

See my code below, well some of the page anyway..

 

define('TEXT_MAIN', "

<center/><image src=images/baby-wear.gif>

<image src=images/web-image-link.gif>

<image src=images/web-image-link.gif>

<image src=images/hi-viz.gif>

<image src=images/pp.gif>

<image src=images/pp2.gif>

<image src=images/comodo_secure_100x85_transp.png><center/>

");

 

define('TABLE_HEADING_NEW_PRODUCTS', 'New Products For %s');

 

define('TABLE_HEADING_UPCOMING_PRODUCTS', 'Upcoming Products');

 

define('TABLE_HEADING_DATE_EXPECTED', 'Date Expected');

 

define('HEADING_TITLE', 'Welcome to ' . STORE_NAME);

 

Thanks in advance

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  

×