Jump to content

ClientlistAnywhere :: Free Ajax-Powered Smarty Clientlist Plugin


rmccny

Recommended Posts

This new add-on that I put together in the past hour allows you to add an ajax-powered client drop-down box to just about any WHMCS admin template. This simple plug-in requires no installation, no configuration, no license, and only a simple template edit to use. Installation and usage instructions included. This works even if you have the client drop-down turned off in admin.

 

Full source code included!

 

 

Example Usage:

 

{clientlist id="userid" clientid=$userid width="250px"}

Here's how easy it is to add a client drop-down to the support ticket view:

Open template admin/tempalates/v4/viewticket.tpl

   LOOK FOR

   <input type="text" name="userid" size="10" value="{$userid}" />


   REPLACE WITH

   {clientlist id="userid" clientid=$userid}


Close and save

Download (no registration required)

Link to comment
Share on other sites

Thanks for the bug report. I forgot about our international friends; the output has to first be converted to UTF8 before being passed to json_encode.

 

Here's the fix:

 

Find:

 

    $client_array[$client['id']] = $client['label'];

Replace With:

 

    $client_array[$client['id']] = utf8_encode($client['label']);

I have packaged the fix in the download; v1.0.2.

 

Thanks!

Link to comment
Share on other sites

Unfortunately that broke the plugin for others. Arrgh! If WHMCS would standardize and require UTF8 encoding life would be much easier. The problem with that patch is that sites already using UTF8 wind up with double-encoding problems.

 

I've released version 1.0.3 of this plugin, if it's working fine for you there is no need to update, but if you're having character encoding problems this update is a must.

 

The patch detects the $mysql_charset setting set in WHMCS configuration.php, if it doesn't see utf8 encoding there it will encode the output, otherwise it just passes it through.

 

Sorry for the rapid succession of updates.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated