Mtekk’s Testimonials

Table of Contents

  1. Purpose
  2. Download
  3. Installation
  4. Usage
  5. Version History and Changelog
  6. License

Purpose

Mtekk’s Testimonials is a WordPress 2.5 plugin that allows users to submit testimonials. This is useful for hosting companies, or anyone who makes, sells, or distributes a product. As a modern plugin, Mtekk’s Testimonials conforms to the WordPress i18n recommendations, supports short code hooks, and nonce protection. When placed on the front page, AJAX functionality, brought by MooTools, is available (with super safe fall back).

Download

Latest Testing Release: Mtekk’s Testimonials 1.1.0

Installation

  1. Download the theme zip archive, see Download section.
  2. Extract the contents of the zip archive into your plugins folder (wp-content/plugins).
  3. Enable the plugin in the administration panel under the plugins section.
  4. Continue onto the Usage section.

Usage

There are two methods of placing a testimonial on a page. Either WordPress short code tags can be used or direct calling of the PHP functions.
Short Code
The generic short code tag for displaying a testimonial is:
[testimonials]
The primary variation to this is to specify a particular ID like so:
[testimonials id='2']
Passing in no or a negative ID value will result in a random testimonial being picked from the approved testimonials in the database. When a ID equal to zero is specified, the action taken is specified in the setting “Default Start ID”. For all specified, non-negative IDs, the navigation links for navigating the testimonial list are not displayed.
PHP Function Call
The function mtest_display($id, $echo = true, $die = false) may be called directly from any template, or plug-in php file. It has three parameters: $id, $echo, and $die.

$id is the only required parameter, it can be used exactly the same as the id parameter in the Short Code. A negative $id will result in a random testimonial being displayed. A valid, positive $id will result in that testimonial being displayed. If $id is set to 0 its action will be defined by the value of the “Default Start ID” setting.

$echo is an optional parameter which will default to true if not specified. When $echo is true, the function will echo it’s output. If $echo is false, the output string will be returned.

$die is an optional parameter which will default to false if not specified. When $die is true, the function will die after echoing it’s output. This is useful for AJAX operations where we don’t want WordPress to handle output. This parameter is only valid when $echo is true.

Version History and Changelog

  • 1.1.0 [7-17-2008]:
    New Feature: Now utilizes Mootools 1.2.
    New Feature: Now restricting the domain/TLD of the submitted websites is optional.
    New Feature: Utilizes WordPress’ javascript dependency handler.
    New Feature: Only loads the javascript on pages that a testimonial is located (only works with the shortcodes).
    New Feature: More user friendly reporting of errors in filling out the add testimonial form.
  • 1.0.0 [5-31-2008]:
    Initial public release

License

Mtekk’s Testimonials is released under the GNU GPL 2.0 license and comes with absolutely no warranty. Portions licensed under the Open Source MIT License. These include the distributed MooTools library. By downloading Mtekk’s Testimonials you agree to the terms of the GNU GPL 2.0 and MIT licenses.

Trackbacks/Pingbacks

  1. Pingback: Mtekk’s Crib » Mtekk’s Testimonials 1.0.0

  2. Pingback: Mtekk’s Crib » Mtekk’s Testimonials 1.1.0

8 thoughts on “Mtekk’s Testimonials

  1. I just downloaded & installed Mtekk’s Testimonials. And tried to use it. Immediately got an “Internal Server Error. Additionally, a 500 Internal Server Error error was encountered while trying to use an ErrorDocument to handle the request.”

    I tried to go back to see what’s wrong. But I could not, because of this message:
    “It seems your account is currently using to much CPU / Memory time. Below are some reasons why your site might be suspended: 1. Poorly written scripts. Scripts that are poorly written use excessive of CPU / Memory and MySQL time. If you got these scripts from a software developer, then you’ll need to work with them directly to find a solution, or don’t use the scripts. Common script problems are generated by mods or plugins for content management systems or online forums. As a temporary solution, you may wish to disable your less-essential mods and see if that improves your situation.”

    I tried to go to the plugins page to deactive this plugin. But: website gone. All my websites gone!

    Via FTP I immediately deleted the Testimonials plugin. After 5 minutes my websites were back.

    I installed the plugin again – same problem.

    So: something must be wrong in the script…

  2. Robbert,

    That’s strange. Do you know what version of WordPress, Apache, PHP and mySQL your host uses? The only thing I can think of off the top of my head that could cause a problem is the install script (your database may not allow tables to be added to it, which will cause problems with this plug-in). You also may find it more beneficial to wait until 1.1, where some of the shortcomings of this version are resolved.

    -John Havlik

  3. Hi! I installed the plugin and I got this error message on the Manage page:

    Warning: is_writable() [function.is-writable]: open_basedir restriction in effect. File(/var/log/php.log) is not within the allowed path(s): (/var/www/vhosts/site/httpdocs:/tmp) in /wp-includes/wp-db.php on line 500

    I get it again when I try to add a testimonial.

    Does it tell you anything? I’m figuring it’s some permissions error on my side, but I’m not sure what it is exactly.

  4. Nico,

    Ok, that is a WordPress thing that is trying to output a DB Query error. To see what the actual error is, in your wp-config.php file place define('WP_DEBUG', true); before require_once(ABSPATH.'wp-settings.php');. This will let WordPress spew out all PHP errors and warnings. See what shows up error wise when you try to add a testimonial.

    -John Havlik

  5. John,

    thanks for the quick reply! I enabled WP_Debug and got this:

    Notice: Undefined index: testimonial_id in /var/www/vhosts/site/httpdocs/blog/wp-content/plugins/testimonial/testimonial.php on line 837

    Warning: is_writable() [function.is-writable]: open_basedir restriction in effect. File(/var/log/php.log) is not within the allowed path(s): (/var/www/vhosts/site/httpdocs:/tmp) in /var/www/vhosts/site/httpdocs/blog/wp-includes/wp-db.php on line 500

    WordPress database error: [Table ‘db_blog.wp_testimonials’ doesn’t exist]
    SELECT id FROM wp_testimonials WHERE displaytest = ‘1’

    Warning: is_writable() [function.is-writable]: open_basedir restriction in effect. File(/var/log/php.log) is not within the allowed path(s): (/var/www/vhosts/site/httpdocs:/tmp) in /var/www/vhosts/site/httpdocs/blog/wp-includes/wp-db.php on line 500

    WordPress database error: [Table ‘db_blog.wp_testimonials’ doesn’t exist]
    SELECT * from wp_testimonials ORDER BY id

    It seems like the plugin isn’t allowed to write to the database, am I right?

  6. Nico,

    It looks like the install script that is supposed to create a new DB table did not run. You can try rerunning it by deactivating the plugin and then reactivating it. Keep WordPress in debug mode, it may have some messages when activating the plugin that will be of use to determine the underlying cause of this.

    -John Havlik

Comments are closed.