Zen Cart Logo
Forums / All Other Contributions/Addons / Testimonial Manager Support Thread (for ZC v1.5.x)

Testimonial Manager Support Thread (for ZC v1.5.x)

Views: 65,839

Results 61 to 80 of 263
28 Oct 2013, 2:43 PM
#61
divavocals avatar

divavocals

Totally Zenned

Join Date:
Jan 2007
Location:
Los Angeles, California, United States
Posts:
10,011
Plugin Contributions:
3

Testimonial Manager Support Thread (for ZC v1.5.x)

amandavz:

Please see "red" area up top. When I change that (and leave the quotes in tact) the entire site goes to a blank white page. If I reload the original file, the site is restored. There is something about this file that is not letting my customize the text. I hope this clarifies the issue I'm having a bit better. Thanks for your help.and when "the entire site goes to a blank white page" there would have been an error log which would tell you what the issue is.. What did the error log say???

28 Oct 2013, 3:09 PM
#62
amandavz avatar

amandavz

Zen Follower

Join Date:
Mar 2009
Location:
Crockett, Texas
Posts:
139
Plugin Contributions:
0

Re: Testimonial Manager Support Thread (for ZC v1.5.x)

Here is the error I am getting:

[28-Oct-2013 09:08:21 America/Denver] PHP Parse error: syntax error, unexpected ''<p>Your testimonial will be a' (T_ENCAPSED_AND_WHITESPACE) in /home3/studirj5/public_html/shop/includes/languages/english/extra_definitions/pure_blue_free/testimonials_manager_defines.php on line 30

I'm not sure what that all means.

28 Oct 2013, 3:29 PM
#63
countrycharm avatar

countrycharm

Totally Zenned

Join Date:
Jul 2007
Posts:
2,179
Plugin Contributions:
2

Re: Testimonial Manager Support Thread (for ZC v1.5.x)

amandavz:

Okay...I am trying to change the testimonials_manager_defines.php in the extra definitions folder. This is what it looks like:

<?php /** * Testimonials Manager * * @package Template System * @copyright 2007 Clyde Jones * @copyright Portions Copyright 2003-2007 Zen Cart Development Team * @license <http://www.zen-cart.com/license/2_0.txt> GNU Public License V2.0 * @version $Id: Testimonials_Manager.php v1.5.2 4-16-2010 Clyde Jones $ */ define('BOX_HEADING_TESTIMONIALS_MANAGER', 'Testimonials'); define('TESTIMONIALS_MANAGER_DISPLAY_ALL_TESTIMONIALS', 'View All Testimonials'); define('TESTIMONIALS_BY', 'Testimonial By: '); **--> I am trying to change this to read: Project Submitted By** define('TESTIMONIALS_MANAGER_ADD_TESTIMONIALS', 'Add A Testimonial'); //Button Defines define('BUTTON_IMAGE_TESTIMONIALS', 'button_testimonials.gif'); define('BUTTON_TESTIMONIALS_ADD_ALT', 'Add My Testimonial'); define('BUTTON_IMAGE_SUBMIT_TESTIMONIALS', 'button_submit_testimonials.gif'); define('BUTTON_TESTIMONIALS_SUBMIT_ALT', 'Submit My Testimonial'); define('BUTTON_IMAGE_VIEW_TESTIMONIALS', 'button_view_testimonials.gif'); define('BUTTON_VIEW_TESTIMONIALS_ALT', 'View All Testimonials'); define('CITY_STATE_SEPARATOR', ', '); define('NAME_SEPARATOR', ' — '); define('TESTIMONIALS_MANAGER_READ_MORE', 'Read More ->'); define('TESTIMONIALS_SUBMIT_THANKS', '<h3>Thank you for submitting a testimonial!</h3>'); define('TESTIMONIALS_SUBMIT_MESSAGE', '<p>Your testimonial will be actived as soon as our store manager reviews it.## If you have any questions regarding your testimonial, please contact us.</p><br /><h4>Thanks Again, we look forward to serving you in the future.</h4>'); //EOF Please see "red" area up top. When I change that (and leave the quotes in tact) the entire site goes to a blank white page. If I reload the original file, the site is restored. There is something about this file that is not letting my customize the text. I hope this clarifies the issue I'm having a bit better. Thanks for your help.

For one thing your not running the current version of Testimonial Manager. Looks like you are still running v1.5.2 4 and the current version is v1.5.4. Regardless of that the change you want to make will work with no problems at all. There something else wrong causing your issue. You can see that the file you were showed that you were was having a issue is clearly working here. I have my Testimonial Manager set up to show reviews instead.

28 Oct 2013, 4:04 PM
#64
divavocals avatar

divavocals

