Jump to content
Richard Cranium

[Contribution] Scrolling Customer Testimonials

Recommended Posts

Dean,

 

First off, I certainly appreciate any input and code from anyone else who is willing to invest the time to help out. The contribution is not open to public uploads simply to keep it from degenerating into dozens of iterations, as I have seen happen to many others.

 

Anyway, if you would like to PM me your email address or a link to your code, that would be my suggestion for the moment to facilitate incorporating your changes into the next release.

 

Regarding the fact that the testimonials are not working for you, do they appear at all? (sounds like they are not) If they do but are not scrolling, which browser are you using?

 

Best Regards,

David

Share this post


Link to post
Share on other sites

Dean,

 

First off, I certainly appreciate any input and code from anyone else who is willing to invest the time to help out. The contribution is not open to public uploads simply to keep it from degenerating into dozens of iterations, as I have seen happen to many others.

 

Anyway, if you would like to PM me your email address or a link to your code, that would be my suggestion for the moment to facilitate incorporating your changes into the next release.

 

Regarding the fact that the testimonials are not working for you, do they appear at all? (sounds like they are not) If they do but are not scrolling, which browser are you using?

 

Best Regards,

David

 

 

Hello and thanks for getting back to me..

 

I am using ie 8. The static works perfect but scrolling just shows a blank box. no errors though.

 

I will send you the code changes that i used and will also send code changes i used to get the upload working with option types also as this contrib also uses upload.php but with differant settings.

 

Thank You

 

Dean

Share this post


Link to post
Share on other sites

Hello and thanks for getting back to me..

 

I am using ie 8. The static works perfect but scrolling just shows a blank box. no errors though.

 

I will send you the code changes that i used and will also send code changes i used to get the upload working with option types also as this contrib also uses upload.php but with differant settings.

 

Thank You

 

Dean

 

Dean,

 

Thanks very much. I clearly need to take a good look at IE 8, because I've had quite a few complaints about that. It seems to be a problem with the Marquee tag not working properly in IE, and I need to find a work around soon.

 

I'll look out for your code snippets. I shall PM you my email address.

 

Best Regards,

David

Share this post


Link to post
Share on other sites

Dean,

 

Thanks very much. I clearly need to take a good look at IE 8, because I've had quite a few complaints about that. It seems to be a problem with the Marquee tag not working properly in IE, and I need to find a work around soon.

 

I'll look out for your code snippets. I shall PM you my email address.

 

Best Regards,

David

 

I think i might have solved the mystery of the scrolling not working.

 

If you take a look at the following code in the includes/boxes/customer_testimonials.php at around line 122.

 

$info_box_contents[] = array('text' => '<div id="marquee" class="marquee_hide"><MARQUEE behavior= "scroll" align= "center" direction= "'.TESTIMONIAL_SCROLL_DIR.'" height="'.TESTIMONIAL_SCROLL_HEIGHT.'" scrollamount= "2" scrolldelay= "'.TESTIMONIAL_SCROLL_DELAY.'" onmouseover=\'this.stop()\' onmouseout=\'this.start()\'>'.$testimonials_list.'</MARQUEE></div>'.$testimonial_write_link);

 

class is set to marquee_hide. <div id="marquee" class="marquee_hide">

change that to marquee_show. <div id="marquee" class="marquee_show">

 

and hey presto it works in ie8.

 

another ie 8 problem i have come across is on the recapcha code within customer_testimonials_write.php on line 319

 

<!-- start modification for reCaptcha -->
         <tr>
           <td class="main"><?php echo ENTRY_SECURITY_CHECK; ?></td>
         </tr>
         <tr>
		<?php
		$languages_query = tep_db_query("select code from " . TABLE_LANGUAGES . " where directory = '" . $language . "'");
		$language_id = tep_db_fetch_array($languages_query);
		?>
		<script>
		var RecaptchaOptions = {
		theme : 'white',
		tabindex : 3,
		lang : '<?php if (in_array($language_id['code'] ,array('en', 'fr', 'de', 'pt', 'es'))) {echo $language_id['code']; } else {echo 'en'; } ?>',
		};
		</script>
		<td><?php echo recaptcha_get_html(RECAPTCHA_PUBLIC_KEY, null, ($request_type == 'SSL')); ?></td>
         </tr>
