.pdf)
WHM Plugins
maketext() API1 and API2 calls follow the same format as maketext() calls in Perl. The first argument is the phrase you wish to create in bracket notation. Any arguments that follow are placeholder values.
maketext() API1 call, they can be either strings or variables that appear elsewhere in cPanel. For example:
<cpanel Locale="maketext('bracket notation phrase goes here [_1], [_2], [_3]',$FORM{'param_name'},"string",$CPDATA{"DNS"})">
maketext() in an API2 call's "Call Template." You may pass the following kinds of arguments to the maketext API2 call:
maketext('bracket notation phrase goes here [_1], [_2], [_3], [_4]', %, ${name}, $FORM{'variable'}, "string")
<?cp Module::function([p class="example"]maketext('bracket notation phrase goes here [_1], [_2], [_3], [_4]', %, ${name}, $FORM{'variable'}, "string")[/p], name,name) ?>
maketext('Your [_1] has been set up.', 'email');
maketext('Your [_1] has been set up.', 'database');
You should use separate and full phrases:
maketext('Your email has been set up.');
maketext('Your database has been set up.');
If there are only 2 or 3 options, you may use the "boolean" bracket notation method in order to reuse the same phrase:
maketext('Your [boolean,_1,email,database] has been set up.', 0);
maketext('Your [boolean,_1,email,database] has been set up.', 1);
Copyright © cPanel 2000–2011.