[SOLVED] Customer Testimonial

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
runblip
Forum Members
Forum Members
Posts: 15
Joined: Tue Mar 31, 2009 6:58 pm

[SOLVED] Customer Testimonial

Post by runblip »

I am looking for the best/most appropriate module to use for displaying a random testimonial. I need to be able to add entries, then display them randomly.

BlankoftheMonth seems to be a good candidate, not sure how I would randomize.

Any help would be much appreciated!

Thanks,
Nathan
Last edited by runblip on Thu May 28, 2009 6:03 pm, edited 1 time in total.
CMSmonkey
Power Poster
Power Poster
Posts: 290
Joined: Thu Nov 27, 2008 4:58 pm

Re: Random Customer Testimonial

Post by CMSmonkey »

Maybe try the Random Quote tag (http://dev.cmsmadesimple.org/projects/randomquote)
I have never used it before, but its description seems to fit your use.
runblip
Forum Members
Forum Members
Posts: 15
Joined: Tue Mar 31, 2009 6:58 pm

Re: Random Customer Testimonial

Post by runblip »

Thanks for the tip!

The advantage of using something like BlankoftheMonth is being able to manage the content in the admin area, as opposed to manually editing the text file.

Any other thoughts on randomizing how BlankoftheMonth calls it's content?
CMSmonkey
Power Poster
Power Poster
Posts: 290
Joined: Thu Nov 27, 2008 4:58 pm

Re: Random Customer Testimonial

Post by CMSmonkey »

For the Random Quote tag, if the quotes.txt document is stored in the uploads folder, then it can be retrieved from the Admin area under Content/File Manager.  You just need to adjust the path file in the script.
jmcgin51
Power Poster
Power Poster
Posts: 1899
Joined: Mon Jun 12, 2006 9:02 pm

Re: Random Customer Testimonial

Post by jmcgin51 »

How about the Quotes Made Simple module?  I use this successfully on a site for exactly the purpose you are proposing.  Allows backend editor editing rather than text file editing.

Here are the supported parameters from the module Help:

    * (optional) lang="en_US" - Parameter is used to specify what language to use for display on the frontend. Not all modules support or need this.
    * (optional) pickedby="random" - How to pick the quote among the candidates, allow values are 'random' (which pick a random quote), 'equal' (which tries to make sure all quotes are shown approximately the same number of times, 'day' (which selects the quote of the day maintaining that for 24 hours and not repeating it until all relevant quotes have been used
      Note that this setting can be more or less relevant regarding the actualy source of the quotes.
    * (optional) template="" - Use this template to show the quotes
    * (optional) group="" - Only show quotes attached to this/these groups, should contain a groupname or more seperated by commas.
    * (optional) quote="" - Only show specific quote(s) specified by their text-id, seperated by commas. This overrides the groups-parameter.
runblip
Forum Members
Forum Members
Posts: 15
Joined: Tue Mar 31, 2009 6:58 pm

Re: Random Customer Testimonial

Post by runblip »

The Quotes Made Simple module looks great. I installed that this morning and it randomizes and works well. One other question is how to provide a link to a page showing all Testimonials?

Thanks for all of the help so far
Last edited by runblip on Wed Apr 01, 2009 12:38 pm, edited 1 time in total.
runblip
Forum Members
Forum Members
Posts: 15
Joined: Tue Mar 31, 2009 6:58 pm

Re: Random Customer Testimonial

Post by runblip »

I guess all I need to do here is display a SQL query for that part of the database. Can someone help me do that in a secure manner?

Thanks!
jmcgin51
Power Poster
Power Poster
Posts: 1899
Joined: Mon Jun 12, 2006 9:02 pm

Re: Random Customer Testimonial

Post by jmcgin51 »

geez, I would have thought you could just customize the template with a {foreach} statement, but I can't make it work...

Here's what I was working on:
{foreach from=$items item=entry}

  {$entry->quoteauthor} says:
 
    "
    {$entry->quotecontent}
    "
 
  from {$entry->quotereference}

(shown {$entry->quoteexposures} times)

{/foreach}

But this just returns a blank page.  I think because the SQL query must return only one result, not an array.

Surely there is a way to do this, though, without a custom SQL query?
User avatar
Nullig
Power Poster
Power Poster
Posts: 2380
Joined: Fri Feb 02, 2007 4:31 pm

Re: Random Customer Testimonial

Post by Nullig »

Can you not use the quotes parameter, with all quotes selected:

* (optional) quote="" - Only show specific quote(s) specified by their text-id, seperated by commas. This overrides the groups-parameter.

quote="1,2,3,4,5,etc"

Nullig
jmcgin51
Power Poster
Power Poster
Posts: 1899
Joined: Mon Jun 12, 2006 9:02 pm

Re: Random Customer Testimonial

Post by jmcgin51 »

but this means you have to edit the module call each time a new quote is added.

should have something like quote="all"
runblip
Forum Members
Forum Members
Posts: 15
Joined: Tue Mar 31, 2009 6:58 pm

Re: Random Customer Testimonial

Post by runblip »

jmcgin51 wrote: but this means you have to edit the module call each time a new quote is added.

should have something like quote="all"
Something like that would be ideal
runblip
Forum Members
Forum Members
Posts: 15
Joined: Tue Mar 31, 2009 6:58 pm

Re: Random Customer Testimonial

Post by runblip »

runblip wrote:
jmcgin51 wrote: but this means you have to edit the module call each time a new quote is added.

should have something like quote="all"
Something like that would be ideal
still need to get this working, any thoughts on getting this module to display all results?

thanks!
JeremyBASS

Re: Random Customer Testimonial

Post by JeremyBASS »

I don't know how far your on this.. but I do the same thing but with news ... depending on what all I need I use

start=$Num

or

articleid=$Num

with

{capture assign=Num}{math equation='rand(10,100)'}{/capture}
{$Num}

just a thought as news is a very stable mod...

Cheers
jeremyBass



Technical Note: {math} is an expensive function in performance due to its use of the php eval() function. Doing the math in PHP is much more efficient, so whenever possible do the math calculations in PHP and assign() the results to the template. Definately avoid repetitive {math} function calls, eg within {section} loops.
Last edited by JeremyBASS on Thu May 21, 2009 7:48 pm, edited 1 time in total.
Jean le Chauve

Re: Random Customer Testimonial

Post by Jean le Chauve »

For this site : http://www.brightfuture.be i made a pseudo rotative testimonial on each page. Each time you refresh the page, you receive a new testimonial. I put into the gabarit :

Code: Select all

<!--Citation random-->
{capture assign='blobname'}citation{1|rand:6}{/capture}
{global_content name="$blobname"}
<!--Fin Citation-->
I create here 6 citations into 6 GCB (citation1, citation2... citation6) for all langage (MLE).
rand:number must be the same of your number of citations.
Last edited by Jean le Chauve on Fri May 22, 2009 7:31 pm, edited 1 time in total.
JeremyBASS

Re: Random Customer Testimonial

Post by JeremyBASS »

@Jean le Chauve  for what it's worth you made 3-4 extra queries going it the GCB way plus you still have the eval() hit ...  

Another topic with 50 ways to skin the cat... ;)


like

{news number='1' sortby="random"}  that would work best of all IMHO...

Cheers
jeremyBass
Last edited by JeremyBASS on Fri May 22, 2009 6:48 pm, edited 1 time in total.
Post Reply

Return to “Modules/Add-Ons”