Totally Zenned

Join Date:
Jan 2007
Location:
Los Angeles, California, United States
Posts:
10,011
Plugin Contributions:
3

Re: Testimonial Manager Support Thread (for ZC v1.5.x)

countrycharm:

For one thing your not running the current version of Testimonial Manager. Looks like you are still running v1.5.2 4 and the current version is v1.5.4. Regardless of that the change you want to make will work with no problems at all. There something else wrong causing your issue. You can see that the file you were showed that you were was having a issue is clearly working here. I have my Testimonial Manager set up to show reviews instead.

I agree.. I made the same change using the latest version of Testimonials Manager and had no issues either. Here's my code:

<?php
/**
 * Testimonials Manager
 *
 * @package Template System
 * @copyright 2007 Clyde Jones
  * @copyright Portions Copyright 2003-2007 Zen Cart Development Team
 * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
 * @version $Id: Testimonials_Manager.php v1.5.4
 */

define('BOX_HEADING_TESTIMONIALS_MANAGER', 'Testimonials');
define('TESTIMONIALS_MANAGER_DISPLAY_ALL_TESTIMONIALS', 'View All Testimonials');
define('TESTIMONIALS_BY', 'Project Submitted By: ');
define('TESTIMONIALS_MANAGER_ADD_TESTIMONIALS', 'Add A Testimonial');

//Button Defines
define('BUTTON_IMAGE_TESTIMONIALS', 'button_testimonials.gif');
define('BUTTON_TESTIMONIALS_ADD_ALT', 'Add My Testimonial');
define('BUTTON_IMAGE_SUBMIT_TESTIMONIALS', 'button_submit_testimonials.gif');
define('BUTTON_TESTIMONIALS_SUBMIT_ALT', 'Submit My Testimonial');
define('BUTTON_IMAGE_VIEW_TESTIMONIALS', 'button_view_testimonials.gif');
define('BUTTON_VIEW_TESTIMONIALS_ALT', 'View All Testimonials');

define('CITY_STATE_SEPARATOR', ', ');
define('NAME_SEPARATOR', ' — ');
define('TESTIMONIALS_MANAGER_READ_MORE', 'Read More ->');

define('TESTIMONIALS_SUBMIT_THANKS', '<h3>Thank you for submitting a testimonial!</h3>');
define('TESTIMONIALS_SUBMIT_MESSAGE', '<p>Your testimonial will be actived as soon as our store manager reviews it.  If you have any questions regarding your testimonial, please contact us.</p><br /><h4>Thanks Again, we look forward to serving you in the future.</h4>');
//EOF
28 Oct 2013, 7:22 PM
#65
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: Testimonial Manager Support Thread (for ZC v1.5.x)

amandavz:

Here is the error I am getting:

[28-Oct-2013 09:08:21 America/Denver] PHP Parse error: syntax error, unexpected ''<p>Your testimonial will be a' (T_ENCAPSED_AND_WHITESPACE) in /home3/studirj5/public_html/shop/includes/languages/english/extra_definitions/pure_blue_free/testimonials_manager_defines.php on line 30

I'm not sure what that all means.

DivaVocals:

I agree.. I made the same change using the latest version of Testimonials Manager and had no issues either.

define('TESTIMONIALS_SUBMIT_MESSAGE', '<p>Your testimonial will be actived as soon as our store manager reviews it. If you have any questions regarding your testimonial, please contact us.</p><br /><h4>Thanks Again, we look forward to serving you in the future.</h4>');


To answer the unasked question about the error message you received, if you compare the code above with what you posted, you will notice that the two pound signs are missing.  Also, the error message indicated that line 30 of that file had a problem. I'm not sure why it manifests only after making a change, but itseems to me that the two previous poster's suggestion of upgrading to the current version (although, and I have not downloaded the recent version before stating this, it could be possible that the file version # in the file itself has not been updated to reflect the current version, but there was definitely a difference in line 30 of the code). Updating the version # is up to the code author, and depending on the philosophy, may only be updated when a change is made to that file, there are some that would update all files to reflect the most recent version, and then there are those that won't change it at all.

Hopefully though, you now have a better understanding about how to find, troubleshoot, and report the problem maker.
29 Oct 2013, 4:25 AM
#66
amandavz avatar

amandavz

Zen Follower

Join Date:
Mar 2009
Location:
Crockett, Texas
Posts:
139
Plugin Contributions:
0

Re: Testimonial Manager Support Thread (for ZC v1.5.x)

Okay...thanks for everyone's help. I will install the newer version and if I run into any snags...I'll be back!!! LOL...Thanks :)

29 Oct 2013, 2:13 PM
#67
divavocals avatar

divavocals

Totally Zenned

