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 }
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, '', '&')); } }
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'); } }
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); } }
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'); } }
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); } }
function onContinue($homepageUrl) { global $tikilib; // Run the parent first parent::onContinue($homepageUrl); }
function onContinue($homepageUrl) { // Run the parent first parent::onContinue($homepageUrl); }
function onContinue($homepageUrl) { // Run the parent first parent::onContinue($homepageUrl); // Configure detail preferences in own page }
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 $user, $prefs; $tikilib = TikiLib::lib('tiki'); $userwatch = $user; // Run the parent first parent::onContinue($homepageUrl); if (isset($_REQUEST["realName"]) && ($prefs['auth_ldap_nameattr'] == '' || $prefs['auth_method'] != 'ldap')) { $tikilib->set_user_preference($userwatch, 'realName', $_REQUEST["realName"]); if ($prefs['user_show_realnames'] == 'y') { $cachelib = TikiLib::lib('cache'); $cachelib->invalidate('userlink.' . $user . '0'); } } if ($prefs['feature_community_gender'] == 'y') { if (isset($_REQUEST["gender"])) { $tikilib->set_user_preference($userwatch, 'gender', $_REQUEST["gender"]); } } $tikilib->set_user_preference($userwatch, 'country', $_REQUEST["country"]); if (isset($_REQUEST["homePage"])) { $tikilib->set_user_preference($userwatch, 'homePage', $_REQUEST["homePage"]); } $tikilib->set_user_preference($userwatch, 'user_information', $_REQUEST['user_information']); }