tiki
21.2
About: Tiki Wiki is a Groupware/CMS (Content Management System) solution that has features like Wikis, Forums, Blogs, Articles, Image Gallery, Map Server, Link Directory, Multilingual Support, Bug Tracker, RSS Feeds etc. Latest release 21 with Long Term Support (LTS). Fossies Dox: tiki-21.2.tar.xz ("unofficial" and yet experimental doxygen-generated source code documentation) 
|
Go to the documentation of this file.
22 ini_set(
'session.cookie_httponly', 1);
24 if (strpos(
$_SERVER[
'SCRIPT_NAME'], basename(__FILE__)) !==
false) {
25 header(
'location: index.php');
28 if (version_compare(PHP_VERSION,
'7.2.0',
'<')) {
29 if (php_sapi_name() !=
'cli') {
30 header(
'location: tiki-install.php');
34 echo
"Warning: Tiki21 and above expects PHP 7.2.0 and above. You are running " . phpversion() .
" at your own risk\n";
42 if (!getenv(
'PHP_PEAR_HTTP_PROXY')) {
43 putenv(
'PHP_PEAR_HTTP_PROXY=http://127.0.0.1');
47 require_once
'lib/setup/third_party.php';
49 include_once(
'lib/setup/twversion.class.php');
56 require_once(
'lib/setup/tikisetup.class.php');
57 require_once(
'lib/setup/timer.class.php');
60 require_once(
'tiki-setup_base.php');
64 setlocale(LC_ALL,
'');
68 foreach ([
'en_US.utf8'] as $UnicodeLocale) {
69 if (setlocale(LC_COLLATE, $UnicodeLocale)) {
74 if (
$prefs[
'feature_tikitests'] ==
'y') {
75 require_once(
'tiki_tests/tikitestslib.php');
79 require_once(
'lib/setup/site_closed.php');
81 require_once(
'lib/setup/error_reporting.php');
82 if (
$prefs[
'use_load_threshold'] ==
'y') {
83 require_once(
'lib/setup/load_threshold.php');
85 require_once(
'lib/setup/sections.php');
95 if (isset(
$_SERVER[
'REQUEST_URI'])) {
96 $requestUri =
$_SERVER[
'REQUEST_URI'];
101 if (
$prefs[
'tiki_domain_prefix'] ==
'strip' && substr(
$host, 0, 4) ==
'www.') {
103 }
elseif (
$prefs[
'tiki_domain_prefix'] ==
'force' && substr(
$host, 0, 4) !=
'www.') {
107 if (strpos(
$prefs[
'tiki_domain_redirects'],
',') !==
false) {
108 foreach (explode(
"\n",
$prefs[
'tiki_domain_redirects']) as
$row) {
109 list(
$old,
$new) = array_map(
'trim', explode(
',',
$row, 2));
118 $prefix = str_replace(
"://$host",
"://{$domain_map[$host]}",
$prefix);
127 }
elseif (function_exists(
'session_id')) {
128 $tikilib->setSessionId(session_id());
132 if (
$prefs[
'login_multiple_forbidden'] ==
'y') {
136 require_once(
'lib/setup/cookies.php');
138 if (
$prefs[
'mobile_feature'] ===
'y') {
139 require_once(
'lib/setup/mobile.php');
141 $prefs[
'mobile_mode'] =
'';
144 require_once(
'lib/setup/user_prefs.php');
145 require_once(
'lib/setup/language.php');
146 require_once(
'lib/setup/wiki.php');
147 require_once(
'lib/setup/javascript.php');
149 require_once(
'lib/setup/theme.php');
154 if (
$prefs[
'cookie_consent_feature'] ===
'y' && strpos(
$_SERVER[
'PHP_SELF'],
'tiki-cookie-jar.php') ===
false) {
155 if (! empty(
$_REQUEST[
'cookie_consent_checkbox']) ||
$prefs[
'site_closed'] ===
'y') {
158 $feature_no_cookie =
false;
162 if (empty($cookie_consent)) {
163 if (
$prefs[
'javascript_enabled'] !==
'y') {
164 $prefs[
'cookie_consent_mode'] =
'';
166 $headerlib->add_js(
'jqueryTiki.no_cookie = true; jqueryTiki.cookie_consent_alert = "' . addslashes(
$prefs[
'cookie_consent_alert']) .
'";');
169 if (strpos($k, session_name()) ===
false) {
170 setcookie($k,
'', time() - 3600);
176 if ($cookie_consent !==
'y') {
177 setcookie(
$prefs[
'cookie_consent_name'],
'y', $cookie_consent / 1000);
179 $feature_no_cookie =
false;
184 if (
$prefs[
'feature_polls'] ==
'y') {
185 require_once(
'lib/setup/polls.php');
188 require_once(
'lib/setup/mailin.php');
190 require_once(
'lib/setup/tikiIndex.php');
191 if (
$prefs[
'useGroupHome'] ==
'y') {
192 require_once(
'lib/setup/default_homepage.php');
194 if (
$prefs[
'user_force_avatar_upload'] ===
'y') {
195 require_once(
'lib/setup/avatar_force_upload.php');
197 if (
$prefs[
'tracker_force_fill'] ==
'y') {
198 require_once(
'lib/setup/tracker_force_fill.php');
201 if (
$prefs[
'feature_sefurl'] ==
'y' && ! defined(
'TIKI_CONSOLE')) {
204 if (
$prefs[
'tikiIndex'] ==
'tiki-index.php' &&
$prefs[
'wikiHomePage']) {
207 }
elseif (substr(
$prefs[
'tikiIndex'], 0, strlen(
'tiki-view_blog.php')) ==
'tiki-view_blog.php') {
208 include_once(
'tiki-sefurl.php');
213 if (! empty($varcheck_errors)) {
214 if (isset(
$_SERVER[
'HTTP_X_REQUESTED_WITH'])
215 &&
$_SERVER[
'HTTP_X_REQUESTED_WITH'] ==
'XMLHttpRequest') {
219 $varcheck_errors[
'tpl'] =
'error_raw.tpl';
223 if (
$prefs[
'feature_usermenu'] ==
'y') {
224 require_once(
'lib/setup/usermenu.php');
226 if (
$prefs[
'feature_live_support'] ==
'y') {
227 require_once(
'lib/setup/live_support.php');
229 if (
$prefs[
'feature_referer_stats'] ==
'y' ||
$prefs[
'feature_stats'] ==
'y') {
230 require_once(
'lib/setup/stats.php');
232 require_once(
'lib/setup/dynamic_variables.php');
233 require_once(
'lib/setup/output_compression.php');
234 if (
$prefs[
'feature_debug_console'] ==
'y') {
236 include_once(
'lib/debug/debugger.php');
238 if (
$prefs[
'feature_integrator'] ==
'y') {
239 require_once(
'lib/setup/integrator.php');
242 require_once(
'lib/setup/comments_zone.php');
244 if (
$prefs[
'feature_lastup'] ==
'y') {
245 require_once(
'lib/setup/last_update.php');
247 if (! empty(
$_SESSION[
'interactive_translation_mode']) && (
$_SESSION[
'interactive_translation_mode'] ==
'on')) {
250 if (
$prefs[
'feature_freetags'] ==
'y') {
251 require_once(
'lib/setup/freetags.php');
253 if (
$prefs[
'feature_categories'] ==
'y') {
254 require_once(
'lib/setup/categories.php');
255 if (
$prefs[
'feature_areas'] ==
'y' &&
$prefs[
'categories_used_in_tpl'] ==
'y') {
257 $areaslib->HandleObjectCategories($objectCategoryIdsNoJail);
260 if (
$prefs[
'feature_userlevels'] ==
'y') {
261 require_once(
'lib/setup/userlevels.php');
263 if (
$prefs[
'auth_method'] ==
'openid') {
264 require_once(
'lib/setup/openid.php');
266 if (
$prefs[
'feature_wysiwyg'] ==
'y') {
272 $smarty->assign(
'wysiwyg',
'n');
275 if (
$prefs[
'pwa_feature'] ==
'y') {
276 $headerlib->add_jsfile(VendorHelper::getAvailableVendorPath(
'dexie',
'npm-asset/dexie/dist/dexie.min.js'),
true);
277 $pages = [
'trackers' => [],
'wiki' => []];
290 $pagesAll =
$tikilib->get_all_pages();
291 $pages[
'wiki'] = array_map(
function ($m) {
292 return str_replace(
' ',
'-', $m[
'pageName']);
300 if (
$prefs[
'feature_antibot'] ==
'y' && empty(
$user)) {
301 if (
$prefs[
'recaptcha_enabled'] ===
'y') {
302 if (
$prefs[
'recaptcha_version'] ==
'2') {
303 if (! empty(
$prefs[
'language'])) {
304 $headerlib->add_jsfile_cdn(
"$url_scheme://www.google.com/recaptcha/api.js?hl=" .
$prefs[
'language']);
306 $headerlib->add_jsfile_cdn(
"$url_scheme://www.google.com/recaptcha/api.js");
309 $headerlib->add_jsfile_cdn(
"$url_scheme://www.google.com/recaptcha/api.js?render=".
$prefs[
'recaptcha_pubkey']);
316 if (
$prefs[
'feature_credits'] ==
'y') {
317 require_once(
'lib/setup/credits.php');
320 if (
$prefs[
'https_external_links_for_users'] ==
'y') {
326 if (! empty(
$prefs[
'feature_canonical_domain'])) {
327 $base_url_canonical =
$prefs[
'feature_canonical_domain'];
329 $base_url_canonical = $base_url_canonical_default;
332 if (substr($base_url_canonical, -1) !=
'/') {
333 $base_url_canonical .=
'/';
336 $smarty->assign_by_ref(
'phpErrors', $phpErrors);
340 $smarty->assign(
'lock',
false);
341 $smarty->assign(
'edit_page',
'n');
342 $smarty->assign(
'forum_mode',
'n');
343 $smarty->assign(
'wiki_extras',
'n');
356 $smarty->assign(
'base_url_canonical', $base_url_canonical);
357 $smarty->assign(
'base_url_canonical_default', $base_url_canonical_default);
359 $smarty->assign(
'stay_in_ssl_mode', $stay_in_ssl_mode);
368 if (isset(
$_GET[
'msg'])) {
376 require_once
'lib/setup/events.php';
378 if (
$prefs[
'rating_advanced'] ==
'y' &&
$prefs[
'rating_recalculation'] ==
'randomload') {
387 if (isset(
$prefs[
'javascript_cdn']) &&
$prefs[
'javascript_cdn'] ==
'google') {
388 $headerlib->add_jsfile_cdn(
"$url_scheme://ajax.googleapis.com/ajax/libs/jquery/$headerlib->jquery_version/jquery.min.js");
390 $headerlib->add_jsfile_dependancy(
"vendor_bundled/vendor/components/jquery-migrate/jquery-migrate.min.js",
true);
392 $headerlib->add_jsfile_cdn(
"$url_scheme://code.jquery.com/jquery-$headerlib->jquery_version.min.js");
393 $headerlib->add_jsfile_cdn(
"$url_scheme://code.jquery.com/jquery-migrate-$headerlib->jquerymigrate_version.min.js");
395 if (isset(
$prefs[
'tiki_minify_javascript']) &&
$prefs[
'tiki_minify_javascript'] ===
'y') {
396 $headerlib->add_jsfile_dependancy(
"vendor_bundled/vendor/components/jquery/jquery.min.js",
true);
397 $headerlib->add_jsfile_dependancy(
"vendor_bundled/vendor/components/jquery-migrate/jquery-migrate.min.js",
true);
399 $headerlib->add_jsfile_dependancy(
"vendor_bundled/vendor/components/jquery/jquery.js",
true);
400 $headerlib->add_jsfile_dependancy(
"vendor_bundled/vendor/components/jquery-migrate/jquery-migrate.js",
true);
404 if (isset(
$prefs[
'fgal_elfinder_feature']) &&
$prefs[
'fgal_elfinder_feature'] ===
'y') {
405 $str =
$prefs[
'tiki_minify_javascript'] ===
'y' ?
'min' :
'full';
408 $headerlib->add_jsfile(
'vendor_bundled/vendor/studio-42/elfinder/js/elfinder.' . $str .
'.js',
true)
409 ->add_cssfile(
'vendor_bundled/vendor/studio-42/elfinder/css/elfinder.' . $str .
'.css')
410 ->add_jsfile(
'lib/jquery_tiki/elfinder/tiki-elfinder.js');
412 $elFinderLang = str_replace([
'cn',
'pt-br'], [
'zh_CN',
'pt_BR'], $language);
414 if (file_exists(
'vendor_bundled/vendor/studio-42/elfinder/js/i18n/elfinder.' . $elFinderLang .
'.js')) {
415 $headerlib->add_jsfile(
'vendor_bundled/vendor/studio-42/elfinder/js/i18n/elfinder.' . $elFinderLang .
'.js');
419 $headerlib->add_jsfile(
'lib/jquery_tiki/tiki-jquery.js');
421 if (isset(
$_REQUEST[
'geo_zoomlevel_to_found_location'])) {
422 $zoomToFoundLocation =
$_REQUEST[
'geo_zoomlevel_to_found_location'];
424 $zoomToFoundLocation = isset(
$prefs[
'geo_zoomlevel_to_found_location']) ?
$prefs[
'geo_zoomlevel_to_found_location'] :
'street';
426 $headerlib->add_js(
'var zoomToFoundLocation = "' . addslashes($zoomToFoundLocation) .
'";');
428 if (
$prefs[
'geo_enabled'] ===
'y') {
429 if (
$prefs[
'geo_openlayers_version'] ===
'ol3') {
430 $headerlib->add_jsfile(
'lib/jquery_tiki/tiki-maps-ol3.js');
432 $headerlib->add_jsfile(
'lib/jquery_tiki/tiki-maps.js');
433 $headerlib->add_cssfile(
'lib/openlayers/theme/default/style.css');
436 $headerlib->add_jsfile(
'vendor_bundled/vendor/jquery-plugins/jquery-json/src/jquery.json.js');
438 if (
$prefs[
'feature_jquery_zoom'] ===
'y') {
439 $headerlib->add_jsfile(
'vendor_bundled/vendor/jquery-plugins/zoom/jquery.zoom.js')
442 display:inline-block;
452 background:url(vendor_bundled/vendor/jquery-plugins/zoom/icon.png);
460 if (
$prefs[
'feature_syntax_highlighter'] ==
'y') {
463 ->add_cssfile(
'vendor_bundled/vendor/codemirror/codemirror/lib/codemirror.css')
464 ->add_jsfile_dependancy(
'vendor_bundled/vendor/codemirror/codemirror/lib/codemirror.js')
465 ->add_jsfile(
'vendor_bundled/vendor/codemirror/codemirror/addon/search/searchcursor.js')
466 ->add_jsfile(
'vendor_bundled/vendor/codemirror/codemirror/addon/mode/overlay.js')
468 ->add_cssfile(
'themes/base_files/feature_css/codemirror_tiki.css')
469 ->add_jsfile(
'lib/codemirror_tiki/codemirror_tiki.js');
471 require_once(
"lib/codemirror_tiki/tiki_codemirror.php");
475 if (
$prefs[
'feature_jquery_carousel'] ==
'y') {
476 $headerlib->add_jsfile(
'vendor_bundled/vendor/jquery-plugins/infinitecarousel/jquery.infinitecarousel3.js');
479 if (
$prefs[
'feature_ajax'] ===
'y') {
480 $headerlib->add_jsfile(
'lib/jquery_tiki/tiki-confirm.js');
481 $headerlib->add_jsfile(
'lib/ajax/autosave.js');
486 if (
$prefs[
'feature_jquery_ui'] ==
'y') {
487 if (isset(
$prefs[
'javascript_cdn']) &&
$prefs[
'javascript_cdn'] ==
'google') {
488 $headerlib->add_jsfile_cdn(
"$url_scheme://ajax.googleapis.com/ajax/libs/jqueryui/$headerlib->jqueryui_version/jquery-ui.min.js");
490 $headerlib->add_jsfile_cdn(
"$url_scheme://code.jquery.com/ui/$headerlib->jqueryui_version/jquery-ui.min.js");
492 if (
$prefs[
'tiki_minify_javascript'] ===
'y') {
493 $headerlib->add_jsfile_dependancy(
"vendor_bundled/vendor/components/jqueryui/jquery-ui.min.js",
true);
495 $headerlib->add_jsfile_dependancy(
"vendor_bundled/vendor/components/jqueryui/jquery-ui.js");
502 if (typeof $.fn.button.noConflict === "function") {
503 bootstrapButton = $.fn.button.noConflict() // return $.fn.button to previously assigned value
504 $.fn.bootstrapBtn = bootstrapButton // give $().bootstrapBtn the Bootstrap functionality
508 if (
$prefs[
'feature_jquery_ui_theme'] !==
'none') {
512 $headerlib->add_cssfile(
'vendor_bundled/vendor/components/jqueryui/themes/' .
$prefs[
'feature_jquery_ui_theme'] .
'/jquery-ui.css');
518 if (
$prefs[
'feature_jquery_autocomplete'] ==
'y') {
520 '.ui-autocomplete-loading { background: white url("img/spinner.gif") right center no-repeat; }'
523 if (
$prefs[
'jquery_ui_chosen'] ==
'y') {
524 $headerlib->add_jsfile(
'vendor_bundled/vendor/harvesthq/chosen/chosen.jquery.min.js',
true);
526 $headerlib->add_jsfile(
'vendor_bundled/vendor/jquery/jquery-timepicker-addon/dist/jquery-ui-timepicker-addon.js');
527 $headerlib->add_cssfile(
'vendor_bundled/vendor/jquery/jquery-timepicker-addon/dist/jquery-ui-timepicker-addon.css');
529 if (
$prefs[
'jquery_fitvidjs'] ==
'y') {
530 $headerlib->add_jsfile(
'vendor_bundled/vendor/jquery-plugins/fitvidjs/jquery.fitvids.js')
531 ->add_jq_onready(
'$("article").fitVids();');
533 if (
$prefs[
'feature_jquery_superfish'] ==
'y') {
534 $headerlib->add_jsfile(
'vendor_bundled/vendor/jquery-plugins/superfish/dist/js/superfish.js');
535 $headerlib->add_jsfile(
'vendor_bundled/vendor/jquery-plugins/superfish/dist/js/supersubs.js');
537 if (
$prefs[
'feature_jquery_tooltips'] ===
'y' ||
$prefs[
'feature_jquery_superfish'] ===
'y') {
538 $headerlib->add_jsfile(
'vendor_bundled/vendor/jquery-plugins/superfish/dist/js/hoverIntent.js');
540 if (
$prefs[
'jquery_smartmenus_enable'] ==
'y') {
541 $headerlib->add_jsfile(
'vendor_bundled/vendor/drmonty/smartmenus/js/jquery.smartmenus.js');
542 $headerlib->add_jsfile(
'vendor_bundled/vendor/drmonty/smartmenus/js/jquery.smartmenus.bootstrap-4.js');
543 $headerlib->add_cssfile(
'vendor_bundled/vendor/drmonty/smartmenus/css/sm-core-css.css');
544 $headerlib->add_cssfile(
'vendor_bundled/vendor/drmonty/smartmenus/css/jquery.smartmenus.bootstrap-4.css');
545 if (! empty(
$prefs[
'jquery_smartmenus_mode'])) {
547 'vendor_bundled/vendor/drmonty/smartmenus/css/sm-' .
$prefs[
'jquery_smartmenus_mode'] .
'.css'
551 $("ul.navbanav").smartmenus();
554 if (
$prefs[
'feature_jquery_reflection'] ==
'y') {
555 $headerlib->add_jsfile(
'vendor_bundled/vendor/jquery-plugins/reflection-jquery/js/reflection.js');
557 if (
$prefs[
'feature_jquery_media'] ==
'y') {
558 $headerlib->add_jsfile(
'vendor_bundled/vendor/jquery-plugins/media/jquery.media.js');
560 if (
$prefs[
'feature_jquery_tablesorter'] ==
'y') {
561 $headerlib->add_jsfile(
'vendor_bundled/vendor/mottie/tablesorter/js/jquery.tablesorter.combined.js');
562 $headerlib->add_jsfile(
'vendor_bundled/vendor/mottie/tablesorter/js/parsers/parser-input-select.js');
563 $headerlib->add_jsfile(
'vendor_bundled/vendor/mottie/tablesorter/js/widgets/widget-columnSelector.js');
564 $headerlib->add_jsfile(
'vendor_bundled/vendor/mottie/tablesorter/js/widgets/widget-filter-formatter-jui.js');
565 $headerlib->add_jsfile(
'vendor_bundled/vendor/mottie/tablesorter/js/widgets/widget-grouping.js');
566 $headerlib->add_jsfile(
'vendor_bundled/vendor/mottie/tablesorter/js/widgets/widget-math.js');
567 $headerlib->add_jsfile(
'vendor_bundled/vendor/mottie/tablesorter/js/widgets/widget-pager.js');
569 $headerlib->add_jsfile(
'vendor_bundled/vendor/mottie/tablesorter/js/widgets/widget-sort2Hash.js');
570 $headerlib->add_jsfile(
'lib/jquery_tiki/tablesorter.js');
573 if (
$prefs[
'feature_jquery_tagcanvas'] ==
'y') {
574 $headerlib->add_jsfile(
'vendor_bundled/vendor/jquery-plugins/tagcanvas/jquery.tagcanvas.js');
577 if (
$prefs[
'feature_shadowbox'] ==
'y') {
578 $headerlib->add_jsfile(
'vendor_bundled/vendor/jquery-plugins/colorbox/jquery.colorbox.js');
579 $headerlib->add_cssfile(
'vendor_bundled/vendor/jquery-plugins/colorbox/' .
$prefs[
'jquery_colorbox_theme'] .
'/colorbox.css');
582 if (
$prefs[
'wikiplugin_flash'] ==
'y') {
583 $headerlib->add_jsfile(
'vendor_bundled/vendor/bower-asset/swfobject/swfobject/swfobject.js',
true);
585 if (
$prefs[
'jquery_timeago'] ===
'y') {
586 $headerlib->add_jsfile(
'vendor_bundled/vendor/rmm5t/jquery-timeago/jquery.timeago.js');
587 $language_short = substr(
$prefs[
'language'], 0, 2);
588 $timeago_locale =
"vendor_bundled/vendor/rmm5t/jquery-timeago/locales/jquery.timeago.{$language_short}.js";
589 if (is_readable($timeago_locale)) {
592 $headerlib->add_jq_onready(
'$("time.timeago").timeago(); jQuery.timeago.settings.allowFuture = true;');
595 if (
$prefs[
'jquery_jqdoublescroll'] ==
'y') {
597 ->add_jsfile(
'vendor_bundled/vendor/avianey/jqdoublescroll/jquery.doubleScroll.js')
598 ->add_jq_onready(
'$(".table-responsive").doubleScroll({resetOnWindowResize: true});');
601 if (
$prefs[
'feature_jquery_validation'] ==
'y') {
602 $headerlib->add_jsfile(
'vendor_bundled/vendor/jquery-plugins/jquery-validation/dist/jquery.validate.js');
603 $headerlib->add_jsfile(
'lib/validators/validator_tiki.js');
606 if (
$prefs[
'tiki_prefix_css'] ==
'y') {
607 $headerlib->add_jsfile(
'vendor_bundled/vendor/npm-asset/prefixfree/prefixfree.js');
612 $headerlib->add_jsfile(
'vendor_bundled/vendor/jquery-plugins/async/jquery.async.js');
614 $headerlib->add_jsfile(
'vendor_bundled/vendor/jquery-plugins/treetable/jquery.treetable.js');
615 $headerlib->add_cssfile(
'vendor_bundled/vendor/jquery-plugins/treetable/css/jquery.treetable.css');
617 $headerlib->add_jsfile(
'vendor_bundled/vendor/cwspear/bootstrap-hover-dropdown/bootstrap-hover-dropdown.js');
619 if (
$prefs[
'feature_equal_height_rows_js'] ==
'y') {
620 $headerlib->add_jsfile(
"vendor_bundled/vendor/Sam152/Javascript-Equal-Height-Responsive-Rows/grids.min.js");
623 if (
$prefs[
'vuejs_enable'] ===
'y' &&
$prefs[
'vuejs_always_load'] ===
'y') {
624 $headerlib->add_jsfile_cdn(
"vendor_bundled/vendor/npm-asset/vue/dist/{$prefs['vuejs_build_mode']}");
627 if (empty(
$user) &&
$prefs[
'feature_antibot'] ==
'y') {
628 $headerlib->add_jsfile_late(
'lib/captcha/captchalib.js');
631 if (! empty(
$prefs[
'header_custom_css'])) {
635 if (! empty(
$prefs[
'header_custom_js'])) {
639 if (
$prefs[
'feature_file_galleries'] ==
'y') {
640 $headerlib->add_jsfile(
'lib/jquery_tiki/files.js');
643 if (
$prefs[
'feature_trackers'] ==
'y') {
644 $headerlib->add_jsfile(
'lib/jquery_tiki/tiki-trackers.js');
646 if (
$prefs[
'feed_tracker'] ===
'y') {
648 foreach (
$opts as & $o) {
649 $o = $o[
'trackerId'];
655 if (in_array($trk[
'trackerId'],
$opts)) {
657 'trackerId' => $trk[
'trackerId'],
658 'name' => $trk[
'name'],
662 TikiLib::lib(
'smarty')->assign(
'rsslist_trackers', $rss_trackers);
666 if (
$prefs[
'feature_draw'] ==
'y') {
668 $headerlib->add_jsfile(
"vendor_bundled/vendor/svg-edit/svg-edit/embedapi.js");
669 $headerlib->add_jsfile(
"lib/svg-edit_tiki/draw.js");
670 $headerlib->add_cssfile(
"themes/base_files/feature_css/svg-edit-draw.css");
673 if (
$prefs[
'geo_always_load_openlayers'] ==
'y') {
677 if (
$prefs[
'workspace_ui'] ==
'y') {
678 $headerlib->add_jsfile(
'lib/jquery_tiki/tiki-workspace-ui.js');
681 if (
$prefs[
'feature_sefurl'] !=
'y') {
683 '$.service = function (controller, action, query) {
687 query.controller = controller;
690 query.action = action;
693 return "tiki-ajax_services.php?" + $.buildParams(query);
698 if (
$prefs[
'feature_friends'] ==
'y' ||
$prefs[
'monitor_enabled'] ==
'y') {
699 $headerlib->add_jsfile(
'lib/jquery_tiki/social.js');
702 if (
$prefs[
'ajax_inline_edit'] ==
'y') {
703 $headerlib->add_jsfile(
'lib/jquery_tiki/inline_edit.js');
706 if (
$prefs[
'mustread_enabled'] ==
'y') {
707 $headerlib->add_jsfile(
'lib/jquery_tiki/mustread.js');
710 if (
$prefs[
'feature_tasks'] ==
'y') {
711 $headerlib->add_jsfile(
'lib/jquery_tiki/tiki-tasks.js');
714 if (
$prefs[
'feature_inline_comments'] ===
'y' &&
$prefs[
'comments_inline_annotator'] ===
'y') {
715 if (empty($object)) {
720 if ($commentController->isEnabled($object[
'type'], $object[
'object']) &&
721 $commentController->canView($object[
'type'], $object[
'object'])) {
722 $canPost = $commentController->canPost($object[
'type'], $object[
'object']);
723 $objectIdentifier = urlencode($object[
'type']) .
':' . urlencode($object[
'object']);
726 ->add_jsfile(
'vendor_bundled/vendor/openannotation/annotator/annotator-full.min.js')
727 ->add_cssfile(
'vendor_bundled/vendor/openannotation/annotator/annotator.min.css')
728 ->add_jq_onready(
'var annotatorContent = $("#top").annotator({readOnly: ' . ($canPost ?
'false' :
'true') .
'});
729 annotatorContent.annotator("addPlugin", "Store", {
730 prefix: "tiki-ajax_services.php?controller=annotation&action=",
734 update: "update&threadId=:id",
735 destroy: "destroy&threadId=:id",
740 "uri": "' . $objectIdentifier .
'"
745 "uri": "' . $objectIdentifier .
'"
748 emulateJSON: true, // send the data in a form request so we can get it later
749 emulateHTTP: true // tiki services need GET or POST
752 annotatorContent.annotator("addPlugin", "Permissions", {
753 user: "' .
$user .
'",
754 showViewPermissionsCheckbox: false, // TODO for private comments
755 showEditPermissionsCheckbox: false,
756 userAuthorize: function(action, annotation, user) {
757 return annotation.permissions[action];
764 $headerlib->add_jsfile(
'lib/jquery_tiki/pluginedit.js');
767 if (
$prefs[
'tiki_cachecontrol_session']) {
768 header(
'Cache-Control: ' .
$prefs[
'tiki_cachecontrol_session']);
771 if (
$prefs[
'tiki_cachecontrol_nosession']) {
772 header(
'Cache-Control: ' .
$prefs[
'tiki_cachecontrol_nosession']);
777 $http_origin =
$_SERVER[
'HTTP_ORIGIN'];
779 if (in_array($http_origin, preg_split(
'/[\s,]+/',
$prefs[
'access_control_allow_origin']))) {
780 header(
"Access-Control-Allow-Origin: $http_origin");
784 if (isset($token_error)) {
785 $smarty->assign(
'token_error', $token_error);
790 require_once(
'lib/setup/plugins_actions.php');
793 $headerlib->add_jsfile_late(
'lib/jquery_tiki/tiki-admin.js');
796 if (
$prefs[
'wikiplugin_addtocart'] ==
'y') {
797 $headerlib->add_jsfile(
'lib/payment/cartlib.js');
836 if (
$prefs[
'openpgp_gpg_pgpmimemail'] ==
'y') {
839 require_once(
'lib/openpgp/openpgplib.php');
846 if (
$prefs[
'print_pdf_from_url'] !=
'none') {
847 $headerlib->add_jsfile(
'lib/jquery_tiki/pdf.js');
848 $headerlib->add_jsfile(
'vendor_bundled/vendor/npm-asset/html2canvas/dist/html2canvas.min.js',
true);
849 $headerlib->add_jsfile(
'vendor_bundled/vendor/mrrio/jspdf/jspdf.min.js',
true);
850 $headerlib->add_jsfile(
'lib/jquery_tiki/fullcalendar_to_pdf.js');
853 if (file_exists(
'_custom/lib/setup/custom.php')) {
854 include_once(
'_custom/lib/setup/custom.php');
861 if (
$prefs[
'conditions_enabled'] ==
'y') {
864 $broker = $servicelib->getBroker();
865 $broker->process(
'user_conditions',
'age_validation',
$jitRequest);
870 $broker = $servicelib->getBroker();
871 $broker->process(
'user_conditions',
'approval',
$jitRequest);
if(basename($_SERVER['SCRIPT_NAME'])===basename(__FILE__)) global $base_host
if(basename($_SERVER['SCRIPT_NAME'])===basename(__FILE__)) global $base_url_https
static error($feedback, $sendHeaders=false)
if(strpos($_SERVER['SCRIPT_NAME'], basename(__FILE__)) !==false) global $base_url
$_SESSION["install-logged-$multi"]
if(basename($_SERVER['SCRIPT_NAME'])===basename(__FILE__)) global $url_host
filter_out_sefurl($tpl_output, $type=null, $title='', $with_next=null, $with_title='y')
if(strpos($_SERVER['SCRIPT_NAME'], basename(__FILE__)) !=false) global $user
if(isset($_GET['msg'])) elseif(isset( $_SESSION[ 'msg']))
$_REQUEST["fgal_podcast_dir"]
if(strpos($_SERVER['SCRIPT_NAME'], basename(__FILE__)) !=false) global $jitRequest
if(PEAR::isError($options)) $opts
if(basename($_SERVER['SCRIPT_NAME'])===basename(__FILE__)) global $base_url_http
if(strpos($_SERVER['SCRIPT_NAME'], basename(__FILE__)) !==false) global $tikipath
setCookieSection($name, $value, $section='', $expire=null, $path='', $domain='', $secure='')
if(basename($_SERVER['SCRIPT_NAME'])===basename(__FILE__)) global $url_path
if(! $prefs['feature_antibot']=='y') $captchalib
static requiresApproval($user)
static errorPage($feedback)
if(basename($_SERVER['SCRIPT_NAME'])===basename(__FILE__)) global $url_scheme
if(strpos($_SERVER['SCRIPT_NAME'], basename(__FILE__)) !==false) $wikilib
if(basename($_SERVER['SCRIPT_NAME'])===basename(__FILE__)) global $url_port
if(! empty($section)) if(! empty($section_class)) elseif(! empty($section)) current_object()
static hasRequiredAge($user)
static add($feedback, $sendHeaders=false)
getCookie($name, $section=null, $default=null)
json_encode($value, $options=0, $depth=512)
if(basename($_SERVER['SCRIPT_NAME'])===basename(__FILE__)) global $tikiroot