Join Date:
Jan 2007
Location:
Los Angeles, California, United States
Posts:
10,011
Plugin Contributions:
3

Re: Testimonial Manager Support Thread (for ZC v1.5.x)

amandavz:

Okay...thanks for everyone's help. I will install the newer version and if I run into any snags...I'll be back!!! LOL...Thanks :)

The newest version is only for v1.5.x.. If you are running v1.3.9, the latest version will not work..

31 Oct 2013, 9:58 PM
#68
amandavz avatar

amandavz

Zen Follower

Join Date:
Mar 2009
Location:
Crockett, Texas
Posts:
139
Plugin Contributions:
0

Re: Testimonial Manager Support Thread (for ZC v1.5.x)

Hi Again everyone...well here's what I discovered. I am installing a new cart for someone using the Testimonial Manager once again as a project gallery and ran into the same problem. BUT...I figured out that if you modify the file and then upload it it allows me to do what I want.

To refresh...I was trying to change the Testimonial By: area to read Project Submitted By: and when I would change the testimonials_manager_defines.php in the includes/languages/english/extra_definitions/mycustomtemplate the entire store would disappear to a white screen.

I just changed the file and re-uploaded it and it's working fine and doing what I want. Thanks everyone for all your help.

BTW - The new install was done with the latest version of TM and still gave me the same problem.

31 Oct 2013, 10:04 PM
#69
divavocals avatar

divavocals

Totally Zenned

Join Date:
Jan 2007
Location:
Los Angeles, California, United States
Posts:
10,011
Plugin Contributions:
3

Re: Testimonial Manager Support Thread (for ZC v1.5.x)

amandavz:

Hi Again everyone...well here's what I discovered. I am installing a new cart for someone using the Testimonial Manager once again as a project gallery and ran into the same problem. BUT...I figured out that if you modify the file and then upload it it allows me to do what I want.

To refresh...I was trying to change the Testimonial By: area to read Project Submitted By: and when I would change the testimonials_manager_defines.php in the includes/languages/english/extra_definitions/mycustomtemplate the entire store would disappear to a white screen.

I just changed the file and re-uploaded it and it's working fine and doing what I want. Thanks everyone for all your help.

BTW - The new install was done with the latest version of TM and still gave me the same problem.

So let me get this straight.. You modified the file locally then FTPd it to your site and it worked.. Before that you were trying to modify the file directly from what??? your hosts file manager??? your FTP tool?? Some WYSIWYG Editor you are using??? WHAT??

In any case it sounds like the issue (as I suspected) was NEVER this module, but something you were doing which caused the issue.. the question is what..

31 Oct 2013, 10:10 PM
#70
countrycharm avatar

countrycharm

Totally Zenned

Join Date:
Jul 2007
Posts:
2,179
Plugin Contributions:
2

Re: Testimonial Manager Support Thread (for ZC v1.5.x)

DivaVocals:

So let me get this straight.. You modified the file locally then FTPd it to your site and it worked.. Before that you were trying to modify the file directly from what??? your hosts file manager??? your FTP tool?? Some WYSIWYG Editor you are using??? WHAT??

In any case it sounds like the issue (as I suspected) was NEVER this module, but something you were doing which caused the issue.. the question is what..

I thought I was going insane for a minute trying to figure out why it wasn't working on there site. Yes your conclusion sounds about right.

1 Nov 2013, 2:54 PM
#71
shopville avatar

shopville

Zen Follower

Join Date:
Aug 2012
Posts:
331
Plugin Contributions:
0

Re: Testimonial Manager Support Thread (for ZC v1.5.x)

Thanks for the mod! just a feature suggestion i would love to see, the ability to respond to testimonials which should display underneath the Original post

1 Nov 2013, 3:18 PM
#72
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: Testimonial Manager Support Thread (for ZC v1.5.x)

ShopVille:

Thanks for the mod! just a feature suggestion i would love to see, the ability to respond to testimonials which should display underneath the Original post

Who are you considering would be the respondent, the store owner or another guest? If the store owner, I would have thought that would be possible by editing the testimonial and possibly changing something about the font (separate class) and providing a respponse.

1 Nov 2013, 3:22 PM
#73
shopville avatar

shopville

Zen Follower

Join Date:
Aug 2012
Posts:
331
Plugin Contributions:
0

Re: Testimonial Manager Support Thread (for ZC v1.5.x)

mc12345678:

Who are you considering would be the respondent, the store owner or another guest? If the store owner, I would have thought that would be possible by editing the testimonial and possibly changing something about the font (separate class) and providing a respponse.

Store owner, and your suggestion would work, but the testimonial text editor is plain-text not HTML