<!-- end modification for reCaptcha -->

 

Ok the problem is a comma that throws up a error and actually stops the recapcha box from taking the theme colour from the code and uses the standard red one. As you can see the theme is set to white.

theme : 'white',

.

 

The comma that needs removing is at the end of this line of code.

 

lang : '<?php if (in_array($language_id['code'] ,array('en', 'fr', 'de', 'pt', 'es'))) {echo $language_id['code']; } else {echo 'en'; } ?>',

 

remove the end comma and you will notice that the recaptcha box now takes on the correct theme.

 

Hope this helps some out.

 

David I will get the other code changes that i made sent to you so you can take a look and incorporate if you wish.

 

Cheers

Share this post


Link to post
Share on other sites

Hi Guys,

 

I've installed and used this but for some reason on the Customer Testimonial Write page it breaks the templates up.

 

http://www.naturadirect.com/shop/customer_testimonials_write.php

 

Here is my code for the customer_tesitmonials_write file, im also using STS.

 

<?php
/*
 $Id: customer_testimonials.php 10/20/2008 Exp $
 Released under the GNU General Public License
 Modified by Bill Kellum 'bkellum' for Image Upload
 Modified by Richard Cranium for ReCaptcha and additional admin functions
*/

 require('includes/application_top.php');

/*** Begin Scrolling Customer Testimonials v1.0 ***/
// Redirect user to login page if any of the following are true:
// 1) Admin has disabled Customer Testimonials mod; or 
// 2) only registered users permitted to write testimonials and user is not logged in
 if ((TESTIMONIAL_ACTIVE != 'Yes') || (TESTIMONIAL_REGISTERED_WRITE == "Disabled") || ((TESTIMONIAL_REGISTERED_WRITE == "Registered Users Only") && (!tep_session_is_registered('customer_id')))) 
 {
 	    $navigation->set_snapshot();
   tep_redirect(tep_href_link(FILENAME_LOGIN, '', 'SSL'));
 }
/*** End Scrolling Customer Testimonials v1.0 ***/ 

 require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_CUSTOMER_TESTIMONIALS);

/*** Begin Scrolling Customer Testimonials v1.1 ***/
 include_once(DIR_WS_LANGUAGES . TESTIMONIAL_ADMIN_EMAIL . '/' . FILENAME_CUSTOMER_TESTIMONIALS_ADMIN_EMAIL);
/*** End Scrolling Customer Testimonials v1.1 ***/

