/** * Subscribes the provided user ID's * Returns the updates progress */ protected function subscribe_users() { // make sure `user_ids` is an array $user_ids = $_REQUEST['user_ids']; if (!is_array($user_ids)) { $user_ids = sanitize_text_field($user_ids); $user_ids = explode(',', $user_ids); } $result = $this->wizard->subscribe_users($user_ids); if ($result) { $this->respond(array('success' => true)); } // send response $this->respond(array('success' => $result, 'error' => $this->wizard->get_error())); }
/** * Returns a block of XHTML-valid code that contains markup for this specific * component. * @param string $fieldName The field name to use when outputting form data or * similar parameters/information. * @access public * @return string */ function getMarkup($fieldName) { $name = RequestContext::name($fieldName); $m = "<input type='text' \n\t\t\t\tname='{$name}' \n\t\t\t\tid='{$fieldName}' \n\t\t\t\tsize='" . $this->_size . "' maxlength='" . $this->_maxlength . "'" . (!$this->isEnabled() ? " readonly='readonly'" : ""); if ($this->_value != null && $this->_value != $this->_startingDisplay) { $m .= " value='" . htmlspecialchars($this->_value, ENT_QUOTES) . "'"; } else { if ($this->_startingDisplay) { $v = htmlspecialchars($this->_startingDisplay, ENT_QUOTES); $m .= "\n\t\t\t\tvalue='{$v}' style='color: #888' "; $m .= "\n\t\t\t\tonfocus='if (this.value == \"{$v}\") { this.value=\"\"; this.style.color=\"#000\";}'"; $m .= "\n\t\t\t\tonblur='if (this.value == \"\") { this.value=\"{$v}\"; this.style.color=\"#888\";}'"; } } if ($this->_style) { $m .= "\n\t\t\t\tstyle=\"" . str_replace("\"", "\\\"", $this->_style) . "\""; } if ($this->_onchange) { $m .= "\n\t\t\t\tonchange=\"" . str_replace("\"", "\\\"", $this->_onchange) . "\""; } $m .= " />"; $errText = $this->getErrorText(); $errRule = $this->getErrorRule(); $errStyle = $this->getErrorStyle(); if ($errText && $errRule) { $m .= "\n\t\t<span id='" . $fieldName . "_error' style=\"padding-left: 10px; {$errStyle}\">« {$errText}</span>"; $m .= Wizard::getValidationJavascript($fieldName, $errRule, $fieldName . "_error", $this->_showError); $this->_showError = false; } return $m; }
function onContinue($homepageUrl) { $tikilib = TikiLib::lib('tiki'); // Run the parent first parent::onContinue($homepageUrl); $editorType = $_REQUEST['editorType']; switch ($editorType) { case 'wiki': // Wysiwyg in wiki mode is always optional (or?). // The setting is presented under HTML mode, and the user can change it there. // Unaware that it affects the wiki mode also, where it is safe to switch between wysiwyg and text mode. $tikilib->set_preference('wysiwyg_optional', 'y'); $tikilib->set_preference('wysiwyg_htmltowiki', 'y'); // Use wiki syntax break; case 'html': // Always use Wysiwyg mode as default // The setting is presented under WIKI mode, and the user can change it there. // Unaware that it affects the HTML mode also, where Wysiwyg always should be the default. $tikilib->set_preference('wysiwyg_default', 'y'); $tikilib->set_preference('wysiwyg_htmltowiki', 'n'); // No not use wiki syntax break; } }
public function onContinue($homepageUrl) { global $tikilib; // Run the parent first parent::onContinue($homepageUrl); // Configure detail preferences in own page }
/** * Returns a block of XHTML-valid code that contains markup for this specific * component. * @param string $fieldName The field name to use when outputting form data or * similar parameters/information. * @access public * @return string */ function getMarkup($fieldName) { if ($this->_callBack != "") { $code = '$this->_contentText = ' . $this->_callBack . '($this);'; eval($code); } return Wizard::parseText($this->_contentText, $this->getChildren(), $fieldName . "_"); }
/** * Constructor * @param Configuration $configuration an instance of Configuration * @param ILDAPWrapper $ldap an instance of ILDAPWrapper */ public function __construct(Configuration $configuration, ILDAPWrapper $ldap) { parent::__construct($ldap); $this->configuration = $configuration; if(is_null(Wizard::$l)) { Wizard::$l = \OC_L10N::get('user_ldap'); } $this->result = new WizardResult; }
public function findAll(\Gacela\Criteria $criteria = null) { if (is_null($criteria)) { $criteria = new \Gacela\Criteria(); } $criteria->equals('role', 'teacher'); return parent::findAll($criteria); }
function onContinue($homepageUrl) { // Run the parent first $changes = parent::onContinue($homepageUrl); if (array_key_exists('style', $changes) || array_key_exists('style_option', $changes)) { $query = array('url' => $_REQUEST['url'], 'wizard_step' => $_REQUEST['wizard_step'], 'showOnLogin' => $_REQUEST['showOnLogin']); TikiLib::lib('access')->redirect($_SERVER['PHP_SELF'] . '?' . http_build_query($query, '', '&')); } }
/** * Constructor * @param Configuration $configuration an instance of Configuration * @param ILDAPWrapper $ldap an instance of ILDAPWrapper */ public function __construct(Configuration $configuration, ILDAPWrapper $ldap, Access $access) { parent::__construct($ldap); $this->configuration = $configuration; if (is_null(Wizard::$l)) { Wizard::$l = \OC::$server->getL10N('user_ldap'); } $this->access = $access; $this->result = new WizardResult(); }
function onContinue($homepageUrl) { global $tikilib, $prefs; // Run the parent first parent::onContinue($homepageUrl); // If ElFinder is selected, set additional preferences if ($prefs['fgal_elfinder_feature'] === 'y') { // jQuery UI $tikilib->set_preference('feature_jquery_ui', 'y'); } }
/** * change menu items for Wizard entities * * @param \ElggMenuItem[] $returnvalue current menu items * @param \Wizard $entity wizard entity * * @return \ElggMenuItem[] */ protected static function wizardEntityMenu($returnvalue, \Wizard $entity) { $allowed_menu_items = ['access', 'edit', 'delete']; foreach ($returnvalue as $index => $menu_item) { $menu_name = $menu_item->getName(); if (!in_array($menu_name, $allowed_menu_items)) { unset($returnvalue[$index]); continue; } if ($menu_name === 'edit') { $menu_item->setHref('admin/administer_utilities/wizard/manage?guid=' . $entity->guid); } } if (!$entity->canEdit()) { return $returnvalue; } $returnvalue[] = \ElggMenuItem::factory(['name' => 'copy', 'text' => elgg_echo('wizard:copy'), 'href' => "action/wizard/copy?guid={$entity->getGUID()}", 'is_action' => true, 'priority' => 100]); $returnvalue[] = \ElggMenuItem::factory(['name' => 'reset', 'text' => elgg_echo('reset'), 'href' => "action/wizard/reset?guid={$entity->getGUID()}", 'confirm' => elgg_echo('wizard:reset:confirm'), 'priority' => 100]); $returnvalue[] = \ElggMenuItem::factory(['name' => 'manage_steps', 'text' => elgg_echo('admin:administer_utilities:wizard:manage_steps'), 'href' => "admin/administer_utilities/wizard/manage_steps?guid={$entity->getGUID()}", 'priority' => 150]); return $returnvalue; }
function onContinue($homepageUrl) { global $tikilib; // Run the parent first parent::onContinue($homepageUrl); if (isset($_REQUEST['useElFinderAsDefault']) && $_REQUEST['useElFinderAsDefault'] === 'on') { // Set ElFinder view as the default File Gallery view $tikilib->set_preference('fgal_default_view', 'finder'); } else { // Re-set back default File Gallery view to list $tikilib->set_preference('fgal_default_view', 'list'); } }
function onContinue($homepageUrl) { $tikilib = TikiLib::lib('tiki'); // Run the parent first parent::onContinue($homepageUrl); $editorType = $_REQUEST['editorType']; switch ($editorType) { case 'text': $tikilib->set_preference('feature_wysiwyg', 'n'); break; case 'wysiwyg': $tikilib->set_preference('feature_wysiwyg', 'y'); break; } }
function onContinue($homepageUrl) { global $prefs, $tikilib; // Run the parent first parent::onContinue($homepageUrl); // Set the specified gallery name $jcaptureFileGalleryName = isset($_REQUEST['jcaptureFileGalleryName']) ? $_REQUEST['jcaptureFileGalleryName'] : ''; if (!empty($jcaptureFileGalleryName)) { $filegalib = TikiLib::lib('filegal'); // Get the currently selected file gallery // If the root gallery is selected, create a new one, if a name is specified $galleryId = intval($prefs['fgal_for_jcapture']); if ($galleryId > 0 && $galleryId != $prefs['fgal_root_id']) { $gallery = $filegalib->get_file_gallery($galleryId); } // If the specified jcapture gallery does not exist, create it if (empty($gallery)) { // Load the top level file galleries $galleryIdentifier = $prefs['fgal_root_id']; $subGalleries = $filegalib->getSubGalleries($galleryIdentifier); $galleryId = 0; foreach ($subGalleries['data'] as $gallery) { if ($gallery['name'] == $jcaptureFileGalleryName) { $galleryId = $gallery['galleryId']; } } // If the gallery doesn't exist, create it if ($galleryId == 0) { $fgal_info = $filegalib->get_file_gallery(); $fgal_info['name'] = $jcaptureFileGalleryName; $galleryId = $filegalib->replace_file_gallery($fgal_info); } } // If a gallery exists, use it for jCapture if ($galleryId > 0) { $tikilib->set_preference('fgal_for_jcapture', '' . $galleryId); } } // Set the jcapture file gallery to the file gallery root, unless it is already set if (intval($tikilib->get_preference('fgal_for_jcapture')) == 0) { $tikilib->set_preference('fgal_for_jcapture', '1'); } // Set token access if not enabled if ($tikilib->get_preference('auth_token_access') !== 'y') { $tikilib->set_preference('auth_token_access', 'y'); } }
function onContinue($homepageUrl) { // Run the parent first parent::onContinue($homepageUrl); $wizardlib = TikiLib::lib('wizard'); // User selected to skip the wizard and hide it on login // Save the "Show on login" setting, and no other preferences // Set preference to hide on login if (isset($_REQUEST['skip'])) { // Save "Show on login" setting $showOnLogin = false; $wizardlib->showOnLogin($showOnLogin); // Then exit, by returning the specified URL $accesslib = TikiLib::lib('access'); $accesslib->redirect($homepageUrl); } }
function onContinue($homepageUrl) { global $tikilib, $user, $prefs; // Run the parent first parent::onContinue($homepageUrl); // Show if option is selected if ($prefs['feature_user_watches'] === 'y' && $prefs['feature_daily_report_watches'] === 'y') { $reportsManager = Reports_Factory::build('Reports_Manager'); $interval = filter_input(INPUT_POST, 'interval', FILTER_SANITIZE_STRING); $view = filter_input(INPUT_POST, 'view', FILTER_SANITIZE_STRING); $type = filter_input(INPUT_POST, 'type', FILTER_SANITIZE_STRING); $always_email = filter_input(INPUT_POST, 'always_email', FILTER_SANITIZE_NUMBER_INT); if ($always_email != 1) { $always_email = 0; } $reportsManager->save($user, $interval, $view, $type, $always_email); } }
/** * Returns a block of XHTML-valid code that contains markup for this specific * component. * @param string $fieldName The field name to use when outputting form data or * similar parameters/information. * @access public * @return string */ function getMarkup($fieldName) { $fromParent = parent::getMarkup($fieldName); // make sure that we add the form info to the markup $harmoni = Harmoni::instance(); $urlObj = $harmoni->request->mkURL(); $url = $urlObj->write(); $formName = $this->getWizardFormName(); $pre = "<form action='{$url}' method='post' name='{$formName}' id='{$formName}' enctype='multipart/form-data'>\n"; $post = "\n</form>\n"; // The removal of this confirmation on submission was added to // Wizard.abstract.php if (isset($this->confirmLeaving) && $this->confirmLeaving) { if (isset($this->confirmLeavingMessage) && $this->confirmLeavingMessage) { $string = $this->confirmLeavingMessage; } else { $string = dgettext("polyphony", "You in a wizard. Any unsubmitted changes will be lost."); } $post .= "\n<script type='text/javascript'>\n// <![CDATA[ \n\t\t\n\t\twindow.addUnloadConfirmationForElement(\"{$formName}\", \"{$string}\");\n\t\t\n\t\t// Override our parent's implementation to remove unload confirmation.\n\t\tfunction submitWizard(form) {\n\t\t\twindow.removeUnloadConfirmationForElement(form.id);\n\n\t\t\tif (validateWizard(form)) \n\t\t\t\tform.submit();\n\t\t}\n\t\n// ]]>\n</script>\n"; } // ignore the field name return $fromParent . $pre . Wizard::parseText($this->_text, $this->getChildren(), $this->getIdString() . "_") . $post; }
function onContinue($homepageUrl) { global $user, $prefs; $tikilib = TikiLib::lib('tiki'); // Run the parent first parent::onContinue($homepageUrl); if (isset($_REQUEST['user_calendar_watch_editor']) && $_REQUEST['user_calendar_watch_editor'] == 'on') { $tikilib->set_user_preference($user, 'user_calendar_watch_editor', 'y'); } else { $tikilib->set_user_preference($user, 'user_calendar_watch_editor', 'n'); } if (isset($_REQUEST['user_article_watch_editor']) && $_REQUEST['user_article_watch_editor'] == 'on') { $tikilib->set_user_preference($user, 'user_article_watch_editor', 'y'); } else { $tikilib->set_user_preference($user, 'user_article_watch_editor', 'n'); } if (isset($_REQUEST['user_wiki_watch_editor']) && $_REQUEST['user_wiki_watch_editor'] == 'on') { $tikilib->set_user_preference($user, 'user_wiki_watch_editor', 'y'); } else { $tikilib->set_user_preference($user, 'user_wiki_watch_editor', 'n'); } if (isset($_REQUEST['user_blog_watch_editor']) && $_REQUEST['user_blog_watch_editor'] == 'on') { $tikilib->set_user_preference($user, 'user_blog_watch_editor', 'y'); } else { $tikilib->set_user_preference($user, 'user_blog_watch_editor', 'n'); } if (isset($_REQUEST['user_tracker_watch_editor']) && $_REQUEST['user_tracker_watch_editor'] == 'on') { $tikilib->set_user_preference($user, 'user_tracker_watch_editor', 'y'); } else { $tikilib->set_user_preference($user, 'user_tracker_watch_editor', 'n'); } if (isset($_REQUEST['user_comment_watch_editor']) && $_REQUEST['user_comment_watch_editor'] == 'on') { $tikilib->set_user_preference($user, 'user_comment_watch_editor', 'y'); } else { $tikilib->set_user_preference($user, 'user_comment_watch_editor', 'n'); } }
/** * Answer the XHTML postfix markup for the current editor * * @param string $fieldName The name we are rendering this instance with. * @return string * @access public * @since 1/14/08 */ public function getCurrentPostHtml($fieldName) { try { $currentEditorName = $this->editorChoice->getAllValues(); if (!$currentEditorName) { throw new Exception("No current editor set."); } if (isset($this->postfixes[$currentEditorName])) { return Wizard::parseFieldNameText($this->postfixes[$currentEditorName], $fieldName); } else { return ''; } } catch (Exception $e) { throw $e; } }
function onContinue($homepageUrl) { // Run the parent first parent::onContinue($homepageUrl); }
* the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * N/X is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with N/X; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA **********************************************************************/ require_once "../../config.inc.php"; $auth = new auth("EXPORT"); $page = new page("Export"); $wizard = new Wizard($lang->get("export_data", "Export Content and Templates Wizard")); $wizard->setTitleText($lang->get("wz_export_title", "This wizard is used to exchange clusters, cluster-templates and page-templates between your N/X installation and others. The wizard generates a XML File, which you can store on your local hard drive and exchange with other N/X-Users.")); ////// STEP 1 ////// $step = new Step(); $step->setTitle($lang->get("wzt_export_type", "Select type to export")); $step->setExplanation($lang->get("wze_export_type", "On the right you need to select the type of data you want to export. Clusters are storing content. When you export clusters, the templates are automatically exported too. Cluster-Templates are schemes for creating clusters. Page-Templates are used for creating pages in the website. Cluster-Templates, Meta-Templates and layout are automatically exported when you export a Page-Template.")); $resources[0][0] = $lang->get("cluster", "Cluster"); $resources[0][1] = "CLUSTER"; $resources[1][0] = $lang->get("cluster_template", "Cluster Template"); $resources[1][1] = "CLUSTERTEMPLATE"; $resources[2][0] = $lang->get("page_template", "Page Template"); $resources[2][1] = "PAGETEMPLATE"; $step->add(new WZRadio("resource_type", $resources)); ////// STEP 2 ////// $step2 = new STSelectResource(); $step2->setTitle($lang->get("wzt_sel_exp_res", "Select Resource for export"));
function onContinue($homepageUrl) { // Run the parent first parent::onContinue($homepageUrl); // Configure detail preferences in own page }
/** * Renders a wizard section. Each wizard section must be defined in the controller and a wizard section must * corrospond to a method in the controller * @param string id | id of the section * @container */ protected function tagWizard($attrs) { $current = Pimple::instance()->getAction(); $w = Wizard::get($attrs->id); if ($w) { $cs = $w->getStep($current); } if ($cs) { $title = '<ul class="horizontal divided">'; $before = true; foreach ($w->getSteps() as $s) { if ($s->getId() == $current) { $title .= sprintf('<li class="active">%s</li>', $s->getTitle()); $before = false; } else { $add = ''; if ($before) { $add = ' class="done"'; } if ($cs->canJumpTo($s->getId())) { $title .= sprintf('<li%s><a href="%s">%s</a></li>', $add, Url::makeLink(Pimple::instance()->getController(), $s->getId()), $s->getTitle()); } else { $title .= sprintf('<li%s>%s</li>', $add, $s->getTitle()); } } } $title .= '</ul>'; return sprintf('<div class="panel wizard %s"><h2>%s<strong>' . T('Step %s of %s', $cs->getStep(), $w->getNumSteps()) . '</strong></h2>%s</div>', $attrs->class, $title, $this->body()); } else { return sprintf('<div class="panel">%s</div>', $this->body()); } }
protected function finish() { self::$values = $this->getValues(TRUE); self::$called++; }
/** * Returns a block of XHTML-valid code that contains markup for this specific * component. * @param string $fieldName The field name to use when outputting form data or * similar parameters/information. * @access public * @return string */ function getMarkup($fieldName) { // check if we have min/max values that are appropriate, etc. if ($this->_num < $this->_min) { $this->_num = $this->_min; } if ($this->_max != -1 && $this->_num > $this->_max) { $this->_num = $this->_max; } $this->_ensureNumber($this->_num); $includeAdd = !($this->_num == $this->_max); $includeRemove = !($this->_num == $this->_min); $m = "<table width='100%' border='0' cellspacing='0' cellpadding='2'>\n"; $this->_orderedSet->reset(); while ($this->_orderedSet->hasNext()) { $collectionId = $this->_orderedSet->next(); $key = $collectionId->getIdString(); $this->_collections[$key]["_remove"]->setEnabled($includeRemove); $m .= "<tr><td valign='top' style='border-bottom: 1px solid #555;'>"; $m .= $this->_collections[$key]["_remove"]->getMarkup($fieldName . "_" . $key . "__remove"); // Display the list $m .= "\n<br/>" . $this->_collections[$key]["_moveToPosition"]->getMarkup($fieldName . "_" . $key . "__moveToPosition"); $m .= $this->_collections[$key]["_moveToPositionChoice"]->getMarkup($fieldName . "_" . $key . "__moveToPositionChoice"); $m .= "</td><td style='border-bottom: 1px solid #555;'>"; $m .= Wizard::parseText($this->_text, $this->_collections[$key], $fieldName . "_" . $key . "_"); $m .= "</td></tr>\n"; } $this->_addButton->setEnabled($includeAdd); $m .= "<tr><td colspan='2'>" . $this->_addButton->getMarkup($fieldName . "_add") . "</td></tr>\n"; $m .= "</table>\n"; return $m; }
/** * Returns a block of XHTML-valid code that contains markup for this specific * component. * @param string $fieldName The field name to use when outputting form data or * similar parameters/information. * @access public * @return string */ function getMarkup($fieldName) { $name = RequestContext::name($fieldName); $m = "\n\t\t\t<textarea rows='" . $this->_rows . "' cols='" . $this->_cols . "'"; if (isset($this->_wrapStyle) && is_string($this->_wrapStyle)) { $m .= " wrap='" . $this->_wrapStyle . "'"; } $m .= "\n\t\t\t\tname='{$name}'"; $m .= "\n\t\t\t\tid='{$name}'"; $m .= !$this->isEnabled() ? " readonly='readonly'" : ""; if ($this->_style) { $m .= "\n\t\t\t\tstyle=\"" . str_replace("\"", "\\\"", $this->_style) . "\""; } if ($this->_onchange) { $m .= "\n\t\t\t\tonchange=\"" . str_replace("\"", "\\\"", $this->_onchange) . "\""; } if ($this->_value != null && $this->_value != $this->_startingDisplay) { $m .= ">" . htmlspecialchars($this->_value); } else { if ($this->_startingDisplay) { $v = htmlspecialchars($this->_startingDisplay, ENT_QUOTES); $m .= "\n\t\t\t\tonfocus='if (this.value == \"{$v}\") { this.value=\"\"; this.style.color=\"#000\";}'"; $m .= "\n\t\t\t\tonblur='if (this.value == \"\") { this.value=\"{$v}\"; this.style.color=\"#888\";}'"; $m .= " style='color: #888'>" . $v; } else { $m .= ">" . htmlspecialchars($this->_value); } } $m .= "</textarea>"; $errText = $this->getErrorText(); $errRule = $this->getErrorRule(); $errStyle = $this->getErrorStyle(); if ($errText && $errRule) { $m .= "<span id='" . $fieldName . "_error' style=\"padding-left: 10px; {$errStyle}\">« {$errText}</span>"; $m .= Wizard::getValidationJavascript($fieldName, $errRule, $fieldName . "_error", $this->_showError); $this->_showError = false; } return $m; }
function onContinue($homepageUrl) { global $user, $prefs; $userlib = TikiLib::lib('user'); $tikilib = TikiLib::lib('tiki'); $registrationlib = TikiLib::lib('registration'); $trklib = TikiLib::lib('trk'); // Run the parent first parent::onContinue($homepageUrl); //get custom fields $customfields = $registrationlib->get_customfields(); $needs_validation_js = true; if ($registrationlib->merged_prefs['userTracker'] == 'y') { $chosenGroup = 'Registered'; $re = $userlib->get_group_info($chosenGroup); if (!empty($re['usersTrackerId']) && (!empty($re['registrationUsersFieldIds']) && $prefs['feature_userWizardDifferentUsersFieldIds'] != 'y' or $prefs['feature_userWizardDifferentUsersFieldIds'] == 'y' && !empty($prefs['feature_userWizardUsersFieldIds']))) { $needs_validation_js = false; include_once 'lib/wiki-plugins/wikiplugin_tracker.php'; if (isset($_REQUEST['name'])) { $user = $_REQUEST['name']; // so that one can set user preferences at registration time $_REQUEST['iTRACKER'] = 1; // only one tracker plugin on registration } $userWizardDetailsFieldIds = ''; if ($prefs['feature_userWizardDifferentUsersFieldIds'] != 'y' or empty($prefs['feature_userWizardUsersFieldIds'])) { $userWizardDetailsFieldIds = $re['registrationUsersFieldIds']; } elseif ($prefs['feature_userWizardDifferentUsersFieldIds'] == 'y' and !empty($prefs['feature_userWizardUsersFieldIds'])) { $userWizardDetailsFieldIds = $prefs['feature_userWizardUsersFieldIds']; } if (!is_array($userWizardDetailsFieldIds)) { $userWizardDetailsFieldIds = explode(':', $userWizardDetailsFieldIds); } $userTrackerData = wikiplugin_tracker('', array('trackerId' => $re['usersTrackerId'], 'fields' => $userWizardDetailsFieldIds, 'showdesc' => 'n', 'showmandatory' => 'y', 'embedded' => 'n', 'action' => 'Save_User_Details', 'registration' => 'n', 'userField' => $re['usersFieldId'])); $tr = TikiLib::lib('trk')->get_tracker($re['usersTrackerId']); $utid = $userlib->get_tracker_usergroup($user); if (isset($utid['usersTrackerId'])) { $_REQUEST['trackerId'] = $utid['usersTrackerId']; $_REQUEST["itemId"] = $trklib->get_item_id($_REQUEST['trackerId'], $utid['usersFieldId'], $user); } $definition = Tracker_Definition::get($_REQUEST['trackerId']); $xfields = array('data' => $definition->getFields()); } } }
function onContinue($homepageUrl) { global $tikilib; // Run the parent first parent::onContinue($homepageUrl); }
function onContinue($homepageUrl) { global $tikilib, $user, $prefs, $tiki_p_admin, $tikidomain; $userwatch = $user; $headerlib = TikiLib::lib('header'); // Run the parent first parent::onContinue($homepageUrl); // setting preferences if ($prefs['change_theme'] == 'y' && empty($group_style)) { if (isset($_REQUEST["mystyle"])) { if ($user == $userwatch) { $t = $tikidomain ? $tikidomain . '/' : ''; if ($_REQUEST["mystyle"] == "") { //If mystyle is empty --> user has selected "Site Default" theme $sitestyle = $tikilib->getOne("select `value` from `tiki_preferences` where `name`=?", 'style'); $headerlib->replace_cssfile('styles/' . $t . $prefs['style'], 'styles/' . $t . $sitestyle, 51); } else { $headerlib->replace_cssfile('styles/' . $t . $prefs['style'], 'styles/' . $t . $_REQUEST['mystyle'], 51); } } if ($_REQUEST["mystyle"] == "") { $tikilib->set_user_preference($userwatch, 'theme', ""); } else { $tikilib->set_user_preference($userwatch, 'theme', $_REQUEST["mystyle"]); } } } if (isset($_REQUEST["userbreadCrumb"])) { $tikilib->set_user_preference($userwatch, 'userbreadCrumb', $_REQUEST["userbreadCrumb"]); } if (isset($_REQUEST["language"]) && $tikilib->is_valid_language($_REQUEST['language'])) { if ($tiki_p_admin || $prefs['change_language'] == 'y') { $tikilib->set_user_preference($userwatch, 'language', $_REQUEST["language"]); } if ($userwatch == $user) { include 'lang/' . $_REQUEST["language"] . '/language.php'; } } else { $tikilib->set_user_preference($userwatch, 'language', ''); } if (isset($_REQUEST['read_language'])) { $list = array(); $tok = strtok($_REQUEST['read_language'], ' '); while (false !== $tok) { $list[] = $tok; $tok = strtok(' '); } $list = array_unique($list); $list = array_filter($list, array($tikilib, 'is_valid_language')); $list = implode(' ', $list); $tikilib->set_user_preference($userwatch, 'read_language', $list); } if (isset($_REQUEST['display_timezone'])) { $tikilib->set_user_preference($userwatch, 'display_timezone', $_REQUEST['display_timezone']); } if (isset($_REQUEST['user_dbl']) && $_REQUEST['user_dbl'] == 'on') { $tikilib->set_user_preference($userwatch, 'user_dbl', 'y'); } else { $tikilib->set_user_preference($userwatch, 'user_dbl', 'n'); } if (isset($_REQUEST['display_12hr_clock']) && $_REQUEST['display_12hr_clock'] == 'on') { $tikilib->set_user_preference($userwatch, 'display_12hr_clock', 'y'); } else { $tikilib->set_user_preference($userwatch, 'display_12hr_clock', 'n'); } if (isset($_REQUEST['diff_versions']) && $_REQUEST['diff_versions'] == 'on') { $tikilib->set_user_preference($userwatch, 'diff_versions', 'y'); } else { $tikilib->set_user_preference($userwatch, 'diff_versions', 'n'); } if ($prefs['feature_community_mouseover'] == 'y') { if (isset($_REQUEST['show_mouseover_user_info']) && $_REQUEST['show_mouseover_user_info'] == 'on') { $tikilib->set_user_preference($userwatch, 'show_mouseover_user_info', 'y'); } else { $tikilib->set_user_preference($userwatch, 'show_mouseover_user_info', 'n'); } } $email_isPublic = isset($_REQUEST['email_isPublic']) ? $_REQUEST['email_isPublic'] : 'n'; $tikilib->set_user_preference($userwatch, 'email is public', $email_isPublic); $tikilib->set_user_preference($userwatch, 'mailCharset', $_REQUEST['mailCharset']); //// Custom fields //foreach ($customfields as $custpref => $prefvalue) { //if (isset($_REQUEST[$customfields[$custpref]['prefName']])) $tikilib->set_user_preference($userwatch, $customfields[$custpref]['prefName'], $_REQUEST[$customfields[$custpref]['prefName']]); //} if (isset($_REQUEST['location'])) { if ($coords = TikiLib::lib('geo')->parse_coordinates($_REQUEST['location'])) { $tikilib->set_user_preference($userwatch, 'lat', $coords['lat']); $tikilib->set_user_preference($userwatch, 'lon', $coords['lon']); if (isset($coords['zoom'])) { $tikilib->set_user_preference($userwatch, 'zoom', $coords['zoom']); } } } //// Custom fields //foreach ($customfields as $custpref => $prefvalue) { //// print $customfields[$custpref]['prefName']; //// print $_REQUEST[$customfields[$custpref]['prefName']]; //$tikilib->set_user_preference($userwatch, $customfields[$custpref]['prefName'], $_REQUEST[$customfields[$custpref]['prefName']]); //} if (isset($_REQUEST['minPrio'])) { $tikilib->set_user_preference($userwatch, 'minPrio', $_REQUEST['minPrio']); } if ($prefs['allowmsg_is_optional'] == 'y') { if (isset($_REQUEST['allowMsgs']) && $_REQUEST['allowMsgs'] == 'on') { $tikilib->set_user_preference($userwatch, 'allowMsgs', 'y'); } else { $tikilib->set_user_preference($userwatch, 'allowMsgs', 'n'); } } if (isset($_REQUEST['mytiki_pages']) && $_REQUEST['mytiki_pages'] == 'on') { $tikilib->set_user_preference($userwatch, 'mytiki_pages', 'y'); } else { $tikilib->set_user_preference($userwatch, 'mytiki_pages', 'n'); } if (isset($_REQUEST['mytiki_blogs']) && $_REQUEST['mytiki_blogs'] == 'on') { $tikilib->set_user_preference($userwatch, 'mytiki_blogs', 'y'); } else { $tikilib->set_user_preference($userwatch, 'mytiki_blogs', 'n'); } if (isset($_REQUEST['mytiki_gals']) && $_REQUEST['mytiki_gals'] == 'on') { $tikilib->set_user_preference($userwatch, 'mytiki_gals', 'y'); } else { $tikilib->set_user_preference($userwatch, 'mytiki_gals', 'n'); } if (isset($_REQUEST['mytiki_msgs']) && $_REQUEST['mytiki_msgs'] == 'on') { $tikilib->set_user_preference($userwatch, 'mytiki_msgs', 'y'); } else { $tikilib->set_user_preference($userwatch, 'mytiki_msgs', 'n'); } if (isset($_REQUEST['mytiki_tasks']) && $_REQUEST['mytiki_tasks'] == 'on') { $tikilib->set_user_preference($userwatch, 'mytiki_tasks', 'y'); } else { $tikilib->set_user_preference($userwatch, 'mytiki_tasks', 'n'); } if (isset($_REQUEST['mytiki_forum_topics']) && $_REQUEST['mytiki_forum_topics'] == 'on') { $tikilib->set_user_preference($userwatch, 'mytiki_forum_topics', 'y'); } else { $tikilib->set_user_preference($userwatch, 'mytiki_forum_topics', 'n'); } if (isset($_REQUEST['mytiki_forum_replies']) && $_REQUEST['mytiki_forum_replies'] == 'on') { $tikilib->set_user_preference($userwatch, 'mytiki_forum_replies', 'y'); } else { $tikilib->set_user_preference($userwatch, 'mytiki_forum_replies', 'n'); } if (isset($_REQUEST['mytiki_items']) && $_REQUEST['mytiki_items'] == 'on') { $tikilib->set_user_preference($userwatch, 'mytiki_items', 'y'); } else { $tikilib->set_user_preference($userwatch, 'mytiki_items', 'n'); } if (isset($_REQUEST['mytiki_articles']) && $_REQUEST['mytiki_articles'] == 'on') { $tikilib->set_user_preference($userwatch, 'mytiki_articles', 'y'); } else { $tikilib->set_user_preference($userwatch, 'mytiki_articles', 'n'); } if (isset($_REQUEST['tasks_maxRecords'])) { $tikilib->set_user_preference($userwatch, 'tasks_maxRecords', $_REQUEST['tasks_maxRecords']); } if ($prefs['feature_intertiki'] == 'y' && !empty($prefs['feature_intertiki_mymaster']) && $prefs['feature_intertiki_import_preferences'] == 'y') { //send to the master TikiLib::lib('user')->interSendUserInfo($prefs['interlist'][$prefs['feature_intertiki_mymaster']], $userwatch); } }
/** * Returns a block of XHTML-valid code that contains markup for this specific * component. * @param string $fieldName The field name to use when outputting form data or * similar parameters/information. * @access public * @return string */ function getMarkup($fieldName) { $this->_currentFieldName = $fieldName; return Wizard::parseText($this->_contentText, $this->getChildren(), $this->getFieldName()); }