Jump to content
Sign in to follow this  
spooks

Graphical Borders

Recommended Posts

I`m not sure u should fix for every browser, thier suppost to follow the same rules!! (microsoft excluded of course!!)

 

In classes boxes, around 106 find:

 

.mws_boxTop    {
background: url('images/infobox/top.gif');
font-family: Verdana, Arial, sans-serif;
font-size: 11.5px;
text-align : left;
font-weight: bold;
background-repeat:repeat-x;
vertical-align: middle;
white-space: nowrap;
color: #FFF;

 

after this to add:

 

width: 200px;

 

but I think your solution is more neat.

 

Thanks again!


---

Max Terbeck

Share this post


Link to post
Share on other sites

Spooks, let me first THANK you for this great, but most of all, easy Graphical Borders contribution!

 

I've often looked at it for implimantation in my webshop but found it to difficult to implement, until you came along.

 

As many others I also have a small "problem" with it and that is related to the product info page, here I'm missing the nice smooth look that I have in the product listing.

Also the specials.php, products_new.php and products_new.php etc. are missing the nice look.

It still looks like it did before, could you point me where I should look?

 

I did read this whole topic from back to front and vice versa but cannot find what needs t0 be done.

The contentBox($info_box_contents); to look for is not in those files.

 

I'm using MS 2.2 060817.

 

Thanks!

Edited by i2Paq

Norman in 't Veldt

 

Moderator

osCommerce The Netherlands

Share this post


Link to post
Share on other sites

The changes are gloabal for all pages, so if it works for one it must work for all!

 

Without doubt your issue is the cache, clear it & all will be fine.


Sam

 

Remember, What you think I ment may not be what I thought I ment when I said it.

 

Contributions:

 

Auto Backup your Database, Easy way

 

Multi Images with Fancy Pop-ups, Easy way

 

Products in columns with multi buy etc etc

 

Disable any Category or Product, Easy way

 

Secure & Improve your account pages et al.

Share this post


Link to post
Share on other sites
The changes are gloabal for all pages, so if it works for one it must work for all!

 

Without doubt your issue is the cache, clear it & all will be fine.

 

 

Hello Spooks, thanks for your reply.

 

I found out that I was mistaken, the product_info.php is not a box, and thus will the graphical borders not work.

I also think that if it would work the site would look "to bussy" with all the borders.

I changed my background and now everything looks nice, I only need to change the borders itself to fit more into my colorscheme.

 

I'm looking for someone to do that for me, you maybe? :lol:


Norman in 't Veldt

 

Moderator

osCommerce The Netherlands

Share this post


Link to post
Share on other sites

Powerful mod! Just a quick newbie question about the infobox header text. After installing Graphical Borders, I edited the top three graphics of the infoboxes to match the look of my site. But now the title text of the infoboxes is riding too low. I tested CSS variations with .mws_boxTop_main and others but haven't been able to get anywhere. Any ideas on what I need to do to get the title text to move up a bit in the infoboxes? Thanks for any suggestions.

Share this post


Link to post
Share on other sites

its mws_boxTop !

use firefox tools to help


Sam

 

Remember, What you think I ment may not be what I thought I ment when I said it.

 

Contributions:

 

Auto Backup your Database, Easy way

 

Multi Images with Fancy Pop-ups, Easy way

 

Products in columns with multi buy etc etc

 

Disable any Category or Product, Easy way

 

Secure & Improve your account pages et al.

Share this post


Link to post
Share on other sites

Hi all

any idea how can I put a image in the boxes header row only, probably not using this contrib.

Thanks


OSC beginner

Share this post


Link to post
Share on other sites

this works on images, so install & replace images with what u need


Sam

 

Remember, What you think I ment may not be what I thought I ment when I said it.

 

Contributions:

 

Auto Backup your Database, Easy way

 

Multi Images with Fancy Pop-ups, Easy way

 

Products in columns with multi buy etc etc

 

Disable any Category or Product, Easy way

 

Secure & Improve your account pages et al.

Share this post


Link to post
Share on other sites
its mws_boxTop !

use firefox tools to help

 

Thank you - I don't know why I missed that one. I kept messing with .mws_boxTop_main. Anyway, looks much better now.

Share this post


Link to post
Share on other sites

You can style any box using the included functions

 

if you have say

 

new contentBox($info_box_contents)

 

change to

 

mws_boxHeader ()

new noborderBox($info_box_contents)

mws_boxFooter()

 

if you need to place a title in the header, add the text within the brackets.

 

I tryed this in starproducts but i dont have this line in the file

 

the closest i get is new contentBox($star_products);

 

if i change that then i get an error

Parse error: syntax error, unexpected T_NEW

can anybody tell me what to do

 

help please

Danta67

Share this post


Link to post
Share on other sites

looks like u made an error,

 

post the b4 & after code, otherwise cant tell anything


Sam

 

Remember, What you think I ment may not be what I thought I ment when I said it.

 

Contributions:

 

Auto Backup your Database, Easy way

 

Multi Images with Fancy Pop-ups, Easy way

 

Products in columns with multi buy etc etc

 

Disable any Category or Product, Easy way

 

Secure & Improve your account pages et al.

Share this post


Link to post
Share on other sites

<?php
//REMOVE THIS LINES IF YOU DON'T WANT TO SHOW THE HEADER
 //$header_star_product = array();
 //$header_star_product[] = array('align' => 'center', 'text' => sprintf(STAR_TITLE));
 new contentBoxHeading($header_star_product);
//END OF -REMOVE THIS LINES IF YOU DON'T WANT TO SHOW THE HEADER-

 function tep_star_product_with_attributes($products_id) {
 $attributes_query = tep_db_query("select count(*) as count from " . TABLE_PRODUCTS_ATTRIBUTES . " where products_id = '" . (int)$products_id . "'");
 $attributes = tep_db_fetch_array($attributes_query);

 if ($attributes['count'] > 0) {
return true;
 }
 else {
return false;
}
 }

 $star_products_query = tep_db_query("select substring(pd.products_description, 1, 598) as products_description, p.products_id, p.products_image, p.manufacturers_id, p.products_price, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price, p.products_tax_class_id, sp.product_id from ((" . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_STAR_PRODUCT . " sp) left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id) where p.products_id = pd.products_id and p.products_status = '1' and pd.products_description != '' and p.products_id=sp.product_id and pd.language_id = '" . $languages_id . "'");
 $star_products = tep_db_fetch_array($star_products_query);
 $star_products['products_name'] = tep_get_products_name($star_products['products_id']);
 $evita_cortar_palabras = explode( ' ',  $star_products["products_description"] );
array_pop( $evita_cortar_palabras );
$star_products["products_description"]  = implode( ' ', $evita_cortar_palabras );

if (!tep_star_product_with_attributes($star_products['products_id'])) {
 $star_products["0"] = array('align' => 'center',
				  'params' => 'width="100%" valign="top"',
								  'text' => '<tr>
							 <td height="15%" width="85%" class="star-product-title">' . $star_products['products_name'] . '</td>
					   <td align="right"  height="100%" width="15%" rowspan="2"><a href="' . tep_href_link(FILENAME_POPUP_IMAGE, 'pID=' . $star_products['products_id']) . '"' . ' target="popup"' . ' onClick="window.open(this.href, this.target, \'toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=yes, copyhistory=no, width=' . SMALL_IMAGE_WIDTH . ', height=' . SMALL_IMAGE_HEIGHT . '\').focus(); return false;">' . tep_image(DIR_WS_IMAGES . $star_products['products_image'], $star_products['products_name'], SMALL_IMAGE_WIDTH*2, SMALL_IMAGE_HEIGHT*2) . '</a></td>
					 </tr>
					 <tr>
					   <td height="80%" width="85%" class="star-product">'. strip_tags($star_products["products_description"]) . '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, "products_id=" . $star_products["products_id"]). '">' . STAR_READ_MORE . '</a></td>
					 </tr>
					 <tr>
					   <td height="5%" width="85%" class="star-product-price" align="center">'.
$currencies->display_price($star_products['final_price'], tep_get_tax_rate($listing['products_tax_class_id'])) . '</td>
					 </tr>
					 <tr>
					   <td><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, "products_id=" . $star_products["products_id"]). '">' . tep_image(DIR_WS_LANGUAGES . $language . '/images/buttons/more_info.gif') . '</a>' . tep_draw_separator('pixel_trans.gif', '10', '10') . '<a href="' . tep_href_link(FILENAME_DEFAULT, tep_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $star_products['products_id']) . '">' . tep_image_button('button_buy_now.gif', IMAGE_BUTTON_IN_CART) . '</a></td>
					 </tr>');
$star_products_output = array_slice($star_products, sizeof($star_products)-1);
new contentBox($star_products_output);
}

else {
 $star_products["0"] = array('align' => 'center',
				  'params' => 'width="100%" valign="top"',
								  'text' => '<tr>
							 <td height="15%" width="85%" class="star-product-title">' . $star_products['products_name'] . '</td>
					   <td align="right"  height="100%" width="15%" rowspan="2"><a href="' . tep_href_link(FILENAME_POPUP_IMAGE, 'pID=' . $star_products['products_id']) . '"' . ' target="popup"' . ' onClick="window.open(this.href, this.target, \'toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=yes, copyhistory=no, width=' . SMALL_IMAGE_WIDTH . ', height=' . SMALL_IMAGE_HEIGHT . '\').focus(); return false;">' . tep_image(DIR_WS_IMAGES . $star_products['products_image'], $star_products['products_name'], SMALL_IMAGE_WIDTH*2, SMALL_IMAGE_HEIGHT*2) . '</a></td>
					 </tr>
					 <tr>
					   <td height="80%" width="85%" class="star-product">'. strip_tags($star_products["products_description"]) . '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, "products_id=" . $star_products["products_id"]). '">' . STAR_READ_MORE . '</a></td>
					 </tr>
					 <tr>
					   <td height="5%" width="85%" class="star-product-price" align="center">'.
$currencies->display_price($star_products['final_price'], tep_get_tax_rate($listing['products_tax_class_id'])) . '</td>
					 </tr>
					 <tr>
					   <td><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, "products_id=" . $star_products["products_id"]). '">' . tep_image(DIR_WS_LANGUAGES . $language . '/images/buttons/more_info.gif') . '</a>' . tep_draw_separator('pixel_trans.gif', '10', '10') . '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $star_products['products_id']) . '">' . tep_image_button('button_buy_now.gif', IMAGE_BUTTON_IN_CART) . '</a></td>
					 </tr>');
new contentBox($star_products);
}
?>

this is my starproduct file

 

thanks for the quick answer

Share this post


Link to post
Share on other sites

So did you replace the

 

new contentBox($star_products);

with:

 

mws_boxHeader ();
new noborderBox($star_products);
mws_boxFooter();

Edited by spooks

Sam

 

Remember, What you think I ment may not be what I thought I ment when I said it.

 

Contributions:

 

Auto Backup your Database, Easy way

 

Multi Images with Fancy Pop-ups, Easy way

 

Products in columns with multi buy etc etc

 

Disable any Category or Product, Easy way

 

Secure & Improve your account pages et al.

Share this post


Link to post
Share on other sites

yess i did

then i get an error

Parse error: syntax error, unexpected T_NEW

that didnt do the trick

 

thankyou

 

danta67

Share this post


Link to post
Share on other sites

If i put the code you gave me

the error is gone but i miss some borders then

and its together with the new prod module instead of both modules separate boxes

 

have a look website

Share this post


Link to post
Share on other sites

Your file is creating the issue as it is putting row elements within columns

 

 

 

modify the file to:

 

<?php
//REMOVE THIS LINES IF YOU DON'T WANT TO SHOW THE HEADER
//$header_star_product = array();
//$header_star_product[] = array('align' => 'center', 'text' => sprintf(STAR_TITLE));
new contentBoxHeading($header_star_product);
//END OF -REMOVE THIS LINES IF YOU DON'T WANT TO SHOW THE HEADER-

function tep_star_product_with_attributes($products_id) {
$attributes_query = tep_db_query("select count(*) as count from " . TABLE_PRODUCTS_ATTRIBUTES . " where products_id = '" . (int)$products_id . "'");
$attributes = tep_db_fetch_array($attributes_query);

if ($attributes['count'] > 0) {
return true;
}
else {
return false;
}
}

$star_products_query = tep_db_query("select substring(pd.products_description, 1, 598) as products_description, p.products_id, p.products_image, p.manufacturers_id, p.products_price, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price, p.products_tax_class_id, sp.product_id from ((" . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_STAR_PRODUCT . " sp) left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id) where p.products_id = pd.products_id and p.products_status = '1' and pd.products_description != '' and p.products_id=sp.product_id and pd.language_id = '" . $languages_id . "'");
$star_products = tep_db_fetch_array($star_products_query);
$star_products['products_name'] = tep_get_products_name($star_products['products_id']);
$evita_cortar_palabras = explode( ' ', $star_products["products_description"] );
array_pop( $evita_cortar_palabras );
$star_products["products_description"] = implode( ' ', $evita_cortar_palabras );

if (!tep_star_product_with_attributes($star_products['products_id'])) {
$star_products["0"] = array('align' => 'center',
'params' => 'width="100%" valign="top"',
'text' => '<table border="0" width="100%" cellspacing="0" cellpadding="0"><tr>
<td height="15%" width="85%" class="star-product-title">' . $star_products['products_name'] . '</td>
<td align="right" height="100%" width="15%" rowspan="2"><a href="' . tep_href_link(FILENAME_POPUP_IMAGE, 'pID=' . $star_products['products_id']) . '"' . ' target="popup"' . ' onClick="window.open(this.href, this.target, \'toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=yes, copyhistory=no, width=' . SMALL_IMAGE_WIDTH . ', height=' . SMALL_IMAGE_HEIGHT . '\').focus(); return false;">' . tep_image(DIR_WS_IMAGES . $star_products['products_image'], $star_products['products_name'], SMALL_IMAGE_WIDTH*2, SMALL_IMAGE_HEIGHT*2) . '</a></td>
</tr>
<tr>
<td height="80%" width="85%" class="star-product">'. strip_tags($star_products["products_description"]) . '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, "products_id=" . $star_products["products_id"]). '">' . STAR_READ_MORE . '</a></td>
</tr>
<tr>
<td height="5%" width="85%" class="star-product-price" align="center">'.
$currencies->display_price($star_products['final_price'], tep_get_tax_rate($listing['products_tax_class_id'])) . '</td>
</tr>
<tr>
<td><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, "products_id=" . $star_products["products_id"]). '">' . tep_image(DIR_WS_LANGUAGES . $language . '/images/buttons/more_info.gif') . '</a>' . tep_draw_separator('pixel_trans.gif', '10', '10') . '<a href="' . tep_href_link(FILENAME_DEFAULT, tep_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $star_products['products_id']) . '">' . tep_image_button('button_buy_now.gif', IMAGE_BUTTON_IN_CART) . '</a></td>
</tr></table>');
$star_products_output = array_slice($star_products, sizeof($star_products)-1);
new contentBox($star_products_output);
}

else {
$star_products["0"] = array('align' => 'center',
'params' => 'width="100%" valign="top"',
'text' => '<table border="0" width="100%" cellspacing="0" cellpadding="0"><tr>
<td height="15%" width="85%" class="star-product-title">' . $star_products['products_name'] . '</td>
<td align="right" height="100%" width="15%" rowspan="2"><a href="' . tep_href_link(FILENAME_POPUP_IMAGE, 'pID=' . $star_products['products_id']) . '"' . ' target="popup"' . ' onClick="window.open(this.href, this.target, \'toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=yes, copyhistory=no, width=' . SMALL_IMAGE_WIDTH . ', height=' . SMALL_IMAGE_HEIGHT . '\').focus(); return false;">' . tep_image(DIR_WS_IMAGES . $star_products['products_image'], $star_products['products_name'], SMALL_IMAGE_WIDTH*2, SMALL_IMAGE_HEIGHT*2) . '</a></td>
</tr>
<tr>
<td height="80%" width="85%" class="star-product">'. strip_tags($star_products["products_description"]) . '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, "products_id=" . $star_products["products_id"]). '">' . STAR_READ_MORE . '</a></td>
</tr>
<tr>
<td height="5%" width="85%" class="star-product-price" align="center">'.
$currencies->display_price($star_products['final_price'], tep_get_tax_rate($listing['products_tax_class_id'])) . '</td>
</tr>
<tr>
<td><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, "products_id=" . $star_products["products_id"]). '">' . tep_image(DIR_WS_LANGUAGES . $language . '/images/buttons/more_info.gif') . '</a>' . tep_draw_separator('pixel_trans.gif', '10', '10') . '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $star_products['products_id']) . '">' . tep_image_button('button_buy_now.gif', IMAGE_BUTTON_IN_CART) . '</a></td>
</tr></table>');
mws_boxHeader ();
new noborderBox($star_products);
mws_boxFooter();
}
?>

 


Sam

 

Remember, What you think I ment may not be what I thought I ment when I said it.

 

Contributions:

 

Auto Backup your Database, Easy way

 

Multi Images with Fancy Pop-ups, Easy way

 

Products in columns with multi buy etc etc

 

Disable any Category or Product, Easy way

 

Secure & Improve your account pages et al.

Share this post


Link to post
Share on other sites

looking at thwe source shows the file is un-changed, have u uploaded the changed file? and reset (or turned off) the cache?


Sam

 

Remember, What you think I ment may not be what I thought I ment when I said it.

 

Contributions:

 

Auto Backup your Database, Easy way

 

Multi Images with Fancy Pop-ups, Easy way

 

Products in columns with multi buy etc etc

 

Disable any Category or Product, Easy way

 

Secure & Improve your account pages et al.

Share this post


Link to post
Share on other sites

sorry for that

it was not working so i changed it back

 

Its now with your code if you look its still the same

 

Thanks

Share this post


Link to post
Share on other sites

can u revert to

new contentBox($star_products);


Sam

 

Remember, What you think I ment may not be what I thought I ment when I said it.

 

Contributions:

 

Auto Backup your Database, Easy way

 

Multi Images with Fancy Pop-ups, Easy way

 

Products in columns with multi buy etc etc

 

Disable any Category or Product, Easy way

 

Secure & Improve your account pages et al.

Share this post


Link to post
Share on other sites

u still seem to have an issue, iether u are not calling mws_boxFooter()

or you have failed to install the code for the mws_boxFooter() function correctly


Sam

 

Remember, What you think I ment may not be what I thought I ment when I said it.

 

Contributions:

 

Auto Backup your Database, Easy way

 

Multi Images with Fancy Pop-ups, Easy way

 

Products in columns with multi buy etc etc

 

Disable any Category or Product, Easy way

 

Secure & Improve your account pages et al.

Share this post


Link to post
Share on other sites

Seems i was missing some code

starproduct looks ok now only it messes up my site

 

thanks for all your help

 

danta67

Share this post


Link to post
Share on other sites

yes, at some point near footer u are closing a table thats not open, often easest way to find is validate with w3c


Sam

 

Remember, What you think I ment may not be what I thought I ment when I said it.

 

Contributions:

 

Auto Backup your Database, Easy way

 

Multi Images with Fancy Pop-ups, Easy way

 

Products in columns with multi buy etc etc

 

Disable any Category or Product, Easy way

 

Secure & Improve your account pages et al.

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  

×