1 Nov 2013, 3:43 PM
#74
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: Testimonial Manager Support Thread (for ZC v1.5.x)

ShopVille:

Store owner, and your suggestion would work, but the testimonial text editor is plain-text not HTML

Two solutions to that assuming html code hasn't been prohibited in the field: the first and not "nicest", learn html to add in the code, the second incorporate one of the html editors where this editor is displayed to the admin. Or yes an improvement as suggested might be of benefit. Perhaps, in this regard the improvement is a menu choice/dropdown to choose which editor to use when editing the testimonial based on what editors are "installed".

1 Nov 2013, 5:00 PM
#75
divavocals avatar

divavocals

Totally Zenned

Join Date:
Jan 2007
Location:
Los Angeles, California, United States
Posts:
10,011
Plugin Contributions:
3

Re: Testimonial Manager Support Thread (for ZC v1.5.x)

ShopVille:

Thanks for the mod! just a feature suggestion i would love to see, the ability to respond to testimonials which should display underneath the Original postand if someone is so inclined to update the module or share the code which adds this feature, then it will be included.. I don't think that anyone who has been maintaining this mod has any plans to add such a feature.. In the meantime mc12345678's suggestion should work..

mc12345678:

Who are you considering would be the respondent, the store owner or another guest? If the store owner, I would have thought that would be possible by editing the testimonial and possibly changing something about the font (separate class) and providing a respponse.

mc12345678:

Two solutions to that assuming html code hasn't been prohibited in the field: the first and not "nicest", learn html to add in the code, the second incorporate one of the html editors where this editor is displayed to the admin. Or yes an improvement as suggested might be of benefit. Perhaps, in this regard the improvement is a menu choice/dropdown to choose which editor to use when editing the testimonial based on what editors are "installed".

9 Nov 2013, 2:07 PM
#76
baloo avatar

baloo

New Zenner

Join Date:
Jul 2007
Location:
Hull, UK
Posts:
28
Plugin Contributions:
0

Re: Testimonial Manager Support Thread (for ZC v1.5.x)

Hi,
I FTP'd all the files, but as I was not already logged in to my admin (timed out without realising), the auto-installer didn't get triggered. How can I now trigger it?
Do I need to remove all the files and re-up them? I'm just guessing there must be an easy way, but please excuse my ignorance.

Thanks

Baloo

9 Nov 2013, 2:34 PM
#77
baloo avatar

baloo

New Zenner

Join Date:
Jul 2007
Location:
Hull, UK
Posts:
28
Plugin Contributions:
0

Re: Testimonial Manager Support Thread (for ZC v1.5.x)

Ignore me, I've done it, missed the auto-install file some how

9 Nov 2013, 6:17 PM
#78
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: Testimonial Manager Support Thread (for ZC v1.5.x)

Baloo:

Hi,
I FTP'd all the files, but as I was not already logged in to my admin (timed out without realising), the auto-installer didn't get triggered. How can I now trigger it?
Do I need to remove all the files and re-up them? I'm just guessing there must be an easy way, but please excuse my ignorance.

Thanks

Baloo
Not required to be logged in to execute the auto-installer, but you will miss out on anyand all messages that are created by it. It gets activated when ZC loads the admin directory to display to the requester. One reason to keep the admin directory name "private".
Baloo:

Ignore me, I've done it, missed the auto-install file some how

What makes you think you missed uploading the auto-installer file? The fact that it is now not present? Part of the process is for it to be deleted after installation.

4 Dec 2013, 12:11 AM
#79
yvonne_debandi avatar

yvonne_debandi

New Zenner

Join Date:
Nov 2013
Location:
United States
Posts:
7
Plugin Contributions:
0

Re: Testimonial Manager Support Thread (for ZC v1.5.x)

Hi, I'm using 1.5 and love testimonial manager. Having a strange issue where things go haywire on all testimonial display when I add testimonial #5.

Admittedly I know just enough about zen to be dangerous and I did add a product field and a switch case request to allow links to a specific product's testimonials. Is it because of my hack or has anyone run into this before?

And yes...I know the styling should all be in my css files, but my server is caching the css results and I can find no quick relief, so please pardon the inline styling here. :-/

Appreciate any help or guidance. Thanks so much!

<?php /** * Testimonials Manager * * @package Template System * @copyright 2007 Clyde Jones * @copyright Portions Copyright 2003-2007 Zen Cart Development Team * @license <http://www.zen-cart.com/license/2_0.txt> GNU Public License V2.0 * @version $Id: Testimonials_Manager.php v1.5.4 */ ?> <style>

