Guest Posted September 14, 2012 Share Posted September 14, 2012 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 Quote Link to comment Share on other sites More sharing options...
Guest Posted September 14, 2012 Share Posted September 14, 2012 @@pederb Simply add an image to the /logoff.php Chris Quote Link to comment Share on other sites More sharing options...
Guest Posted September 14, 2012 Share Posted September 14, 2012 Hi Chris, Thank you but where in logoff.php ? and what href should i use ? The image is uploaded to /images/ Cheers Quote Link to comment Share on other sites More sharing options...
Guest Posted September 18, 2012 Share Posted September 18, 2012 Anybody? Quote Link to comment Share on other sites More sharing options...
vampirehunter Posted September 21, 2012 Share Posted September 21, 2012 (edited) 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 September 21, 2012 by vampirehunter roobear 1 Quote Link to comment Share on other sites More sharing options...
Guest Posted September 22, 2012 Share Posted September 22, 2012 Thxs Vamp Quote Link to comment Share on other sites More sharing options...
Guest Posted September 22, 2012 Share Posted September 22, 2012 It looks great but where do i put the code to center the image? Cheers Quote Link to comment Share on other sites More sharing options...
vampirehunter Posted September 22, 2012 Share Posted September 22, 2012 (edited) 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 September 22, 2012 by vampirehunter Quote Link to comment Share on other sites More sharing options...
roobear Posted December 28, 2012 Share Posted December 28, 2012 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 Quote Link to comment Share on other sites More sharing options...
namasteboy Posted January 24, 2013 Share Posted January 24, 2013 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! Quote Link to comment Share on other sites More sharing options...
roobear Posted February 13, 2013 Share Posted February 13, 2013 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 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.