1<?php 2// (c) Copyright by authors of the Tiki Wiki CMS Groupware Project 3// 4// All Rights Reserved. See copyright.txt for details and a complete list of authors. 5// Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See license.txt for details. 6// $Id$ 7 8if (basename($_SERVER['SCRIPT_NAME']) === basename(__FILE__)) { 9 die('This script may only be included.'); 10} 11 12/* 13 * Show comments zone on page load by default 14 */ 15$comzone = $_REQUEST['comzone']; 16if ($comzone == 'show') { 17 if (strstr($_SERVER['REQUEST_URI'], 'tiki-read_article') and $prefs['feature_article_comments'] == 'y') { 18 $prefs['show_comzone'] = 'y'; 19 } 20 21 if (strstr($_SERVER['REQUEST_URI'], 'tiki-poll_results') and $prefs['feature_poll_comments'] == 'y') { 22 $prefs['show_comzone'] = 'y'; 23 } 24 25 if (strstr($_SERVER['REQUEST_URI'], 'tiki-index') and $prefs['feature_wiki_comments'] == 'y') { 26 $prefs['show_comzone'] = 'y'; 27 } 28 29 if (strstr($_SERVER['REQUEST_URI'], 'tiki-view_faq') and $prefs['feature_faq_comments'] == 'y') { 30 $prefs['show_comzone'] = 'y'; 31 } 32 33 if (strstr($_SERVER['REQUEST_URI'], 'tiki-browse_gallery') and $prefs['feature_image_galleries_comments'] == 'y') { 34 $prefs['show_comzone'] = 'y'; 35 } 36 37 if (strstr($_SERVER['REQUEST_URI'], 'tiki-list_file_gallery') and $prefs['feature_file_galleries_comments'] == 'y') { 38 $prefs['show_comzone'] = 'y'; 39 } 40 41 if (strstr($_SERVER['REQUEST_URI'], 'tiki-view_blog_post') and $prefs['feature_blogposts_comments'] == 'y') { 42 $prefs['show_comzone'] = 'y'; 43 } 44 45 if (strstr($_SERVER['REQUEST_URI'], 'tiki-map') and $prefs['feature_map_comments'] == 'y') { 46 $prefs['show_comzone'] = 'y'; 47 } 48 49 if ($prefs['show_comzone'] == 'y') { 50 $smarty->assign('show_comzone', 'y'); 51 } 52} 53