/*** Begin Scrolling Customer Testimonials v1.0 ***/
 if (TESTIMONIAL_CAPTCHA == 'Yes') {
// start modification for reCaptcha
 require_once('includes/classes/recaptchalib.php');
// end modification for reCaptcha
}
/*** End Scrolling Customer Testimonials v1.0 ***/

   $testimonials_error = false;
   if (isset($HTTP_GET_VARS['action']) && ($HTTP_GET_VARS['action'] == 'insert')) {
       $testimonials_id = tep_db_prepare_input($HTTP_POST_VARS['testimonials_id']);
       $testimonials_title = tep_db_prepare_input($HTTP_POST_VARS['testimonials_title']);
       $testimonials_name = tep_db_prepare_input($HTTP_POST_VARS['testimonials_name']);
       $testimonials_email = tep_db_prepare_input($HTTP_POST_VARS['testimonials_email']);
       $testimonials_location = tep_db_prepare_input($HTTP_POST_VARS['testimonials_location']);
       $html_text = tep_db_prepare_input($HTTP_POST_VARS['html_text']);

// make sure testimonials directory exists
	if(!is_dir(DIR_WS_IMAGES . 'testimonials'))mkdir(DIR_WS_IMAGES . 'testimonials', '777');

	$testimonial_image = new upload('testimonial_image');
       $testimonial_image->set_destination(DIR_WS_IMAGES . 'testimonials/');
       $imagefiletypes = array('jpg','jpeg','gif','png','bmp');
       $testimonial_image->set_extensions($imagefiletypes);

       if ($testimonial_image->parse() && $testimonial_image->save()) {
         $testimonial_image_name = $testimonial_image->filename;
       }

       if (empty($testimonials_title)) {
         $testimonials_error = true;
         $messageStack->add('testimonials', ERROR_TESTIMONIALS_TITLE_REQUIRED);
       }
       if (empty($testimonials_name)) {
         $testimonials_error = true;
         $messageStack->add('testimonials', ERROR_TESTIMONIALS_NAME_REQUIRED);
       }
	 if (empty($testimonials_email)) {
         $testimonials_error = true;
         $messageStack->add('testimonials', ERROR_TESTIMONIALS_EMAIL_REQUIRED);
       }
    if (!tep_validate_email($testimonials_email)) {
         $testimonials_error = true;
         $messageStack->add('testimonials', ENTRY_EMAIL_ADDRESS_CHECK_ERROR);
    }
       if (empty($html_text)) {
         $testimonials_error = true;
         $messageStack->add('testimonials', ERROR_TESTIMONIALS_DESCRIPTION_REQUIRED);
       }

/*** Begin Scrolling Customer Testimonials v1.0 ***/
 if (TESTIMONIAL_CAPTCHA == 'Yes') {
// start modification for reCaptcha
       // the response from reCAPTCHA
       $resp = null;

       // was there a reCAPTCHA response?
       $resp = recaptcha_check_answer (RECAPTCHA_PRIVATE_KEY,
       $_SERVER["REMOTE_ADDR"],
       $_POST["recaptcha_challenge_field"],
       $_POST["recaptcha_response_field"]);

	if (!$resp->is_valid) {
	  $testimonials_error = true;
         $messageStack->add('testimonials', ENTRY_SECURITY_CHECK_ERROR . " (reCAPTCHA output: " . $resp->error . ")");
}
// end modification for reCaptcha
 }
/*** End Scrolling Customer Testimonials v1.0 ***/

/*** Begin Scrolling Customer Testimonials v1.1 ***/
$languages_query = tep_db_query("select languages_id from " . TABLE_LANGUAGES . " where directory = '" . $language . "'");
$language_id = tep_db_fetch_array($languages_query);

       if (!$testimonials_error) {
         $sql_data_array = array('testimonials_title' => $testimonials_title,
							  'testimonials_location' => $testimonials_location,
                                 'testimonials_name' => $testimonials_name,
							  'testimonials_email' => $testimonials_email,
                                 'testimonials_html_text' => $html_text,
							  'testimonial_image' => $testimonial_image_name,
							  'language_id' => $language_id['languages_id']);
/*** End Scrolling Customer Testimonials v1.1 ***/

	  if ($HTTP_GET_VARS['action'] == 'insert') {
           $insert_sql_data = array('date_added' => 'now()',
                                    'status' => '0');
           $sql_data_array = array_merge($sql_data_array, $insert_sql_data);
           tep_db_perform(TABLE_CUSTOMER_TESTIMONIALS, $sql_data_array);
           $testimonials_id = tep_db_insert_id();
           // email notification added by maestro
           $email_text = TESTIMONIAL_NOTIFICATION_TEXT . $testimonials_name . TESTIMONIAL_CONJ . $testimonials_location . '.' . "\n\n" .
                         TESTIMONIAL_NOTIFICATION_TITLE . $testimonials_title . "\n\n" .
                         TESTIMONIAL_NOTIFICATION_HTML_TEXT . $html_text . "\n\n" .
                         TESTIMONIAL_NOTIFICATION_APPROVE;
           tep_mail(STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS, TESTIMONIAL_NOTIFICATION_SUBJECT, $email_text, $testimonials_name, $testimonials_email);
         }
         $testimonials_id = '';
         $testimonials_title = '';
	  $testimonials_location = '';
         $testimonials_name = '';
	  $testimonials_email = '';
         $html_text = '';
         tep_redirect(tep_href_link(FILENAME_CUSTOMER_TESTIMONIALS_WRITE, 'action=success'));
       } else {
         $testimonials_id = tep_db_prepare_input($HTTP_POST_VARS['testimonials_id']);
         $testimonials_title = tep_db_prepare_input($HTTP_POST_VARS['testimonials_title']);
	  $testimonials_location = tep_db_prepare_input($HTTP_POST_VARS['testimonials_location']);
         $testimonials_name = tep_db_prepare_input($HTTP_POST_VARS['testimonials_name']);
	  $testimonials_email = tep_db_prepare_input($HTTP_POST_VARS['testimonials_email']);
         $html_text = tep_db_prepare_input($HTTP_POST_VARS['html_text']);
       }
   }

 $breadcrumb->add(NAVBAR_TITLE2, tep_href_link(FILENAME_CUSTOMER_TESTIMONIALS_WRITE));
