本文整理汇总了PHP中spa_paint_input函数的典型用法代码示例。如果您正苦于以下问题:PHP spa_paint_input函数的具体用法?PHP spa_paint_input怎么用?PHP spa_paint_input使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了spa_paint_input函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: spa_permissions_add_auth_form
function spa_permissions_add_auth_form()
{
?>
<script type="text/javascript">
jQuery(document).ready(function() {
spjAjaxForm('sfauthnew', '');
});
</script>
<?php
spa_paint_options_init();
$ahahURL = SFHOMEURL . 'index.php?sp_ahah=permissions-loader&sfnonce=' . wp_create_nonce('forum-ahah') . '&saveform=newauth';
?>
<form action="<?php
echo $ahahURL;
?>
" method="post" id="sfauthnew" name="sfauthnew">
<?php
echo sp_create_nonce('forum-adminform_authnew');
spa_paint_open_tab(spa_text('Permissions') . ' - ' . spa_text('Add New Authorization'), true);
spa_paint_open_panel();
spa_paint_open_fieldset(spa_text('Add New Authorization'), 'true', 'create-new-authorization');
?>
<br /><div class="sfoptionerror">
<?php
spa_etext('Please note, this will create a new singular authorization.');
?>
<?php
spa_etext('However, by default, it will not be used by anything in core.');
?>
<?php
spa_etext('This authorization could be used for a profile authorization or by a theme or plugin.');
?>
<?php
spa_etext('Please see the popup help for more information.');
?>
</div><br />
<?php
spa_paint_input(spa_text('Authorization name'), 'auth_name', '');
spa_paint_input(spa_text('Authorization description'), 'auth_desc', '');
spa_paint_checkbox(spa_text('Activate authorization'), 'auth_active', true);
spa_paint_checkbox(spa_text('Authorization is ignored for guests'), 'auth_guests', false);
spa_paint_checkbox(spa_text('Authorization requires enabling (recommend false'), 'auth_enabling', false);
spa_paint_close_fieldset();
spa_paint_close_panel();
do_action('sph_perm_add_auth_panel');
spa_paint_close_container();
?>
<div class="sfform-submit-bar">
<input type="submit" class="button-primary" id="saveit" name="saveit" value="<?php
spa_etext('Create New Authorization');
?>
" />
</div>
<?php
spa_paint_close_tab();
?>
</form>
<div class="sfform-panel-spacer"></div>
<?php
}
示例2: spa_options_email_form
function spa_options_email_form()
{
?>
<script type="text/javascript">
jQuery(document).ready(function() {
spjAjaxForm('sfemailform', '');
});
</script>
<?php
$sfoptions = spa_get_email_data();
$ahahURL = SFHOMEURL . 'index.php?sp_ahah=options-loader&sfnonce=' . wp_create_nonce('forum-ahah') . '&saveform=email';
?>
<form action="<?php
echo $ahahURL;
?>
" method="post" id="sfemailform" name="sfemail">
<?php
echo sp_create_nonce('forum-adminform_email');
spa_paint_options_init();
#== EMAIL Tab ============================================================
spa_paint_open_tab(spa_text('Options') . ' - ' . spa_text('Email Settings'));
spa_paint_open_panel();
spa_paint_open_fieldset(spa_text('New User Email'), true, 'new-user-email');
spa_paint_checkbox(spa_text('Use the Simple:Press new user email version'), 'sfusespfreg', $sfoptions['sfusespfreg']);
echo '<p><strong>' . spa_text('The following placeholders are available: %USERNAME%, %BLOGNAME%, %SITEURL%, %LOGINURL%, %PWURL%') . '</strong></p>';
spa_paint_input(spa_text('Email subject line'), 'sfnewusersubject', $sfoptions['sfnewusersubject'], false, true);
spa_paint_wide_textarea(spa_text('Email message (no html)'), 'sfnewusertext', $sfoptions['sfnewusertext'], $submessage = '', 4);
spa_paint_close_fieldset();
spa_paint_close_panel();
do_action('sph_options_email_left_panel');
spa_paint_tab_right_cell();
spa_paint_open_panel();
spa_paint_open_fieldset(spa_text('Email Address Settings'), true, 'email-address-settings');
spa_paint_checkbox(spa_text('Use the following email settings'), 'sfmailuse', $sfoptions['sfmailuse']);
spa_paint_input(spa_text('The senders name'), 'sfmailsender', $sfoptions['sfmailsender'], false, false);
spa_paint_input(spa_text('The email from name'), 'sfmailfrom', $sfoptions['sfmailfrom'], false, false);
spa_paint_input(spa_text('The email domain name'), 'sfmaildomain', $sfoptions['sfmaildomain'], false, false);
spa_paint_close_fieldset();
spa_paint_close_panel();
do_action('sph_options_email_right_panel');
spa_paint_close_container();
?>
<div class="sfform-submit-bar">
<input type="submit" class="button-primary" id="saveit" name="saveit" value="<?php
spa_etext('Update Email Options');
?>
" />
</div>
<?php
spa_paint_close_tab();
?>
</form>
<?php
}
示例3: spa_toolbox_toolbox_form
function spa_toolbox_toolbox_form()
{
?>
<script type="text/javascript">
jQuery(document).ready(function() {
spjAjaxForm('sftoolboxform', '');
});
</script>
<?php
$sfoptions = spa_get_toolbox_data();
$ahahURL = SFHOMEURL . 'index.php?sp_ahah=toolbox-loader&sfnonce=' . wp_create_nonce('forum-ahah') . '&saveform=toolbox';
?>
<form action="<?php
echo $ahahURL;
?>
" method="post" id="sftoolboxform" name="sftoolbox">
<?php
echo sp_create_nonce('forum-adminform_toolbox');
spa_paint_options_init();
#== TOOLBOX Tab ============================================================
spa_paint_open_tab(spa_text('Toolbox') . ' - ' . spa_text('Toolbox'));
spa_paint_open_panel();
spa_paint_open_fieldset(spa_text('Current Version/Build'), false);
$version = spa_text('Version:') . ' <strong>' . sp_get_option('sfversion') . '</strong>';
$build = spa_text('Build: ') . ' <strong>' . sp_get_option('sfbuild') . '</strong>';
echo $version . ' ' . $build;
spa_paint_close_fieldset();
spa_paint_close_panel();
do_action('sph_toolbox_toolbox_left_panel');
spa_paint_tab_right_cell();
spa_paint_open_panel();
spa_paint_open_fieldset(spa_text('Modify Build Number'), true, 'modify-build-number');
echo '<div class="sfoptionerror">' . spa_text('WARNING: This value should not be changed unless requested by the Simple:Press team in the support forum as it may cause the install/upgrade script to be re-run.') . '</div>';
spa_paint_input(spa_text('Build number'), "sfbuild", sp_get_option('sfbuild'), false, false);
spa_paint_checkbox(spa_text('Force upgrade to build number'), "sfforceupgrade", $sfoptions['sfforceupgrade']);
spa_paint_close_fieldset();
spa_paint_close_panel();
do_action('sph_toolbox_toolbox_right_panel');
spa_paint_close_container();
?>
<div class="sfform-submit-bar">
<input type="submit" class="button-primary" id="saveit" name="saveit" value="<?php
spa_etext('Update Toolbox');
?>
" />
</div>
<?php
spa_paint_close_tab();
?>
</form>
<?php
}
示例4: spa_usergroups_create_usergroup_form
function spa_usergroups_create_usergroup_form()
{
global $spPaths;
?>
<script type="text/javascript">
jQuery(document).ready(function() {
spjAjaxForm('sfusergroupnew', 'sfreloadub');
});
</script>
<?php
spa_paint_options_init();
$ahahURL = SFHOMEURL . 'index.php?sp_ahah=usergroups-loader&sfnonce=' . wp_create_nonce('forum-ahah') . '&saveform=newusergroup';
?>
<form action="<?php
echo $ahahURL;
?>
" method="post" id="sfusergroupnew" name="sfusergroupnew">
<?php
echo sp_create_nonce('forum-adminform_usergroupnew');
spa_paint_open_tab(spa_text('User Groups') . ' - ' . spa_text('Create New User Group'), true);
spa_paint_open_panel();
spa_paint_open_fieldset(spa_text('Edit User Group'), 'true', 'edit-user-group');
spa_paint_input(spa_text('User Group Name'), 'usergroup_name', '', false, true);
spa_paint_input(spa_text('User Group Description'), 'usergroup_desc', '', false, true);
spa_paint_select_start(spa_text('Select Badge'), 'usergroup_badge', 'usergroup_badge');
spa_select_icon_dropdown('usergroup_badge', spa_text('Select Badge'), SF_STORE_DIR . '/' . $spPaths['ranks'] . '/', '', false);
spa_paint_select_end('<small>(' . spa_text('Upload badges on the Components - Forum Ranks admin panel') . ')</small>');
spa_paint_checkbox(spa_text('Allow members to join usergroup'), 'usergroup_join', false, false, false, false, '<small>' . spa_text('(Indicates that members are allowed to choose to join this usergroup on their profile page)') . '</small>');
spa_paint_checkbox(spa_text('Is moderator'), 'usergroup_is_moderator', false, false, false, false, '<small>' . spa_text('(Indicates that members of this usergroup are considered Moderators)') . '</small>');
spa_paint_close_fieldset();
spa_paint_close_panel();
do_action('sph_usergroup_create_panel');
spa_paint_close_container();
?>
<div class="sfform-submit-bar">
<input type="submit" class="button-primary" id="saveit" name="saveit" value="<?php
spa_etext('Create New User Group');
?>
" />
</div>
</form>
<?php
spa_paint_close_tab();
?>
<div class="sfform-panel-spacer"></div>
<?php
}
示例5: sp_featured_admin_options_form
function sp_featured_admin_options_form()
{
$meta = sp_get_sfmeta('featured', 'topics');
$topics = implode(',', $meta[0]['meta_value']);
$meta = sp_get_sfmeta('featured', 'posts');
$posts = implode(',', $meta[0]['meta_value']);
spa_paint_options_init();
spa_paint_open_tab(__('Featured Topics and Posts Plugin', 'sp-featured'), true);
spa_paint_open_panel();
spa_paint_open_fieldset(__('Featured Topics and Posts Options', 'sp-featured'), true, 'featured-lists');
spa_paint_input(__('List of featured topic IDs', 'sp-featured'), 'topic_list', sp_filter_title_display($topics));
spa_paint_input(__('List of featured post IDs', 'sp-featured'), 'post_list', sp_filter_title_display($posts));
spa_paint_close_fieldset();
spa_paint_close_panel();
spa_paint_close_container();
}
示例6: spa_integration_page_form
function spa_integration_page_form()
{
?>
<script type="text/javascript">
jQuery(document).ready(function() {
spjAjaxForm('wppageform', 'sfreloadpp');
});
</script>
<?php
$sfoptions = spa_get_integration_page_data();
$ahahURL = SFHOMEURL . 'index.php?sp_ahah=integration-loader&sfnonce=' . wp_create_nonce('forum-ahah') . '&saveform=page';
?>
<form action="<?php
echo $ahahURL;
?>
" method="post" id="wppageform" name="wppage">
<?php
echo sp_create_nonce('forum-adminform_integration');
spa_paint_options_init();
spa_paint_open_tab(spa_text('Integration') . ' - ' . spa_text('Page and Permalink'), true);
spa_paint_open_panel();
spa_paint_open_fieldset(spa_text('WP Forum Page Details'), true, 'forum-page-details');
if ($sfoptions['sfpage'] == 0) {
echo '<tr><td colspan="2"><div class="sfoptionerror">' . spa_text('ERROR: The page slug is either missing or incorrect. The forum will not display until this is corrected') . '</div></td></tr>';
}
spa_paint_select_start(spa_text('Select the WP Page to be used to display your forum'), 'slug', 'slug');
echo spa_create_page_select($sfoptions['sfpage']);
spa_paint_select_end();
spa_paint_close_fieldset();
if ($sfoptions['sfpage'] != 0) {
$title = spdb_table(SFWPPOSTS, 'ID=' . $sfoptions['sfpage'], 'post_title');
$template = spdb_table(SFWPPOSTMETA, "meta_key='_wp_page_template' AND post_id=" . $sfoptions['sfpage'], 'meta_value');
spa_paint_open_fieldset(spa_text('Current WP Forum Page'), false);
echo '<table class="form-table"><tr>';
echo '<th>' . spa_text('Forum page ID') . '</th>';
echo '<th>' . spa_text('Page title') . '</th>';
echo '<th>' . spa_text('Page template') . '</th>';
echo '</tr>';
echo '<tr>';
echo '<td class="sflabel">' . $sfoptions['sfpage'] . '</td>';
echo '<td class="sflabel">' . $title . '</td>';
echo '<td class="sflabel">' . $template . '</td>';
echo '</tr></table>';
spa_paint_close_fieldset();
spa_paint_open_fieldset(spa_text('Update Forum Permalink'), true, 'forum-permalink');
echo '<p class="sublabel">' . spa_text('Current permalink') . ':<br /></p><div class="subhead" id="adminupresult"><p>' . $sfoptions['sfpermalink'] . '</p></div><br />';
spa_paint_update_permalink();
spa_paint_close_fieldset();
}
spa_paint_close_panel();
spa_paint_close_tab();
spa_paint_spacer();
spa_paint_open_tab(spa_text('Integration') . ' - ' . spa_text('WordPress and WordPress Theme'), false);
spa_paint_open_panel();
spa_paint_open_fieldset(spa_text('Integration Options'), true, 'integration-options');
spa_paint_checkbox(spa_text('Filter WP list pages'), 'sfwplistpages', $sfoptions['sfwplistpages']);
spa_paint_checkbox(spa_text('Load javascript in footer'), 'sfscriptfoot', $sfoptions['sfscriptfoot']);
spa_paint_checkbox(spa_text('Force the strict use of the WP API'), 'sfuseob', $sfoptions['sfuseob']);
spa_paint_checkbox(spa_text('Run the wptexturize formatting on post content'), 'spwptexturize', $sfoptions['spwptexturize']);
spa_paint_close_fieldset();
spa_paint_close_panel();
spa_paint_tab_right_cell();
spa_paint_open_panel();
spa_paint_open_fieldset(spa_text('Theme Display Options'), true, 'theme-options');
spa_paint_checkbox(spa_text('Limit forum display to within WP loop'), 'sfinloop', $sfoptions['sfinloop']);
spa_paint_checkbox(spa_text('Allow multiple loading of forum content'), 'sfmultiplecontent', $sfoptions['sfmultiplecontent']);
spa_paint_input(spa_text('Compensate (in pixels) for fixed WP theme header'), 'spheaderspace', $sfoptions['spheaderspace'], false, false);
spa_paint_checkbox(spa_text('Bypass wp_head action complete requirement'), 'sfwpheadbypass', $sfoptions['sfwpheadbypass']);
spa_paint_close_fieldset();
spa_paint_close_panel();
do_action('sph_integration_panel');
spa_paint_close_container();
?>
<div class="sfform-submit-bar">
<input type="submit" class="button-primary" id="saveit" name="saveit" value="<?php
spa_etext('Update WP Integration');
?>
" />
</div>
<?php
spa_paint_close_tab();
?>
</form>
<?php
}
示例7: spa_permissions_edit_permission_form
function spa_permissions_edit_permission_form($role_id)
{
global $spGlobals;
?>
<script type="text/javascript">
jQuery(document).ready(function() {
jQuery('#rolerow-<?php
echo $role_id;
?>
').addClass('inForm');
spjAjaxForm('sfroleedit<?php
echo $role_id;
?>
', 'sfreloadpb');
jQuery(function(jQuery){vtip();})
});
</script>
<?php
# Get correct tooltips file
$lang = spa_get_language_code();
if (empty($lang)) {
$lang = 'en';
}
$ttpath = SPHELP . 'admin/tooltips/admin-permissions-tips-' . $lang . '.php';
if (file_exists($ttpath) == false) {
$ttpath = SPHELP . 'admin/tooltips/admin-permissions-tips-en.php';
}
if (file_exists($ttpath)) {
include_once $ttpath;
}
$role = spa_get_role_row($role_id);
spa_paint_options_init();
$ahahURL = SFHOMEURL . 'index.php?sp_ahah=permissions-loader&sfnonce=' . wp_create_nonce('forum-ahah') . '&saveform=editperm';
?>
<form action="<?php
echo $ahahURL;
?>
" method="post" id="sfroleedit<?php
echo $role->role_id;
?>
" name="sfroleedit<?php
echo $role->role_id;
?>
">
<?php
echo sp_create_nonce('forum-adminform_roleedit');
spa_paint_open_tab(spa_text('Permissions') . ' - ' . spa_text('Manage Permissions'), true);
spa_paint_open_panel();
spa_paint_open_fieldset(spa_text('Edit Permission'), 'true', 'edit-master-permission-set');
?>
<input type="hidden" name="role_id" value="<?php
echo $role->role_id;
?>
" />
<?php
spa_paint_input(spa_text('Permission Set Name'), 'role_name', sp_filter_title_display($role->role_name), false, true);
spa_paint_input(spa_text('Permission Set Description'), 'role_desc', sp_filter_title_display($role->role_desc), false, true);
?>
<br /><p><strong><?php
spa_etext("Permission Set Actions");
?>
:</strong></p>
<?php
echo '<p><img src="' . SFADMINIMAGES . 'sp_GuestPerm.png" alt="" width="16" height="16" align="top" />';
echo '<small> ' . spa_text('Note: Action settings displaying this icon will be ignored for Guest Users') . '</small><br />';
echo '<img src="' . SFADMINIMAGES . 'sp_GlobalPerm.png" alt="" width="16" height="16" align="top" />';
echo '<small> ' . spa_text('Note: Action settings displaying this icon require enabling to use') . '</small><br />';
echo '<img src="' . SFADMINIMAGES . 'sp_Warning.png" alt="" width="16" height="16" align="top" />';
echo '<small> ' . spa_text('Note: Action settings displaying this icon should be used with great care') . '</small></p>';
sp_build_site_auths_cache();
$sql = 'SELECT auth_id, auth_name, auth_cat, authcat_name, warning FROM ' . SFAUTHS . '
JOIN ' . SFAUTHCATS . ' ON ' . SFAUTHS . '.auth_cat = ' . SFAUTHCATS . '.authcat_id
WHERE active = 1
ORDER BY auth_cat, auth_id';
$authlist = spdb_select('set', $sql);
$role_auths = maybe_unserialize($role->role_auths);
$firstitem = true;
$category = '';
?>
<!-- OPEN OUTER CONTAINER DIV -->
<div class="outershell" style="width: 100%;">
<?php
foreach ($authlist as $a) {
if ($category != $a->authcat_name) {
$category = $a->authcat_name;
if (!$firstitem) {
?>
<!-- CLOSE DOWN THE ENDS -->
</table></div>
<?php
}
?>
<!-- OPEN NEW INNER DIV -->
<div class="innershell">
<!-- NEW INNER DETAIL TABLE -->
<table width="100%" border="0">
<tr><td colspan="2" class="permhead"><?php
spa_etext($category);
?>
</td></tr>
//.........这里部分代码省略.........
示例8: spa_options_content_form
function spa_options_content_form()
{
?>
<script type="text/javascript">
jQuery(document).ready(function() {
spjAjaxForm('sfcontentform', '');
});
</script>
<?php
$sfoptions = spa_get_content_data();
$ahahURL = SFHOMEURL . 'index.php?sp_ahah=options-loader&sfnonce=' . wp_create_nonce('forum-ahah') . '&saveform=content';
?>
<form action="<?php
echo $ahahURL;
?>
" method="post" id="sfcontentform" name="sfcontent">
<?php
echo sp_create_nonce('forum-adminform_content');
spa_paint_options_init();
#== POSTS Tab ============================================================
spa_paint_open_tab(spa_text('Options') . ' - ' . spa_text('Content Settings'));
spa_paint_open_panel();
spa_paint_open_fieldset(spa_text('Date/Time Formatting'), true, 'date-time-formatting');
spa_paint_input(spa_text('Date display format'), 'sfdates', $sfoptions['sfdates']);
spa_paint_input(spa_text('Time display format'), 'sftimes', $sfoptions['sftimes']);
spa_paint_link('http://codex.wordpress.org/Formatting_Date_and_Time', spa_text('Date/Time help'));
$tz = get_option('timezone_string');
if (empty($tz)) {
$tz = spa_text('Unknown');
}
echo ' ' . spa_text('Server timezone set to') . ': ' . $tz;
spa_paint_close_fieldset();
spa_paint_close_panel();
spa_paint_open_panel();
spa_paint_open_fieldset(spa_text('Image Enlargement'), true, 'image-enlarging');
spa_paint_checkbox(spa_text('Use popup image enlargement'), 'sfimgenlarge', $sfoptions['sfimgenlarge']);
spa_paint_checkbox(spa_text('Constrain popup enlargement to current window size'), 'constrain', $sfoptions['constrain']);
spa_paint_checkbox(spa_text('Always use image thumbnails'), 'process', $sfoptions['process']);
spa_paint_input(spa_text('Thumbnail width of images in posts (Minimum 100px)'), 'sfthumbsize', $sfoptions['sfthumbsize']);
spa_paint_select_start(spa_text('Default image style'), 'style', 'style');
echo spa_create_imagestyle_select($sfoptions['style']);
spa_paint_select_end();
spa_paint_checkbox(spa_text('Force paragraph after an image to start new line'), 'forceclear', $sfoptions['forceclear']);
spa_paint_close_fieldset();
spa_paint_close_panel();
spa_paint_open_panel();
spa_paint_open_fieldset(spa_text('Smileys'), true, 'smileys');
spa_paint_input(spa_text('Maximum smileys allowed in post (0 = unlimited)'), 'sfmaxsmileys', $sfoptions['sfmaxsmileys']);
spa_paint_close_fieldset();
spa_paint_close_panel();
spa_paint_open_panel();
spa_paint_open_fieldset(spa_text('Spam Posts'), true, 'spam-post');
spa_paint_checkbox(spa_text('Refuse duplicate post made by member'), 'sfdupemember', $sfoptions['sfdupemember']);
spa_paint_checkbox(spa_text('Refuse duplicate post made by guest'), 'sfdupeguest', $sfoptions['sfdupeguest']);
spa_paint_close_fieldset();
spa_paint_close_panel();
do_action('sph_options_content_left_panel');
spa_paint_tab_right_cell();
spa_paint_open_panel();
spa_paint_open_fieldset(spa_text('Additional Filtering'), true, 'additional-filters');
spa_paint_checkbox(spa_text('Filter out HTML pre tags'), 'sffilterpre', $sfoptions['sffilterpre']);
spa_paint_close_fieldset();
spa_paint_close_panel();
spa_paint_open_panel();
spa_paint_open_fieldset(spa_text('Post Links Filtering'), true, 'post-links-filtering');
spa_paint_input(spa_text('Maximum links allowed in post (0 = unlimited)'), 'sfmaxlinks', $sfoptions['sfmaxlinks']);
spa_paint_checkbox(spa_text('Add nofollow to links'), 'sfnofollow', $sfoptions['sfnofollow']);
spa_paint_checkbox(spa_text('Open links in new tab/window'), 'sftarget', $sfoptions['sftarget']);
spa_paint_input(spa_text('URL shortening limit (0 = not shortened)'), 'sfurlchars', $sfoptions['sfurlchars']);
$submessage = spa_text("If post viewer doesn't have view links permission, this custom message will be displayed instead");
spa_paint_textarea(spa_text('Hidden links custom message'), 'sfnolinksmsg', $sfoptions['sfnolinksmsg'], $submessage, 3);
spa_paint_close_fieldset();
spa_paint_close_panel();
spa_paint_open_panel();
spa_paint_open_fieldset(spa_text('Shortcodes Filtering'), true, 'shortcode-filters');
spa_paint_checkbox(spa_text('Filter WP shortcodes (if disabled ALL WP shortcodes will be passed)'), 'sffiltershortcodes', $sfoptions['sffiltershortcodes']);
$submessage = spa_text('Enter allowed WP shortcodes (if filtering enabled above) - one shortcode per line.');
spa_paint_textarea(spa_text('Allowed WP shortcodes in posts'), 'sfshortcodes', $sfoptions['sfshortcodes'], $submessage, 3);
spa_paint_close_fieldset();
spa_paint_close_panel();
do_action('sph_options_content_right_panel');
spa_paint_close_container();
?>
<div class="sfform-submit-bar">
<input type="submit" class="button-primary" id="saveit" name="saveit" value="<?php
spa_etext('Update Content Options');
?>
" />
</div>
<?php
spa_paint_close_tab();
?>
</form>
<?php
}
示例9: spa_toolbox_cron_form
//.........这里部分代码省略.........
?>
</td>
<td data-label='<?php
spa_etext('Next Run (timestamp)');
?>
'><?php
echo $time;
?>
</td>
<td data-label='<?php
spa_etext('Schedule');
?>
'>
<?php
if ($item['schedule']) {
echo $cronData->schedules[$item['schedule']]['display'];
} else {
spa_etext('One Time');
}
?>
</td>
<td data-label='<?php
spa_etext('Hook');
?>
'>
<?php
$sph = strncmp('sph_', $hook, 4);
if ($sph === 0) {
echo '<b>';
}
echo $hook;
if ($sph === 0) {
echo '</b>';
}
?>
</td>
<td data-label='<?php
spa_etext('Arguments');
?>
'>
<?php
if (count($item['args']) > 0) {
foreach ($item['args'] as $arg => $value) {
echo $arg . ':' . $value . '<br />';
}
} else {
echo ' ';
}
?>
</td>
</tr>
<?php
$class = strpos($class, 'alternate') === false ? 'class="spMobileTableData alternate"' : 'class="spMobileTableData"';
}
}
}
?>
</tbody>
</table>
<?php
spa_paint_close_fieldset();
spa_paint_close_panel();
do_action('sph_toolbox_top_cron_panel');
spa_paint_close_container();
echo '<div class="sfform-panel-spacer"></div>';
spa_paint_close_tab();
spa_paint_open_tab(spa_text('Toolbox') . ' - ' . spa_text('CRON Update'));
spa_paint_open_panel();
spa_paint_open_fieldset(spa_text('Add CRON'), true, 'cron-add');
spa_paint_input(spa_text('Next Run Timestamp'), 'add-timestamp', '');
spa_paint_input(spa_text('Interval'), 'add-interval', '');
spa_paint_input(spa_text('Hook'), 'add-hook', '');
spa_paint_input(spa_text('Arguments'), 'add-args', '');
spa_paint_close_fieldset();
spa_paint_open_fieldset(spa_text('Run CRON'), true, 'cron-run');
spa_paint_input(spa_text('Hook to run'), 'run-hook', '');
spa_paint_close_fieldset();
spa_paint_close_panel();
do_action('sph_toolbox_left_cron_panel');
spa_paint_tab_right_cell();
spa_paint_open_panel();
spa_paint_open_fieldset(spa_text('Delete CRON'), true, 'cron-delete');
spa_paint_input(spa_text('Next Run Timestamp'), 'del-timestamp', '');
spa_paint_input(spa_text('Hook'), 'del-hook', '');
spa_paint_input(spa_text('Arguments'), 'del-args', '');
spa_paint_close_fieldset();
spa_paint_close_panel();
do_action('sph_toolbox_right_cron_panel');
spa_paint_close_container();
?>
<div class="sfform-submit-bar">
<input type="submit" class="button-primary" id="saveit" name="saveit" value="<?php
spa_etext('Update CRON');
?>
" />
</div>
</form>
<?php
spa_paint_close_tab();
}
示例10: spa_profiles_avatars_form
//.........这里部分代码省略.........
?>
</p>');
} else if (response==="exists") {
jQuery('#sf-upload-status').html('<p class="sf-upload-status-fail"><?php
echo esc_js(spa_text('Sorry, the file already exists!'));
?>
</p>');
} else {
jQuery('#sf-upload-status').html('<p class="sf-upload-status-fail"><?php
echo esc_js(spa_text('Error uploading file!!'));
?>
</p>');
}
}
});
});
</script>
<?php
$sfoptions = spa_get_avatars_data();
$ahahURL = SFHOMEURL . 'index.php?sp_ahah=profiles-loader&sfnonce=' . wp_create_nonce('forum-ahah') . '&saveform=avatars';
?>
<form action="<?php
echo $ahahURL;
?>
" method="post" id="sfavatarsform" name="sfavatars">
<?php
echo sp_create_nonce('forum-adminform_avatars');
spa_paint_options_init();
#== PROFILE OPTIONS Tab ============================================================
spa_paint_open_tab(spa_text('Profiles') . ' - ' . spa_text('Avatars'));
spa_paint_open_panel();
spa_paint_open_fieldset(spa_text('Avatar Options'), true, 'avatar-options');
spa_paint_checkbox(spa_text('Display avatars'), 'sfshowavatars', $sfoptions['sfshowavatars']);
spa_paint_input(spa_text('Maximum avatar display width (pixels)'), 'sfavatarsize', $sfoptions['sfavatarsize'], false, false);
spa_paint_checkbox(spa_text('Enable avatar uploading'), 'sfavataruploads', $sfoptions['sfavataruploads']);
spa_paint_input(spa_text('Maximum avatar upload file size (bytes)'), 'sfavatarfilesize', $sfoptions['sfavatarfilesize'], false, false);
spa_paint_checkbox(spa_text('Auo resize avatar uploads'), 'sfavatarresize', $sfoptions['sfavatarresize']);
spa_paint_input(spa_text('Uploaded avatar resize quality (if resizing)'), 'sfavatarresizequality', $sfoptions['sfavatarresizequality'], false, false);
spa_paint_checkbox(spa_text('Enable avatar pool selection'), 'sfavatarpool', $sfoptions['sfavatarpool']);
spa_paint_checkbox(spa_text('Enable remote avatars'), 'sfavatarremote', $sfoptions['sfavatarremote']);
$values = array(spa_text('G - Suitable for all'), spa_text('PG- Suitable for 13 and above'), spa_text('R - Suitable for 17 and above'), spa_text('X - Suitable for all adults'));
spa_paint_radiogroup(spa_text('Gravatar max rating'), 'sfgmaxrating', $values, $sfoptions['sfgmaxrating'], false, true);
spa_paint_checkbox(spa_text('Replace WP avatar with SP avatar'), 'sfavatarreplace', $sfoptions['sfavatarreplace']);
echo '<br /><div class="sfoptionerror">';
spa_etext('Warning: If you want to replace WP avatars with SP avatars, make sure you dont have WP avatars in your avatar priorities (have it below SP Default Avatars) or you will have a circular reference');
echo '</div><br />';
spa_paint_close_fieldset();
spa_paint_close_panel();
do_action('sph_profiles_avatar_left_panel');
spa_paint_tab_right_cell();
spa_paint_open_panel();
spa_paint_open_fieldset(spa_text('Avatar Priorities'), true, 'avatar-priorities');
spa_etext('Select the avatar dislay priority order by dragging and dropping the buttons below. The top of the list is the highest priority order. When an avatar is found for the current priority, it is used. If none is found, the next priority is checked and so on. An SP Default Avatar will always be found. Any avatar after the SP Default Avatar is essentially ignored');
echo '<div>';
echo '<ul id="sfavataroptions" class="menu">';
$list = array(0 => spa_text('Gravatars'), 1 => spa_text('WP Avatars'), 2 => spa_text('Uploaded Avatar'), 3 => spa_text('SP Default Avatars'), 4 => spa_text('Avatar Pool'), 5 => spa_text('Remote Avatar'));
if ($sfoptions['sfavatarpriority']) {
foreach ($sfoptions['sfavatarpriority'] as $priority) {
echo '<li id="aitem_' . $priority . '" class="menu-item menu-item-depth-0"><span class="item-name">' . $list[$priority] . '</span></li>';
}
}
echo '</ul>';
echo '<input type="text" class="inline_edit" size="70" id="sfavataropts" name="sfavataropts" />';
echo '</div>';
spa_paint_close_fieldset();
spa_paint_close_panel();
示例11: spa_forums_edit_group_form
function spa_forums_edit_group_form($group_id)
{
?>
<script type="text/javascript">
jQuery(document).ready(function() {
jQuery('#grouprow-<?php
echo $group_id;
?>
').addClass('inForm');
spjAjaxForm('sfgroupedit<?php
echo $group_id;
?>
', 'sfreloadfb');
});
</script>
<?php
global $spPaths;
$group = $group = spdb_table(SFGROUPS, "group_id={$group_id}", 'row');
spa_paint_options_init();
$ahahURL = SFHOMEURL . 'index.php?sp_ahah=forums-loader&sfnonce=' . wp_create_nonce('forum-ahah') . '&saveform=editgroup';
?>
<form action="<?php
echo $ahahURL;
?>
" method="post" id="sfgroupedit<?php
echo $group->group_id;
?>
" name="sfgroupedit<?php
echo $group->group_id;
?>
">
<?php
echo sp_create_nonce('forum-adminform_groupedit');
spa_paint_open_tab(spa_text('Forums') . ' - ' . spa_text('Manage Groups and Forums'), false);
spa_paint_open_panel();
spa_paint_open_fieldset(spa_text('Edit Group'), 'true', 'edit-forum-group');
?>
<input type="hidden" name="group_id" value="<?php
echo $group->group_id;
?>
" />
<input type="hidden" name="cgroup_name" value="<?php
echo sp_filter_title_display($group->group_name);
?>
" />
<input type="hidden" name="cgroup_desc" value="<?php
echo sp_filter_text_edit($group->group_desc);
?>
" />
<input type="hidden" name="cgroup_seq" value="<?php
echo $group->group_seq;
?>
" />
<input type="hidden" name="cgroup_icon" value="<?php
echo esc_attr($group->group_icon);
?>
" />
<input type="hidden" name="cgroup_rss" value="<?php
echo $group->group_rss;
?>
" />
<input type="hidden" name="cgroup_message" value="<?php
echo sp_filter_text_edit($group->group_message);
?>
" />
<?php
spa_paint_input(spa_text('Group Name'), 'group_name', sp_filter_title_display($group->group_name), false, true);
spa_paint_input(spa_text('Description'), 'group_desc', sp_filter_text_edit($group->group_desc), false, true);
spa_paint_select_start(spa_text('Select Custom Icon'), 'group_icon', '');
spa_select_icon_dropdown('group_icon', spa_text('Select Custom Icon'), SF_STORE_DIR . '/' . $spPaths['custom-icons'] . '/', $group->group_icon, false);
spa_paint_select_end();
spa_paint_input(spa_text('Replacement external RSS URL') . '<br />' . spa_text('Default') . ': <strong>' . sp_get_sfqurl(sp_build_url('', '', 0, 0, 0, 1)) . 'group=' . $group->group_id . '</strong>', 'group_rss', sp_filter_url_display($group->group_rss), false, true);
spa_paint_wide_textarea('Special group message to be displayed above forums', 'group_message', sp_filter_text_edit($group->group_message));
do_action('sph_forums_edit_group_panel');
spa_paint_close_fieldset();
echo '<div class="sfoptionerror spaceabove">';
echo sprintf(sp_text('To re-order your Groups, Forums and SubForums use the %s Order Groups and Forums %s option from the Forums Menu'), '<b>', '</b>');
echo '</div>';
spa_paint_close_panel();
spa_paint_tab_right_cell();
spa_paint_open_panel();
spa_paint_open_fieldset(spa_text('Default User Group Permissions'), false);
echo '<strong>' . spa_text('Set default usergroup permission sets for this group') . '</strong><br />';
echo spa_text('Note - This will not will add or modify any current permissions. It is only a default setting for future forums created in this group. Existing default usergroup settings will be shown in the drop down menus');
# Permissions
$usergroups = spa_get_usergroups_all();
$roles = sp_get_all_roles();
foreach ($usergroups as $usergroup) {
echo '<input type="hidden" name="usergroup_id[]" value="' . $usergroup->usergroup_id . '" />';
spa_paint_select_start(sp_filter_title_display($usergroup->usergroup_name), 'role[]', '');
$defrole = spa_get_defpermissions_role($group->group_id, $usergroup->usergroup_id);
if ($defrole == -1 || $defrole == '') {
echo '<option value="-1">' . spa_text('Select permission set') . '</option>';
}
foreach ($roles as $role) {
$selected = '';
if ($defrole == $role->role_id) {
$selected = 'selected="selected" ';
}
echo '<option ' . $selected . 'value="' . $role->role_id . '">' . sp_filter_title_display($role->role_name) . '</option>' . "\n";
//.........这里部分代码省略.........
示例12: spa_paint_custom_smileys
function spa_paint_custom_smileys()
{
global $spPaths, $tab;
$scount = -1;
# load smiles from sfmeta
$filelist = array();
$meta = sp_get_sfmeta('smileys', 'smileys');
$smeta = $meta[0]['meta_value'];
# Open forum-smileys folder and get cntents for matching
$path = SF_STORE_DIR . '/' . $spPaths['smileys'] . '/';
$dlist = @opendir($path);
if (!$dlist) {
echo '<table><tr><td class="sflabel"><strong>' . spa_text('The forum-smileys folder does not exist') . '</strong></td></tr></table>';
return;
}
# start the table display
echo '<table id="sfsmileytable" class="wp-list-table widefat">';
$row = 0;
# gather the file data
while (false !== ($file = readdir($dlist))) {
$path_info = pathinfo($path . $file);
$ext = strtolower($path_info['extension']);
if ($file != '.' && $file != '..' && ($ext == 'jpg' || $ext == 'jpeg' || $ext == 'png' || $ext == 'gif' || $ext == 'bmp')) {
$filelist[] = $file;
}
}
# now to sort them if required
$newfiles = count($filelist) + 1;
$sortlist = array();
if ($filelist) {
foreach ($filelist as $file) {
$found = false;
if ($meta[0]['meta_value']) {
foreach ($meta[0]['meta_value'] as $name => $info) {
if ($info[0] == $file) {
$found = true;
break;
}
}
}
if ($found) {
if (isset($info[3])) {
$sortlist[$info[3]] = $file;
} else {
$sortlist[] = $file;
}
} else {
$sortlist[$newfiles] = $file;
$newfiles++;
}
}
ksort($sortlist);
}
if ($sortlist) {
foreach ($sortlist as $file) {
$found = false;
echo '<tr id="smiley' . $row . '">';
$row++;
if ($meta[0]['meta_value']) {
foreach ($meta[0]['meta_value'] as $name => $info) {
if ($info[0] == $file) {
$found = true;
break;
}
}
}
if (!$found) {
$sname = str_replace('.', '_', $file);
$code = str_replace('.', '_', $file);
$in_use = false;
$break = false;
} else {
$code = stripslashes($info[1]);
$sname = $name;
$in_use = $info[2];
$break = isset($info[4]) ? $info[4] : false;
}
$scount++;
# drag handle cell
echo '<td class="dragHandle" style="text-align:center;width:2%">';
echo '<img class="spSmiley" src="' . SFSMILEYS . $file . '" alt="" />';
echo '</td>';
# image and file name and inout fields
echo '<td class="wp-core-ui">';
spa_paint_open_fieldset($file, false);
echo '<input type="hidden" name="smfile[]" value="' . $file . '" />';
spa_paint_input(spa_text('Name'), 'smname[]', $sname, false, true);
spa_paint_input(spa_text('Code'), 'smcode[]', $code, false, true);
spa_paint_checkbox(spa_text('Break Smileys Row in Editor Display'), "smbreak-{$sname}", $break);
spa_paint_checkbox(spa_text('Allow Use of this Smiley'), "sminuse-{$sname}", $in_use);
spa_paint_close_fieldset();
echo '</td>';
echo '<td style="text-align: left;vertical-align: middle;margin:0;padding:0 4px 0 0;width:3%">';
$site = esc_url(SFHOMEURL . 'index.php?sp_ahah=components&sfnonce=' . wp_create_nonce('forum-ahah') . "&action=delsmiley&file={$file}");
echo '<img src="' . SFCOMMONIMAGES . 'delete.png" title="' . spa_text('Delete Smiley') . '" alt="" onclick="spjDelRow(\'' . $site . '\', \'smiley' . ($row - 1) . '\');" />';
echo '</td>';
echo '</tr>';
}
}
echo '</table>';
//.........这里部分代码省略.........
示例13: spa_profiles_options_form
function spa_profiles_options_form()
{
?>
<script type="text/javascript">
spjAjaxForm('sfoptionsform', '');
</script>
<?php
$sfoptions = spa_get_options_data();
$ahahURL = SFHOMEURL . 'index.php?sp_ahah=profiles-loader&sfnonce=' . wp_create_nonce('forum-ahah') . '&saveform=options';
?>
<form action="<?php
echo $ahahURL;
?>
" method="post" id="sfoptionsform" name="sfoptions">
<?php
echo sp_create_nonce('forum-adminform_options');
spa_paint_options_init();
#== PROFILE OPTIONS Tab ============================================================
spa_paint_open_tab(spa_text('Profiles') . ' - ' . spa_text('Profile Options'));
spa_paint_open_panel();
spa_paint_open_fieldset(spa_text('Display Name Format'), true, 'display-name-format');
spa_paint_checkbox(spa_text('Let member choose display name'), 'nameformat', $sfoptions['nameformat']);
spa_paint_select_start(spa_text('Display name format if member cannot choose') . '<br />' . spa_text('(ignored if member allowed to choose)'), 'fixeddisplayformat', 'fixeddisplayformat');
echo spa_display_name_format_options($sfoptions['fixeddisplayformat']);
spa_paint_select_end();
echo '<tr><td colspan="2"><br /><div class="sfoptionerror">';
spa_etext('Warning: If you change the display name format, it may take some time on a large number of users to update them to the new format. Please be patient.');
echo '</div><br />';
echo '</td></tr>';
spa_paint_close_fieldset();
spa_paint_close_panel();
spa_paint_open_panel();
spa_paint_open_fieldset(spa_text('Personal Photos'), true, 'personal-photos');
spa_paint_input(spa_text('Maximum number of photos allowed'), 'photosmax', $sfoptions['photosmax'], false, false);
spa_paint_input(spa_text('Maximum pixel width of photo display'), 'photoswidth', $sfoptions['photoswidth'], false, false);
spa_paint_input(spa_text('Maximum pixel height of photo display'), 'photosheight', $sfoptions['photosheight'], false, false);
spa_paint_close_fieldset();
spa_paint_close_panel();
spa_paint_open_panel();
spa_paint_open_fieldset(spa_text('Signature Image Size'), true, 'sig-images');
echo '<tr><td colspan="2"> <u>' . spa_text('If you are allowing signature images (zero = not limited)') . ':</u></td></tr>';
spa_paint_input(spa_text('Maximum signature width (pixels)'), 'sfsigwidth', $sfoptions['sfsigwidth']);
spa_paint_input(spa_text('Maximum signature height (pixels)'), 'sfsigheight', $sfoptions['sfsigheight']);
spa_paint_close_fieldset();
spa_paint_close_panel();
spa_paint_open_panel();
spa_paint_open_fieldset(spa_text('First Forum Visit'), true, 'first-forum-visit');
spa_paint_checkbox(spa_text('Display profile form on login'), 'firstvisit', $sfoptions['firstvisit']);
$show_password_fields = apply_filters('show_password_fields', true);
if ($show_password_fields) {
spa_paint_checkbox(spa_text('Force password change'), 'forcepw', $sfoptions['forcepw']);
}
spa_paint_close_fieldset();
spa_paint_close_panel();
do_action('sph_profiles_options_left_panel');
spa_paint_tab_right_cell();
spa_paint_open_panel();
spa_paint_open_fieldset(spa_text('Display Profile Mode'), true, 'display-profile-mode');
$values = array(spa_text('Popup window'), spa_text('Forum profile page'), spa_text('BuddyPress profile'), spa_text('WordPress author page'), spa_text('Other page'), spa_text('Mingle profile'));
spa_paint_radiogroup(spa_text('Display profile information in'), 'displaymode', $values, $sfoptions['displaymode'], false, true);
spa_paint_input(spa_text('URL for Other page'), 'displaypage', sp_filter_url_display($sfoptions['displaypage']), false, true);
spa_paint_input(spa_text('Query String Variable Name'), 'displayquery', sp_filter_title_display($sfoptions['displayquery']), false, true);
spa_paint_close_fieldset();
spa_paint_close_panel();
spa_paint_open_panel();
spa_paint_open_fieldset(spa_text('Profile Entry Form Mode'), true, 'profile-entry-form-mode');
$values = array(spa_text('Forum profile form'), spa_text('WordPress profile form'), spa_text('BuddyPress profile'), spa_text('Other form'), spa_text('Mingle profile'));
spa_paint_radiogroup(spa_text('Enter profile information In'), 'formmode', $values, $sfoptions['formmode'], false, true);
spa_paint_input(spa_text('URL for Other page'), 'formpage', sp_filter_url_display($sfoptions['formpage']), false, true);
spa_paint_input(spa_text('Query string variable name'), 'formquery', sp_filter_title_display($sfoptions['formquery']), false, true);
spa_paint_close_fieldset();
spa_paint_close_panel();
spa_paint_open_panel();
spa_paint_open_fieldset(spa_text('Profile Overview Message'), true, 'profile-message');
$submessage = spa_text('Text you enter here will be displayed to the User on their profile overview page');
spa_paint_wide_textarea(spa_text('Profile overview message'), 'sfprofiletext', sp_filter_text_edit($sfoptions['sfprofiletext']), $submessage);
spa_paint_close_fieldset();
spa_paint_close_panel();
do_action('sph_profiles_options_right_panel');
spa_paint_close_container();
?>
<div class="sfform-submit-bar">
<input type="submit" class="button-primary" id="saveit" name="saveit" value="<?php
spa_etext('Update Profile Options');
?>
" />
</div>
</form>
<?php
spa_paint_close_tab();
}
示例14: spa_forums_create_group_form
function spa_forums_create_group_form()
{
?>
<script type="text/javascript">
jQuery(document).ready(function() {
spjAjaxForm('sfgroupnew', 'sfreloadfb');
});
</script>
<?php
global $spPaths;
spa_paint_options_init();
$ahahURL = SFHOMEURL . 'index.php?sp_ahah=forums-loader&sfnonce=' . wp_create_nonce('forum-ahah') . '&saveform=creategroup';
?>
<form action="<?php
echo $ahahURL;
?>
" method="post" id="sfgroupnew" name="sfgroupnew">
<?php
echo sp_create_nonce('forum-adminform_groupnew');
spa_paint_open_tab(spa_text('Forums') . ' - ' . spa_text('Create New Group'), false);
spa_paint_open_panel();
spa_paint_open_fieldset(spa_text('Create New Group'), 'true', 'create-new-forum-group');
spa_paint_input(spa_text('Group Name'), 'group_name', '', false, true);
spa_paint_input(spa_text('Description'), 'group_desc', '', false, true);
spa_paint_select_start(spa_text('Select Custom Icon'), 'group_icon', '');
spa_select_icon_dropdown('group_icon', spa_text('Select Custom Icon'), SF_STORE_DIR . '/' . $spPaths['custom-icons'] . '/', '', false);
spa_paint_select_end();
spa_paint_wide_textarea('Special group message to be displayed above forums', 'group_message', '');
do_action('sph_forums_create_group_panel');
spa_paint_close_fieldset();
echo '<div class="sfoptionerror spaceabove">';
echo sprintf(sp_text('To re-order your Groups, Forums and SubForums use the %s Order Groups and Forums %s option from the Forums Menu'), '<b>', '</b>');
echo '</div>';
spa_paint_close_panel();
spa_paint_tab_right_cell();
spa_paint_open_panel();
spa_paint_open_fieldset(spa_text('Default User Group Permissions'), false);
echo '<strong>' . spa_text('Set default usergroup permission sets for this group') . '</strong><br />';
echo spa_text('Note - This will not add or modify any current permissions. It is only a default setting for future forums created in this group.');
# Permissions
$usergroups = spa_get_usergroups_all();
$roles = sp_get_all_roles();
foreach ($usergroups as $usergroup) {
echo '<input type="hidden" name="usergroup_id[]" value="' . $usergroup->usergroup_id . '" />';
spa_paint_select_start(sp_filter_title_display($usergroup->usergroup_name), 'role[]', '');
echo '<option value="-1">' . spa_text('Select permission set') . '</option>';
foreach ($roles as $role) {
echo '<option value="' . $role->role_id . '">' . sp_filter_title_display($role->role_name) . '</option>' . "\n";
}
spa_paint_select_end();
}
spa_paint_close_fieldset();
spa_paint_close_panel();
spa_paint_close_container();
?>
<div class="sfform-submit-bar">
<input type="submit" class="button-primary" id="saveit" name="saveit" value="<?php
spa_etext('Create New Group');
?>
" />
</div>
</form>
<?php
spa_paint_close_tab();
?>
<div class="sfform-panel-spacer"></div>
<?php
}
示例15: spa_forums_create_forum_form
function spa_forums_create_forum_form()
{
?>
<script type="text/javascript">
jQuery(document).ready(function() {
spjAjaxForm('sfforumnew', 'sfreloadfb');
});
</script>
<?php
global $spPaths, $tab;
spa_paint_options_init();
$ahahURL = SFHOMEURL . 'index.php?sp_ahah=forums-loader&sfnonce=' . wp_create_nonce('forum-ahah') . '&saveform=createforum';
?>
<form action="<?php
echo $ahahURL;
?>
" method="post" id="sfforumnew" name="sfforumnew">
<?php
echo sp_create_nonce('forum-adminform_forumnew');
spa_paint_open_tab(spa_text('Forums') . ' - ' . spa_text('Create New Forum'), true);
spa_paint_open_panel();
spa_paint_open_fieldset(spa_text('Create New Forum'), 'true', 'create-new-forum');
# check there are groups before proceeding
if (spdb_count(SFGROUPS) == 0) {
echo '<br /><div class="sfoptionerror">';
spa_etext('There are no groups defined');
echo '<br />' . spa_text('Create new group');
echo '</div><br />';
spa_paint_close_fieldset();
spa_paint_close_panel();
spa_paint_close_container();
spa_paint_close_tab();
echo '</form>';
return;
}
# Select the forum type first
echo "<div class='sp-form-row'>\n";
echo "<div class='wp-core-ui sflabel sp-label-40'>" . spa_text('What type of forum are you creating') . ":</div>\n";
echo "<div class='wp-core-ui sp-radio'>";
echo '<input type="radio" name="forumtype" id="sfradio1" tabindex="' . $tab . '" value="1" checked="checked" onchange="spjSetForumOptions(\'forum\');" />' . "\n";
echo '<label for="sfradio1" class="wp-core-ui">' . spa_text('Standard Forum') . '</label><br>' . "\n";
$tab++;
# check there are forums before offering subforum creation!
if (spdb_count(SFFORUMS) != 0) {
echo '<input type="radio" name="forumtype" id="sfradio2" tabindex="' . $tab . '" value="2" onchange="spjSetForumOptions(\'subforum\');" />' . "\n";
echo '<label for="sfradio2" class="wp-core-ui">' . spa_text('Sub or child forum') . '</label>' . "\n";
$tab++;
}
echo '</div><div class="clearboth"></div></div>';
# Now display the two select box options
$ahahURL = SFHOMEURL . 'index.php?sp_ahah=forums&sfnonce=' . wp_create_nonce('forum-ahah');
$target = 'fseq';
echo '<div id="groupselect" style="display:block;">';
echo "<div class='sp-form-row'>\n";
echo "<div class='wp-core-ui sflabel sp-label-40'>" . spa_text('Select group new forum will belong to') . ":</div>\n";
echo '<select class="wp-core-ui sp-input-60" tabindex="' . $tab . '" name="group_id" onchange="spjSetForumSequence();">';
echo spa_create_group_select(0, 1);
echo "</select>\n";
echo '<div class="clearboth"></div>';
echo '</div>';
$tab++;
echo '</div>';
echo '<div id="forumselect" style="display:none;">';
echo "<div class='sp-form-row'>\n";
echo "<div class='wp-core-ui sflabel sp-label-40'>" . spa_text('Select forum new subforum will belong to') . ":</div>\n";
echo '<select class="wp-core-ui sp-input-60" tabindex="' . $tab . '" name="forum_id" onchange="spjSetForumSequence();">';
echo sp_render_group_forum_select(false, false, false, true);
echo "</select>\n";
echo '<div class="clearboth"></div>';
echo '</div>';
$tab++;
echo '</div>';
spa_paint_close_fieldset();
spa_paint_close_panel();
spa_paint_close_container();
echo '<div class="sfform-panel-spacer"></div>';
spa_paint_close_tab();
echo '<div class="sfform-panel-spacer"></div>';
echo '<div class="sfhidden" id="block1">';
spa_paint_open_nohead_tab(false);
spa_paint_open_panel();
spa_paint_open_fieldset(spa_text('Forum Details'), false);
$target = 'thisforumslug';
$ahahURL = SFHOMEURL . 'index.php?sp_ahah=forums&sfnonce=' . wp_create_nonce('forum-ahah');
# forum name and slug
echo "<div class='sp-form-row'>";
echo "<div class='wp-core-ui sflabel sp-label-40'>" . spa_text('Forum Name') . ':</div>';
echo '<input type="text" class="wp-core-ui sp-input-60" tabindex="' . $tab . '" name="forum_name" value="" onchange="spjSetForumSlug(this, \'' . $ahahURL . '\', \'' . $target . '\', \'new\');" />';
echo '<div class="clearboth"></div>';
echo '</div>';
$tab++;
echo "<div class='sp-form-row'>\n";
echo "<div class='wp-core-ui sflabel sp-label-40'>" . spa_text('Forum slug') . ":</div>";
echo '<input type="text" class="wp-core-ui sp-input-60" tabindex="' . $tab . '" name="thisforumslug" id="thisforumslug" value="" disabled="disabled" onchange="spjSetForumSlug(this, \'' . $ahahURL . '\', \'' . $target . '\', \'new\');" />';
echo '<div class="clearboth"></div>';
echo '</div>';
$tab++;
spa_paint_input(spa_text('Description'), 'forum_desc', '', false, true);
spa_paint_checkbox(spa_text('Locked'), 'forum_status', 0);
spa_paint_checkbox(spa_text('Disable forum RSS feed so feed will not be generated'), 'forum_private', 0);
//.........这里部分代码省略.........