-
Content count
61 -
Joined
-
Last visited
Community Reputation
0 NeutralAbout cdeese8

-
Rank
Member
Recent Profile Visitors
The recent visitors block is disabled and is not being shown to other users.
-
knowledgebase article date - is there an available hook yet?
cdeese8 posted a topic in Developer Corner
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)- 1 reply
-
- date
- kb article date
-
(and 1 more)
Tagged with:
-
How do I make smarty data load on kbcat page? It loads on kbarticle page just fine...
cdeese8 replied to cdeese8's topic in Developer Corner
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!! 😎 -
How do I default minimize sidebar panel title on page load?
cdeese8 replied to cdeese8's topic in Developer Corner
Wicked. Thanks - it works! Much appreciated Brian, have a good day...- 2 replies
-
- sidebar
- minimize sidebar
-
(and 2 more)
Tagged with:
-
How do I make smarty data load on kbcat page? It loads on kbarticle page just fine...
cdeese8 replied to cdeese8's topic in Developer Corner
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; }); -
How do I make smarty data load on kbcat page? It loads on kbarticle page just fine...
cdeese8 posted a topic in Developer Corner
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, -
How do I default minimize sidebar panel title on page load?
cdeese8 posted a topic in Developer Corner
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.- 2 replies
-
- sidebar
- minimize sidebar
-
(and 2 more)
Tagged with:
-
Smarty snippet / addon (or similar) to display Geo Targeted Content for State
cdeese8 replied to cdeese8's topic in Developer Corner
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 -
Smarty snippet / addon (or similar) to display Geo Targeted Content for State
cdeese8 posted a topic in Developer Corner
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! :) -
welcome back from your holiday vacation - hope you had a great time filled with smiles and pictures.
:)
-
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
-
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
-
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...
-
Admin Hook to insert option to Ban IP and Delete selected Support Tickets(s)
cdeese8 replied to cdeese8's topic in Developer Corner
UPDATE: Using Ban Control IP Wildcards, I was able to kinda get a solution: https://docs.whmcs.com/Security/Ban_Control -
Terminating inactive accounts from WHMCS
cdeese8 replied to GoogieHost's topic in Troubleshooting Issues
Perhaps this module can help you get a step closer to automation: https://marketplace.whmcs.com/product/3322 -
Maybe you should consider using Softaculous to create your desired results. They have a solid WHMCS Auto Install Module hook.