本文整理汇总了PHP中NewsletterControls::select方法的典型用法代码示例。如果您正苦于以下问题:PHP NewsletterControls::select方法的具体用法?PHP NewsletterControls::select怎么用?PHP NewsletterControls::select使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类NewsletterControls
的用法示例。
在下文中一共展示了NewsletterControls::select方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1:
<?php
if (empty($emails)) {
?>
<img src="http://cdn.thenewsletterplugin.com/tnp-reports-dummy-image.png" style="max-width: 100%">
<?php
} else {
?>
<div class="row">
<div class="tnp-statistics-info-box">
<p class="tnp-legend">Select Newsletter category:</p>
<?php
$controls->select('type', $type_options, 'All');
?>
<?php
$controls->button('update', __('Update Charts', 'newsletter'));
?>
</div>
</div>
<br>
<div class="row">
<div class="col-md-6">
<div class="tnp-widget">
<h3>Overview</h3>
<div class="inside">
示例2: plugins_url
</div>
<div id="tnp-body">
<form method="post" action="<?php
echo plugins_url('newsletter');
?>
/users/csv.php">
<?php
$controls->init();
?>
<table class="form-table">
<tr>
<th>Fields separator</th>
<td>
<?php
$controls->select('separator', array(';' => 'Semicolon', ',' => 'Comma', 'tab' => 'Tabulation'));
?>
<p class="description">Try to change the separator if Excel does not recognize the columns.</p>
</td>
</tr>
<tr>
<th>Limit to</th>
<td>
<?php
$controls->select('list', $lists);
?>
<p class="description">Limit to the user with that preference active</p>
</td>
</tr>
</table>
<p>
示例3: array
?>
<div class="hints">
Tags: <strong>{name}</strong> receiver name.
</div>
</td>
</tr>
<tr valign="top">
<th>Message</th>
<td>
<?php
$nc->data['editor'] == 0 ? $nc->editor('message', 20) : $nc->textarea_fixed('message', '100%', 400);
?>
<br />
<?php
$nc->select('editor', array(0 => 'Edit with visual editor', 1 => 'Edit as plain text'));
?>
<div class="hints">
Tags: <strong>{name}</strong> receiver name;
<strong>{unsubscription_url}</strong> unsubscription URL;
<strong>{token}</strong> the subscriber token; <strong>{profile_url}</strong> link to user subscription options page;
<strong>{np_aaa}</strong> user profile data named "aaa".
</div>
</td>
</tr>
<tr valign="top">
<th>To...</th>
<td>
list: <?php
$nc->select('list', $lists);
示例4: array
$controls->checkboxes_group('sex', array('f' => 'Women', 'm' => 'Men', 'n' => 'Not specified'));
?>
<div class="hints">
Leaving all gender options unselected disable this filter.
</div>
</td>
</tr>
<tr valign="top">
<th><?php
_e('Subscriber preferences', 'newsletter');
?>
</th>
<td>
Subscribers with
<?php
$controls->select('preferences_status_operator', array(0 => 'at least one preference', 1 => 'all preferences'));
?>
<?php
$controls->select('preferences_status', array(0 => 'active', 1 => 'not active'));
?>
between the selected ones below:
<?php
$controls->preferences_group('preferences', true);
?>
<div class="hints">
You can address the newsletter to subscribers who selected at least one of the options or to who
has not selected at least one of the options.
<a href="http://www.thenewsletterplugin.com/plugins/newsletter/newsletter-preferences" target="_blank">Read more about the "NOT ACTIVE" usage</a>.
</div>
示例5: array
<form method="post" enctype="multipart/form-data">
<?php
$controls->init();
?>
<table class="form-table">
<tr valign="top">
<th><?php
_e('Import Subscribers As', 'newsletter-users');
?>
</th>
<td>
<?php
$controls->select('import_as', array('C' => __('Confirmed', 'newsletter-users'), 'S' => __('Not confirmed', 'newsletter-users')));
?>
</td>
</tr>
<tr valign="top">
<th>Import mode</th>
<td>
<?php
$controls->select('mode', array('update' => 'Update', 'overwrite' => 'Overwrite', 'skip' => 'Skip'));
?>
if email is already present
<div class="hints">
<strong>Update</strong>: <?php
_e('user data will be updated, existing preferences will be left untouched and new ones will be added.', 'newsletter-users');
?>
示例6: array
<li><a href="#tabs-3">Confirmation</a></li>
<li><a href="#tabs-4">Welcome</a></li>
<li><a href="#tabs-8">Template</a></li>
<li><a href="#tabs-9">Profile</a></li>
<li><a href="#tabs-5">Unsubscription</a></li>
<li><a href="#tabs-wp">WP Registration</a></li>
<li><a href="#tabs-7">Docs</a></li>
</ul>
<div id="tabs-general">
<table class="form-table">
<tr valign="top">
<th>Opt In</th>
<td>
<?php
$controls->select('noconfirmation', array(0 => 'Double Opt In', 1 => 'Single Opt In'));
?>
<p class="description">
<strong>Double Opt In</strong> means subscribers need to confirm their email address by an activation link sent them on a activation email message.<br />
<strong>Single Opt In</strong> means subscribers do not need to confirm their email address.<br />
</p>
</td>
</tr>
<tr valign="top">
<th>Newsletter dedicated page</th>
<td>
<?php
$controls->text('url', 70);
?>
<?php
if (empty($controls->data['url'])) {
示例7:
$controls->text('email_error', 50);
?>
</td></tr>
</table>
</td>
</tr>
<tr>
<th>Name or first name</th>
<td>
<table class="newsletter-option-grid">
<tr><th>Field label</th><td><?php
$controls->text('name', 50);
?>
</td></tr>
<tr><th>When to show</th><td><?php
$controls->select('name_status', $status);
?>
</td></tr>
<tr><th>Rules</th><td><?php
$controls->select('name_rules', $rules);
?>
</td></tr>
<tr><th>Error message</th><td><?php
$controls->text('name_error', 50);
?>
</td></tr>
</table>
<p class="description">
If you want to collect only a generic "name", use only this field and not the
last name field.
</p>
示例8: table
<td>
<?php
$controls->textarea('css');
?>
<p class="description">
Add here your own css to style the forms. The whole form is enclosed in a div with class
"newsletter" and it's made with a table (guys, I know about your table less design
mission, don't blame me too much!)
</p>
</td>
</tr>
<tr valign="top">
<th>Email body content encoding</th>
<td>
<?php
$controls->select('content_transfer_encoding', array('' => 'Default', '8bit' => '8 bit', 'base64' => 'Base 64'));
?>
<p class="description">
Sometimes setting it to Base 64 solves problem with old mail servers (for example truncated or unformatted emails.
<a href="http://www.thenewsletterplugin.com/plugins/newsletter/newsletter-configuration#enconding" target="_blank">Read more here</a>.
</p>
</td>
</tr>
<tr valign="top">
<th>PHP max execution time</th>
<td>
<?php
$controls->text('php_time_limit', 10);
?>
(before write in something, <a href="http://www.thenewsletterplugin.com/plugins/newsletter/newsletter-configuration#advanced" target="_blank">read here</a>)
<p class="description">
示例9: array
</td>
</tr>
<tr valign="top">
<th>Name and email</th>
<td>
first name: <?php
$nc->text('name', 30);
?>
last name: <?php
$nc->text('surname', 30);
?>
email: <?php
$nc->text('email', 40);
?>
sex: <?php
$nc->select('sex', array('n' => 'Not specified', 'f' => 'female', 'm' => 'male'));
?>
</td>
</tr>
<tr valign="top">
<th>Status</th>
<td>
<?php
$nc->select('status', array('C' => 'Confirmed', 'S' => 'Not confirmed', 'B' => 'Bounce'));
?>
</td>
</tr>
<tr valign="top">
<th>Lists</th>
<td>
<table>
示例10: array
$controls->yesno('phpmailer');
?>
<p class="description">
Instead of using WordPress emails are sent directly by Newsletter.
This enable the textual part of newsletters and the content encoding setting.
Keep at "No" if you're using
ans SMTP plugin like Postman.
<a href=" http://www.thenewsletterplugin.com/configuration-tnin-send-email" target="_blank">Read more</a>.
</p>
</td>
</tr>
<tr valign="top">
<th>Email body content encoding</th>
<td>
<?php
$controls->select('content_transfer_encoding', array('' => 'Default', '8bit' => '8 bit', 'base64' => 'Base 64', 'binary' => 'Binary', 'quoted-printable' => 'Quoted printable', '7bit' => '7 bit'));
?>
<p class="description">
Sometimes setting it to Base 64 solves problem with old mail servers (for example truncated or unformatted emails.
<a href="http://www.thenewsletterplugin.com/plugins/newsletter/newsletter-configuration#enconding" target="_blank">Read more here</a>.
Works only with direct email sending, see the option above.
</p>
</td>
</tr>
<tr valign="top">
<th>PHP max execution time</th>
<td>
<?php
$controls->text('php_time_limit', 10);
?>
(before write in something, <a href="http://www.thenewsletterplugin.com/plugins/newsletter/newsletter-configuration#advanced" target="_blank">read here</a>)
示例11: array
</div>
<div id="tnp-body">
<form method="post" action="">
<?php
$controls->init();
?>
<table class="form-table">
<tr valign="top">
<th>Subscription on registration</th>
<td>
<?php
$controls->select('subscribe', array(0 => 'No', 1 => 'Yes, force subscription', 2 => 'Yes, show the option', 3 => 'Yes, show the option already checked'));
?>
<p class="description">
Adds a newsletter subscription option on registration.
<a href="http://www.thenewsletterplugin.com/plugins/newsletter/subscription-module#registration" target="_blank">Read more</a>
</p>
</td>
</tr>
<tr valign="top">
<th><?php
_e('Check box label', 'newsletter');
?>
</th>
<td>
<?php
$controls->text('subscribe_label', 30);
示例12: array
<h3>Massive actions</h3>
<table class="form-table">
<tr>
<th>General actions on subscribers</th>
<td>
<?php
$nc->button_confirm('remove_all', 'Delete all', 'Are you sure you want to remove ALL subscribers?');
?>
</td>
</tr>
<tr>
<th>Lists</th>
<td>
List <?php
$nc->select('list', $lists);
?>
:
<?php
$nc->button_confirm('list_add', 'Add all to it', 'Are you sure?');
?>
<?php
$nc->button_confirm('list_remove', 'Cancel all from it', 'Are you sure?');
?>
<?php
$nc->button_confirm('list_delete', 'Delete subscribers of it', 'Are you really sure you want to delete those user from your database?');
?>
<br /><br />
<?php
$nc->select('list_action', array('move' => 'Move', 'add' => 'Add'));
?>
示例13: array
<td>
<?php
$controls->preferences_group('preferences', true);
?>
<div class="hints">
Every new imported or updated subscriber will be associate with selected preferences above.
</div>
</td>
</tr>
<!--
<tr valign="top">
<th>Follow up</th>
<td>
<?php
$controls->select('followup', array('none' => 'None', 'activate' => 'Activate'));
?>
</td>
</tr>
-->
<tr valign="top">
<th>Import mode</th>
<td>
If the email is already present:
<?php
$controls->select('mode', array('update' => 'Update', 'overwrite' => 'Overwrite', 'skip' => 'Skip'));
?>
<div class="hints">
<strong>Update</strong>: the user data is updated: if a user was associated to some preferences, those associations will be
kept and the new ones added; his name is updated as well.<br />
示例14: array
$nc->yesno('no_translation');
?>
<br />
<?php
_e('The author does NOT maintain translations, so if you have a doubt about some texts, disable the translations', 'newsletter');
?>
</td>
</tr>
<tr valign="top">
<th><?php
_e('Logging', 'newsletter');
?>
</th>
<td>
<?php
$nc->select('logs', array(0 => 'None', 1 => 'Normal', 2 => 'Debug'));
?>
<br />
<?php
_e('Debug level saves user data on file system, use only to debug problems.', 'newsletter');
?>
</td>
</tr>
</table>
<p class="submit">
<?php
$nc->button('save', __('Save', 'newsletter'));
?>
</p>
</form>
</div>
示例15: array
<form method="post" action="">
<?php
$nc->init();
?>
<h3>Working mode</h3>
<div>
<p>Choose how the subscription process to your newsletter works.</p>
<table class="form-table">
<tr valign="top">
<th>Opt In</th>
<td>
<?php
$nc->select('noconfirmation', array(0 => 'Double Opt In', 1 => 'Single Opt In'));
?>
<div class="hints">
<strong>Double Opt In</strong> means subscribers need to confirm their email address by an activation link sent them on a activation email message.<br />
<strong>Single Opt In</strong> means subscribers do not need to confirm their email address.<br />
</div>
</td>
</tr>
</table>
<p class="submit">
<?php
$nc->button('save', __('Save', 'newsletter'));
?>
</p>
</div>