-INSERT INTO ConfigurationValues VALUES (DEFAULT, 'poll_CommentDelay_Interval', '60', 'In-Bulletin', 'in-bulletin:configuration_output');
-INSERT INTO ConfigurationValues VALUES (DEFAULT, 'poll_CommentDelay_Value', '10', 'In-Bulletin', 'in-bulletin:configuration_output');
-
-UPDATE Category SET Template = '/in-bulletin/designs/section' WHERE Template = 'inbulletin/index';
-UPDATE Category SET CachedTemplate = '/in-bulletin/designs/section' WHERE CachedTemplate = 'inbulletin/index';
-
-UPDATE ConfigurationValues SET VariableValue = '/in-bulletin/designs/section' WHERE VariableName = 'bb_CategoryTemplate';
-UPDATE ConfigurationValues SET VariableValue = 'in-bulletin/designs/detail' WHERE VariableName = 'bb_ItemTemplate';
-
-INSERT INTO Permissions VALUES (DEFAULT, 'in-bulletin:topics.view', 11, 1, 1, 0);
-INSERT INTO Permissions VALUES (DEFAULT, 'in-bulletin:setting_folder.view', 11, 1, 1, 0);
-DELETE FROM Permissions WHERE Permission LIKE 'in-bulletin:inbulletin_general.%';
-
-UPDATE Phrase SET Module = 'In-Bulletin' WHERE ((Phrase LIKE '%Topic%' OR Phrase LIKE '%Post%' OR Phrase LIKE '%Forum%' OR Phrase LIKE '%Censor%' OR Phrase LIKE '%Smiley%' OR Phrase = 'la_title_In-Bulletin') AND (Module = 'Core'));
Property changes on: releases/5.0.0/in-bulletin/install/upgrades.sql
-INSERT INTO ConfigurationAdmin VALUES ('Topic_SortField', 'la_Text_Topics', 'la_topic_sortfield_prompt', 'select', '', 'TopicText=la_opt_TopicText,Posts=la_opt_NumberOfPosts,CreatedOn=la_opt_CreatedOn,LastPostDate=la_opt_LastUpdated,Views=la_opt_TopicViews,CachedRating=la_opt_Rating,LastPoser=la_opt_LastPoster,<SQL>SELECT Prompt AS OptionName, CONCAT("cust_", FieldName) AS OptionValue FROM <PREFIX>CustomField WHERE (Type = 3) AND (IsSystem = 0)</SQL>', 10.01, 1, 1);
-INSERT INTO ConfigurationAdmin VALUES ('Topic_SortField2', 'la_Text_Topics', 'la_topic_sortfield2_prompt', 'select', '', 'TopicText=la_opt_TopicText,Posts=la_opt_NumberOfPosts,CreatedOn=la_opt_CreatedOn,LastPostDate=la_opt_LastUpdated,Views=la_opt_TopicViews,CachedRating=la_opt_Rating,LastPoser=la_opt_LastPoster,<SQL>SELECT Prompt AS OptionName, CONCAT("cust_", FieldName) AS OptionValue FROM <PREFIX>CustomField WHERE (Type = 3) AND (IsSystem = 0)</SQL>', 10.02, 1, 1);
-INSERT INTO PermissionConfig VALUES (DEFAULT, 'TOPIC.VIEW', 'lu_PermName_Topic.View_desc', 'lu_PermName_Topic.View_error', 'In-Bulletin');
-INSERT INTO PermissionConfig VALUES (DEFAULT, 'TOPIC.ADD', 'lu_PermName_Topic.Add_desc', 'lu_PermName_Topic.Add_error', 'In-Bulletin');
-INSERT INTO PermissionConfig VALUES (DEFAULT, 'TOPIC.ADD.PENDING', 'lu_PermName_Topic.Add.Pending_desc', 'lu_PermName_Topic.Add.Pending_error', 'In-Bulletin');
-INSERT INTO PermissionConfig VALUES (DEFAULT, 'TOPIC.DELETE', 'lu_PermName_Topic.Delete_desc', 'lu_PermName_Topic.Delete_error', 'In-Bulletin');
-INSERT INTO PermissionConfig VALUES (DEFAULT, 'TOPIC.MODIFY', 'lu_PermName_Topic.Modify_desc', 'lu_PermName_Topic.Modify_error', 'In-Bulletin');
-INSERT INTO PermissionConfig VALUES (DEFAULT, 'TOPIC.REPLY.DELETE', 'lu_PermName_Topic.Reply.Delete_desc', 'lu_PermName_Topic.Reply.Delete_desc', 'In-Bulletin');
-INSERT INTO PermissionConfig VALUES (DEFAULT, 'TOPIC.REPLY.VIEW', 'lu_PermName_Topic.Reply.View_desc', 'lu_PermName_Topic.Reply.View_error', 'In-Bulletin');
-INSERT INTO PermissionConfig VALUES (DEFAULT, 'TOPIC.REPLY.ADD', 'lu_PermName_Topic.Reply.Add_desc', 'lu_PermName_Topic.Reply.Add_error', 'In-Bulletin');
-INSERT INTO PermissionConfig VALUES (DEFAULT, 'TOPIC.REPLY.MODIFY', 'lu_PermName_Topic.Reply.Modify_desc', 'lu_PermName_Topic.Reply.Modify_error', 'In-Bulletin');
-INSERT INTO PermissionConfig VALUES (DEFAULT, 'TOPIC.RATE', 'lu_PermName_Topic.Rate_desc', 'lu_PermName_Topic.Rate_desc', 'In-Bulletin');
-INSERT INTO PermissionConfig VALUES (DEFAULT, 'TOPIC.REVIEW', 'lu_PermName_Topic.Review_desc', 'lu_PermName_Topic.Review_desc', 'In-Bulletin');
-INSERT INTO PermissionConfig VALUES (DEFAULT, 'TOPIC.REPLY.OWNER.MODIFY', 'lu_PermName_Topic.Reply.Owner.Modify_desc', 'lu_PermName_Topic.Reply.Owner.Modify_error', 'In-Bulletin');
-INSERT INTO PermissionConfig VALUES (DEFAULT, 'TOPIC.REPLY.OWNER.DELETE', 'lu_PermName_Topic.Reply.Owner.Delete_desc', 'lu_PermName_Topic.Reply.Owner.Delete_error', 'In-Bulletin');
-INSERT INTO PermissionConfig VALUES (DEFAULT, 'TOPIC.OWNER.DELETE', 'lu_PermName_Topic.Owner.Delete_desc', 'lu_PermName_Topic.Owner.Delete_error', 'In-Bulletin');
-INSERT INTO PermissionConfig VALUES (DEFAULT, 'TOPIC.MODIFY.PENDING', 'lu_PermName_Topic.Modify.Pending_desc', 'lu_PermName_Topic.Modify.Pending_error', 'In-Bulletin');
-INSERT INTO PermissionConfig VALUES (DEFAULT, 'TOPIC.OWNER.MODIFY.PENDING', 'lu_PermName_Topic.Owner.Modify.Pending_desc', 'lu_PermName_Topic.Owner.Modify.Pending_error', 'In-Bulletin');
-INSERT INTO PermissionConfig VALUES (DEFAULT, 'TOPIC.OWNER.MODIFY', 'lu_PermName_Topic.Owner.Modify_desc', 'lu_PermName_Topic.Owner.Modify_error', 'In-Bulletin');
-INSERT INTO PermissionConfig VALUES (DEFAULT, 'TOPIC.LOCK', 'lu_PermName_Topic.Lock_desc', 'lu_PermName_Topic.Lock_error', 'In-Bulletin');
-
-INSERT INTO StatItem VALUES (DEFAULT, 'In-Bulletin', 'SELECT count(*) FROM <%prefix%>Topic WHERE Status=1', NULL, 'la_prompt_ActiveTopics', 0, 1);
-INSERT INTO StatItem VALUES (DEFAULT, 'In-Bulletin', 'SELECT COUNT(*) AS TotalTopics FROM <%prefix%>Topic', NULL, 'la_prompt_TopicsTotal', 0, 2);
-INSERT INTO StatItem VALUES (DEFAULT, 'In-Bulletin', 'SELECT COUNT(*) AS ActiveTopics FROM <%prefix%>Topic WHERE Status = 1', NULL, 'la_prompt_TopicsActive', 0, 2);
-INSERT INTO StatItem VALUES (DEFAULT, 'In-Bulletin', 'SELECT COUNT(*) AS PendingTopics FROM <%prefix%>Topic WHERE Status = 2', NULL, 'la_prompt_TopicsPending', 0, 2);
-INSERT INTO StatItem VALUES (DEFAULT, 'In-Bulletin', 'SELECT COUNT(*) AS DisabledTopics FROM <%prefix%>Topic WHERE Status = 0', NULL, 'la_prompt_TopicsDisabled', 0, 2);
-INSERT INTO StatItem VALUES (DEFAULT, 'In-Bulletin', 'SELECT COUNT(*) AS NewTopics FROM <%prefix%>Topic WHERE (NewItem = 1) OR ( (UNIX_TIMESTAMP() - CreatedOn) <= <%m:config name="Topic_NewDays"%>*86400 AND (NewItem = 2) )', NULL, 'la_prompt_NewTopics', 0, 2);
-INSERT INTO StatItem VALUES (DEFAULT, 'In-Bulletin', 'SELECT COUNT(*) FROM <%prefix%>Topic WHERE EditorsPick = 1', NULL, 'la_prompt_EditorsPickTopics', 0, 2);
-INSERT INTO StatItem VALUES (DEFAULT, 'In-Bulletin', 'SELECT COUNT(*) AS HotTopics FROM <%prefix%>Topic WHERE (HotItem = 1) OR (Posts >= <%m:config name="Topic_MaxHotNumber"%> AND (HotItem = 2) )', NULL, 'la_prompt_HotTopics', 0, 2);
-INSERT INTO StatItem VALUES (DEFAULT, 'In-Bulletin', 'SELECT COUNT(*) AS PopularTopics FROM <%prefix%>Topic WHERE (PopItem = 1) OR ( (CachedRating >= <%topic:hit_count type="top"%>) AND <%topic:hit_count type="top"%> AND (PopItem = 2) )', NULL, 'la_prompt_PopularTopics', 0, 2);
-INSERT INTO StatItem VALUES (DEFAULT, 'In-Bulletin', 'SELECT <%m:post_format field="AVG(CachedRating)" type="currency" precision="2"%> FROM <%prefix%>Topic WHERE CachedRating > 0', NULL, 'la_prompt_TopicAverageRating', 0, 2);
-INSERT INTO StatItem VALUES (DEFAULT, 'In-Bulletin', 'SELECT MAX(Views) AS MaxTopicHits FROM <%prefix%>Topic', NULL, 'la_prompt_MaxTopicHits', 0, 2);
-INSERT INTO StatItem VALUES (DEFAULT, 'In-Bulletin', 'SELECT MAX(CachedVotesQty) AS MaxTopicVotes FROM <%prefix%>Topic', NULL, 'la_prompt_MaxTopicVotes', 0, 2);
-INSERT INTO StatItem VALUES (DEFAULT, 'In-Bulletin', 'SELECT <%m:post_format field="MAX(CreatedOn)" type="date"%> FROM <%prefix%>Topic', NULL, 'la_prompt_NewestTopicDate', 0, 2);
-INSERT INTO StatItem VALUES (DEFAULT, 'In-Bulletin', 'SELECT <%m:post_format field="MAX(CreatedOn)" type="time"%> FROM <%prefix%>Topic', NULL, 'la_prompt_NewestTopicTime', 0, 2);
-INSERT INTO StatItem VALUES (DEFAULT, 'In-Bulletin', 'SELECT <%m:post_format field="MAX(Modified)" type="date"%> FROM <%prefix%>Topic', NULL, 'la_prompt_LastUpdatedTopicDate', 0, 2);
-INSERT INTO StatItem VALUES (DEFAULT, 'In-Bulletin', 'SELECT <%m:post_format field="MAX(Modified)" type="time"%> FROM <%prefix%>Topic', NULL, 'la_prompt_LastUpdatedTopicTime', 0, 2);
-INSERT INTO StatItem VALUES (DEFAULT, 'In-Bulletin', 'SELECT COUNT(*) FROM <%prefix%>ItemReview WHERE Module = \'<%modules:get_current%>\'', NULL, 'la_prompt_TopicReviews', 0, 2);
-INSERT INTO StatItem VALUES (DEFAULT, 'In-Bulletin', 'SELECT COUNT(*) AS TotalPosts FROM <%prefix%>Posting', NULL, 'la_prompt_PostsTotal', 0, 2);
-INSERT INTO StatItem VALUES (DEFAULT, 'In-Bulletin', 'SELECT <%m:post_format field="MAX(CreatedOn)" type="date"%> FROM <%prefix%>Posting', NULL, 'la_prompt_NewestPostDate', 0, 2);
-INSERT INTO StatItem VALUES (DEFAULT, 'In-Bulletin', 'SELECT <%m:post_format field="MAX(CreatedOn)" type="time"%> FROM <%prefix%>Posting', NULL, 'la_prompt_NewestPostTime', 0, 2);
-INSERT INTO StatItem VALUES (DEFAULT, 'In-Bulletin', 'SELECT <%m:post_format field="MAX(Modified)" type="date"%> FROM <%prefix%>Posting', NULL, 'la_prompt_LastUpdatedPostDate', 0, 2);
-INSERT INTO StatItem VALUES (DEFAULT, 'In-Bulletin', 'SELECT <%m:post_format field="MAX(Modified)" type="time"%> FROM <%prefix%>Posting', NULL, 'la_prompt_LastUpdatedPostTime', 0, 2);
-* @copyright Copyright (C) 1997 - 2009 Intechnic. All rights reserved.
-* @license GNU/GPL
-* In-Portal is Open Source software.
-* This means that this software may have been modified pursuant
-* the GNU General Public License, and as distributed it includes
-* or is derivative of works licensed under the GNU General Public License
-* or other free or open source software licenses.
-* See http://www.in-portal.net/license/ for copyright notices and details.
-*/
-
-
- class PollTagProcessor extends kDBTagProcessor {
-
- /**
- * Allows to tell if user from current ip has voted already for current poll
- *
- * @param Array $params
- * @return bool
- */
- function HasVoted($params)
- {
- $object =& $this->getObject($params);
- /* @var $object kDBItem */
-
- if (!$object->GetDBField('AllowMultipleVotings')) {
- $sql = 'SELECT StatisticsId
- FROM '.TABLE_PREFIX.'PollsStatistics
- WHERE PollId = '.$object->GetID().' AND CreatedById = '.$this->Application->RecallVar('user_id').' AND UserIP = '.$this->Conn->qstr(getenv('REMOTE_ADDR'));
- $has_voted = $this->Conn->GetOne($sql) > 0;
- }
-
- return $has_voted;
- }
-
- /**
- * Allows to tell if user from current ip has voted already for current poll
- Grids['<inp2:m_param name="prefix"/>'].SetDependantToolbarButtons( new Array('edit','delete','approve','decline','sep3','cut','copy','move_up','move_down','sep6'));