Jump to content

Rickharris

Members
  • Content count

    31
  • Joined

  • Last visited

Profile Information

  1. Rickharris

    Current AUctions V2.0

    Thanks, You may want to try this one: http://www.oscommerce.com/community/contri...ons,3762/page,5 At least it will show something on site....guess I'll have to disable my C/Auctions also...Thanks for letting me know.... By the way...did you try the author's website...I heard they weren't supporting it...but it's worth a shot trying to get the help... :thumbsup:
  2. Rickharris

    Current AUctions V2.0

    Let me know if you get anything.... I'd like to get it working to... Did it "ever" work for your site? Thanks, Rick...
  3. Rickharris

    [Contribution] Pollbooth v2.0

    Begging! :) Look at this: http://www.shopabundle.com/pollbooth.php/op/list The (other polls) PAGE and COLUMN RIGHT...only goes out of whack when (more than one) poll is added. If only one poll is listed...the page is fine. ANY HELP...Please!!!??.. All other pages of the pollbooth work fine...just the link to "other polls". I have to get column right and the page like the rest of the site...soon. Thanks folks!!!!! Here's the code....I'd appreciate if you'd tell me what to put....and where. ----------------------------------------------------------------------------------------------- <?php /* $Id: pollbooth.php,v 2.1.1 2004/04/06 22:29:47 wilt Exp $ The Exchange Project - Community Made Shopping! http://www.theexchangeproject.org Copyright © 2000,2001 The Exchange Project Released under the GNU General Public License */ require('includes/application_top.php'); require(DIR_WS_LANGUAGES . $language . '/pollbooth.php'); $location = ' : <a href="' . tep_href_link('pollbooth.php', 'op=results', 'NONSSL') . '" class="headerNavigation"> ' . NAVBAR_TITLE_1 . '</a>'; DEFINE('MAX_DISPLAY_NEW_COMMENTS', '5'); if ($HTTP_GET_VARS['action']=='do_comment') { $comment_query_raw = "insert into phesis_comments (pollid, customer_id, name, date, host_name, comment,language_id) values ('" . $HTTP_GET_VARS['pollid'] . "', '" . $customer_id . "', '" . addslashes($HTTP_POST_VARS['comment_name']) . "', now(),'" . $REMOTE_ADDR . "','" . addslashes($HTTP_POST_VARS['comment']) . "','" . $languages_id . "')"; $comment_query = tep_db_query($comment_query_raw); $HTTP_GET_VARS['action'] = ''; $HTTP_GET_VARS['op'] = 'results'; } ?> <!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN"> <html <?php echo HTML_PARAMS; ?>> <head> <meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>"> <title><?php echo TITLE; ?></title> <base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>"> <link rel="stylesheet" type="text/css" href="stylesheet.css"> </head> <body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0"> <!-- header //--> <?php require(DIR_WS_INCLUDES . 'header.php'); ?> <!-- header_eof //--> <!-- body //--> <table border="0" width="100%" cellspacing="1" cellpadding="1"> <tr> <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2"> <!-- left_navigation //--> <?php require(DIR_WS_INCLUDES . 'column_left.php'); ?> <!-- left_navigation_eof //--> </table></td> <!-- body_text //--> <td width="100%" valign="top"> <table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td class="pageHeading"><?php echo HEADING_TITLE; ?></td> <td align="right"><?php echo tep_image(DIR_WS_IMAGES . 'table_background_pollbooth.gif', HEADING_TITLE); ?></td> </tr> </table><table><br> <?php if (!isset($HTTP_GET_VARS['op'])) { $HTTP_GET_VARS['op']="list"; } switch ($HTTP_GET_VARS['op']) { case "results": if (isset($HTTP_GET_VARS['pollid'])) { $pollid=$HTTP_GET_VARS['pollid']; } else { $pollid=1; } $poll_query = tep_db_query("SELECT pollid, timeStamp FROM phesis_poll_desc WHERE pollid='".$pollid."'"); $polls = tep_db_fetch_array($poll_query); $title_query = tep_db_query("SELECT optionText from phesis_poll_data where pollid='".$pollid."' and voteid='0' and language_id = '" . $languages_id . "'"); $title = tep_db_fetch_array($title_query); ?> <table align="center"> <tr><td colspan="2" align="center" class="pageHeading"><b><u><br><br><?php echo $title['optionText']?></u></b></td></tr> <tr><td> </td></tr> <?php $query="SELECT SUM(optionCount) AS sum FROM phesis_poll_data WHERE pollid='".$pollid."'"; $result=tep_db_query($query); $polls=tep_db_fetch_array($result); $sum=$polls['sum']; for($i = 1; $i <= 12; $i++) { $query = "SELECT pollid, optiontext, optioncount, voteid FROM phesis_poll_data WHERE (language_id = '" . $languages_id . "') and (pollid='".$pollid."') AND (voteid='".$i."')"; $result=tep_db_query($query);$polls=tep_db_fetch_array($result); $optiontext=$polls['optiontext']; $optioncount=$polls['optioncount']; if ($optiontext) { ?> <tr><td align="right" class="main"> <?php echo $optiontext?></td> <?php if ($sum) { $percent = 100 * $optioncount / $sum; } else { $percent = 0; } ?> <td align="left" class="main"> <?php $percentInt = (int)$percent * 4 * 1; $percent2 = (int)$percent; if ($percent > 0) { ?> <img src="images/leftbar.gif" height="15" width="7" Alt="<?echo $percent2?> %"><img src="images/mainbar.gif" height="15" width="<?echo $percentInt?>" Alt="<?echo $percent2?> %"><img src="images/rightbar.gif" height="15" width="7" Alt="<?echo $percent2?> %"> <?php } else { ?> <img src="images/leftbar.gif" height="15" width="7" Alt="<? echo $percent2?> %"><img src="images/mainbar.gif" height="15" width="3" Alt="<? echo $percent2?> %"><img src="images/rightbar.gif" height="15" width="7" Alt="<? echo $percent2?> %"> <?php } printf(" %.2f%% (%d)", $percent, $optioncount); ?> <?php } } ?><tr><td> </td><td> </td></tr><?php $comments_query_raw = "select * from phesis_comments where pollid = '" . $pollid . "' and language_id = '" . $languages_id . "'"; // $comments_split = new splitPageResults($HTTP_GET_VARS['page'], MAX_DISPLAY_NEW_COMMENTS, $comments_query_raw, $comments_numrows); $comments_query = tep_db_query($comments_query_raw); if ($comments_numrows > 0) { ?> <tr><td colspan="2"> </td></tr> <tr><td class="pageheading" colspan="2"><?php echo _COMMENTS_POSTED; ?></td></tr> <?php } if (($comments_numrows > 0) && ((PREV_NEXT_BAR_LOCATION == '1') || (PREV_NEXT_BAR_LOCATION == '3'))) { ?> <tr> <td colspan="2"><br><table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td class="smallText"><?php echo $comments_split->display_count($comments_numrows, MAX_DISPLAY_NEW_COMMENTS, $HTTP_GET_VARS['page'], TEXT_DISPLAY_NUMBER_OF_COMMENTS); ?></td> <td align="right" class="smallText"><?php echo TEXT_RESULT_PAGE; ?> <?php echo $comments_split->display_links($comments_numrows, MAX_DISPLAY_NEW_COMMENTS, MAX_DISPLAY_PAGE_LINKS, $HTTP_GET_VARS['page'], tep_get_all_get_params(array('page', 'info', 'x', 'y'))); ?></td> </tr> </table><table> <?php } while ($comments = tep_db_fetch_array($comments_query)) { if ($comments['customer_id'] != '0') { $name_query = tep_db_query("select customers_firstname, customers_lastname from " . TABLE_CUSTOMERS . " where customers_id = '". $comments['customer_id'] . "'"); $name = tep_db_fetch_array($name_query); $comment_name = $name['customers_firstname'] . " " . $name['customers_lastname']; } else { $comment_name = $comments['name']; } $post_details = _COMMENTS_BY . "<u>" . $comment_name . "</u>" . _COMMENTS_ON . $comments['date'] . '<br>'; ?> <tr><td class="main" colspan="2"><b><?php echo $post_details; ?></b></td></tr> <tr><td class="main" colspan="2"><?php echo htmlspecialchars($comments['comment']); ?></td></tr> <?php } if (($comments_numrows > 0) && ((PREV_NEXT_BAR_LOCATION == '2') || (PREV_NEXT_BAR_LOCATION == '3'))) { ?> <tr> <td colspan="2"><br><table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td class="smallText"><?php echo $comments_split->display_count($comments_numrows, MAX_DISPLAY_NEW_COMMENTS, $HTTP_GET_VARS['page'], TEXT_DISPLAY_NUMBER_OF_COMMENTS); ?></td> <td align="right" class="smallText"><?php echo TEXT_RESULT_PAGE; ?> <?php echo $comments_split->display_links($comments_numrows, MAX_DISPLAY_NEW_COMMENTS, MAX_DISPLAY_PAGE_LINKS, $HTTP_GET_VARS['page'], tep_get_all_get_params(array('page', 'info', 'x', 'y'))); ?></td> </tr> </table></td> </tr> <?php } ?><table align="center"> <tr><td colspan="2" align="center"> </td></tr> <tr><td colspan="2" align="center" class="main"><? echo _TOTALVOTES?> = <? echo $sum?></td></tr> <tr><td colspan="2" align="center" class="main">[<a href="<?php echo tep_href_link('pollbooth.php','pollid='.$pollid.'&op=comment','NONSSL')?>"><? echo _ADD_COMMENTS?></a> | <a href="<?php echo tep_href_link('pollbooth.php','pollid='.$pollid.'&op=vote','NONSSL')?>"><? echo _VOTING?></a> | <a href="<? echo tep_href_link('pollbooth.php','op=list','NONSSL')?>"><?echo _OTHERPOLLS?></a>]</td></tr> </table> <?php break; case 'comment': if (isset($HTTP_GET_VARS['pollid'])) { $pollid=$HTTP_GET_VARS['pollid']; } else { $pollid=1; } $poll_query = tep_db_query("SELECT pollid, timeStamp FROM phesis_poll_desc WHERE pollid='".$pollid."'"); $polls = tep_db_fetch_array($poll_query); $title_query = tep_db_query("select optionText from phesis_poll_data where pollid='".$pollid."' and voteid='0' and language_id = '" . $languages_id . "'"); $title = tep_db_fetch_array($title_query); ?> <?php echo tep_draw_form('poll_comment', tep_href_link('pollbooth.php', 'action=do_comment&pollid=' . $pollid), 'post'); ?> <table> <tr><td colspan="2" align="left" class="pageHeading">>> <u><?echo $title['optionText']?></u><BR><BR></td> <?php if (!$customer_id) { ?> <tr><td class="main"><?php echo _YOURNAME; ?><BR><?php echo tep_draw_input_field('comment_name',''); ?><BR><BR></td></tr> <?php } ?> <tr><td class="main"><?php echo _YOURCOMMENTS; ?><BR><?php echo tep_draw_textarea_field('comment', 'soft', '30', '4', ''); ?></td></tr> <tr><td class="main"><?php echo _THANKSCOMMENTS; ?> <tr><td><BR><BR><?php echo tep_image_submit('button_continue.gif'); ?></td></tr> </table> <?php $nolink = true; break; case 'list': ?> <tr><td colspan="3"> </td></tr> <?php $result=tep_db_query("SELECT pollid, timestamp, voters, poll_type, poll_open FROM phesis_poll_desc ORDER BY timestamp desc"); $row=0; while ($polls=tep_db_fetch_array($result)) { $row++; $id=$polls['pollid']; if (($row / 2) == floor($row / 2)) { ?> <tr class="Payment-even"> <?php } else { ?> <tr class="Payment-odd"> <?php } $title_query = tep_db_query("SELECT optionText from phesis_poll_data where pollid='".$id."' and voteid='0' and language_id = '" . $languages_id . "'"); $title = tep_db_fetch_array($title_query); $fullresults="<a href=\"".tep_href_link('pollbooth.php','op=results&pollid='.$id,'NONSSL')."\">"._POLLRESULTS."</a>"; $result1 = tep_db_query("SELECT sum(optioncount) AS sum FROM phesis_poll_data WHERE pollid='".$id."'"); $poll_sum=tep_db_fetch_array($result1); $sum=$poll_sum['sum']; $query1=tep_db_query("select count(pollid) as comments from phesis_comments where pollid='".$id."' and language_id='".$languages_id."'"); $result1 = tep_db_fetch_array($query1); $comments = $result1['comments']; echo("<table align='center' width='100%' border='1'><tr><td align='center' class=\"main\">".$title['optionText']."</td><td align='center' class=\"main\">".$sum." "._VOTES."</td><td align='center' class=\"main\">".$comments." "._COMMENTS."</td><td align='center' class=\"main\">".$fullresults."</td>"); if ($polls['poll_type']=='0') { echo ("<td align='center' class=\"main\">"._PUBLIC."</td>"); } else { echo ("<td align='center' class=\"main\">"._PRIVATE."</td>"); } if ($polls['poll_open']=='0') { echo ("<td align='center' class=\"main\">"._POLLOPEN."</td>"); } else { echo ("<td align='center' class=\"main\">"._POLLCLOSED."</td>"); } echo("</tr></table>\n"); } break; case "vote": if (isset($HTTP_GET_VARS['pollid'])) { $pollid=$HTTP_GET_VARS['pollid']; } else { $pollid=1; } $poll_query=tep_db_query("select voters from phesis_poll_desc where pollid='".$pollid."'"); $poll_details=tep_db_fetch_array($poll_query); $title_query = tep_db_query("Select optionText from phesis_poll_data where pollid='".$pollid."' and voteid='0' and language_id = '" . $languages_id . "'"); $title = tep_db_fetch_array($title_query); ?> <b><table align="center"><tr><td class="pageHeading">Poll Question: >> <u><?php echo $title['optionText']; ?></u></b></td></center> <table align="center"><BR><BR><td class="main"> <?php $url = tep_href_link('pollbooth.php','op=results&pollid='.$pollid,'NONSSL'); $content = "<input type=\"hidden\" name=\"pollid\" value=\"".$pollid."\">\n"; $content .= "<input type=\"hidden\" name=\"forwarder\" value=\"".$url."\">\n"; for ($i=1;$i<=12;$i++) { $query=tep_db_query("select pollid, optiontext, optioncount, voteid from phesis_poll_data where (pollid='".$pollid."') and (voteid=$i) and (language_id='".$languages_id."')"); if ($result=tep_db_fetch_array($query)) { if ($result['optiontext']) { $content .= "<b><left><input type=\"radio\" name=\"voteid\" value=\"" . $i . "\">" . $result['optiontext'] . "<br><br></center></b>\n"; } } } $content .= "<br><center><input type=\"submit\" value=\""._VOTE."\"></center><br>\n"; $query=tep_db_query("select sum(optioncount) as sum from phesis_poll_data where pollid='".$pollid."'"); if ($result=tep_db_fetch_array($query)) { $sum=$result['sum']; } $content .= "<center>[ <a href=\"".tep_href_link('pollbooth.php','op=results&pollid= . $pollid,'NONSSL') . "\">" . _RESULTS . "</a> | <a href=\"".tep_href_link('pollbooth.php','op=list','NONSSL') . "\">" . _OTHERPOLLS . "</a>" . ]" . "</center>"; $content .= "</br><center>" . $sum . " "._VOTES."</center>\n"; ?> <form name="poll" method="post" action="pollcollect.php"> <?php echo $content; ?> </form> </tr></table> <?php break; } if (!$nolink) { ?> <br><center><?php echo '<a href="' . tep_href_link(FILENAME_DEFAULT, '', 'NONSSL') . '">' . tep_image_button('button_continue.gif', IMAGE_BUTTON_CONTINUE) . '</a>' . "</center>"; ?> <?php } ?> <!-- body_text_eof //--> <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2"></td><tr><td> <!-- right_navigation //--> <?php require(DIR_WS_INCLUDES . 'column_right.php'); ?> <!-- right_navigation_eof //--> </td> </tr></table></td> </tr> </table> <!-- body_eof //--> <!-- footer //--> <?php require(DIR_WS_INCLUDES . 'footer.php'); ?> <!-- footer_eof //--> </body> </html> <?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>
  4. You know...looking at that page again....there is an alt/text bubble over the "pixel_trans.gif" also...so....maybe the alt/text bubble...even pops up over pics without text...?? Hover just below TRAVEL PRODUCTS...where the separator is located here: http://www.shopabundle.com/default.php/cPath/39 ...you'll see the bubble pops up there for the pixel, also. No big deal...but it confused me into originally thinking that there was no subtext showing in the TRAVEL PRODUCTS PIC...which it does in the main category...but not this sub. Thanks Nate!...and ...thanks for a great contribution!....Saves a lot of headache! ;)
  5. Hey Nate... Oh, yeah...how do you think the contribution would perform under heavy site traffic? I know you mentioned earlier about it maybe using up more server juice. Would this perform better than the contributions that "break" down larger jpegs to separate, renamed, smaller thumbnails....they seem to suffer in quality at smaller sizes that way. Thanks Buddy.....
  6. Thanks Nate......(don't growl!) ;) Yep...I did read the previous message....but sorry...being a newbie...some of it went over my head. (pixel black, and separator works fine now!)... :D The problem only seems to involve the "subcategory" where the products are listed...not in the upper "main categories" that list the subcategories....the alt/text works fine there. I can't figure....the alt / text also works fine when over a (product pic)....in the subcategory...but not over the top/right pic for the subcategory. Anybody out there have an idea of how to fix? Thanks...appreciate the help. See what I mean here: http://www.shopabundle.com/default.php/cPath/39 The product pics...buy now buttons, etc...all have the alt text...just NOT the top/right pic...which has a yellow popup box...but no text. Hmmm.......... Thanks Folks...
  7. Do you see anything in my code on (on previous page)...that may cause that problem, Nate? Thanks...! Really would like to get this working ok..... Rick...............
  8. Thanks Nate!........;) Gettin' there! The pixel black / works great now!...So does the divider pixel settings! ;) Still can't figure why the alt text for the subcategory image (top-right)...shows no alt text after install. Hmmmmm? It is a gif file (category and subcategory images only...not product images). But guess what...the alt text works fine in the CATEGORY listings (gif format)...but NOT the subcategory top/right pics!??? Check this out...hover over the category pics: http://www.shopabundle.com/default.php/cPath/37 NOW...hover over the subcategory pic: http://www.shopabundle.com/default.php/cPath/37_64 See?....only a blank alt/text bubble? Any suggestions?
  9. Thanks Nate... I'd appreciate it if you would take a glance at my code above....maybe I put something in the wrong place. Or if someone else could help....Thanks...
  10. Thanks Nate! Sorry for posting the "whole" file.....I didn't know what was causing the error on the page..hence the whole file. Looking at the code...is there something that I pasted in the wrong place? (Newbie) Because, looking at this product listing page for example: http://www.shopabundle.com/default.php/cPath/37_64 The pixel black only goes so far....and the tooltip for the subcategory names don't show....whereas before the contribution instruction/code....they were normal. I know it's not the contrib....any idea what it can be? Thanks Nate........
  11. Hi Nate! :) Yes...I still have some kind of problem with the product listing page after install.... It interferes with the "pixel black" and also the tooltip/bubbles that affect the subcategory names, etc. Probably something minor...could you take a look at my code below...and let me know what needs correcting? We're newbies....Thanks.... First...take a look here: http://www.shopabundle.com/default.php/cPath/37_64 Code (from html_output.php) below: ---------------------------------------------- <?php /* $Id: html_output.php,v 1.49 2003/02/11 01:31:02 hpdl Exp $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright © 2003 osCommerce Released under the GNU General Public License */ //// // Parse the data used in the html tags to ensure the tags will not break function tep_parse_input_field_data($data, $parse) { return strtr(trim($data), $parse); } //// // The HTML href link wrapper function function tep_href_link($page = '', $parameters = '', $connection = 'NONSSL', $add_session_id = true, $search_engine_safe = true) { if (!tep_not_null($page)) { die('</td></tr></table></td></tr></table><br><br><font color="#ff0000"><b>Error!</b></font><br><br><b>Unable to determine the page link!<br><br>'); } if ($connection == 'NONSSL') { $link = HTTP_SERVER . DIR_WS_CATALOG; } elseif ($connection == 'SSL') { if (ENABLE_SSL == true) { $link = HTTPS_SERVER . DIR_WS_CATALOG; } else { $link = HTTP_SERVER . DIR_WS_CATALOG; } } else { die('</td></tr></table></td></tr></table><br><br><font color="#ff0000"><b>Error!</b></font><br><br><b>Unable to determine connection method on a link!<br><br>Known methods: NONSSL SSL</b><br><br>'); } if (tep_not_null($parameters)) { $link .= $page . '?' . $parameters; $separator = '&'; } else { $link .= $page; $separator = '?'; } while ( (substr($link, -1) == '&') || (substr($link, -1) == '?') ) $link = substr($link, 0, -1); // Add the session ID when moving from HTTP and HTTPS servers or when SID is defined if ( (ENABLE_SSL == true ) && ($connection == 'SSL') && ($add_session_id == true) ) { $sid = tep_session_name() . '=' . tep_session_id(); } elseif ( ($add_session_id == true) && (tep_not_null(SID)) ) { $sid = SID; } // (( ADD ADDITIONAL SPIDERS HERE WHEN NEEDED)) $spiders = array("MICROSOFT-GLOBAL-NET", "MSFTP-ARIN", "ZM39-ARIN", "msnbot", "YahooSeeker/1.1", "yahooseeker", "slurp", "slurp/si", "slurp@inktomi.com", "Slurp", "slurp@inktomi.com", "INKTOMI", "INKT", "inkt", "inktomi", "inktomisearch.com"); foreach($spiders as $Val) { if (ereg($Val, strtolower($_SERVER["HTTP_USER_AGENT"]))) { // Edit out one of these as necessary depending upon your version of html_output.php //$sess = NULL; $sid = NULL; break; } } if ( (SEARCH_ENGINE_FRIENDLY_URLS == 'true') && ($search_engine_safe == true) ) { while (strstr($link, '&&')) $link = str_replace('&&', '&', $link); $link = str_replace('?', '/', $link); $link = str_replace('&', '/', $link); $link = str_replace('=', '/', $link); $separator = '?'; } if (isset($sid)) { $link .= $separator . $sid; } return $link; } //// // The HTML image wrapper function function tep_image($src, $alt = '', $width = '', $height = '', $params = '') { if (($src == '' || $src == 'images/') && IMAGE_REQUIRED == 'false') { return; } $image = '<img src="' . $src . '" border="0" alt=" ' . htmlspecialchars(StripSlashes($alt)) . ' "'; if ((strstr($width,'%')!='') || (strstr($height,'%')!='')) { $dont_calculate = 1; } if (CONFIG_CALCULATE_IMAGE_SIZE && (!$width || !$height)) { if ($image_size = @getimagesize($src)) { if (!$width && $height) { $ratio = $height / $image_size[1]; $width = $image_size[0] * $ratio; } elseif ($width && !$height) { $ratio = $width / $image_size[0]; $height = $image_size[1] * $ratio; } elseif (!$width && !$height) { $width = $image_size[0]; $height = $image_size[1]; } } elseif (IMAGE_REQUIRED == 'false') { return ''; } } if ( CONFIG_CALCULATE_IMAGE_SIZE && (!$dont_calculate) ){ if ($image_size = @getimagesize($src)) { $ratio = $image_size[1] / $image_size[0]; // real ratio $orig_width = $image_size[1]; $orig_height = $image_size[0]; // do we need scaling if (($image_size[0] > $width) || ($image_size[1] > $height)) { $rx = $image_size[0] / $width; $ry = $image_size[1] / $height; if ($rx < $ry) { $width = $height / $ratio; } else { $height = $width * $ratio; } // Generate thumbnail on the fly $image = '<img src="product_thumb.php?img='.$src.'&w='.intval($width).'&h='.intval($height).'" border="0" alt=" ' . htmlspecialchars(StripSlashes($alt)) . ' "'; } else { $rx = $image_size[0] / $width; $ry = $image_size[1] / $height; if ($rx < $ry) { $width = $height / $ratio; } else { $height = $width * $ratio; } } } } if ( ($width) && ($height) ) { $image .= ' width="' . intval($width) . '" height="' . intval($height) . '"'; } if ($params != '') { $image .= ' ' . $params; } $image .= '>'; return $image; } //// // The HTML form submit button wrapper function // Outputs a button in the selected language function tep_image_submit($image, $alt = '', $parameters = '') { global $language; $image_submit = '<input type="image" src="' . tep_parse_input_field_data(DIR_WS_LANGUAGES . $language . '/images/buttons/' . $image, array('"' => '"')) . '" alt="' . tep_parse_input_field_data($alt, array('"' => '"')) . '"'; if (tep_not_null($alt)) $image_submit .= ' title=" ' . tep_parse_input_field_data($alt, array('"' => '"')) . ' "'; if (tep_not_null($parameters)) $image_submit .= ' ' . $parameters; $image_submit .= '>'; return $image_submit; } //// // Output a function button in the selected language function tep_image_button($image, $alt = '', $parameters = '') { global $language; return tep_image(DIR_WS_LANGUAGES . $language . '/images/buttons/' . $image, $alt, '', '', $parameters); } //// // Output a separator either through whitespace, or with an image function tep_draw_separator($image = 'pixel_black.gif', $width = '100%', $height = '1') { return tep_image(DIR_WS_IMAGES . $image, '', $width, $height); } //// // Output a form function tep_draw_form($name, $action, $method = 'post', $parameters = '') { $form = '<form name="' . tep_parse_input_field_data($name, array('"' => '"')) . '" action="' . tep_parse_input_field_data($action, array('"' => '"')) . '" method="' . tep_parse_input_field_data($method, array('"' => '"')) . '"'; if (tep_not_null($parameters)) $form .= ' ' . $parameters; $form .= '>'; return $form; } //// // Output a form input field function tep_draw_input_field($name, $value = '', $parameters = '', $type = 'text', $reinsert_value = true) { $field = '<input type="' . tep_parse_input_field_data($type, array('"' => '"')) . '" name="' . tep_parse_input_field_data($name, array('"' => '"')) . '"'; if ( (isset($GLOBALS[$name])) && ($reinsert_value == true) ) { $field .= ' value="' . tep_parse_input_field_data($GLOBALS[$name], array('"' => '"')) . '"'; } elseif (tep_not_null($value)) { $field .= ' value="' . tep_parse_input_field_data($value, array('"' => '"')) . '"'; } if (tep_not_null($parameters)) $field .= ' ' . $parameters; $field .= '>'; return $field; } //// // Output a form password field function tep_draw_password_field($name, $value = '', $parameters = 'maxlength="40"') { return tep_draw_input_field($name, $value, $parameters, 'password', false); } //// // Output a selection field - alias function for tep_draw_checkbox_field() and tep_draw_radio_field() function tep_draw_selection_field($name, $type, $value = '', $checked = false, $parameters = '') { $selection = '<input type="' . tep_parse_input_field_data($type, array('"' => '"')) . '" name="' . tep_parse_input_field_data($name, array('"' => '"')) . '"'; if (tep_not_null($value)) $selection .= ' value="' . tep_parse_input_field_data($value, array('"' => '"')) . '"'; if ( ($checked == true) || ($GLOBALS[$name] == 'on') || ( (isset($value)) && ($GLOBALS[$name] == $value) ) ) { $selection .= ' CHECKED'; } if (tep_not_null($parameters)) $selection .= ' ' . $parameters; $selection .= '>'; return $selection; } //// // Output a form checkbox field function tep_draw_checkbox_field($name, $value = '', $checked = false, $parameters = '') { return tep_draw_selection_field($name, 'checkbox', $value, $checked, $parameters); } //// // Output a form radio field function tep_draw_radio_field($name, $value = '', $checked = false, $parameters = '') { return tep_draw_selection_field($name, 'radio', $value, $checked, $parameters); } //// // Output a form textarea field function tep_draw_textarea_field($name, $wrap, $width, $height, $text = '', $parameters = '', $reinsert_value = true) { $field = '<textarea name="' . tep_parse_input_field_data($name, array('"' => '"')) . '" wrap="' . tep_parse_input_field_data($wrap, array('"' => '"')) . '" cols="' . tep_parse_input_field_data($width, array('"' => '"')) . '" rows="' . tep_parse_input_field_data($height, array('"' => '"')) . '"'; if (tep_not_null($parameters)) $field .= ' ' . $parameters; $field .= '>'; if ( (isset($GLOBALS[$name])) && ($reinsert_value == true) ) { $field .= $GLOBALS[$name]; } elseif (tep_not_null($text)) { $field .= $text; } $field .= '</textarea>'; return $field; } //// // Output a form hidden field function tep_draw_hidden_field($name, $value = '', $parameters = '') { $field = '<input type="hidden" name="' . tep_parse_input_field_data($name, array('"' => '"')) . '" value="'; if (tep_not_null($value)) { $field .= tep_parse_input_field_data($value, array('"' => '"')); } else { $field .= tep_parse_input_field_data($GLOBALS[$name], array('"' => '"')); } if (tep_not_null($parameters)) $field .= ' ' . $parameters; $field .= '">'; return $field; } //// // Hide form elements function tep_hide_session_id() { if (defined('SID') && tep_not_null(SID)) return tep_draw_hidden_field(tep_session_name(), tep_session_id()); } //// // Output a form pull down menu function tep_draw_pull_down_menu($name, $values, $default = '', $parameters = '', $required = false) { $field = '<select name="' . tep_parse_input_field_data($name, array('"' => '"')) . '"'; if (tep_not_null($parameters)) $field .= ' ' . $parameters; $field .= '>'; if (empty($default) && isset($GLOBALS[$name])) $default = $GLOBALS[$name]; for ($i=0, $n=sizeof($values); $i<$n; $i++) { $field .= '<option value="' . tep_parse_input_field_data($values[$i]['id'], array('"' => '"')) . '"'; if ($default == $values[$i]['id']) { $field .= ' SELECTED'; } $field .= '>' . tep_parse_input_field_data($values[$i]['text'], array('"' => '"', '\'' => ''', '<' => '<', '>' => '>')) . '</option>'; } $field .= '</select>'; if ($required == true) $field .= TEXT_FIELD_REQUIRED; return $field; } //// // Creates a pull-down list of countries function tep_get_country_list($name, $selected = '', $parameters = '') { $countries_array = array(array('id' => '', 'text' => PULL_DOWN_DEFAULT)); $countries = tep_get_countries(); for ($i=0, $n=sizeof($countries); $i<$n; $i++) { $countries_array[] = array('id' => $countries[$i]['countries_id'], 'text' => $countries[$i]['countries_name']); } return tep_draw_pull_down_menu($name, $countries_array, $selected, $parameters); } ?>
  12. Rickharris

    "Main Categories" contribution help

    Hi Gustavo! Your Main Categories Mod is great!!! Listen?.I have the enable/disable categories mod installed. http://www.oscommerce.com/community/contributions,326 The mod will disable / enable categories in the default left categories menu?.but not the Main Categories mod. Can you help? Let me know if you need a file, etc. Also...can you make it so the subcategories will use a "..." when it goes so many categories or characters...so that "all" of the subcategories aren't listed? The box can get pretty big...and if the customer wants to go that deep...they can use the menu. I know it sounds redundant to have both...but I was trying to achieve a "portal" look. See what I mean: http://www.shopabundle.com Thanks! Rick???...
  13. Rickharris

    NEW: Anti Robot Registration Validation

    Hi Guys.... Can anyone help me with my cart....? I have the mod installed in the files..... But there is nothing showing (except the name in column left-admin) but, nothing shows...like settings, etc. and on my "create account" page, the letters don't show..... I'm a rookie...so don't yell. Is it the mod, or phpmyadmin?.....can anyone help...soon???????? Thanks!!!!!!!! Rick............. http://www.shopabundle.com
×