RevenueHosting Posted December 20, 2010 Share Posted December 20, 2010 I am trying to add some extra functionality to my homepage area and would like to add the knowledgebase search form and top 5 knowledgebase articles to it. The knowledgebase.php is ioncube encoded so no luck grabbing the source from it. Does anyone know how to do this? I searched around and didn't find anything. 0 Quote Link to comment Share on other sites More sharing options...
ws4210 Posted December 20, 2010 Share Posted December 20, 2010 watching this 0 Quote Link to comment Share on other sites More sharing options...
RevenueHosting Posted December 20, 2010 Author Share Posted December 20, 2010 I found this free little script to add top knowledgebase posts to any whmcs page: http://ben90.com/2009/07/whmcs-mod-top-knowledgebase-articles-on-any-page/ I just need to figure out the search form for knowledgebase articles and I'm set. 0 Quote Link to comment Share on other sites More sharing options...
RevenueHosting Posted December 21, 2010 Author Share Posted December 21, 2010 I have been searching all day and cant find anything on this. I found a user contributed knowledgebase display page but I cannot get it to work right. Anyone have any ideas? Knowledgebase Search form on the main client page (homepage.tpl) and under it, 5 most viewed knowledgebase pages. 0 Quote Link to comment Share on other sites More sharing options...
RevenueHosting Posted December 24, 2010 Author Share Posted December 24, 2010 Is there no answers for this? I do not really need the top knowledgebase articles, just a form to be able to search them from the main homepage.tpl. Anyone? Everyone? 0 Quote Link to comment Share on other sites More sharing options...
uberhost Posted December 24, 2010 Share Posted December 24, 2010 (edited) Is there no answers for this? I do not really need the top knowledgebase articles, just a form to be able to search them from the main homepage.tpl. Anyone? Everyone? This one is easiest: <!-- KB search --> <br /> <h2>{$LANG.knowledgebasesearch} {$LANG.knowledgebasetitle}</h2> <form method="post" action="knowledgebase.php?action=search"> <p align="center"> <input type="text" name="search" size="40" /> <input type="submit" value="{$LANG.knowledgebasesearch}" /> </p> </form> <!-- /KB search --> Just paste that at the bottom of homepage.tpl. Merry Christmas, Rick & Uberhost Edited December 24, 2010 by uberhost Typo 0 Quote Link to comment Share on other sites More sharing options...
uberhost Posted December 24, 2010 Share Posted December 24, 2010 This code block is for the top 5 KB articles. I've tested this and have it running on our homepage.tpl which anyone here is welcome to take a look at by going to http://www.uberhost.com and then to the Support link. <!-- KB most popular --> <br /> <h2>Our 5 {$LANG.knowledgebasepopular} {$LANG.knowledgebasetitle} {$LANG.knowledgebasearticles}</h2> {php} $topnum = 0; $query = "SELECT * FROM tblknowledgebase ORDER BY views DESC LIMIT 0,5"; $result = mysql_query($query); while ($data = mysql_fetch_array($result)) { $topnum++; $id = $data["id"]; $title = $data["title"]; $article = $data["article"]; $views = $data["views"]; $useful = $data["useful"]; $votes = $data["votes"]; $private = $data["private"]; $parentid = $data["parentid"]; $language = $data["language"]; echo("<p><strong>".$topnum.". $title</strong><br>$article</p>"); } {/php} <!-- /KB most popular --> Merry Christmas, Rick & Uberhost 0 Quote Link to comment Share on other sites More sharing options...
RevenueHosting Posted December 24, 2010 Author Share Posted December 24, 2010 Thank you so much Rick! That worked perfectly! Merry Christmas and thanks! 0 Quote Link to comment Share on other sites More sharing options...
uberhost Posted December 24, 2010 Share Posted December 24, 2010 Thank you so much Rick! That worked perfectly! Merry Christmas and thanks! I'm truly happy to have helped! Rick 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.