Sorry, No to both. Images can be added from the admin panel (admin -> tools -> testimonial manager) and editing the testimonial.
Printable View
NP Clyde. I figured that would take some serious rewriting anyway but figured I'd ask.
Next question though. As it is now if an image is in the testimonial when the image is clicked it takes you to the authors submitted link/site.
What about altering it so that a smaller image can be used and when clicked it behaves like a product picture and opens a larger picture on top?
I'm using the Fuel Slimbox mod at http://www.zen-cart.com/index.php?ma...roducts_id=830 and would like to see a larger picture displayed instead.
cheers!
You can set the image dimensions to whatever you want
admin -> configuration -> testimonial manager (by default the height and width are set at 80px.)
When you edit a testimonial you can set the URL to take you to a particular product info page (you can see this in action here
Just scroll down to the "great site" testimonial and click on the image.
I'm not sure how Fuel Slimbox handles images so I can't really speak to what would be required to alter testimonial manager code to work with it.
Clyde;
I found where in the 2 template files the url is passed to the picture and although my php is crude at best managed to comment out the url from being passed.
tpl_testimonials_manager_default.php
tpl_testimonials_manager_all_testimonials_default.php
I did it like this...
One thing I noticed is that if there is no URL supplied either in the submission or edited in on the admin side then the code still inserts "http:///" as a link for the picture. Might consider adding a statement for it to check for a url and if none exists then not to create the link.PHP Code:
<p id="testimonialImage">
<?php /* echo '<a href="' . $page_check->fields[testimonials_url] . '" target="_blank">' . zen_image($testimonials_image). '</a>'; */ ?>
<?php echo '' . zen_image($testimonials_image). '</a>'; ?>
</p>
Also, thanks for the image info. If I'd have opened my eyes I might have seen it slap me in the face! :oops:
If no image exists then no image or link is displayed:
This complete if statement takes care of that on the display pages:
PHP Code:
<?php
if (($testimonials->fields[testimonials_image]) != ('')) {
$testimonials_image = DIR_WS_IMAGES . $testimonials->fields[testimonials_image];
?>
<p class="testimonialImage">
<?php echo '<a href="' . $testimonials->fields['testimonials_url'] . '" target="_blank">' . zen_image($testimonials_image). '</a>'; ?>
</p>
<?php
}
?>
The image size applies to both the sidebox and the display pages.
Mabey I wasn't too clear on my description. I DO want the image displayed but if no link is in the db for it then the picture should not attempt to link anywhere. As it stands now with no link in the db on mouseover it displays "http:///" in the status bar and clicking it takes me to the store root.
I must have something messed up then. Right now it only thumbs the image for the sidebox. The pages tpl_testimonials_manager_default.php and tpl_testimonials_manager_all_testimonials_default.php are both showing a full sized image. I even reverted back to your original files and still the same presentation.
The cart is a clean 1.3.8a install and this was the first mod I installed on it. I tried the Fuel Slimbox after that and nothing was over written but the javascript from slimbox kept halting php and all I would get was blank pages so I removed slimbox for now.
Cheers!
Just reverted everything back to your original files and now the only difference is the store's full root url shows up in the status bar and of course takes you there when you click the picture. Site url is http://www.southraven.com/demo10/
Finally got a version of lightbox installed and working. Had to remove the Fuel Slimbox and go with the Zen Lightbox 1.4. Got that working in the cart now without any errors. Just something about the Fuel Slimbox was giving the site grief. Can't understand why though. Outside of a few stock changes to the stylesheet.css for the template its a fully compliant Zen Cart 1.3.8 and I have been very meticulous in creating a fully compliant template.
Now if I can find a way to get your Testimonial Manager to treat the pictures the same way I would be happy indeed.
From what I can see to get litebox to work on other pages you simply have to copy the javascript file into the appropriate ../includes/modules/pages/ directory and add the tag "rel="lightbox[gallery]".
I'm sure that sounds simpler than it really is though!