Kayako logo
Modifications & Addon Releases Modification guides and addons are posted here to share with the community. Do not post requests in here!

Notices

Reply
 
LinkBack Thread Tools Search this Thread Rating: Thread Rating: 2 votes, 3.00 average. Display Modes
  (#1) Old
Chris Boulton Offline
Member
 
Posts: 146
Join Date: Jun 2003
Location: Sydney, Australia
Client Comment Validation + Captcha - 08-08-2007, 11:49 AM

Greetings all, another quick modification put together to enhance a specific area of SupportSuite.

This particular modification relates to improving the client side comment functionality on knowledge base articles, news items, downloads and troubleshooter items.

The comment functionality in SupportSuite has a few major problems:
  1. When users do not enter any comment or their full name, they receive a blank page with no error messages after submitting the comment form.
  2. Spam bots are free to use the comment system as there is no "captcha" protection for it.

This modification addresses these things by adding the following functionality:
  • Name & comment validation, with optional ability to require email addresses to be valid.
  • When errors are detected with the submitted comment, the users information is saved and they're taken back to a comment form which mentions these errors and retains their previous values.
  • A captcha image will be generated if captcha images are enabled in SupportSuite and the user is not logged in when commenting.

Personally, I would recommend all users of Kayako SupportSuite who have commenting enabled by guests, and even users, install this modification - it is something very necessary!

Please see the following screenshot for an example:


Please see the instructions in the attached text file to apply it to your insallation.

Let me know if you're using it and if you have any feedback.
Attached Files
File Type: txt comment_validation.txt (8.3 KB, 135 views)

Last edited by Chris Boulton; 04-09-2007 at 02:33 AM.
   
Reply With Quote
  (#2) Old
Jamie Edwards Offline
Operations Manager
 
Jamie Edwards's Avatar
 
Posts: 5,120
Join Date: Jan 2006
Location: United Kingdom
08-08-2007, 12:00 PM

Fantastic mod Chris, thanks for sharing


Jamie Edwards (jamie.edwards ]at[ kayako.com)
----------------------------------------------------------------
---
  • New to the forum? New user's guide here.
  • Submit bug reports here.
  • Submit support tickets via the members area.
  • Submit sales queries either via live chat or via e-mail.
  • There is no official ETA on Version 4.
   
Reply With Quote
  (#3) Old
craigbrass Offline
Senior Member
 
Posts: 5,391
Join Date: Jun 2005
Location: Cumbria, UK
08-08-2007, 12:12 PM

Lookin Good Chris! Thanks for sharing!


Craig Brass - Kayako Forum Squatter (Note: I am NOT a staff member)

Icon Headquarters - Its Elixir - Web2Messenger
   
Reply With Quote
  (#4) Old
ansuk Offline
New Member
 
Posts: 16
Join Date: Mar 2007
08-08-2007, 12:30 PM

I am using yearly licensed eSupport and because of the encription the "Find and Add" doesnt work
   
Reply With Quote
  (#5) Old
Chris Boulton Offline
Member
 
Posts: 146
Join Date: Jun 2003
Location: Sydney, Australia
08-08-2007, 12:46 PM

Ah sorry - yes, you'd need an owned license.

Sorry about that,
Chris
   
Reply With Quote
  (#6) Old
craigbrass Offline
Senior Member
 
Posts: 5,391
Join Date: Jun 2005
Location: Cumbria, UK
08-08-2007, 01:17 PM

You may be able to get the unencoded files by submitting a ticket to Kayako. Sometimes they allow this.


Craig Brass - Kayako Forum Squatter (Note: I am NOT a staff member)

Icon Headquarters - Its Elixir - Web2Messenger
   
Reply With Quote
  (#7) Old
SWG Offline
New Member
 
Posts: 11
Join Date: Jan 2006
08-08-2007, 09:14 PM

I have followed the steps and can't get the captcha to appear. I am not logged in and have captcha turned on and is visible for new registrations. I've cleared the cache. I see the changed text in the template and even uncommented the lines for valid email addresses and that works, just no captcha! Is there another loale to turn it on that I'm missing? Any help is appreciated as this mod is just what we need and there is no reason Kayako shouldn't include it!!!
   
Reply With Quote
  (#8) Old
Chris Boulton Offline
Member
 
Posts: 146
Join Date: Jun 2003
Location: Sydney, Australia
09-08-2007, 01:28 AM

Hi,

It should appear. Can you send me a PM with the link to your frontend/client side of SupportSuite so I can take a look?

Also - are you by chance integrating SupportSuite & ModernBill? Just thought that this might be the cause of it.

Regards,
Chris
   
Reply With Quote
  (#9) Old
Chris Boulton Offline
Member
 
Posts: 146
Join Date: Jun 2003
Location: Sydney, Australia
09-08-2007, 07:32 AM

I've just updated the modification to allow it to function correctly with Modern Bill integrated installs.

Please grab the updated version from the first post.

Quote:
Originally Posted by SWG
I have followed the steps and can't get the captcha to appear. I am not logged in and have captcha turned on and is visible for new registrations.
SWG,

Can you reapply the changes in step 1 (includes/functions_comments.php), it should work then.

Cheers,
Chris
   
Reply With Quote
  (#10) Old
mopa Offline
Member
 
mopa's Avatar
 
Posts: 134
Join Date: May 2007
Location: Denmark
09-08-2007, 01:12 PM

In the template editing area of your file I see that there is this code:

PHP Code:
 <tr>
    <
td colspan="2" class="smalltext"><{$language[commentsdesc]}></td>
  </
tr>
<{if 
$errors}>
  <
tr>
  <
td colspan="2" class="smalltext" style="padding-top: 4px; padding-bottom: 4px;">
   <
div style="padding: 5px; border: #FC6 1px solid; background-color: #FFC;">
    <
p style="color: #C00; margin: 0; font-weight: bold;">Please correct the following errors and try again:</p>
    <
ul>
    <{foreach 
key=key value=error from=$errors}>
     <
li><{$error}></li>
    <{/foreach}>
    </
ul>
    <
script type="text/javascript">javascript:switchDisplay('comments');</script>
   </div>
  </td>
 </tr>
<{/if}>
<{if $_USER[loggedin] == true}>
  <tr class="smalltext">
    <td><strong><{$language[cmname]}></strong><BR /><{$_USER[fullname]}><input name="fullname" value="<{$_USER[fullname]}>" type="hidden" /></td>
    <td><strong><{$language[cmemail]}></strong><BR /><{$_USER[primaryemail]}><input name="email" value="<{$_USER[primaryemail]}>" type="hidden" /></td>
  </tr>
  <{else}>
  <tr class="smalltext">
    <td><strong><{$language[cmname]}></strong><BR /><input name="fullname" type="text" size="30" value="<{$fullname}>" class="swifttext"></td>
    <td><strong><{$language[cmemail]}></strong><BR /><input name="email" type="text" size="30" value="<{$email}>" class="swifttext"></td>
  </tr>
  <{if $cancaptcha eq "1"}>
   <tr class="smalltext">
     <td colspan="2"><strong>Human Verification:</strong></td>
   </tr>
   <tr>
     <td><span class="smalltext">Please enter the text you see in the image at the right into the textbox below. This is required to prevent automated comments.</span></td>
     <td rowspan="2" align="left" valign="center" width="100"><img src="<{$swiftpath}>index.php?_m=core&_a=addcomment&do=captcha&randomhash=<{$randomhash}>&sessionid=<{$sessionid}>" border="0"></td>
   </tr>
   <tr>
    <td><input name="verifyregcode" type="text" style="WIDTH:100%;" class="swifttext"></td>
   </tr>
  <{/if}>
  <{/if}>
  <tr>
    <td colspan="2" class="smalltext"><strong><{$language[cmcomments]}></strong><BR /><textarea name="comments" style="WIDTH:98%;" class="swifttextarea" rows="4"><{$comments}></textarea></td>
  </tr> 
Wouldn't it be better to add the phrase: Please enter the text you see in the image at the right into the textbox below. This is required to prevent automated comments in a language-string instead, so it could be easily translated into different needed languages?


Kayako: 3.11.01 | PHP: 5.2.3 | MySQL: 5.0.41 | Windows 2003 Server
   
Reply With Quote
  (#11) Old
Chris Boulton Offline
Member
 
Posts: 146
Join Date: Jun 2003
Location: Sydney, Australia
09-08-2007, 01:23 PM

Possibly, but that involves extra file edits and too many of those make things hard to maintain for users. It isn't really a priority/issue for me because I only use the English language and users with one language installed (most only use one) can change it in the template too.

If there is demand for it, however, I can do so.
   
Reply With Quote
  (#12) Old
mopa Offline
Member
 
mopa's Avatar
 
Posts: 134
Join Date: May 2007
Location: Denmark
09-08-2007, 01:27 PM

You are propably right. No need to do so - at least now people who use more languages are aware that if they want to easily translate this it have to be done with an added phrase into the languages. Since I use two languages I might do so.
But it can also just be translated directly in the template...

Thanks - keep up the nice work


Kayako: 3.11.01 | PHP: 5.2.3 | MySQL: 5.0.41 | Windows 2003 Server
   
Reply With Quote
  (#13) Old
handsonweb Offline
Member
 
Posts: 34
Join Date: Aug 2003
Location: Fullerton, CA
18-08-2007, 01:50 AM

Nice mod - I'll be implementing it shortly to see how it goes. I've been using some of our own SQL searches to remove comments etc that are spam - but this will hopefully help take care of some of that too.

Will update this thread once we've implemented it. Thanks again.
   
Reply With Quote
  (#14) Old
fivestarhost Offline
Registered User
 
Posts: 28
Join Date: Mar 2007
Location: Las Vegas
20-08-2007, 06:47 AM

thank you
   
Reply With Quote
  (#15) Old
supportskins Offline
Senior Member
 
supportskins's Avatar
 
Posts: 3,566
Join Date: Aug 2006
Location: Mumbai, India
20-08-2007, 11:59 AM

Great mod! Thanks for sharing



Professional and Affordable Kayako Skins - Specialists in Kayako Skinning & Customization - Professional Paid Support
Our Skins and Services - http://www.supportskins.com/store/
SupportSkins.com - http://www.supportskins.com/
   
Reply With Quote
Reply

Tags
captcha, client, comment, validation

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Ability for Client to Close Own Ticket. netFusion Wont Implement / Already Implemented 20 04-09-2007 08:15 AM
Ability for client to gracefully leave a chat / cancel chat request netFusion Feature Requests 19 19-07-2007 09:15 PM
Required field validation if client sends ticket via email richm SupportSuite, eSupport and LiveResponse 0 25-05-2007 03:31 AM
[HOW TO] Get the Winapp client runing on Terminal Servers Paul Agerbeek LiveResponse Desktop Application 0 12-10-2006 11:34 AM



Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
vBulletin Skin developed by: vBStyles.com


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46