Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Change position to Language box but...without line...


chycco

Recommended Posts

Hi to everybody

 

I'm trying to change the position of the "language box", that normaly it is posicioned in the right column.

 

I used this code:

------------------------------------------------------------------------------------

<?php



if (!isset($lng) && !is_object($lng)) {

   include(DIR_WS_CLASSES . 'language.php');

   $lng = new language;

 }

 $languages_string = '';

 reset($lng->catalog_languages);

 while (list($key, $value) = each($lng->catalog_languages)) {

   $languages_string .= ' <a href="' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('language', 'currency')) . 'language=' . $key, $request_type) . '">' . tep_image(DIR_WS_LANGUAGES .  $value['directory'] . '/images/' . $value['image'], $value['name']) . '</a> ';

 }



 

 $info_box_contents = array();

 $info_box_contents[] = array('align' => 'center',

                              'text' => $languages_string);



 new infoBox($info_box_contents);

?>

 

-------------------------------------------------------------------------

 

...but in this way I can see the line of the table that contains the language box. I don't want this line!!!

Anybody knows how can i remove the line of the table?

My target: put the language box in the top-right of the shop.

 

Thanx in advance[/code]

Link to comment
Share on other sites

Copy the infoBox class and rename the new one. Then find the parts that set the border and set them to 0 in the new class.

 

You might have to do the same with tableBox.

 

Hth,

Matt

Link to comment
Share on other sites

Hi,

 

I think you're looking in the wrong file. :shock:

 

This is the /catalog/includes/boxes/languages.php file, which actually draws the box.

 

You need to look in /catalog/includes/column_right.php and find this line:

 

include(DIR_WS_BOXES . 'languages.php');

 

and move it up to the top of the the file, after the <?php tag (this will put it at the top of the column).

 

Even better, install this contribution: http://www.oscommerce.com/community/contributions,1175

 

It makes moving infoboxes and turning them off and on nice and easy.

 

Regards,

 

 

 

Mark

Link to comment
Share on other sites

ok iinetworks

 

I have understood the concept of your idea.

But in the code that I have wrotten.... where is the class? or....in what file i can find it?

 

Then....I have found this infoboxes in the stylesheet.css:

 

----------------------------------------------

.infoBox {

  background: #A3986B;

}



.infoBoxContents {

 background: #FFFFFF;

 font-family: Verdana, Arial, sans-serif;

 font-size: 10px;

}



.infoBoxNotice {

 background: #FF8E90;

}



.infoBoxNoticeContents {

 background: #FFE6E6;

 font-family: Verdana, Arial, sans-serif;

 font-size: 10px;

}



TD.infoBoxHeading {

 font-family: Arial, Verdana, sans-serif;

 font-size: 11px;

 font-weight: bold;



 color: #333333;

 background: #A3986B;

}



TD.infoBox, SPAN.infoBox {

 font-family: Verdana, Arial, sans-serif;

 font-size: 10px;

}

-----------------------------------------------------

 

what of them i have to renamed?

I can't find the name of tablebox... :(

 

equilla...i'm not wrong...sorry for my bad english...i try to put the language box in the top-right of the shop..not of the column...

Link to comment
Share on other sites

Not at all.

 

I'm sure your English is better than my Italian!

 

In this case - assuming you are putting this inside the page header or something, then you probably don't need an infobox class at all. I did something like this recently with a quick search box.

 

You should just be able to use the following code:

 

if (!isset($lng) && !is_object($lng)) {

include(DIR_WS_CLASSES . 'language.php');

$lng = new language;

}

$languages_string = '';

reset($lng->catalog_languages);

while (list($key, $value) = each($lng->catalog_languages)) {

$languages_string .= ' <a href="' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('language', 'currency')) . 'language=' . $key, $request_type) . '">' . tep_image(DIR_WS_LANGUAGES . $value['directory'] . '/images/' . $value['image'], $value['name']) . '</a> ';

}

 

echo $languages_string;

 

to put the languages flags wherever you want.

 

Haven't tried it though, but it should work....

 

Regards,

 

 

 

Mark

Link to comment
Share on other sites

I'm sorry, not in CSS, in includes/classes/boxes.php. You want to copy and rename the entire class infoBox { } definition. In my file, these are lines 75-98. This may or may not be the same in your file.

 

Hth,

Matt

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...