?>
<!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 (getenv('HTTPS') == 'on' ? 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="3" cellpadding="3">
 <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">
  <form name="customer_testimonial" method="post" action="<?php echo tep_href_link(FILENAME_CUSTOMER_TESTIMONIALS_WRITE, 'action=insert', 'NONSSL'); ?>" enctype="multipart/form-data">
  <table border="0" width="100%" cellspacing="0" cellpadding="0">
     <tr>
       <td width="100%"><table border="0" width="100%" cellspacing="0" cellpadding="0">
         <tr>
           <td class="pageHeading" colspan="2"><?php echo HEADING_TITLE2; ?></td>
         </tr>
       </table></td>
     </tr>
     <tr>
       <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
     </tr>
     <tr>
       <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
     </tr>
<?php
 if ($messageStack->size('testimonials') > 0) {
?>
     <tr>
       <td><?php echo $messageStack->output('testimonials'); ?></td>
     </tr>
     <tr>
       <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
     </tr>
  <tr>
       <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
     </tr>
<?php
 }
 if (isset($HTTP_GET_VARS['action']) && ($HTTP_GET_VARS['action'] == 'success')) {
?>
     <tr>
       <td class="main" align="center"><?php echo TEXT_TESTIMONIALS_SUCCESSFUL; ?></td>
     </tr>
     <tr>
       <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
     </tr>
     <tr>
       <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
     </tr>
     <tr>
       <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
     </tr>
     <tr>
       <td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox">
         <tr class="infoBoxContents">
           <td><table border="0" width="100%" cellspacing="0" cellpadding="2">
             <tr>
               <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
               <td align="right"><?php echo '<a href="' . tep_href_link(FILENAME_DEFAULT) . '">' . tep_image_button('button_continue.gif', IMAGE_BUTTON_CONTINUE) . '</a>'; ?></td>
               <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
             </tr>
           </table></td>
         </tr>
       </table></td>
     </tr>
<?php
 } else {
 if (tep_session_is_registered('customer_id')) {
   $account_query = tep_db_query("select customers_firstname, customers_lastname, customers_email_address from " . TABLE_CUSTOMERS . " where customers_id = '" . (int)$customer_id . "'");
   $account = tep_db_fetch_array($account_query);

   $testimonials_name = $account['customers_firstname'] . ' ' . $account['customers_lastname'];
   $testimonials_email = $account['customers_email_address'];
 }
?>
     <tr>
       <td>
	<table width="100%" border="0" cellspacing="0" cellpadding="2">
	  <tr>
		<td><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td>
         </tr>
         <tr>
           <td class="main"><?php echo TEXT_TESTIMONIALS_INTRO; ?></td>
         </tr>
	  <tr>
		<td><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td>
         </tr>
	  <tr>
		<td><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td>
         </tr>
         <tr>
	    <td><table align="center" width="100%" border="0" cellspacing="0" cellpadding="0">
		  <tr>
               <td><table border="0" width="100%" cellspacing="0" cellpadding="2">
                 <tr>
                   <td class="main"><b><?php echo TEXT_TESTIMONIALS_WRITE; ?></b></td>
                   <td class="inputRequirement" align="right"><?php echo FORM_REQUIRED_INFORMATION; ?></td>
                 </tr>
               </table></td>
             </tr>
		  <tr>
               <td class="infoBox"><table width="100%" border="0" cellspacing="0" cellpadding="7" class="infoBoxContents">
	          <tr>
                   <td><table width="100%" border="0" cellspacing="0" cellpadding="0">
		      <tr>
                   <td class="main"><?php echo TEXT_TESTIMONIALS_TITLE; ?><br>
                                    <?php echo tep_draw_input_field('testimonials_title',  $testimonials_title, '', true); ?> <span class="inputRequirement">*</span></td>
                 </tr>
	          <tr>
                   <td><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td>
                 </tr>
	          <tr>
                   <td class="main"><?php echo TEXT_TESTIMONIALS_NAME; ?><br>
                                    <?php echo tep_draw_input_field('testimonials_name', $testimonials_name, '', true); ?> <span class="inputRequirement">*</span></td>
                 <tr>
                   <td><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td>
                 </tr>
	          <tr>
		        <td class="main"><?php echo TEXT_TESTIMONIALS_EMAIL; ?><br>
		                         <?php echo tep_draw_input_field('testimonials_email'); ?> <span class="inputRequirement">*</span></td>
	          </tr>
	          <tr>
                   <td><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td>
                 </tr>
	          <tr>
                   <td class="main"><?php echo TEXT_TESTIMONIALS_LOCATION; ?><br>
                                    <?php echo tep_draw_input_field('testimonials_location', $testimonials_location); ?></td>
      	          </tr>
	          <tr>
                   <td><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td>
                 </tr>
                 <tr>
                   <td valign="top" class="main"><?php echo TEXT_BANNERS_HTML_TEXT; ?> <span class="inputRequirement">*</span><br>
										      <?php echo tep_draw_textarea_field('html_text', 'soft', '130', '10', $html_text); ?></td>
                 </tr>
	          <tr>
                   <td><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td>
                 </tr>

<?php
/*** Begin Scrolling Customer Testimonials v1.0 ***/
 if (TESTIMONIAL_IMAGE_ALLOW == 'Yes') {
?>
                 <tr>
                   <td valign="top" class="main"><?php echo 'Upload an image'; ?><br>
										      <?php echo tep_draw_file_field('testimonial_image'); ?></td>
                 </tr>
<?php
}
/*** End Scrolling Customer Testimonials v1.0 ***/
?>

		    </table></td>
	      </tr>
		</table></td>
	  </tr></table>

<?php
/*** Begin Scrolling Customer Testimonials v1.0 ***/
 if (TESTIMONIAL_CAPTCHA == 'Yes') {
?>

<!-- start modification for reCaptcha -->
         <tr>
           <td class="main"><?php echo ENTRY_SECURITY_CHECK; ?></td>
         </tr>
         <tr>
		<?php
		$languages_query = tep_db_query("select code from " . TABLE_LANGUAGES . " where directory = '" . $language . "'");
		$language_id = tep_db_fetch_array($languages_query);
		?>
		<script>
		var RecaptchaOptions = {
		theme : 'white',
		tabindex : 3,
		lang : '<?php if (in_array($language_id['code'] ,array('en', 'fr', 'de', 'pt', 'es'))) {echo $language_id['code']; } else {echo 'en'; } ?>',
		};
		</script>
		<td><?php echo recaptcha_get_html(RECAPTCHA_PUBLIC_KEY, null, ($request_type == 'SSL')); ?></td>
         </tr>
<!-- end modification for reCaptcha -->
<?php
 }
/*** End Scrolling Customer Testimonials v1.0 ***/
?>

         <tr>
           <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
         </tr>
	  </tr>
         <tr>
           <td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox">
             <tr class="infoBoxContents">
               <td><table border="0" width="100%" cellspacing="0" cellpadding="2">
                 <tr>
                   <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
				<td class="main" align="left" valign="middle"><?php echo '<a href="' . tep_href_link(FILENAME_CUSTOMER_TESTIMONIALS) . '">' . tep_image_button('button_back.gif', IMAGE_BUTTON_BACK) . '</a>'; ?></td>
                   <td class="main" align="right" valign="middle"><?php echo tep_image_submit('button_submit.gif', IMAGE_BUTTON_SUBMIT); ?></td>
				<td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
                 </tr>
               </table></td>
             </tr>
           </table></td>
         </tr>
       </table></form></td>
     </tr>
<?php
}
?>
</td></table>
<!-- body_text_eof //-->
<td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2">
<!-- right_navigation //-->
<?php require(DIR_WS_INCLUDES . 'column_right.php'); ?>
<!-- right_navigation_eof //-->
   </table></td>
 </tr>
</table>
<!-- body_eof //-->

<!-- footer //-->
<?php require(DIR_WS_INCLUDES . 'footer.php'); ?>
<!-- footer_eof //-->
<br>
</body>
</html>
<?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>

Share this post


Link to post
Share on other sites

Rocha,

 

First, can you be sure you are not hovering the mouse over the Scrolling Testimonials infobox? That would cause it to pause.

 

If that is not the case, please try the following:

 

1. Edit /includes/boxes/customer_testimonials.php and REMOVE the following code - lines 119-143 (or REM it out for the moment):

 

?>

<!-- Make sure we don't interrupt any other onLoad event -->
<!-- Load event handler by Peter-Paul Koch -->
<script type="text/javascript">
function addLoadEvent(func) {
 var oldonload = window.onload;
 if (typeof window.onload != 'function') {
   window.onload = func;
 } else {
   window.onload = function() {
     if (oldonload) {
       oldonload();
     }
     func();
   }
 }
}

addLoadEvent(function() {
    document.getElementById('marquee').className='marquee_show'; 
});
</script>

<?php

 

2. Edit /stylesheet.css

 

Find

 

.marquee_hide {
    visibility:hidden;
}

 

 

CHANGE to:

 

.marquee_hide {
    visibility:visible;
}

 

 

This should turn on scrolling. You will see some text flash on the screen before the scrolling starts. Not a long term solution, but I want to see if the scrolling works for you. Let me know what you see after those changes.

 

BTW, which browser are you using and on what platform (i.e. Mac, PC, etc.)? Please also include your browser version (e.g. Firefox 3.4, etc.).

 

Regards,

David

 

 

Another tip regarding IE browsers is to be sure to check your DOCTYPE designation on your forms. At least some OSC 2.2 stock forms have outdated definitions.

 

If you have trouble rendering the scrolling properly in IE but it works in other browsers, try changing your DOCTYPE on the problematic form to something like this:

 

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

 

For an overview of this topic, I suggest visiting this website: http://www.w3schools.com/tags/tag_doctype.asp

 

David

 

 

I think i might have solved the mystery of the scrolling not working.

 

If you take a look at the following code in the includes/boxes/customer_testimonials.php at around line 122.

 

$info_box_contents[] = array('text' => '<div id="marquee" class="marquee_hide"><MARQUEE behavior= "scroll" align= "center" direction= "'.TESTIMONIAL_SCROLL_DIR.'" height="'.TESTIMONIAL_SCROLL_HEIGHT.'" scrollamount= "2" scrolldelay= "'.TESTIMONIAL_SCROLL_DELAY.'" onmouseover=\'this.stop()\' onmouseout=\'this.start()\'>'.$testimonials_list.'</MARQUEE></div>'.$testimonial_write_link);

 

class is set to marquee_hide. <div id="marquee" class="marquee_hide">

change that to marquee_show. <div id="marquee" class="marquee_show">

 

and hey presto it works in ie8.

 

In regards to the posts above, I just did this and it fixed the problem on IE (in Firefox works fine either way):

 

2. Edit /stylesheet.css

 

Find

 

.marquee_hide {
    visibility:hidden;
}

 

 

CHANGE to:

 

.marquee_hide {
    visibility:visible;
}

Richard, I have a complete and correct Portuguese translation, including the SQL. Would you like me to send it to you? I can't upload it to your contribution. Please let me know and I can send it to you.

 

Great contribution, by the way. Tks for making it available and for maintaining it. :)

