Jump to content

techwthquestion

Senior Member
  • Content count

    42
  • Joined

  • Last visited

Community Reputation

0 Neutral

1 Follower

About techwthquestion

  • Rank
    Member

Recent Profile Visitors

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

  1. Hello I am not sure why I am unable to get support ticket count. Here is my code <?php use WHMCS\View\Menu\Item; use Illuminate\Database\Capsule\Manager as Capsule; add_hook('ClientAreaHomepagePanels', 1, function (Item $homePagePanels) { $clientemail = Capsule::table('tblclients') ->select('email') ->where('tblclients.id', '=', $vars['userid']) ->first(); $servername = "localhost"; $username = "XXXXX"; $password = "XXXXX;"; $dbname = "XXXXX"; // Create connection $conn = new mysqli($servername, $username, $password, $dbname); // Check connection if ($conn->connect_error) { die("Connection failed: " . $conn->connect_error); } $sql = "select * from swtickets where email = '".$clientemail->email."' order by ticketid desc limit 3"; // echo $sql;exit; $result = $conn->query($sql); while ($data = mysql_fetch_array($result)) { $tid = $data["ticketmaskid"]; $title = $data["subject"]; $department = $data["departmenttitle"]; $date = fromMySQLDate($date); $bodyhtml = '<p class="mytitleannoun"><i class="fa fa-file-text-o" aria-hidden="true" style="margin-right:15px;"></i><a style="margin-right:15px;" href="/viewticket.php?tid='.$tid.'">'.$title.'</a><span>'.$department.'</span><span>'.$tid.'</span><font color="#b3b3b3">'.$date.'</font></p>'; } $examplePanel = $homePagePanels->addChild( 'Recent Support Ticket', array( 'label' => Lang::trans('Support Ticket'), 'icon' => 'fa-example' 'bodyHtml' => $bodyhtml . '</p>' )); });
  2. techwthquestion

    sidebar hook

    Hello brian, Yes, I am using customer theme. I managed to created 2nd box with text but I am not sure how to take input from viewticket.tpl. In the viewticket.tpl file, there is a code to fetch data Ticket, Subject, status, last update. . But how can I use that in the hook? Here is my code add_hook('ClientAreaSecondarySidebar', 1, function(MenuItem $secondarySidebar) { if (APP::getCurrentFileName()=="viewticket"){ $secondarySidebar->addChild('sidebar1', array( 'label' => 'Ticket Information', 'order' => '10', 'icon' => 'fa-ticket"' )); $secondarySidebar->getChild('sidebar1') ->addChild('child1', array( 'label' => 'Department', 'uri' => 'http://www.google.com' )); $secondarySidebar->getChild('sidebar1') ->addChild('child2', array( 'label' => 'Submitted', 'uri' => 'http://www.google.com' )); $secondarySidebar->getChild('sidebar1') ->addChild('child3', array( 'label' => 'Last Updated', 'uri' => 'http://www.google.com' )); And here is the code from viewticket.tpl <h3 class="panel-title"> <i class="fas fa-pencil-alt"></i> &nbsp; {$_ticketContainer.subject} <small style="float:right;">Created: {$_ticketContainer.dateline}&nbsp;&nbsp;&nbsp;&nbsp;Updated: {$_ticketContainer.lastactivity}</small> </h3> <div class="date"> {$_ticketPost.posttitle} </div> <span class="name"> {$_ticketPost.fullname} </span> {$_ticket.department} {$_ticket.status}
  3. techwthquestion

    sidebar hook

    Hello, I want to display 2 hooks on the support pages. can I get some help with this, please?
  4. HelloI want to list a number of tickets of the customer in the admin panel Please check the attached screenshot.I guess need to create a hook to fetch data from kayako db and display that. Can some help in this task?
  5. Hello I want to display recent tickets on the client area summary page, above Client Profile text, which hook/method do i need to use?
  6. techwthquestion

    disaply client details on custom page

    Actually, I am trying to insert value of these fields in another database at the time of ticket creation. so what is the best way to do that?
  7. Hello, if I want to display below details for a user who is already logged in how can display on customerd.php page? product name domain username Password server Product ID Service ID client id These details, I want to show on our customerd.php page. (customerd.php page is the internal page for stff only)
  8. Hello, if I want to display below details for a user who is already logged in how can display on customerd.php page? product name
  9. techwthquestion

    Support pages not showing sidebar

    Something strnge happened. I enable all hooks and now I am able to get support pin box on support pages. but other boxes are missing.
  10. techwthquestion

    Support pages not showing sidebar

    I am expecting below look for support pages.
  11. techwthquestion

    Support pages not showing sidebar

    Yes. I am logged in. and sidebar is visible only for logged in users.
  12. techwthquestion

    Support pages not showing sidebar

    Done. still same result.
  13. techwthquestion

    Support pages not showing sidebar

    No. I am getting the same view in the six template.
  14. techwthquestion

    Support pages not showing sidebar

    Yes. I am able to see side bar on other pages. is there any way to add sidebar on custom pages manually?
  15. techwthquestion

    Support pages not showing sidebar

    Some more images.
×

Important Information

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