blockquote {margin:0 !important;padding:0 !important;
-webkit-border-radius: 20px; -mozborder-radius: 20px; border-radius: 20px;
box-shadow: 5px 5px 5px #007;;
height:1%;width:95%;
background-color:#ffffff;}

blockquote div {padding:38px 56px;height:1%;margin-left:auto; margin-right:auto;}
</style>

<div class="centerColumn" id="testimonialDefault" style="background-image:url(includes/templates/classic/images/background-wallpaper2.jpg); box-shadow: 5px 5px 5px #007;"> <? switch($_REQUEST['req']){ case "read": ?> <h3> All Testimonials for:</h3> <? $query = mysql_query("SELECT * FROM zen_testimonials_manager WHERE testimonials_pid='{$_GET['testimonials_pid']}'");?> <? $row = mysql_fetch_assoc($query); $pid = $row['testimonials_pid']; {?> <div style="width:250px; height:250px; box-shadow:5px 5px 5px #000080; text-align:center; margin-right:auto; margin-left:auto; border-radius:25px;background-image:url(images/products/<? echo $pid?>.jpg); background-size: 250px 250px;"></div><br /> <? echo "<a href='index.php?main_page=product_info&products_id=".$pid."'>"; echo "<p><br />Click here for product details.</p></a>";?> <?php } ?> <br class="clearBoth" /> <? $query = mysql_query("SELECT * FROM zen_testimonials_manager WHERE testimonials_pid='{$_GET['testimonials_pid']}'");?> <? while($row = mysql_fetch_assoc($query)){ $text = $row['testimonials_html_text']; $pid = $row['testimonials_pid']; $id = $row['products_id']; $title = $row['testimonials_title']; $author = $row['testimonials_name']; ?> <blockquote> <div class="testimonial"> <h3><? echo $title ?></h3> <p>"<?php echo $text?>"</p> <p align="right"><? echo $author?></p> </div> </blockquote><br /><br /> <br class="clearBoth" /> <div class="buttonRow back"><?php echo zen_back_link() . zen_image_button(BUTTON_IMAGE_BACK, BUTTON_BACK_ALT) . '</a>'; ?></div> <div class="buttonRow forward"><a href="<?php echo zen_href_link(FILENAME_TESTIMONIALS_ADD, '', 'SSL'); ?>"><?php echo zen_image_button(BUTTON_IMAGE_TESTIMONIALS, BUTTON_TESTIMONIALS_ADD_ALT); ?></a></div> <br class="clearBoth" /> </div><? } break; ?> <? default: ?> <span style="color:#fff"><?php echo HEADING_TITLE; ?></span> <?php // $testimonials_query_raw = "select * from " . TABLE_TESTIMONIALS_MANAGER . " where status = 1 and language_id = '" . (int)$_SESSION['languages_id'] . "' order by date_added DESC, testimonials_title"; // $testimonials_split = new splitPageResults($testimonials_query_raw, MAX_DISPLAY_TESTIMONIALS_MANAGER_ALL_TESTIMONIALS);

if (($testimonials_split->number_of_rows > 0) && ((PREV_NEXT_BAR_LOCATION == '1') || (PREV_NEXT_BAR_LOCATION == '3'))) {
?>

<div id="productsListingTopNumber" class="navSplitPagesResult back"><?php echo $testimonials_split->display_count(TEXT_DISPLAY_NUMBER_OF_TESTIMONIALS_MANAGER_ITEMS); ?></div> <div id="productsListingListingTopLinks" class="navSplitPagesLinks forward"><?php echo TEXT_RESULT_PAGE . ' ' . $testimonials_split->display_links(MAX_DISPLAY_PAGE_LINKS, zen_get_all_get_params(array('page', 'info', 'x', 'y', 'main_page'))); ?></div> <br /> <br class="clearBoth" /> <hr /> <?php } // split page ?> <?php $testimonials = $db->Execute($testimonials_split->sql_query); while (!$testimonials->EOF) { $date_published = $testimonials->fields['date_added']; ?> <blockquote> <div class="testimonial"> <table width="100%" border="0" cellpadding="5"> <tr> <td width="44%"><p class="back"><b><a href="<?php echo zen_href_link(FILENAME_TESTIMONIALS_MANAGER, 'testimonials_id=' . $testimonials->fields['testimonials_id']);?>"><?php echo $testimonials->fields['testimonials_title'];?></a></b></p> </td> <td width="56%"><p class="forward"><?php if (DISPLAY_TESTIMONIALS_DATE_PUBLISHED == 'true') { echo zen_date_long($date_published); } ?></p><br class="clearBoth" /></td> </tr> <tr> <td><?php if (($testimonials->fields[testimonials_image]) != ('')) { $testimonials_image = zen_image(DIR_WS_IMAGES . $testimonials->fields[testimonials_image], $testimonials->fields['testimonials_title'], TESTIMONIAL_IMAGE_WIDTH, TESTIMONIAL_IMAGE_HEIGHT); ?><?php /*if (($testimonials->fields['testimonials_url']) == ('http://') or ($testimonials->fields['testimonials_url']) == ('')) {

echo $testimonials_image;
} else {
echo '<a href="' . $testimonials->fields['testimonials_url'] . '" target="_blank">' . $testimonials_image . '</a>';
}*/

?>
<a href="index.php?main_page=product_info&products_id=<? echo $testimonials->fields['testimonials_pid']?>"><img src="images/products/<? echo ($testimonials->fields['testimonials_pid'])?>.jpg" width="250" height="250" alt="Mark Cahill Ministries" /></a><br /><? if ($testimonials->fields['testimonials_pid'] !=0){ echo "<a href='index.php?main_page=product_info&products_id=".nl2br($testimonials->fields['testimonials_pid']."'>"); ?> </p>

<p><br /> Click here for product details.</p> </a> <? } ?></td> <td style="font-size:16px; font-family: 'Palatino Linotype', 'Book Antiqua', Palatino, serif">"<?php echo nl2br($testimonials->fields['testimonials_html_text']);?>" <p align="right"> <span class="buttonRow back" style="text-align:right; font-size:11px;"><?php echo TESTIMONIALS_BY; ?> <?php echo $testimonials->fields[testimonials_name] . $testimonial_info; ?></span></p></td> </tr> <tr> <td colspan="2"></td> </tr> </table> <?php } ?> </div> </blockquote> <?php $testimonial_info = ''; if ( (!empty($testimonials->fields[testimonials_city])) and (!empty($testimonials->fields[testimonials_country])) ) { $testimonial_info .= NAME_SEPARATOR . $testimonials->fields[testimonials_city] . CITY_STATE_SEPARATOR . $testimonials->fields[testimonials_country]; } if ( (!empty($testimonials->fields[testimonials_city])) and (empty($testimonials->fields[testimonials_country])) ) { $testimonial_info .= NAME_SEPARATOR . $testimonials->fields[testimonials_city]; } if ( (empty($testimonials->fields[testimonials_city])) and (!empty($testimonials->fields[testimonials_country])) ) { $testimonial_info .= NAME_SEPARATOR . $testimonials->fields[testimonials_country]; } if (!empty($testimonials->fields[testimonials_company])) { $testimonial_info .= NAME_SEPARATOR . $testimonials->fields[testimonials_company]; } ?> <br class="clearBoth" /> <br /> <hr /> <?php $testimonials->MoveNext(); } ?> <?php if (($testimonials_split->number_of_rows > 0) && ((PREV_NEXT_BAR_LOCATION == '2') || (PREV_NEXT_BAR_LOCATION == '3'))) { ?> <div id="productsListingBottomNumber" class="navSplitPagesResult back"><?php echo $testimonials_split->display_count(TEXT_DISPLAY_NUMBER_OF_TESTIMONIALS_MANAGER_ITEMS); ?></div> <div id="productsListingListingBottomLinks" class="navSplitPagesLinks forward"><?php echo TEXT_RESULT_PAGE . ' ' . $testimonials_split->display_links(MAX_DISPLAY_PAGE_LINKS, zen_get_all_get_params(array('page', 'info', 'x', 'y', 'main_page'))); ?></div> <?php } // split page ?> <br class="clearBoth" /> <div class="buttonRow back"><?php echo zen_back_link() . zen_image_button(BUTTON_IMAGE_BACK, BUTTON_BACK_ALT) . '</a>'; ?></div> <div class="buttonRow forward"><a href="<?php echo zen_href_link(FILENAME_TESTIMONIALS_ADD, '', 'SSL'); ?>"><?php echo zen_image_button(BUTTON_IMAGE_TESTIMONIALS, BUTTON_TESTIMONIALS_ADD_ALT); ?></a></div> <br class="clearBoth" /> </div><? } ?>
4 Dec 2013, 2:32 AM
#80
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: Testimonial Manager Support Thread (for ZC v1.5.x)