Edited by Patty

Patty

Share this post


Link to post
Share on other sites

Richard, I have a complete and correct Portuguese translation, including the SQL. Would you like me to send it to you? I can't upload it to your contribution. Please let me know and I can send it to you.

 

Great contribution, by the way. Tks for making it available and for maintaining it. :)

 

Patty,

 

Thank you. Yes please send me the Portuguese translations. I would love to get a better version.

 

Also, thanks very much for your comments. I am trying to find time to work on some bug fixes and a major update for the contribution. I've been backed up at work the past few months, but I can see the light at the end of the tunnel now and should finally have time to focus on SCT again shortly. I am certainly going to make the changes you've and DForce have described, along with those of a few others in posts above and from some private PM's.

 

Incidentally, were you able to solve your problem with STS? There seems to be a compatibility issue with STS and how it processes the HTML for its templates, but I'm not sure where the dis-connect is occurring.

 

Best Regards,

David

Share this post


Link to post
Share on other sites

Hi Guys,

 

I've installed and used this but for some reason on the Customer Testimonial Write page it breaks the templates up.

 

http://www.naturadirect.com/shop/customer_testimonials_write.php

 

 

Sorry, I got your query and Patty's comments mixed up in my post above.

 

I'm not sure what is causing the problem with STS. I believe the problem is related to how STS massages the HTML flow to the browser, but I'm not 100% sure. I've heard of other users having problems with STS and SCT. All I can say at this time is that the Write Testimonials form does not appear to be compatible with STS. I don't use STS personally. I have used it in the past, but un-installed it because it did not turn out to be as useful as I originally thought for my particular needs. Point is that I have added this to my list of updates to consider for SCT. However, I'll be quite frank with you that troubleshooting STS compatibility is a lower priority for SCT versus some other updates in the pipeline which are more important at this time (e.g. IE8 fix).

 

