Jump to content

cdeese8

Members
  • Content count

    61
  • Joined

  • Last visited

Community Reputation

0 Neutral

About cdeese8

  • Rank
    Member

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Might you know if this is still the best way to do it @brian!? Just manually add date to the actual KB Article in WHMCS admin? I logged into Adminer and checked the DB and didn't any relevant tables for "last updated" in the knowledgebase tables. I would have replied to community thread but I think it's locked / archived. https://whmcs.community/topic/252161-knowledgebase-date-article/ https://whmcs.community/topic/236225-no-knowledgebase-action-hook-available/ I was hoping to be able to automate things a bit more and make it so, when a person clicks Yes or No for the {$kbarticle.useful} {$LANG.knowledgebaseratingtext} strings in knowledgebasearticle.tpl file the site would display an updated "Last Updated" date string. Even a static last updated string would be cool if it was being tracked each time the actual article was being updated by an admin in the WHMCS side of things. But yea, was just wondering if the date can be extracted? Does the the {debug} display all available things able to used from the WHMCS database? It's usually my goto thing and if something isn't in that popup window, it has to be done with an addon / module. I'm gonna browse over the docs right now and see what I can dig up. https://developers.whmcs.com/hooks-reference/client-area-interface/#clientareapageknowledgebase https://help.whmcs.com/searches?utf8=✓&text=Knowledgebase&commit=Search i dont see anything on the https://docs.whmcs.com/Knowledgebase (or entire docs.whmcs.com domain)
  2. Excellent optimization and thanks for the clean hook. 😋 You know, it was nice to see Steven drop in here but when I see Brian... it's ALWAYS a treat! Thanks dude. It works perfectly! If you are still reading this, and happen to know the answer, what is the difference in the hook between the two snippets? use Illuminate\Database\Capsule\Manager as Capsule; use WHMCS\Database\Capsule; Is one telling Smarty to dig into the database and do a global search and the other is specifically telling Smarty to do something else? Are the two hooks a combination of PHP, Smarty and SQL language? I've never seen things like "$x=0;" and "$x++;". Thanks again!! 😎
  3. Wicked. Thanks - it works! Much appreciated Brian, have a good day...
  4. Thank you very much @steven99 - at first, i tried to create two hook files (and dupe the code and replace the keyword) but that didn't work, so i just duped what you shared, merged it into a single hook file and it magically works. Brilliant! If you have any advise or wisdom, maybe this isn't written properly... I'm all ears. Thanks again!! Now, on the knowledgebasecat.tpl page, I can use both {$kbarticle.votes} and {$kbarticle.useful} to get the extracted data I desired. <?php // written by steven99 // https://whmcs.community/topic/293372-how-do-i-make-smarty-data-load-on-kbcat-page-it-loads-on-kbarticle-page-just-fine/?do=findComment&comment=1311909 use WHMCS\Database\Capsule; add_hook('ClientAreaPageKnowledgebase', 1, function($vars) { $x=0; foreach($vars['kbarticles'] as $article) { $dbarticle = Capsule::table('tblknowledgebase')->where('id', '=', $article['id'])->first(); // get article from database since we aren't given useful here. $vars['kbarticles'][$x]['useful'] = $dbarticle->useful; // add to the array $x++; } $x=0; foreach($vars['kbarticles'] as $article) { $dbarticle = Capsule::table('tblknowledgebase')->where('id', '=', $article['id'])->first(); // get article from database since we aren't given votes here. $vars['kbarticles'][$x]['votes'] = $dbarticle->votes; // add to the array $x++; } return $vars; });
  5. How do I load data on the knowledgebasecat.tpl page? When I add {debug} to the file I can't see the specific "votes" and "useful" data being loaded. But if I add {debug} to the knowledgebasearticle.tpl I can see them being loaded. How do I get that specific smarty data / variable to pass on the cat page? {$kbarticle.votes} {$kbarticle.useful} I noticed the knowledgebasecat.tpl loads the "views" .. I just wish it also loaded the votes and useful smarty data too. Any ideas? Anything you can offer would be most helpful. Thanks,
  6. Specifically, I desire having the "Support Knowledgebase Tag Cloud" sidebar panel title minimized on page load on knowledgebasearticle.tpl and knowledgebasecat.tpl pages. May you please recommend and share some wisdom? Might you know of a hook, that will automatically make it so the sidebar <div menuitemname="Support Knowledgebase Tag Cloud" class="panel panel-sidebar panel-sidebar"> is hidden / minimized by default? Thanks in advance for whatever help you can offer.
  7. This addon might be overkill, but perhaps the Geolocation Hook For WHMCS config.php (geolocation_hook_2.0.1_whmcs\includes\Geolocation\config.php) file might be the best starting point. I can add the GeoLite2 City.mmdb and see what kind of damage I can do in a couple of hours. Maybe you know this kind of stuff just because... 😃... if you had to guess, do you think, by adding a 59 meg file to the addon will make website load speed noticeably slower? Of course! I didn't think about doing something for logged in clients but yea, you make good point about VPN. Using WHMCS 7.4.* and stock template, I thought it would be fancy for logged out clients to see something a tad-bit more welcoming. The idea is to make a landing page that converts and having a little bit extra touch of personal might help (or deter because it's creepy). Alright, gonna dig my fingers into the keyboard.. thanks for feedback
  8. May you please point me into the right direction on how I could achieve this? This is what I imagine would just magically work if I typed into a .tpl file... {if statecode = "AK"} hi people from Alaska {elseif statecode = "CO"} hi people from Colorado {else} hi everyone else... {/if} Right now I'm still doing research, here are some notes I have: * https://www.docs.modulesgarden.com/Geolocation_Hook_For_WHMCS * site:whmcs.community conditional logic geo localization * maxmind Geolocation whmcs -fraud * https://dev.maxmind.com/geoip/geoip2/geolite2/ * https://ipinfo.io/ * https://whmcs.community/topic/249129-custom-html-panel-for-specific-country/ * http://www.smarty.net/docs/en/language.function.if.tpl * https://www.smarty.net/docs/en/plugins Any wisdom you may have that can help me achieve what I desire would be awesome. Thanks! :)
  9. welcome back from your holiday vacation - hope you had a great time filled with smiles and pictures.

    :)

    https://media.giphy.com/media/BAJ7JKJKAYzzq/giphy.gif

  10. cdeese8

    How to get my WHMCS site domain? 

    Use the smarty {debug} command and when you refresh page, you'll get a pop-up window that has EVERYTHING you are looking for. Be sure to us the CTRL + F command inside that window.. THERE is alot of data.. 1.) https://www.smarty.net/docs/en/language.function.debug.tpl 2.) https://whmcs.community/topic/190113-introduction-to-whmcs-smarty-debugging-display-if-customer-or-admin-are-logged-in/ Have fun pal
  11. cdeese8

    Importing clients using API

    Try using a search operator on Google or Duckduckgo: site:whmcs.community import export client data Inside WHMCS admin area, you can uncheck / check boxes to make client data required or optional. log into whmcs admin goto general settings click other tab check boxes in Optional Client Profile Fields area
  12. cdeese8

    Get knowledgebase

    Just use what is already available and find a creative way to recycle it. There is a helpful snippet of code that is used in \templates\six\supportticketsubmit-steptwo.tpl file. <div id="autoAnswerSuggestions" class="well hidden"></div> \templates\six\js\whmcs.js and whmcs.js /** * Get automatic knowledgebase suggestions for support ticket message. */ var lastTicketMsg; function getTicketSuggestions() { var userMsg = jQuery("#inputMessage").val(); if (userMsg != lastTicketMsg && userMsg != '') { jQuery.post("submitticket.php", { action: "getkbarticles", text: userMsg }, function (data) { if (data) { jQuery("#autoAnswerSuggestions").html(data); if (!jQuery("#autoAnswerSuggestions").is(":visible")) { jQuery("#autoAnswerSuggestions").hide().removeClass('hidden').slideDown(); } } }); lastTicketMsg = userMsg; } setTimeout('getTicketSuggestions()', 3000); } Happy New year buddy...
  13. UPDATE: Using Ban Control IP Wildcards, I was able to kinda get a solution: https://docs.whmcs.com/Security/Ban_Control
  14. cdeese8

    Terminating inactive accounts from WHMCS

    Perhaps this module can help you get a step closer to automation: https://marketplace.whmcs.com/product/3322
  15. cdeese8

    WHMCS Will Not Create Website

    Maybe you should consider using Softaculous to create your desired results. They have a solid WHMCS Auto Install Module hook.
×

Important Information

By using this site, you agree to our Terms of Use & Guidelines