Yvonne DeBandi:

Hi, I'm using 1.5 and love testimonial manager. Having a strange issue where things go haywire on all testimonial display when I add testimonial #5.

Admittedly I know just enough about zen to be dangerous and I did add a product field and a switch case request to allow links to a specific product's testimonials. Is it because of my hack or has anyone run into this before?

And yes...I know the styling should all be in my css files, but my server is caching the css results and I can find no quick relief, so please pardon the inline styling here. :-/

Appreciate any help or guidance. Thanks so much!

<?php /** * Testimonials Manager * * @package Template System * @copyright 2007 Clyde Jones * @copyright Portions Copyright 2003-2007 Zen Cart Development Team * @license [url]http://www.zen-cart.com/license/2_0.txt[/url] GNU Public License V2.0 * @version $Id: Testimonials_Manager.php v1.5.4 */ ?> <style>

blockquote {margin:0 !important;padding:0 !important;
-webkit-border-radius: 20px; -mozborder-radius: 20px; border-radius: 20px;
box-shadow: 5px 5px 5px #007;;
height:1%;width:95%;
background-color:#ffffff;}

blockquote div {padding:38px 56px;height:1%;margin-left:auto; margin-right:auto;}
</style>

<div class="centerColumn" id="testimonialDefault" style="background-image:url(includes/templates/classic/images/background-wallpaper2.jpg); box-shadow: 5px 5px 5px #007;"> <? switch($_REQUEST['req']){ case "read": ?> <h3> All Testimonials for:</h3> <? $query = mysql_query("SELECT * FROM zen_testimonials_manager WHERE testimonials_pid='{$_GET['testimonials_pid']}'");?> <? $row = mysql_fetch_assoc($query); $pid = $row['testimonials_pid']; {?> <div style="width:250px; height:250px; box-shadow:5px 5px 5px #000080; text-align:center; margin-right:auto; margin-left:auto; border-radius:25px;background-image:url(images/products/<? echo $pid?>.jpg); background-size: 250px 250px;"></div><br /> <? echo "<a href='index.php?main_page=product_info&products_id=".$pid."'>"; echo "<p><br />Click here for product details.</p></a>";?> <?php } ?> <br class="clearBoth" /> <? $query = mysql_query("SELECT * FROM zen_testimonials_manager WHERE testimonials_pid='{$_GET['testimonials_pid']}'");?> <? while($row = mysql_fetch_assoc($query)){ $text = $row['testimonials_html_text']; $pid = $row['testimonials_pid']; $id = $row['products_id']; $title = $row['testimonials_title']; $author = $row['testimonials_name']; ?> <blockquote> <div class="testimonial"> <h3><? echo $title ?></h3> <p>"<?php echo $text?>"</p> <p align="right"><? echo $author?></p> </div> </blockquote><br /><br /> <br class="clearBoth" /> <div class="buttonRow back"><?php echo zen_back_link() . zen_image_button(BUTTON_IMAGE_BACK, BUTTON_BACK_ALT) . '</a>'; ?></div> <div class="buttonRow forward"><a href="<?php echo zen_href_link(FILENAME_TESTIMONIALS_ADD, '', 'SSL'); ?>"><?php echo zen_image_button(BUTTON_IMAGE_TESTIMONIALS, BUTTON_TESTIMONIALS_ADD_ALT); ?></a></div> <br class="clearBoth" /> </div><? } break; ?> <? default: ?> <span style="color:#fff"><?php echo HEADING_TITLE; ?></span> <?php // $testimonials_query_raw = "select * from " . TABLE_TESTIMONIALS_MANAGER . " where status = 1 and language_id = '" . (int)$_SESSION['languages_id'] . "' order by date_added DESC, testimonials_title"; // $testimonials_split = new splitPageResults($testimonials_query_raw, MAX_DISPLAY_TESTIMONIALS_MANAGER_ALL_TESTIMONIALS);

if (($testimonials_split->number_of_rows > 0) && ((PREV_NEXT_BAR_LOCATION == '1') || (PREV_NEXT_BAR_LOCATION == '3'))) {
?>

<div id="productsListingTopNumber" class="navSplitPagesResult back"><?php echo $testimonials_split->display_count(TEXT_DISPLAY_NUMBER_OF_TESTIMONIALS_MANAGER_ITEMS); ?></div> <div id="productsListingListingTopLinks" class="navSplitPagesLinks forward"><?php echo TEXT_RESULT_PAGE . ' ' . $testimonials_split->display_links(MAX_DISPLAY_PAGE_LINKS, zen_get_all_get_params(array('page', 'info', 'x', 'y', 'main_page'))); ?></div> <br /> <br class="clearBoth" /> <hr /> <?php } // split page ?> <?php $testimonials = $db->Execute($testimonials_split->sql_query); while (!$testimonials->EOF) { $date_published = $testimonials->fields['date_added']; ?> <blockquote> <div class="testimonial"> <table width="100%" border="0" cellpadding="5"> <tr> <td width="44%"><p class="back"><b><a href="<?php echo zen_href_link(FILENAME_TESTIMONIALS_MANAGER, 'testimonials_id=' . $testimonials->fields['testimonials_id']);?>"><?php echo $testimonials->fields['testimonials_title'];?></a></b></p> </td> <td width="56%"><p class="forward"><?php if (DISPLAY_TESTIMONIALS_DATE_PUBLISHED == 'true') { echo zen_date_long($date_published); } ?></p><br class="clearBoth" /></td> </tr> <tr> <td><?php if (($testimonials->fields[testimonials_image]) != ('')) { $testimonials_image = zen_image(DIR_WS_IMAGES . $testimonials->fields[testimonials_image], $testimonials->fields['testimonials_title'], TESTIMONIAL_IMAGE_WIDTH, TESTIMONIAL_IMAGE_HEIGHT); ?><?php /*if (($testimonials->fields['testimonials_url']) == ('http://') or ($testimonials->fields['testimonials_url']) == ('')) {

echo $testimonials_image;
} else {
echo '<a href="' . $testimonials->fields['testimonials_url'] . '" target="_blank">' . $testimonials_image . '</a>';
}*/

?>
<a href="index.php?main_page=product_info&products_id=<? echo $testimonials->fields['testimonials_pid']?>"><img src="images/products/<? echo ($testimonials->fields['testimonials_pid'])?>.jpg" width="250" height="250" alt="Mark Cahill Ministries" /></a><br /><? if ($testimonials->fields['testimonials_pid'] !=0){ echo "<a href='index.php?main_page=product_info&products_id=".nl2br($testimonials->fields['testimonials_pid']."'>"); ?> </p>

<p><br /> Click here for product details.</p> </a> <? } ?></td> <td style="font-size:16px; font-family: 'Palatino Linotype', 'Book Antiqua', Palatino, serif">"<?php echo nl2br($testimonials->fields['testimonials_html_text']);?>" <p align="right"> <span class="buttonRow back" style="text-align:right; font-size:11px;"><?php echo TESTIMONIALS_BY; ?> <?php echo $testimonials->fields[testimonials_name] . $testimonial_info; ?></span></p></td> </tr> <tr> <td colspan="2"></td> </tr> </table> <?php } ?> </div> </blockquote> <?php $testimonial_info = ''; if ( (!empty($testimonials->fields[testimonials_city])) and (!empty($testimonials->fields[testimonials_country])) ) { $testimonial_info .= NAME_SEPARATOR . $testimonials->fields[testimonials_city] . CITY_STATE_SEPARATOR . $testimonials->fields[testimonials_country]; } if ( (!empty($testimonials->fields[testimonials_city])) and (empty($testimonials->fields[testimonials_country])) ) { $testimonial_info .= NAME_SEPARATOR . $testimonials->fields[testimonials_city]; } if ( (empty($testimonials->fields[testimonials_city])) and (!empty($testimonials->fields[testimonials_country])) ) { $testimonial_info .= NAME_SEPARATOR . $testimonials->fields[testimonials_country]; } if (!empty($testimonials->fields[testimonials_company])) { $testimonial_info .= NAME_SEPARATOR . $testimonials->fields[testimonials_company]; } ?> <br class="clearBoth" /> <br /> <hr /> <?php $testimonials->MoveNext(); } ?> <?php if (($testimonials_split->number_of_rows > 0) && ((PREV_NEXT_BAR_LOCATION == '2') || (PREV_NEXT_BAR_LOCATION == '3'))) { ?> <div id="productsListingBottomNumber" class="navSplitPagesResult back"><?php echo $testimonials_split->display_count(TEXT_DISPLAY_NUMBER_OF_TESTIMONIALS_MANAGER_ITEMS); ?></div> <div id="productsListingListingBottomLinks" class="navSplitPagesLinks forward"><?php echo TEXT_RESULT_PAGE . ' ' . $testimonials_split->display_links(MAX_DISPLAY_PAGE_LINKS, zen_get_all_get_params(array('page', 'info', 'x', 'y', 'main_page'))); ?></div> <?php } // split page ?> <br class="clearBoth" /> <div class="buttonRow back"><?php echo zen_back_link() . zen_image_button(BUTTON_IMAGE_BACK, BUTTON_BACK_ALT) . '</a>'; ?></div> <div class="buttonRow forward"><a href="<?php echo zen_href_link(FILENAME_TESTIMONIALS_ADD, '', 'SSL'); ?>"><?php echo zen_image_button(BUTTON_IMAGE_TESTIMONIALS, BUTTON_TESTIMONIALS_ADD_ALT); ?></a></div> <br class="clearBoth" /> </div><? } ?> ```

One thing that jumps out at me from just the formatting is that short tags are used (<? ) Instead of <?php don't know what you mean by going haywire nor am I sure if other parts of the code use the short tag or not. Sorry didn't follow through the logic yet, kinda got stopped in my tracks when I saw the short tags and other missing case statements.