Jump to content
Sign in to follow this  
Dgital Essence

Display all customers sticky notes on Admin Summary page

Recommended Posts

Hi,

 

I'm not sure if this has already been done but I use Sticky Notes to record additional work that needs to be invoiced at a later date but kept on forgetting who I'd done extra work for.

 

So I've created a widget for the Admin Summary page that displays all the Sticky Notes with links through to the Customers Note and also the customer summary.

 

sticky_notes.jpg

 

Just create a new file in modules/widgets and paste this code in. Then head over to Setup > Staff Management > Administrator Roles > Edit and scroll down to Widgets and then tick yours (in this example it's called "Display Customer\'s Sticky Notes".

 

This was tested in Version: 5.3.11. it works on my install but it if breaks yours or makes the sky fall down, I'm not liable...

 

?php
# WHMCS Widget to display sticky notes on the Admin Summary
# Hedley Phillips - Digital Essence
if (!defined("WHMCS"))
   die("This file cannot be accessed directly");

function widget_display_sticky_notes() {

$content = '<table bgcolor="#cccccc" align="center" style="margin-bottom:5px;width:100%;" cellspacing="1">
<tr bgcolor="#efefef" style="text-align:center;font-weight:bold;"><td>Customer</td><td>Note</td><td>Modified</td></tr>';

$x=1; $range = "<= 364";
   $result = mysql_query("SELECT * FROM `tblnotes` JOIN tblclients ON tblclients.id=tblnotes.userid  WHERE `sticky` = '1'");
   while ($data = @mysql_fetch_array ($result)) {
	 $noteid = $data["id"];
	 $userid = $data["userid"];
	 $firstname = $data["firstname"];
        $lastname = $data["lastname"];
	 $note = $data["note"];
	 $date = $data["modified"];
       $content .= '<tr bgcolor="#ffffff" style="text-align:center;"><td><a href="/whmcsadmin/clientssummary.php?userid='.$userid.'">'.$firstname. ' ' .$lastname.'</a></td><td><a href="/whmcsadmin/clientsnotes.php?userid='.$userid.'&action=edit&id='.$noteid.'">'.$note.'</a></td><td>'.$date.'</td></tr>'; $x=0;
   }
   if($x) $content =  '<tr bgcolor="#ffffff" style="text-align:center;"><td colspan="7">No Sticky Notes to display</td></tr>';
$content .= '</table>';

   return array( 'title' => 'Display Customer\'s Sticky Notes', 'content' => $content );
}

add_hook("AdminHomeWidgets",1,"widget_display_sticky_notes");

?>

 

NOTE:

 

What I can't get to work is the edit function.

 

I'm using:

 

<a href="/whmcsadmin/clientsnotes.php?userid='.$userid.'&action=edit&id='.$noteid.'">

 

where:

 

$noteid = $data["id"];

$userid = $data["userid"];

 

but it keeps on putting the customer id in both $userid and $noteid and I can't work out why.

Edited by Dgital Essence

Share this post


Link to post
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.

Sign in to follow this  

  • Similar Content

    • By ModulesGarden
      1. Client Profile Viewer For WHMCS 1.8.0

      We are more than overjoyed to bring you the news about the latest super-practical update to Client Profile Viewer For WHMCS. This is what the electrifying 1.8.0 version keeps in store for you:
      Take a quick peek at all the users that are assigned to your client’s profile with the just-out List Of Users widget. Hover over a client's name and get the list of messages sent to them most recently showing up in front of your eyes thanks to Recent Emails addition. Do not hesitate to enjoy all the comfort and convenience of arranging your widgets into one, two or three columns to use the available screen space to the utmost. Last but not least, get yourself exposed to the fully-featured WHMCS V8.1 compatibility of Client Profile Viewer For WHMCS 1.8.0 and a bunch of other improvements that come along!

      The full changelog impatiently waiting here to be inspected!



      2. Since last week we have also rolled out the following updates:
      Amazon EC2 For WHMCS - v1.3.1 Amazon Lightsail For WHMCS - v1.2.1 DirectAdmin Licenses For WHMCS - v1.4.3 Hosting Renewals For WHMCS - v3.2.5

      Need Custom Software Development For Your Business?
       
      Get Your Free Quote Now! Specially for you we will adapt an application and its design to your own needs, create a new module or even a completely new system built from scratch!
    • By Trle94
      Hello everyone,
      So I am currently trying to build all in one widget that will display current balance from our domain registars, enom, reseller club and so on..
      Can you please tell me is it possible and how to take api user and pw that are already placed into Domain Registrars(configureregistars.php) page.  So we have registrars already configured and API details are saved somewhere.
      Is it possible to reuse somehow in widget code that saved api details?
    • By brian!
      the idea for this widget was started in the feedback thread below, but rather than hijack that thread with this project, it was easier to start a new thread in Third Party Addons.
      this "Enhanced ToDo List" admin widget, expands on the default widget by showing client names (or Company Name), service details (name/domain) and domain names as mouseover tooltips (I could put them in the body, but then space might become an issue)...

      for those that want to use this widget, i've attached it to this post - simply upload to /modules/widgets and the next time you go to the admin homepage, it should be there (assuming your admin role allows viewing of the ToDo List).
      i've called the file "EnhancedToDo.php", so you'll end up with two ToDo widgets on your homepage, just disable the default one using the Show/Hide widgets option top right... I could have called it ToDo.php, but then the WHMCS auto-updater would have overwritten it during the next update - so it's easier to keep it separate until WHMCS improve how they handle ToDo's.

      it's written for WHMCS v7.6, but will work on v7.5.x too... it might work on earlier v7 versions, but I haven't tested it on them - there is a WHMCS version check inside the widget that chooses FontAwesome 5 icons if using v7.6 or later, or FA4 if using an earlier WHMCS version.
      if you spot any ToDo's that don't behave correctly (e.g a third-party addon might add a ToDo that doesn't follow the WHMCS convention), then feel free to reply about it (or PM me) - it shouldn't break the output, it will likely just not show the icon(s) for that ToDo.
      EnhancedToDo.php
    • By Tengri
      Hello. 
      Finally I was able to upgrade to 7.4.2! But now I have another problem. I don't know why but after the update my widgets stopped working. Not one widget doesn't work in dashboard. Not system overview (Today, month, all time), Automation Overview, Billing, Quickly search and etc. And I know about the solution by changing the admin template to Blend. This is not an option. First of all, the article is outdated. It says to change the template to Blend. Since people have already faced this problem in the latest versions. For one decision was to upgrade the system, for the other earned itself (magic!). As we all know with 6.* versions used Blend and we did not change it.
      I changed the template to V4 and voila! All widgets are working. Magic. I'm back on Blend and not working. The inspector of the browser (FF) gives the following error:
      Uncaught ReferenceError: whmcsBaseUrl is not defined scripts.min.js?v=7352cc:30 at Object.getAdminRouteUrl (scripts.min.js?v=7352cc:30) at refreshWidget (scripts.min.js?v=7352cc:1) at HTMLAnchorElement.<anonymous> (scripts.min.js?v=7352cc:31) at HTMLAnchorElement.dispatch (scripts.min.js?v=7352cc:3) at HTMLAnchorElement.g.handle (scripts.min.js?v=7352cc:2) This error does not occur in V4. 
      I hope for your wisdom. Especially the @brian! 
      Thank you!
    • By ModulesGarden
      Hello!
       
      Today we prepared for you one module update and one free widget. Both for WHMCS.
       
       
      1. Let's begin with eNom Email For WHMCS 1.2. We used the latest eNom API to implement new features and improve existing ones.
       
      Changelog - Version 1.2.0:
       

      New Feature: Manage email forwarding
      New Feature: Define Catch-All email forwarder
      New Feature: Define additional TLDs & gTLDs
      Changed: Extended TLDs list
      Changed: Improved interface at the client area

       
      Are You Interested?
      ♦ Order eNom Email For WHMCS Now!
       
      Do You Need More Information?
      ♦ Read More About eNom Email For WHMCS
       
      Are You Looking For A Complete Documentation?
      ♦ Visit eNom Email For WHMCS Wiki
       
      Do You Want Us To Install And Configure The Module For You?
      ♦ Tick 'eNom Email Installation Service' Field While Ordering The Product
       
       
       
       
      2. Now the widget. The free widget in fact.
      We already have 5000 satisfied customers and on this occasion we decided to prepare for you something extra! We developed ModulesGarden Widget For WHMCS and put 10% promo code inside it. The code is applicable to any module from our offer.
      The widget will inform you when there is ModulesGarden's module update available and will keep you up to date with the most recent news. In addition, you will gain access to special promo codes available for widget users only!
       
      Admin Area Features:
       

      View Active Promo Codes And The Most Recent News
      Check If Your Modules Are Up To Date
      Quick Redirection To Changelog Of Each Outdated Module
      Show/Hide The Latest ModulesGarden Post On Twitter

       
      Additionally:
       

      No Installation Required - Upload, Activate And Use!
      Supports WHMCS V5 and Later

       
      Why Should You Use The Widget And What About The 10% Promo Code?
      ♦ Find Out More!
       
      Do You Need More Information?
      ♦ Read More About ModulesGarden Widget For WHMCS
       
      Are You Looking For A Complete Documentation?
      ♦ Visit ModulesGarden Widget For WHMCS Wiki
       
       
       
      Coming Next:

      Release List For October-November-December

       
       
      Do You Need Custom Software Development?
      Specially for you we will adapt an application and its design to your own needs, create adequate addon, entirely new module or even a complete system!
      We can advise how to solve your problems or propose an optimal solution for your business.
       
      ♦ Contact Us Today!
       
      We will send you the quote, ETA and more details within 24-48 hours.
       
       
       
      For more information about our promotions, products and company activity visit our Forums, Blog, Facebook, Twitter, Google+ and YouTube !
       
      ♦ Forums
      ♦ Blog
      ♦ Facebook
      ♦ Twitter
      ♦ Google+
      ♦ YouTube
  • 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