Jump to content

KK123

Members
  • Content count

    2
  • Joined

  • Last visited

Profile Information

  • Real Name
    Megan Larsen
  1. Thank you, thank you! I've been fiddling around with the same problem as above. The solution worked like a charm. Chris, thank you so much for this contrib and for taking the time to be so helpful - you rock!
  2. Hi Steve, Your contrtibution is fantastic. Thank you so much for taking the time to share this with everyone! I'm trying to accomplish a couple of things with the contribution, but I'm having a hard time because I know nothing about PHP. Since the contribution is working perfect as described, you may not be interested in helping me out, but if you happen to come across my post and find some time, it would be most appreciated. I'd rather use the default description rather than the having to enter a shortdescription - problem is that because I have an html text editor installed, all my descriptions have different font styles, sizes, line breaks, etc. And when displayed under featured products, it looks like crap. How can I strip the html tags from the html output? From my limited knowledge of PHP, I've learned that i need to use strip_tags, but cannot find out where I should put it. I figure it would be here somewhere in the code below, but not sure how to do it: if ($featured_products_array[$i]['shortdescription'] != '') { echo $featured_products_array[$i]['shortdescription']; } else { $bah = explode(" ", $featured_products_array[$i]['description']); for($desc=0; $desc<MAX_FEATURED_WORD_DESCRIPTION; $desc++) { echo "$bah[$desc] "; } } Secondly, because of the limitations of my site design and long product names, I need to truncate the characters for my product names, how do I do that? Finally, I'd like to place a vertical divider between the collumns, like a vertical line. I tried that by adding a <td>, but then realized that it adds a <td> to the last column as well. From looking at the code, I have a feeling I need to add some code somewhere here... if (($col / FEATURED_PRODUCTS_COLUMNS) == floor($col / FEATURED_PRODUCTS_COLUMNS)) { if (((FEATURED_SET == '1') && (FEATURED_SET_STYLE == '3')) or ((FEATURED_SET == '2') && (FEATURED_SET_STYLE == '3')) or ((FEATURED_SET == '3') && (FEATURED_SET_STYLE == '3')) or ((FEATURED_SET == '4') && (FEATURED_SET_STYLE == '3'))){ echo '</td></tr><tr><td colspan="' . FEATURED_PRODUCTS_COLUMNS . '" align="center" valign="top" class="main" width="50%"><hr color=#' . HORIZONTAL_LINE_COLOUR . '></td></tr><tr>'; }else{ echo '</td></tr><tr><td colspan="' . FEATURED_PRODUCTS_COLUMNS . '" class="main"></td></tr><tr>'; } } if (($i+1) != sizeof($featured_products_array)) { } } } But not sure how to do this. If you would just help me out with any of the above I would be most greatful as I have a very active live site and the featured products section is looking a bit disorganized right now. Hope to hear from you soon. Megan
×