Jump to content

leemahoney3

Member
  • Content Count

    28
  • Joined

  • Last visited

  • Days Won

    1

leemahoney3 last won the day on August 11

leemahoney3 had the most liked content!

Community Reputation

1 Neutral

About leemahoney3

  • Rank
    Junior Member

Recent Profile Visitors

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

  1. Ah, I meant if they open it from the client area by accessing the submitticket.php page directly when not logged in. If its happening to tickets that are opened via email, then I have no clue and that does not sound like normal behavior.
  2. They can view the ticket after opening it, if they had opened the ticket asking for account information for example and a support agent replies, they would see it. They could also potentially request a change on the clients account, e.g. cancel a service etc..
  3. I don't think its just you, happens in our place also. If the client doesn't sign in and just inputs their email, the system treats them as a guest as anyone really can type in an email and try impersonate a client.
  4. Do you allow people open support tickets without being logged in? Likely that's what's happening.
  5. Hi there, In six its a little different, however the code is still in the header.tpl file. Change {if $loggedin} <li> <a href="#" data-toggle="popover" id="accountNotifications" data-placement="bottom"> {$LANG.notifications} {if count($clientAlerts) > 0} <span class="label label-info">{lang key='notificationsnew'}</span> {/if} <b class="caret"></b> </a> <div id="accountNotificationsContent" class="hidden"> <ul class="client-alerts"> {foreach $clientAlerts as $alert} <li> <a href="{$alert->getLink()}"> <i class="fas fa-fw fa-{if $alert->getSeverity() == 'danger'}exclamation-circle{elseif $alert->getSeverity() == 'warning'}exclamation-triangle{elseif $alert->getSeverity() == 'info'}info-circle{else}check-circle{/if}"></i> <div class="message">{$alert->getMessage()}</div> </a> </li> {foreachelse} <li class="none"> {$LANG.notificationsnone} </li> {/foreach} </ul> </div> </li> <li class="primary-action"> <a href="{$WEB_ROOT}/logout.php" class="btn"> {$LANG.clientareanavlogout} </a> </li> {else} <li> <a href="{$WEB_ROOT}/clientarea.php">{$LANG.login}</a> </li> {if $condlinks.allowClientRegistration} <li> <a href="{$WEB_ROOT}/register.php">{$LANG.register}</a> </li> {/if} <li class="primary-action"> <a href="{$WEB_ROOT}/cart.php?a=view" class="btn"> {$LANG.viewcart} </a> </li> {/if} To {if $loggedin} <li class="primary-action"> <a href="{$WEB_ROOT}/logout.php" class="btn"> {$LANG.clientareanavlogout} </a> </li> {else} <li> <a href="{$WEB_ROOT}/clientarea.php">{$LANG.login}</a> </li> {if $condlinks.allowClientRegistration} <li> <a href="{$WEB_ROOT}/register.php">{$LANG.register}</a> </li> {/if} <li class="primary-action"> <a href="{$WEB_ROOT}/cart.php?a=view" class="btn"> {$LANG.viewcart} </a> </li> {/if} Excuse the formatting, its messed up in the code blocks and I cant seem to fix it!
  6. Hey there, Are you using the twenty-one theme? If so, you can remove the following code from the header.tpl file located in the /templates/twenty-one/ directory. <button type="button" class="btn" data-toggle="popover" id="accountNotifications" data-placement="bottom"> <i class="far fa-flag"></i> {if count($clientAlerts) > 0} {count($clientAlerts)} <span class="d-none d-sm-inline">{lang key='notifications'}</span> {else} <span class="d-sm-none">0</span> <span class="d-none d-sm-inline">{lang key='nonotifications'}</span> {/if} </button> <div id="accountNotificationsContent" class="w-hidden"> <ul class="client-alerts"> {foreach $clientAlerts as $alert} <li> <a href="{$alert->getLink()}"> <i class="fas fa-fw fa-{if $alert->getSeverity() == 'danger'}exclamation-circle{elseif $alert->getSeverity() == 'warning'}exclamation-triangle{elseif $alert->getSeverity() == 'info'}info-circle{else}check-circle{/if}"></i> <div class="message">{$alert->getMessage()}</div> </a> </li> {foreachelse} <li class="none"> {lang key='notificationsnone'} </li> {/foreach} </ul> </div>
  7. You'd need to set up a LEMP stack or use some sort of control panel that ships with Nginx, plenty of guides on Google (e.g. https://www.linuxcapable.com/how-to-install-lemp-stack-on-debian-11-bullseye/) WHMCS was designed to work with Apache, however that does not mean it will not work with Nginx, just that you will need to make some configuration changes especially if you use the fancy urls as Nginx doesn't read .htaccess files. Take a look at https://hostup.org/blog/whmcs-friendly-urls-configuration-for-nginx/ for more information. Whatever you do, ensure you deny access to your vendor folder location ^~ /vendor/ { deny all; return 403; }
  8. I'd be inclined to think the lara theme is causing that, or perhaps another hook or module. If you switch to the default theme and try, does the same behavior occur with the dropdown?
  9. Don't believe so, not natively anyways unless there is an addon module for it. Looks to be a feature request, though I wouldn't hold my breath as the feature request was made 9 years ago... https://requests.whmcs.com/idea/billing-term-change
  10. Sorry, I meant if you remove the following from your configuredomains.tpl file, does the same issue occur {if $smarty.session.cart.domains.{$num}.type eq "transfer"}This is a transfer!!!!!{elseif $smarty.session.cart.domains.{$num}.type eq "register"}This is a new registration!!!{/if} If so, do you have any other custom code in that template or any other modules or hooks that may be conflicting with the security policy? Perhaps you may need to add more variables to the security policy such as $smarty_security_policy = [ 'system' => [ 'enabled_special_smarty_vars' => [ 'session', 'cookies', 'server' ] ] ]; You may need to play around with it, more details can be found at https://docs.whmcs.com/Smarty_Security_Policy
  11. Do you have any other addon modules or hooks that might influence the status? I've just tested the code on another install and can confirm it works. I'd suggest playing around with the hooks, especially the set_ticket_status_after_reply function to see if you can get it to work for your environment.
  12. Strange, its working for me. Can you change # Update the status of the ticket localAPI('UpdateTicket', [ 'ticketid' => $vars['ticketid'], 'status' => $status ]); To # Update the status of the ticket Capsule::table('tbltickets')->where('id', $vars['ticketid'])->update([ 'status' => $status ]); And try again? I've not used the Lara theme but can't really see how it would affect it.
  13. Hi Snake, I've just posted a solution in your other thread which should hopefully work.
  14. Hi Snake, So the following hooks should work, can add them all to one hook file in the /includes/hooks/ folder. Bit messy but don't see any other way to do this as sessions don't carry between hooks and theres no way to grab the previous status in the TicketAdminReply hook which is incredibly annoying. <?php use WHMCS\Database\Capsule; # Need to store the current status in the database function store_current_ticket_status($vars) { # Create custom database table if it does not already exist. if (!Capsule::schema()->hasTable('mod_keepticketstatus')) { try { Capsule::schema()->create('mod_keepticketstatus', function ($table) { $table->increments('id'); $table->string('ticketid'); $table->string('status'); }); } catch(\Exception $e) { logActivity("Unable to create table 'mod_keepticketstatus', the following error was returned: {$e->getMessage()}"); } } # Grab current ticket details $ticket = Capsule::table('tbltickets')->where('id', $vars['ticketid'])->first(); # Insert them into the custom table (or update if the entry is already there) Capsule::table('mod_keepticketstatus')->updateOrInsert([ 'ticketid' => $ticket->id ], [ 'status' => $ticket->status ]); } # Retrieve the current status from the database function set_ticket_status_after_reply($vars) { # Grab ticket details $ticket = Capsule::table('tbltickets')->where('id', $vars['ticketid'])->first(); # Check custom table to see if entry exists $custom = Capsule::table('mod_keepticketstatus')->where('ticketid', $ticket->id)->first(); # If it exists then use the status stored in the database, otherwise revert to the default of 'Answered' if ($custom) { $status = $custom->status; } else { $status = 'Answered'; } # Update the status of the ticket localAPI('UpdateTicket', [ 'ticketid' => $vars['ticketid'], 'status' => $status ]); } # If the status is manually changed by an admin, ensure it is updated in the custom table also function set_custom_ticket_status_on_change($vars) { # Insert them into the custom table (or update if the entry is already there) Capsule::table('mod_keepticketstatus')->updateOrInsert([ 'ticketid' => $vars['ticketid'] ], [ 'status' => $vars['status'] ]); } # If the ticket is deleted, ensure the entry is removed from the database to keep the table clean function remove_custom_ticket_status_on_delete($vars) { Capsule::table('mod_keepticketstatus')->where('ticketid', $vars['ticketId'])->delete(); } add_hook('AdminAreaViewTicketPage', 1, 'store_current_ticket_status'); add_hook('TicketAdminReply', 1, 'set_ticket_status_after_reply'); add_hook('TicketStatusChange', 1, 'set_custom_ticket_status_on_change'); add_hook('TicketDelete', 1, 'remove_custom_ticket_status_on_delete');
  15. Strange, if you remove your code from the smarty template, does the white screen remain? What version of WHMCS are you running?
×
×
  • 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