Please continue to update this thread with anything you discover regarding SCT compatibility with STS.

 

Best Regards,

David

Share this post


Link to post
Share on other sites

I think i might have solved the mystery of the scrolling not working.

 

 

 

Thanks. Between PHP's finicky nature plus the forgiveness of Firefox, it is easy to miss some of these syntax errors! :)

 

Best Regards,

David

Share this post


Link to post
Share on other sites

Patty,

 

Thank you. Yes please send me the Portuguese translations. I would love to get a better version.

 

Also, thanks very much for your comments. I am trying to find time to work on some bug fixes and a major update for the contribution. I've been backed up at work the past few months, but I can see the light at the end of the tunnel now and should finally have time to focus on SCT again shortly. I am certainly going to make the changes you've and DForce have described, along with those of a few others in posts above and from some private PM's.

 

Incidentally, were you able to solve your problem with STS? There seems to be a compatibility issue with STS and how it processes the HTML for its templates, but I'm not sure where the dis-connect is occurring.

 

Best Regards,

David

 

Hello, David.

 

I couldn't find a way to attach files here, so here's a link to download from my server: http://www.cybernetfx.com/Portuguese_files.zip

Please let me know when you're finish so I can delete it from the server.

 

I'm looking forward to the new version. It's already great the way it is and I'm including it on my clients' stores. ;)


