function build_admin_user_search_results($search, $offset, $limit) { global $USER, $THEME; $wantedparams = array('query', 'f', 'l', 'sortby', 'sortdir', 'loggedin', 'loggedindate', 'duplicateemail', 'institution'); $params = array(); foreach ($search as $k => $v) { if (!in_array($k, $wantedparams)) { continue; } if (!empty($v)) { $params[] = $k . '=' . $v; } } $searchurl = get_config('wwwroot') . 'admin/users/search.php?' . join('&', $params) . '&limit=' . $limit; $results = get_admin_user_search_results($search, $offset, $limit); $pagination = build_pagination(array('id' => 'admin_usersearch_pagination', 'class' => 'center', 'url' => $searchurl, 'count' => $results['count'], 'setlimit' => true, 'limit' => $limit, 'jumplinks' => 8, 'numbersincludeprevnext' => 2, 'offset' => $offset, 'datatable' => 'searchresults', 'searchresultsheading' => 'resultsheading', 'jsonscript' => 'admin/users/search.json.php')); $cols = array('icon' => array('template' => 'admin/users/searchiconcolumn.tpl', 'class' => 'center', 'accessible' => get_string('profileicon')), 'firstname' => array('name' => get_string('firstname'), 'sort' => true, 'template' => 'admin/users/searchfirstnamecolumn.tpl'), 'lastname' => array('name' => get_string('lastname'), 'sort' => true, 'template' => 'admin/users/searchlastnamecolumn.tpl'), 'preferredname' => array('name' => get_string('displayname'), 'sort' => true), 'username' => array('name' => get_string('username'), 'sort' => true, 'template' => 'admin/users/searchusernamecolumn.tpl'), 'email' => array('name' => get_string('email'), 'sort' => true)); if ($search->duplicateemail) { $cols['email'] = array('name' => get_string('emails'), 'sort' => true, 'help' => true, 'helplink' => get_help_icon('core', 'admin', 'usersearch', 'email'), 'template' => 'admin/users/searchemailcolumn.tpl'); } $institutions = get_records_assoc('institution', '', '', '', 'name,displayname'); if (count($institutions) > 1) { $cols['institution'] = array('name' => get_string('institution'), 'sort' => false, 'template' => 'admin/users/searchinstitutioncolumn.tpl'); } $cols['authname'] = array('name' => get_string('authentication'), 'sort' => true); $cols['lastlogin'] = array('name' => get_string('lastlogin', 'admin'), 'sort' => true, 'template' => 'strftimedatetime.tpl'); $cols['select'] = array('headhtml' => '<a href="" id="selectall">' . get_string('All') . '</a> <a href="" id="selectnone">' . get_string('none') . '</a>', 'template' => 'admin/users/searchselectcolumn.tpl', 'class' => 'center nojs-hidden-table-cell', 'accessible' => get_string('bulkselect')); if (!$USER->get('admin') && !$USER->is_institutional_admin()) { unset($cols['email']); if (!get_config('staffreports')) { unset($cols['select']); } } else { if (!$USER->get('admin') && $results['data']) { foreach ($results['data'] as &$r) { if (!isset($r['email'])) { $r['email'] = '- ' . get_string('emailaddresshidden', 'admin') . ' -'; } } } } $smarty = smarty_core(); $smarty->assign_by_ref('results', $results); $smarty->assign_by_ref('institutions', $institutions); $smarty->assign('USER', $USER); $smarty->assign('limit', $limit); $smarty->assign('limitoptions', array(10, 50, 100, 200, 500)); $smarty->assign('cols', $cols); $smarty->assign('ncols', count($cols)); $html = $smarty->fetch('searchresulttable.tpl'); return array($html, $cols, $pagination, array('url' => $searchurl, 'sortby' => $search->sortby, 'sortdir' => $search->sortdir)); }
</table> <div id="or"><?php echo get_string('Or...', 'admin'); ?> </div> <div class="choice"><input type="radio" name="createmethod" class="ic"<?php if (isset($_POST['createmethod']) && $_POST['createmethod'] == 'leap2a') { ?> checked="checked"<?php } ?> id="uploadleap" value="leap2a"> <label for="uploadleap"><?php echo get_string('uploadleap2afile', 'admin'); ?> </label> <?php echo get_help_icon('core', 'admin', 'adduser', 'leap2afile'); ?> </div> <?php echo $elements['leap2afile']['html']; if ($elements['leap2afile']['error']) { ?> <div class="errmsg"><?php echo $elements['leap2afile']['error']; ?> </div> <?php } ?> </td> <td class="filler">»</td>
defined('INTERNAL') || die; $enc_id = json_encode($id); $enc_wwwroot = json_encode(get_config('wwwroot')); $enc_draft = json_encode(get_string('draft', 'artefact.blog')); $enc_published = json_encode(get_string('published', 'artefact.blog')); $enc_publish = json_encode(get_string('publish', 'artefact.blog')); $enc_publish_confirm = json_encode(get_string('publishblogpost?', 'artefact.blog')); $enc_nopublish = json_encode(get_string('publishfailed', 'artefact.blog')); $enc_edit = json_encode(get_string('edit', 'artefact.blog')); $enc_error = json_encode(get_string('unknownerror')); $enc_files = json_encode(get_string('attachedfiles', 'artefact.blog')); $enc_delete = json_encode(get_string('delete', 'artefact.blog')); $enc_delete_confirm = json_encode(get_string('deleteblogpost?', 'artefact.blog')); $enc_postedon = json_encode(get_string('postedon', 'artefact.blog')); $enc_cannotdeleteblogpost = json_encode(get_string('cannotdeleteblogpost', 'artefact.blog')); $enc_publish_help = json_encode(get_help_icon('artefact', 'blog', null, null, null, 'publish')); $limit = ArtefactTypeBlog::pagination; return <<<EOJAVASCRIPT var postlist = new TableRenderer( 'postlist', 'index.json.php', [undefined, undefined, undefined] ); postlist.limit = {$limit}; postlist.rowfunction = function(d, n, gd) { var status = TH({'id':'poststatus'+d.id}); var pub; var pubhelp;
function has_page_help() { $pt = defined('SECTION_PLUGINTYPE') ? SECTION_PLUGINTYPE : null; $pn = defined('SECTION_PLUGINNAME') ? SECTION_PLUGINNAME : null; $sp = defined('SECTION_PAGE') ? SECTION_PAGE : null; if (empty($pt) || $pt != 'core' && empty($pn)) { // we can't have a plugin type but no plugin name return false; } if (in_array($pt, plugin_types())) { $pagehelp = get_config('docroot') . $pt . '/' . $pn . '/lang/en.utf8/help/pages/' . $sp . '.html'; } else { $pagehelp = get_config('docroot') . 'lang/en.utf8/help/pages/' . $pn . '/' . $sp . '.html'; } if (is_readable($pagehelp)) { return array($sp, get_help_icon($pt, $pn, '', '', $sp)); } return false; }
/** * Create logins by institution layout for the site statistics page * * @param int $limit Limit results * @param int $offset Starting offset * @param string $sort DB Column to sort by * @param string/int $sortdesc The direction to sort the $sort column by * @param string $start The start date to filter results by - format 'YYYY-MM-DD HH:MM:SS' * @param string $end The end date to filter results by - format 'YYYY-MM-DD HH:MM:SS' * * @results array Results containing the html / pagination data */ function institution_logins_statistics($limit, $offset, $sort, $sortdesc, $start = null, $end = null) { // If no start/end dates provided then default to the previous full month $start = $start ? $start : date('Y-m-d H:i:s', mktime(0, 0, 0, date('n') - 1, 1, date('Y'))); // first day of previous month $end = $end ? $end : date('Y-m-d H:i:s', mktime(23, 59, 59, date('n'), 0, date('Y'))); // last day of previous month $data = array(); $data['tableheadings'] = array(array('name' => get_string('institution'), 'class' => 'search-results-sort-column' . ($sort == 'displayname' ? ' ' . ($sortdesc ? 'desc' : 'asc') : ''), 'link' => get_config('wwwroot') . 'admin/statistics.php?type=logins&sort=displayname&sortdesc=' . ($sort == 'displayname' ? !$sortdesc : false) . '&limit=' . $limit . '&offset=' . $offset . '&start=' . $start . '&end=' . $end), array('name' => get_string('logins', 'statistics'), 'class' => 'search-results-sort-column' . ($sort == 'count_logins' ? ' ' . ($sortdesc ? 'desc' : 'asc') : ''), 'link' => get_config('wwwroot') . 'admin/statistics.php?type=logins&sort=count_logins&sortdesc=' . ($sort == 'count_logins' ? !$sortdesc : true) . '&limit=' . $limit . '&offset=' . $offset . '&start=' . $start . '&end=' . $end), array('name' => get_string('activeusers', 'statistics'), 'class' => 'search-results-sort-column' . ($sort == 'count_active' ? ' ' . ($sortdesc ? 'desc' : 'asc') : ''), 'link' => get_config('wwwroot') . 'admin/statistics.php?type=logins&sort=count_active&sortdesc=' . ($sort == 'count_active' ? !$sortdesc : true) . '&limit=' . $limit . '&offset=' . $offset . '&start=' . $start . '&end=' . $end)); $data['table'] = institution_logins_stats_table($limit, $offset, $sort, $sortdesc, $start, $end); $data['tabletitle'] = get_string('institutionloginstabletitle', 'admin'); $data['tablesubtitle'] = get_string('institutionloginstablesubtitle', 'admin', format_date(strtotime($start), 'strftimedate'), format_date(strtotime($end), 'strftimedate')); $data['help'] = get_help_icon('core', 'statistics', null, null, null, 'statisticslogins'); $data['summary'] = $data['table']['count'] == 0 ? get_string('nostats', 'admin') : null; return $data; }
function epl_add_meta_boxes() { $help_link = get_help_icon(array('section' => 'org_details')); add_meta_box('epl-settings-meta-box', epl__('Organization Info') . $help_link, array($this, 'org_meta_box'), self::post_type, 'normal', 'core'); }
} if (empty($data->name) || $data->name != 'mahara') { $elements['defaultmembershipperiod'] = array('type' => 'expiry', 'title' => get_string('defaultmembershipperiod', 'admin'), 'description' => get_string('defaultmembershipperioddescription', 'admin'), 'defaultvalue' => $data->defaultmembershipperiod, 'help' => true); $elements['theme'] = array('type' => 'select', 'title' => get_string('theme'), 'description' => get_string('sitethemedescription', 'admin'), 'defaultvalue' => $data->theme ? $data->theme : 'sitedefault', 'collapseifoneoption' => true, 'options' => $themeoptions, 'help' => true); if ($USER->get('admin')) { $elements['maxuseraccounts'] = array('type' => 'text', 'title' => get_string('maxuseraccounts', 'admin'), 'description' => get_string('maxuseraccountsdescription', 'admin'), 'defaultvalue' => empty($data->maxuseraccounts) ? '' : $data->maxuseraccounts, 'rules' => array('regex' => '/^\\d*$/', 'maxlength' => 8), 'size' => 5); } } $elements['lockedfields'] = array('type' => 'fieldset', 'legend' => get_string('Lockedfields', 'admin'), 'collapsible' => true, 'collapsed' => true, 'elements' => array()); if ($institution != 'mahara') { $elements['lockedfields']['elements']['description'] = array('type' => 'html', 'value' => get_string('disabledlockedfieldhelp', 'admin', get_field('institution', 'displayname', 'name', 'mahara'))); } foreach (ArtefactTypeProfile::get_all_fields() as $field => $type) { $elements['lockedfields']['elements'][$field] = array('type' => 'checkbox', 'title' => get_string($field, 'artefact.internal'), 'defaultvalue' => in_array($field, $lockedprofilefields) || $institution != 'mahara' && in_array($field, $sitelockedfields), 'disabled' => $institution != 'mahara' && in_array($field, $sitelockedfields)); } $elements['lockedfieldshelp'] = array('value' => '<tr id="lockedfieldshelp"><th colspan="2">' . get_help_icon('core', 'admin', 'institution', 'lockedfields') . '</th></tr>'); $elements['submit'] = array('type' => 'submitcancel', 'value' => array(get_string('submit'), get_string('cancel'))); $institutionform = pieform(array('name' => 'institution', 'renderer' => 'table', 'plugintype' => 'core', 'pluginname' => 'admin', 'elements' => $elements)); } else { // Get a list of institutions require_once get_config('libroot') . 'institution.php'; if (!$USER->get('admin')) { // Filter the list for institutional admins $filter = $USER->get('admininstitutions'); $showdefault = false; } else { $filter = false; $showdefault = true; } $data = build_institutions_html($filter, $showdefault, $query, $limit, $offset, $count); $smarty = smarty(array('lib/pieforms/static/core/pieforms.js', 'paginator'));
function event_type_section() { $data = array(); $data['help_link'] = get_help_icon(array('section' => 'epl_event_type', 'id' => null)); $data['epl_event_type'] = array(); $epl_fields_to_create = $this->fields['epl_event_type_fields']['_epl_event_type']; foreach ($epl_fields_to_create['options'] as $k => $v) { $field = array('input_type' => $epl_fields_to_create['input_type'], 'input_name' => $epl_fields_to_create['input_name'], 'options' => array($k => $v), 'value' => isset($this->data['values']['_epl_event_type']) ? $this->data['values']['_epl_event_type'] : '', 'default_checked' => 1); $data['epl_event_type'][$k] = $this->epl_util->create_element($field, 20); } $this->epl->load_view('admin/events/event-type-section', $data); }
<div id="tabs-1"> <div class="clearfix"> <?php echo get_help_icon(array('section' => 'regis_fields')); ?> </div> <?php echo $fields_page; ?> </div> <div id="tabs-2"> <div class="clearfix"><?php echo get_help_icon(array('section' => 'regis_forms')); ?> </div> <?php echo $forms_page; ?> </div> </div> </div> <div id="list_of_fields_for_forms_wrapper">
$SESSION->add_ok_msg(get_string('numbernewgroupsadded', 'admin', count($addedgroups))); } redirect('/admin/groups/uploadcsv.php'); } $grouptypes = "<ul class=fieldslist>\n"; foreach (array_keys($GROUPTYPES) as $grouptype) { $grouptypes .= '<li>' . hsc($grouptype) . "</li>\n"; } $grouptypes .= "<div class=cl></div></ul>\n"; $editroles = "<ul class=fieldslist>\n"; foreach (array_keys($EDITROLES) as $editrole) { $editroles .= '<li>' . hsc($editrole) . "</li>\n"; } $editroles .= "<div class=cl></div></ul>\n"; $grouptypes .= get_string('uploadgroupcsveditrolesdescription', 'admin', get_help_icon('core', 'groups', 'editgroup', 'editroles'), $editroles); $fields = "<ul class=fieldslist>\n"; foreach ($ALLOWEDKEYS as $type) { $helplink = ''; if ($type == 'public' || $type == 'usersautoadded') { $helplink = get_help_icon('core', 'groups', 'editgroup', $type); } $fields .= '<li>' . hsc($type) . $helplink . "</li>\n"; } $fields .= "<div class=cl></div></ul>\n"; $uploadcsvpagedescription = get_string('uploadgroupcsvpagedescription2', 'admin', get_help_icon('core', 'groups', 'editgroup', 'grouptype'), $grouptypes, $fields); $form = pieform($form); $smarty = smarty(array('adminuploadcsv')); $smarty->assign('uploadcsvpagedescription', $uploadcsvpagedescription); $smarty->assign('uploadcsvform', $form); $smarty->assign('PAGEHEADING', TITLE); $smarty->display('admin/groups/uploadcsv.tpl');
<div id="wpbody-content" style="overflow: hidden;"> <script type="text/javascript"> jQuery(document).ready(function($){ $("#epl_tabs").tabs({ fx: {opacity: 'toggle', duration:'fast' } }); }); </script> <div class="wrap"> <div class="icon32" id="icon-options-general"></div> <h2>Events Planner General Settings <?php echo get_help_icon(array('section' => 'settings')); ?> </h2> <?php echo epl_show_ad('Go Pro, get access to plenty of other features, create new fields and access them anywhere.'); ?> <?php if ($settings_updated == 'true') { ?> <div id="message" class="updated"><?php _e('Settings Updated', 'events_planner'); ?> </div> <?php } ?> <form action="<?php echo $_SERVER['REQUEST_URI'];
<td><?php echo $elements['photograph']['html']; ?> </td> </tr> <tr> <th></th> <td class="description"><?php echo get_string('photographdesc', 'artefact.europass'); ?> </td> </tr> <tr> <th></th> <td><?php echo get_help_icon('artefact', 'europass', 'europassform', 'photograph'); ?> </td> </tr> </table> </td> <td class="filler">»</td> <td class="step step2"> <table> <tr> <th><?php echo get_string('exportfile', 'artefact.europass'); ?> </th> <td><?php echo $elements['fileformat']['html'];
function epl_add_meta_boxes() { $help_link = get_help_icon(array('section' => 'payment_profile_details', 'id' => null)); add_meta_box('epl-pp-meta-box', epl__('Payment Profile Details') . $help_link, array($this, 'pay_profile_meta_box'), self::post_type, 'normal', 'core'); }
/** * Renders form elements inside a <table>. * * @param Pieform $form The form the element is being rendered for * @param string $element The element to be rendered * @return string The element rendered inside an appropriate container */ function pieform_renderer_maharatable(Pieform $form, $element) { $formname = $form->get_name(); if ($element['type'] == 'fieldset') { // Add table tags to the build element, to preserve HTML compliance $builtelement = $element['html']; if (0 === strpos($builtelement, "\n<fieldset")) { $closelegendpos = strpos($builtelement, '</legend>'); if ($closelegendpos !== false) { $closelegendpos += 9; $builtelement = substr($builtelement, 0, $closelegendpos) . '<table>' . substr($builtelement, $closelegendpos); } else { $pos = strpos($builtelement, '>') + 1; $builtelement = substr($builtelement, 0, $pos) . '<table>' . substr($builtelement, $pos); } } else { $builtelement = substr($builtelement, 0, 11) . '<table>' . substr($builtelement, 11); } $builtelement = substr($builtelement, 0, -12) . '</table></fieldset>'; $result = "\t<tr>\n\t\t<td colspan=\"2\">"; $result .= $builtelement; $result .= "</td>\n\t</tr>"; return $result; } $result = ''; if (isset($element['labelhtml']) && $element['labelhtml'] !== '') { $result .= "\t<tr"; $result .= ' id="' . $formname . '_' . $element['name'] . '_header"'; // Set the class of the enclosing <tr> to match that of the element if ($element['class']) { $result .= ' class="' . $element['class'] . '"'; } $result .= ">\n\t\t"; $result .= '<th>'; $result .= $element['labelhtml']; $result .= "</th>\n\t</tr>\n"; } $result .= "\t<tr id=\"{$formname}_{$element['name']}_container\">\n\t\t<td>"; // Wrap WYSIWYG elements in a table with two cells side by side, one for the element and one for the help icon if (!empty($element['help']) && $element['type'] == 'wysiwyg') { $result .= '<table class="help-wrapper"><tr><td>'; } // Add the element itself $result .= $element['html']; if (!empty($element['help']) && $element['type'] == 'wysiwyg') { $result .= '</td><td>'; } // Contextual help if (!empty($element['help'])) { $result .= get_help_icon($form->get_property('plugintype'), $form->get_property('pluginname'), $form->get_name(), $element['name']); if ($element['type'] == 'wysiwyg') { $result .= '</td></tr></table>'; } } $result .= "</td>\n\t</tr>\n"; // Description - optional description of the element, or other note that should be visible // on the form itself (without the user having to hover over contextual help if ((!$form->has_errors() || $form->get_property('showdescriptiononerror')) && !empty($element['description'])) { $result .= "\t<tr>\n\t\t<td class=\"description\">"; $result .= $element['description']; $result .= "</td>\n\t</tr>\n"; } if (!empty($element['error'])) { $result .= "\t<tr>\n\t\t<td class=\"errmsg\">"; $result .= $element['error']; $result .= "</td>\n\t</tr>\n"; } return $result; }
<div id="wpbody-content" style="overflow: hidden;"> <div class="wrap"> <h2>Events Planner Help Section <?php echo get_help_icon(array('section' => 'help')); ?> <?php echo EPL_PLUGIN_VERSION; ?> </h2> <?php echo epl_show_ad('Go Pro, get priority help, more tools, discounts on custom development, and more.'); ?> <h3>Thanks for choosing Events Planner for your event management needs.</h3> <div class="epl_box"> <div class="epl_box_content"> <h4>Help Channels</h4> <ol> <li> Every place you see this icon <?php echo '<img src ="' . EPL_FULL_URL . 'images/email.png" alt="Send Feedback" />'; ?> , please click on it to send a feedback straight from this install of wordpress (if of course you can send emails out of this install). </li> <li> Every place you see this icon <?php echo '<img src ="' . EPL_FULL_URL . 'images/help.png" alt="Send Feedback" />';