Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Index/Main Page Image


2johnsons

Recommended Posts

On the main page, center column I would like to add a image (also linkable to another page)

I was able to remove all the text now I want to place a image in its place but I have no idea how I can do this or where to begin.

I've looked through the forum for about an hour and haven't been able to find anything.

 

Please assist me if you can.

 

Thank you

Link to comment
Share on other sites

Where you got rid of TEXT_MAIN:

 

			<td class="main"><?php //echo TEXT_MAIN; ?></td>

Change that code to:

 

<!--
		<td class="main"><?php //echo TEXT_MAIN; ?></td>
-->
		<td align="center"><?php echo '<a href="' . tep_href_link(FILENAME_DEFAULT) . '">' . tep_image(DIR_WS_IMAGES . 'oscommerce.gif', 'osCommerce') . '</a>'; ?></td>

In that code change:

 

FILENAME_DEFAULT = the page you are linking to

 

oscommerce.gif = the name of the image you're using (put it in the /images folder with all the other osC images)

 

osCommerce = the text to display on a mouseover of the image.

If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you.

 

"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."

- Me -

 

"Headers already sent" - The definitive help

 

"Cannot redeclare ..." - How to find/fix it

 

SSL Implementation Help

 

Like this post? "Like" it again over there >

Link to comment
Share on other sites

Thank you for the information I will try this out today.

 

 

Where you got rid of TEXT_MAIN:

 

			<td class="main"><?php //echo TEXT_MAIN; ?></td>

Change that code to:

 

<!--
		<td class="main"><?php //echo TEXT_MAIN; ?></td>
-->
		<td align="center"><?php echo '<a href="' . tep_href_link(FILENAME_DEFAULT) . '">' . tep_image(DIR_WS_IMAGES . 'oscommerce.gif', 'osCommerce') . '</a>'; ?></td>

In that code change:

 

FILENAME_DEFAULT = the page you are linking to

 

oscommerce.gif = the name of the image you're using (put it in the /images folder with all the other osC images)

 

osCommerce = the text to display on a mouseover of the image.

Link to comment
Share on other sites

If you're linking to one of the standard osC pages it would be best if you used the name found in /includes/filenames.php here:

 

FILENAME_DEFAULT

If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you.

 

"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."

- Me -

 

"Headers already sent" - The definitive help

 

"Cannot redeclare ..." - How to find/fix it

 

SSL Implementation Help

 

Like this post? "Like" it again over there >

Link to comment
Share on other sites

I am new to the osCommerce site and very lost in there, how do you take off the text on the home page and replace it with text I would like and also put images up on the home page. here is my email address todd@stuntwars.com

thank you for any help

Todd

 

 

 

On the main page, center column I would like to add a image (also linkable to another page)

I was able to remove all the text now I want to place a image in its place but I have no idea how I can do this or where to begin.

I've looked through the forum for about an hour and haven't been able to find anything.

 

Please assist me if you can.

 

Thank you

Link to comment
Share on other sites

How do I ....?

 

That topic and more are covered at the link above.

;)

If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you.

 

"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."

- Me -

 

"Headers already sent" - The definitive help

 

"Cannot redeclare ..." - How to find/fix it

 

SSL Implementation Help

 

Like this post? "Like" it again over there >

Link to comment
Share on other sites

Where would I find this code, in the module, the file manager etc.

 

 

Where you got rid of TEXT_MAIN:

 

			<td class="main"><?php //echo TEXT_MAIN; ?></td>

Change that code to:

 

<!--
		<td class="main"><?php //echo TEXT_MAIN; ?></td>
-->
		<td align="center"><?php echo '<a href="' . tep_href_link(FILENAME_DEFAULT) . '">' . tep_image(DIR_WS_IMAGES . 'oscommerce.gif', 'osCommerce') . '</a>'; ?></td>

In that code change:

 

FILENAME_DEFAULT = the page you are linking to

 

oscommerce.gif = the name of the image you're using (put it in the /images folder with all the other osC images)

 

osCommerce = the text to display on a mouseover of the image.

Link to comment
Share on other sites

It is possible to make changes with the osC File Mangler Manager, but there are buggy versions of it about that will screw up a PHP file in a heartbeat, so I'd advise AGAINST using it - AT ALL!.

:o

 

To make changes either login and use the File Editor in your cPanel, or FTP the file to your PC and use a TEXT editor like Notepad or Wordpad (NOT WORD!) to make changes then FTP it back to the same place you got it from on the server.

 

Be aware that osC has files by the same name in different folders and putting a file in the wrong folder can be hazardous to your sites health.

:blush:

 

And do yourself a favor - BACKUP!

 

After a successful install, backup all the files to your PC. Then before making changes to any file make a backup of it so if by chance the changes you made don't work out like you wanted you can easily replace it with the backup.

 

The forum is littered with requests from those who made mistakes without making backups then they wait for hours (or days) for someone to get them out of the hole they dug for themselves.

If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you.

 

"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."

- Me -

 

"Headers already sent" - The definitive help

 

"Cannot redeclare ..." - How to find/fix it

 

SSL Implementation Help

 

Like this post? "Like" it again over there >

Link to comment
Share on other sites

If you're linking to one of the standard osC pages it would be best if you used the name found in /includes/filenames.php here:

 

FILENAME_DEFAULT

 

are all the names listed in filenames.php the names of all the pages within the site?

also what if I want to link it to a new page? a page that I haven't created yet?

Link to comment
Share on other sites

As far as I know, all the pages you would normally link to are in there.

 

If not, or it's a new page, enter it like this example:

 

tep_href_link('mypage.php')

If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you.

 

"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."

- Me -

 

"Headers already sent" - The definitive help

 

"Cannot redeclare ..." - How to find/fix it

 

SSL Implementation Help

 

Like this post? "Like" it again over there >

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...