Patty

Share this post


Link to post
Share on other sites

thanks for this great contribution,

 

 

How to control how many testimonials display on customer_testimonials.php page? the page will be very long if testminonals go over 50.

 

and how to sort the testimonals by date?

 

 

Thanks

 

Sean

Edited by minglou

Share this post


Link to post
Share on other sites

Hello again, David. Hopping you're doing well. :)

 

A client just noticed that the link to testimonial's admin on the email sent to admin does't work. I checked and found out that DIR_WS_TESTIMONIAL_ADMIN on portugues/customer_testimonials_admin_email.php is not defined anywhere. What's the best way to fix this? I thought about changing <a href="' . DIR_WS_TESTIMONIAL_ADMIN . '"> to <a href="' . tep_href_link(FILENAME_TESTIMONIALS_MANAGER) . '"> because I don't want to have to define it on configure.php for every store I install.

 

Would that work?

 

Tks for your help and have a great Sunday! :)

Edited by Patty

Patty

Share this post


Link to post
Share on other sites

Hi David

 

This looks like a great contribution and the only reason I haven't actually tried it yet is that... I'm running V3.0A5 :}

So... do you have any plans to port it to V3? I may do it myself based on your V1.11a which I presume is the latest version. If I manage it, I'll obviously let you have it.

 

Cheers,

David H


This space accidentally left blank

Share this post


Link to post
Share on other sites

After i installed everything that is says I have 2 problem The first is I get

// Begin Scrolling Customer Testimonials v1.0 // Do not load Testimonials box if page is SSL // Why? It may trigger SSL warning if ($request_type != 'SSL') { include(DIR_WS_BOXES . 'customer_testimonials.php'); } // End Scrolling Scrolling Customer Testimonials v1.0

on my page where the box is suppose to be

 

and when I do Step 2.6 catalog/includes/functions/html_output.php

 

 

 

Find the following near line 185:

 

 

 

// Output a form password field

 

 

 

 

 

ADD the following just ABOVE it:

 

 

 

// Output a form filefield

 

function tep_draw_file_field($name) {

 

$field = tep_draw_input_field($name, '', '', 'file');

 

return $field;

 

}

 

 

 

////

My site gives me an error of Fatal error: Cannot redeclare tep_draw_file_field() (previously declared in /home2/techsonh/public_html/includes/functions/html_output.php:207) in /home2/techsonh/public_html/includes/functions/html_output.php on line 224

 

Can some one help me out on how to fix this

Share this post


