Скрипт Модули WHMCS

Alex.Volk

Охотник
Регистрация
16 Мар 2012
Сообщения
380
Реакции
1.141
В темах:
Для просмотра ссылки Войди или Зарегистрируйся постим только релизы WHMCS (помощь, запросы, вопросы Запрещено)
Для просмотра ссылки Войди или Зарегистрируйся постим только модули WHMCS (помощь, запросы, вопросы Запрещено)
Для просмотра ссылки Войди или Зарегистрируйся постим запросы на модули, вопросы и прочее (задавать глупые вопросы, дублировать запросы, "хитрая набивка постов" Запрещено)

Вступает в силу 10.10.14.
P.s. moderator Aste
---

Здравствуйте,

Данная тема специально создана для модулей WHMCS, для всего остального существуют другие темы.

Ветка Для просмотра ссылки Войди или Зарегистрируйся.
Для просмотра ссылки Войди или Зарегистрируйся

Если у Вас есть запрос на какой-то модуль, пожалуйста, все запросы шлите в тему по ссылке Для просмотра ссылки Войди или Зарегистрируйся

Список всех модулей:
Для просмотра ссылки Войди или Зарегистрируйся
ISPmanager Для просмотра ссылки Войди или Зарегистрируйся
VMmanager , DCImanager Для просмотра ссылки Войди или Зарегистрируйся
Для просмотра ссылки Войди или Зарегистрируйся
Для просмотра ссылки Войди или Зарегистрируйся)
Для просмотра ссылки Войди или Зарегистрируйся
Для просмотра ссылки Войди или Зарегистрируйся
Для просмотра ссылки Войди или Зарегистрируйся
Для просмотра ссылки Войди или Зарегистрируйся
 
Последнее редактирование:
У кого то он работает ?У меня просто белый экран и выбор языка показует и все ...
если у вас версия 6, тогда поэтому белый экран

вот из за чего не работают шаблоны от 6 версии, на 5x

Smarty Templating Changes
WHMCS has gone through a number of backend changes in version 6. Included amongst them was the internal upgrade from Smarty 2 to Smarty 3.1. Most custom templates won't need any updates to be compatible with version 6, but those that used features only available in Smarty 2 will need to be migrated to ensure a smooth transition to the latest version.

The inverse of this change is also true. Custom templates made for WHMCS 6 that use Smarty 3 specific syntax are not compatible with previous versions of WHMCS.
{literal} Changes
Smarty 3's engine changes the way whitespace is interpreted in templates, removing the need for {literal} tags around "{" and "}" characters in CSS and Javascript blocks.

For example, the following Javascript from a Smarty template:

PHP:
<script type="text/javascript">
function example()
{literal}{{/literal}
alert('example');
{literal}}{/literal}
</script>

Converts to:

PHP:
<script type="text/javascript">
function example()
{
alert('example');
}
</script>

{php} 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.
Smarty 3's backwards compatibility layer defines the {php} tag as a block plugin instead of a method native to the Smarty object. Combined with Smarty's internal rewrite in version 3, some syntax available within a Smarty 2 {php} block will need small modification.

Original syntax New syntax Notes
$this $template All Smarty 3 block plugins have a $template parameter containing the current Smarty instance.
PHP:
$this->_tpl_vars $template->getVariable('variableName') or$template->getTemplateVars()
Template variables are represented bySmarty_Variable objects in Smarty 3, which have a value property.
For example, the following {php} block:

PHP:
{php}

// Retrieve a single template variable.
$myValue = $this->_tpl_vars['myVariable'];

// Loop through all template variables.
foreach ($this->_tpl_vars as $key => $value) {
echo "{$key}: {$value}";
}

// Assign a new template variable.
$this->assign('myNewVariable', 'myNewValue');

{/php}


Converts to:

PHP:
{php}

// Retrieve a single template variable.
$myValue = $template->getVariable('myVariable')->value;

// Loop through all template variables.
foreach ($template->getTemplateVars() as $key => $variable) {
echo "{$key}: {$variable->value}";
}

// The assign() method works as it did before, though it must now be
// called on the $template object instead of $this.
$template->assign('myNewVariable', 'myNewValue');

{/php}

It is also importing to note that because of these changes, PHP code blocks that close in the middle of a condition, such as the below example, are now no longer possible and result in a fatal error.

PHP:
{php}
if ($foo) {
{/php}
<div>
Lots of HTML here...
</div>
{/php}
}
{/php}

Migrating From {php} Tags To Hooks
It's a good practice to separate backend logic from display logic. In most cases a template's {php} block can be migrated to a hook file. Hooks are very useful for performing custom actions at specific points in WHMCS's page generation routines. See Для просмотра ссылки Войди или Зарегистрируйся for more information.

For instance, one can reference existing template variables or define new template variables in a PHP file in theincludes/hooks directory. Inspect and assign variables using the "ClientAreaPage" hook.
PHP:
add_hook('ClientAreaPage', 1, function($templateVariables)
{
// Look for an existing template variable.
foreach ($templateVariables as $name => $variable) {
doThings();
}

// Define new variables to send to the template.
return array(
'myCustomVariable' => 'myCustomValue',
);
});
And then reference the newly assigned variable in the template:

PHP:
<p>My custom variable value is: {$myCustomVariable}.</p>

The $client Object
All client area templates now have a $client variable that represents the currently logged in client. $client is either aWHMCS\Client\User object or null if no client is logged in. See Для просмотра ссылки Войди или Зарегистрируйся for more information on how to work with model-based objects.
PHP:
{if $client === null}
<p>Nobody is logged in. :(</p>
{else}
<p>Hello, {$client->firstName} {$client->lastName}!</p>
{/if}

может кому и пригодится) взято от сюда: Для просмотра ссылки Войди или Зарегистрируйся

вот ребят ещё насчет шаблонов 6 версии, кому надо

Для просмотра ссылки Войди или Зарегистрируйся (автор Хабрахабр)
 
Последнее редактирование модератором:
Российские модули не работают в новой версии 6? А то, я пробовал активировать 3.2, но страница только и загружается и ничего не активируется, даже оплата не проходит.
 
Российские модули не работают в новой версии 6? А то, я пробовал активировать 3.2, но страница только и загружается и ничего не активируется, даже оплата не проходит.
модули версии 3.2 у меня на 6.0.1 успешно работают
 
модули версии 3.2 у меня на 6.0.1 успешно работают
Не знаю, у меня страница загружается и загружается и никакого результата. Я то в принципе триал взял только ради языка и русских/украинских email темплейтов.
 
Не знаю, у меня страница загружается и загружается и никакого результата. Я то в принципе триал взял только ради языка и русских/украинских email темплейтов.
включите вывоод php ошибок + логи модульных команд, где то косяк в скриптах скорей всего из-за версии php либо настроек сервера(хостинга)
 
тоже не работает
 
тоже не работает
Если совсем ничего не работает - то нужно с нуля всё правильно установить, включить вывод ошибок и только потом пробовать модули на ошибки
 
Все заработало, только сам не знаю как, мне в поддержке сказали, что импортировать русские темплейты можно, имея только лицензию на whmcs ru и модули (Leased-######...), есть ли способ как-то по другому? Пробовал старые взять 1.4, но не работает.
 
Самый обычный способ - это перевести самостоятельно английские письма на русский язык . текст писем прилагаю ниже
 

Вложения

  • system_messages.txt
    16,6 KB · Просмотры: 44
а в автоматическом варианте? все вручную полгода уйдет
 
Назад
Сверху