Jump to content

mohammad50

Member
  • Posts

    9
  • Joined

  • Last visited

Everything posted by mohammad50

  1. i want use getChild('') to get date array for example getChild('nextduedate') please dont offer me to edit .tpl files, because when i update whmcs, i must edit all .tpl files again for all my customer.
  2. i write a plugin to change date without changing .tpl files and it work... but finding array data arrays is very difficult in this method. add_hook('ClientAreaPageProductsServices', 1, function ($templateVariables) { /*foreach ($templateVariables as $Variables_name) { print_r($Variables_name); }*/ $date = $templateVariables['services']['0']['nextduedate'] ; $date2 = jdate( 'Y/m/d', strtotime( $date )) ; $replacements = $templateVariables['services']['0']; $convetred = array( "nextduedate" => $date2); $templateVariables['services']['0'] = array_replace($replacements, $convetred); return($templateVariables); } ); can some one help me to use folowing code to replace date ? how can i use getChild('') to get date value for example getChild('nextduedate') use WHMCS\View\Menu\Item as MenuItem; @add_hook('ClientAreaPrimaryNavbar', 1, function (MenuItem $primaryNavbar) { if (!is_null($primaryNavbar->getChild('Support'))) { $primaryNavbar->getChild('Support') ->addChild('sms_module', array( 'label' => 'sms_notification', 'uri' => 'index.php?m=sms_module', 'order' => '100', )); } });
  3. i mean i dont want. ok i prefer use php tag now, but i dont khow why whmcs dont support jalali date!
  4. i cant use {php} tag in .tpl file in version 6: http://docs.whmcs.com/Version_6_Template_Migration_Guide#.7Bphp.7D_Block_Syntax "An option was added to WHMCS 6 to enable use of the potentially dangerous {php} tag in custom templates. This option is disabled by default but can be enabled if required in Setup > General Settings > Security. We strongly encourage using hook functions over php code blocks inside of templates for backend interaction." i dont want to enable php tag... can i convert date without use of php tag in template?
  5. hi at version 5 of whmcs for converting dates from Gregorian to solar(Jalali) in viewinvoice.tpl file first i add this line at top of viewinvoice.tpl file: {php}include('jdf.php');{/php} then i replace {$datecreated} by folowing line {php}echo $shamsi = jdate("Y/m/d", strtotime($this->_tpl_vars["datecreated"]));{/php} but i cant use this method at version 6 do you have any solution for this problem ? download jdf.php link —-> http://jdf.scr.ir/download/dl.php —---------------------- code to convert Gregorian to Solar(Jalali) include('jdf.php'); $Gregorian_date = "2016/01/16"; $Gregorian_date = strtotime($Gregorian_date); $solar_date = jdate("Y/m/d", $Gregorian_date); echo $solar_date; —---------------------- thank you excuse me for my poor english
  6. hi at version 5 of whmcs for converting dates from Gregorian to solar(Jalali) in viewinvoice.tpl file first i add this line at top of viewinvoice.tpl file: {php}include('jdf.php');{/php} then i replace {$datecreated} by folowing line {php}echo $shamsi = jdate("Y/m/d", strtotime($this->_tpl_vars["datecreated"]));{/php} but i cant use this method at version 6 do you have any solution for this problem ? download jdf.php link ---> jdf.scr.ir/download/dl.php ------------------------ code to convert Gregorian to Solar(Jalali) include('jdf.php'); $Gregorian_date = "2016/01/16"; $Gregorian_date = strtotime($Gregorian_date); $solar_date = jdate("Y/m/d", $Gregorian_date); echo $solar_date; ------------------------ thank you excuse me for my poor english
  7. hi there i want to use whmcs attachment that used in support ticket in a addon module this is my code in .tpl file {if $upload} <tr> <td style="width: 150px" valign="top"><label>{$LANG.supportticketsticketattachments}</label></td> <td> <input type="file" name="attachments[]" dir="ltr" size="15" /> <br/> ({$LANG.supportticketsallowedextensions}: {$allowedfiletypes} .zip - .jpg - .gif - .png ) </td> </tr> {/if} i dont know how can i use this in my php file when form submited
  8. hi , i have a problem with this module , when i send sms for a user directly all thing work well but when i want to send sms when client change his password or a ticket opened ... sms dont send but its go to log , do you khow how can i solve this problem ? excuse me for my poor english
  9. hi how can i change admin date format to jalali ?
×
×
  • 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