Link to post
Share on other sites

Any chance this contribution will be updated for OsCommerce 2.3.1 any time soon? The additions to html_output.php seem to cause errors and it no longer has column_left.php or column_right.php that I can find.

Share this post


Link to post
Share on other sites

This contrib is superb, but the image upload function does not work. It is so far the only issue I am having.

 

In the page for the customer to write the testimonal, if I activate the upload image function in the admin panel, the following appears for the customer, below the field to type the testimonial text:

 

Upload an image

 

Only these three words and no place whatsoever to add the image directory, or a button for upload. And the reCaptcha also does not appear.

Edited by here2learn

Share this post


Link to post
Share on other sites

I have fixed the above issue, now I have to look on why the Testimonials box doesn't appear when the site is HTTPS.

Share this post


Link to post
Share on other sites

Hi all.

 

Has anyone sorted out the issue with sts?

This is a superb contribution but as stated above it breaks the template on our site when trying to write a customer testimonial.

 

Hope this can be resolved.

Regards

Andy

Share this post


Link to post
Share on other sites

i keep getting this error when trying to add a testimonial as a customer or admin backend please help thank you

 

1054 - Unknown column 'testimonial_image' in 'field list'

 

insert into customer_testimonials (testimonials_title, testimonials_location, testimonials_name, testimonials_email, testimonials_html_text, testimonial_image, language_id, date_added, status) values ('viadkmfiad', 'kfnas', 'jadcj', 'jdancfv@yahoo.com', 'fknakfma;k', '', '1', now(), '0')

 

[TEP STOP]

Share this post


Link to post
Share on other sites

Im not sure how much this matters, or even if it is a bug. But search engine bots always get stuck in my customer testimonials module. About 10-15 of them are always displayed in my whos online within admin. If anyone knows the cause of this please iterate, I feel like there is a dead end somewhere that they dont have any options of getting out of, and im thinking search engine optimization frequency may suffer.

Share this post


Link to post
Share on other sites

Very strange..

 

I have this installed before on an old site and i am in the process of building a new one on version 2.2rca.

 

everything works fine apart from when i click on the read more within the scrolling box it just shows all testimonials rather than just the testimonial id that i have clicked on.

 

This is the code on the customer_testimonials.php that looks like it is saying if testimonial ID = testimonial id.

 

<?php
	    if ($testimonial_id != '') {  // display a specific id testimonial
		    $testimonial_id = ct_sanitise($testimonial_id);
		    $full_testimonial = tep_db_query("select * FROM " . TABLE_CUSTOMER_TESTIMONIALS . " WHERE testimonials_id = '".(int)$testimonial_id."' LIMIT 1");
	    }
	    else {  // display all testimonials
/*** Begin Scrolling Customer Testimonials v1.1 ***/
   if (TESTIMONIAL_LANG_PREF == "User Language Only") {  // display only localized testimonials (to user)
			 $full_testimonial = tep_db_query("select * FROM " . TABLE_CUSTOMER_TESTIMONIALS . " WHERE status = '1' AND language_id = $languages_id order by date_added desc");	
   }
/*** End Scrolling Customer Testimonials v1.1 ***/
	    }
	    while ($testimonials = tep_db_fetch_array($full_testimonial)) {
		    $testimonial_array[] = array('id' => $testimonials['testimonials_id'],
										 'author' => $testimonials['testimonials_name'],
	    'location' => $testimonials['testimonials_location'],
	    'title' => $testimonials['testimonials_title'],
										 'testimonial' => $testimonials['testimonials_html_text'],
										 'word_count' => tep_word_count($testimonials['testimonials_html_text'], ' '),
										 'image' => $testimonials['testimonial_image'],
	    'date_added' => $testimonials['date_added'],
										 'email' => $testimonials['testimonials_email']);
		    }
	    require(DIR_WS_MODULES  . 'customer_testimonials.php');
	    ?>

 

any body any ideas please..

Share this post


Link to post
Share on other sites

 

Thank you for your offer. I'll have to give it some thought. Is there a site with a demo for CT using split results that I could view? Is the idea to add a page number, prev, next buttons at the end of n testimonials displayed per page?

 

Best Regards,

David

 

hi David... when you planning to share an update about the idea to make a page limitation as your idea that I quoted above ? :)

 

thanks

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

×