Version 4.7.6
This commit is contained in:
1 parent
8ba7d43898
commit
7b7404e741
1085 files changed
+30590
-7837
No files matched your search
@@ -333,13 +333,13 @@ class _posts extends \IPS\Content\Api\CommentController
|
||||
* POST /forums/posts/{id}/report
|
||||
* Reports a post
|
||||
*
|
||||
* @param int $id ID Number
|
||||
* @apiparam int author ID of the member reporting
|
||||
* @apiparam int report_type Report type (0 is default and is for letting CMGR team know, more options via core_automatic_moderation_types)
|
||||
* @apiparam string message Optional message
|
||||
* @return \IPS\forums\Topic\Post
|
||||
* @param int $id ID Number
|
||||
* @apiparam int author ID of the member reporting
|
||||
* @apiparam int report_type Report type (0 is default and is for letting CMGR team know, more options via core_automatic_moderation_types)
|
||||
* @apiparam string message Optional message
|
||||
* @throws 1S425/B NO_AUTHOR The author ID does not exist
|
||||
* @throws 1S425/C REPORTED_ALREADY The member has reported this item in the past 24 hours
|
||||
* @return \IPS\forums\Topic\Post
|
||||
*/
|
||||
public function POSTitem_report( $id )
|
||||
{
|
||||
|
||||
@@ -174,9 +174,9 @@ class _topics extends \IPS\Content\Api\ItemController
|
||||
* @apiparam int pinned 1/0 indicating if the topic should be pinned
|
||||
* @apiparam int featured 1/0 indicating if the topic should be featured
|
||||
* @apiparam string poll_title Poll title (to create a poll)
|
||||
* @apiparam bool poll_public Make the poll public
|
||||
* @apiparam bool poll_only Make this a poll-only topic
|
||||
* @apiparam array poll_options Array of objects with keys 'title' (string), 'answers' (array of objects with key 'value' set to the choice) and 'multichoice' (bool)
|
||||
* @apiparam int poll_public 1/0 indicating if the poll is public
|
||||
* @apiparam int poll_only 1/0 indicating if this a poll-only topic
|
||||
* @apiparam array poll_options Array of objects with keys 'title' (string), 'answers' (array of objects with key 'value' set to the choice) and 'multichoice' (int 1/0)
|
||||
* @throws 1F294/2 NO_FORUM The forum ID does not exist
|
||||
* @throws 1F294/3 NO_AUTHOR The author ID does not exist
|
||||
* @throws 1F294/5 NO_TITLE No title was supplied
|
||||
@@ -278,9 +278,9 @@ class _topics extends \IPS\Content\Api\ItemController
|
||||
* @apiparam int pinned 1/0 indicating if the topic should be pinned
|
||||
* @apiparam int featured 1/0 indicating if the topic should be featured
|
||||
* @apiparam string poll_title Poll title (to create a poll)
|
||||
* @apiparam bool poll_public Make the poll public
|
||||
* @apiparam bool poll_only Make this a poll-only topic
|
||||
* @apiparam array poll_options Array of objects with keys 'title' (string), 'answers' (array of objects with key 'value' set to the choice) and 'multichoice' (bool)
|
||||
* @apiparam int poll_public 1/0 indicating if the poll is public
|
||||
* @apiparam int poll_only 1/0 indicating if this a poll-only topic
|
||||
* @apiparam array poll_options Array of objects with keys 'title' (string), 'answers' (array of objects with key 'value' set to the choice) and 'multichoice' (int 1/0)
|
||||
* @param int $id ID Number
|
||||
* @throws 2F294/6 INVALID_ID The topic ID does not exist or the authorized user does not have permission to view it
|
||||
* @throws 1F294/7 NO_FORUM The forum ID does not exist or the authorized user does not have permission to post in it
|
||||
|
||||
@@ -38,6 +38,13 @@
|
||||
"do": "",
|
||||
"restriction": "questions_manage",
|
||||
"subcontrollers": ""
|
||||
},
|
||||
"solved": {
|
||||
"tab": "stats",
|
||||
"controller": "solved",
|
||||
"do": "",
|
||||
"restriction": "topics_manage",
|
||||
"subcontrollers": ""
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -3,12 +3,19 @@
|
||||
"lang_key": "menu__forums_forums_forums",
|
||||
"restriction": "forums_manage",
|
||||
"keywords": [
|
||||
"edit forum",
|
||||
"categories",
|
||||
"edit forum",
|
||||
"forum",
|
||||
"forums"
|
||||
]
|
||||
},
|
||||
"app=forums&module=forums&controller=forums&do=form&searchResult=bw_enable_answers__member": {
|
||||
"lang_key": "bw_enable_answers__member",
|
||||
"restriction": "forums_manage",
|
||||
"keywords": [
|
||||
"solved"
|
||||
]
|
||||
},
|
||||
"app=forums&module=forums&controller=forums&do=form&searchResult=forum_best_answer": {
|
||||
"lang_key": "bw_enable_answers_moderator",
|
||||
"restriction": "forums_manage",
|
||||
@@ -500,9 +507,9 @@
|
||||
"lang_key": "menu__forums_forums_savedActions",
|
||||
"restriction": "savedActions_manage",
|
||||
"keywords": [
|
||||
"saved actions",
|
||||
"multi moderation",
|
||||
"multimod"
|
||||
"multimod",
|
||||
"saved actions"
|
||||
]
|
||||
},
|
||||
"app=forums&module=forums&controller=savedActions&searchResult=form_1_mm_forums": {
|
||||
@@ -719,6 +726,15 @@
|
||||
"rss export"
|
||||
]
|
||||
},
|
||||
"app=forums&module=forums&controller=settings&searchResult=form_forums_solved_topic_reengage": {
|
||||
"lang_key": "forums_solved_topic_reengage",
|
||||
"restriction": "settings_access",
|
||||
"keywords": [
|
||||
"email",
|
||||
"notification",
|
||||
"solved"
|
||||
]
|
||||
},
|
||||
"app=forums&module=forums&controller=settings&searchResult=form_forums_topic_activity": {
|
||||
"lang_key": "forums_topic_activity",
|
||||
"restriction": "settings_access",
|
||||
@@ -777,6 +793,14 @@
|
||||
"forum settings"
|
||||
]
|
||||
},
|
||||
"app=forums&module=forums&controller=settings&tab=settings&searchResult=form_forums_solved_topic_reengage": {
|
||||
"lang_key": "forums_solved_topic_reengage",
|
||||
"restriction": "settings_access",
|
||||
"keywords": [
|
||||
"notifications",
|
||||
"solved"
|
||||
]
|
||||
},
|
||||
"app=forums&module=stats&controller=posts": {
|
||||
"lang_key": "menu__forums_stats_posts",
|
||||
"restriction": "posts_manage",
|
||||
@@ -787,6 +811,44 @@
|
||||
"post stats"
|
||||
]
|
||||
},
|
||||
"app=forums&module=stats&controller=solved": {
|
||||
"lang_key": "menu__forums_stats_solved",
|
||||
"restriction": "topics_manage",
|
||||
"keywords": [
|
||||
"mark as solved",
|
||||
"solution",
|
||||
"solved"
|
||||
]
|
||||
},
|
||||
"app=forums&module=stats&controller=solved&tab=_default": {
|
||||
"lang_key": "dynamic_chart_overview",
|
||||
"restriction": "topics_manage",
|
||||
"keywords": [
|
||||
"solved",
|
||||
"time to solved"
|
||||
]
|
||||
},
|
||||
"app=forums&module=stats&controller=solved&tab=percentage": {
|
||||
"lang_key": "forums_solved_stats_percentage",
|
||||
"restriction": "topics_manage",
|
||||
"keywords": [
|
||||
"solved"
|
||||
]
|
||||
},
|
||||
"app=forums&module=stats&controller=solved&tab=solved": {
|
||||
"lang_key": "stats_topics_tab_solved",
|
||||
"restriction": "topics_manage",
|
||||
"keywords": [
|
||||
"solved"
|
||||
]
|
||||
},
|
||||
"app=forums&module=stats&controller=solved&tab=time": {
|
||||
"lang_key": "forums_solved_stats_time",
|
||||
"restriction": "topics_manage",
|
||||
"keywords": [
|
||||
"solved"
|
||||
]
|
||||
},
|
||||
"app=forums&module=stats&controller=topics": {
|
||||
"lang_key": "menu__forums_stats_topics",
|
||||
"restriction": "topics_manage",
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
"app_author": "Invision Power Services, Inc.",
|
||||
"app_directory": "forums",
|
||||
"app_protected": 0,
|
||||
"app_website": "",
|
||||
"app_update_check": "",
|
||||
"app_website": null,
|
||||
"app_update_check": null,
|
||||
"app_hide_tab": 0
|
||||
}
|
||||
@@ -5,6 +5,8 @@
|
||||
<module key="front/forums"><![CDATA[{"default_controller":"index","protected":0,"default":1}]]></module>
|
||||
<task frequency="P0Y0M0DT0H5M0S">archive</task>
|
||||
<task frequency="P0Y0M0DT0H5M0S">unarchive</task>
|
||||
<task frequency="P0Y0M0DT6H0M0S">solvedNotifications</task>
|
||||
<task frequency="P0Y0M1DT0H0M0S">solvedStatsAggregation</task>
|
||||
<setting key="archive_last_post_cloud"><![CDATA[{"key":"archive_last_post_cloud","default":"5","report":"full"}]]></setting>
|
||||
<setting key="archive_on"><![CDATA[{"key":"archive_on","default":"0","report":"full"}]]></setting>
|
||||
<setting key="archive_remote_sql_database"><![CDATA[{"key":"archive_remote_sql_database","default":"","report":"none"}]]></setting>
|
||||
@@ -25,6 +27,7 @@
|
||||
<setting key="forums_posts_per_page"><![CDATA[{"key":"forums_posts_per_page","default":"25","report":"full"}]]></setting>
|
||||
<setting key="forums_questions_downvote"><![CDATA[{"key":"forums_questions_downvote","default":"0","report":"full"}]]></setting>
|
||||
<setting key="forums_rss"><![CDATA[{"key":"forums_rss","default":"1","report":"full"}]]></setting>
|
||||
<setting key="forums_solved_topic_reengage"><![CDATA[{"key":"forums_solved_topic_reengage","default":"14","report":"full"}]]></setting>
|
||||
<setting key="forums_topic_activity"><![CDATA[{"key":"forums_topic_activity","default":"[\"desktop\",\"mobile\"]","report":"full"}]]></setting>
|
||||
<setting key="forums_topic_activity_desktop"><![CDATA[{"key":"forums_topic_activity_desktop","default":"sidebar","report":"full"}]]></setting>
|
||||
<setting key="forums_topic_activity_features"><![CDATA[{"key":"forums_topic_activity_features","default":"[\"popularDays\", \"topPost\", \"uploads\"]","report":"none"}]]></setting>
|
||||
@@ -38,7 +41,8 @@
|
||||
<widget key="topicFeed"><![CDATA[{"class":"\\IPS\\Widget\\PermissionCache","restrict":[],"default_area":"","allow_reuse":true,"menu_style":"modal","embeddable":true}]]></widget>
|
||||
<widget key="postFeed"><![CDATA[{"class":"\\IPS\\Widget\\PermissionCache","restrict":[],"default_area":"","allow_reuse":true,"menu_style":"modal","embeddable":true}]]></widget>
|
||||
<widget key="poll"><![CDATA[{"class":"\\IPS\\Widget\\PermissionCache","restrict":["sidebar","cms"],"default_area":"","allow_reuse":true,"menu_style":"modal","embeddable":true}]]></widget>
|
||||
<acpsearch key="app=forums&module=forums&controller=forums"><![CDATA[{"lang_key":"menu__forums_forums_forums","restriction":"forums_manage","keywords":["edit forum","categories","forum","forums"]}]]></acpsearch>
|
||||
<acpsearch key="app=forums&module=forums&controller=forums"><![CDATA[{"lang_key":"menu__forums_forums_forums","restriction":"forums_manage","keywords":["categories","edit forum","forum","forums"]}]]></acpsearch>
|
||||
<acpsearch key="app=forums&module=forums&controller=forums&do=form&searchResult=bw_enable_answers__member"><![CDATA[{"lang_key":"bw_enable_answers__member","restriction":"forums_manage","keywords":["solved"]}]]></acpsearch>
|
||||
<acpsearch key="app=forums&module=forums&controller=forums&do=form&searchResult=forum_best_answer"><![CDATA[{"lang_key":"bw_enable_answers_moderator","restriction":"forums_manage","keywords":["solution","solved"]}]]></acpsearch>
|
||||
<acpsearch key="app=forums&module=forums&controller=forums&searchResult=bw_disable_prefixes"><![CDATA[{"lang_key":"bw_disable_prefixes","restriction":"forums_manage","keywords":["can set","can set tag prefixes","tag prefixes"]}]]></acpsearch>
|
||||
<acpsearch key="app=forums&module=forums&controller=forums&searchResult=bw_disable_tagging"><![CDATA[{"lang_key":"bw_disable_tagging","restriction":"forums_manage","keywords":["can use tags","tags","use tags"]}]]></acpsearch>
|
||||
@@ -96,7 +100,7 @@
|
||||
<acpsearch key="app=forums&module=forums&controller=forums&subnode=0&parent=2&searchResult=forum_permission_showtopic"><![CDATA[{"lang_key":"forum_permission_showtopic","restriction":"forums_manage","keywords":["read permissions","users without","users without read permissions","without permissions"]}]]></acpsearch>
|
||||
<acpsearch key="app=forums&module=forums&controller=forums&subnode=0&parent=2&searchResult=forum_preview_posts"><![CDATA[{"lang_key":"forum_preview_posts","restriction":"forums_manage","keywords":["must approved","posts approved","posts must approved"]}]]></acpsearch>
|
||||
<acpsearch key="app=forums&module=forums&controller=forums&subnode=0&parent=2&searchResult=forum_sort_key"><![CDATA[{"lang_key":"forum_sort_key","restriction":"forums_manage","keywords":["default sort","default sort order","sort order"]}]]></acpsearch>
|
||||
<acpsearch key="app=forums&module=forums&controller=savedActions"><![CDATA[{"lang_key":"menu__forums_forums_savedActions","restriction":"savedActions_manage","keywords":["saved actions","multi moderation","multimod"]}]]></acpsearch>
|
||||
<acpsearch key="app=forums&module=forums&controller=savedActions"><![CDATA[{"lang_key":"menu__forums_forums_savedActions","restriction":"savedActions_manage","keywords":["multi moderation","multimod","saved actions"]}]]></acpsearch>
|
||||
<acpsearch key="app=forums&module=forums&controller=savedActions&searchResult=form_1_mm_forums"><![CDATA[{"lang_key":"mm_forums","restriction":"savedActions_manage","keywords":["multimod forums","settings forums"]}]]></acpsearch>
|
||||
<acpsearch key="app=forums&module=forums&controller=savedActions&searchResult=form_1_mm_title"><![CDATA[{"lang_key":"mm_title","restriction":"savedActions_manage","keywords":["multimod name","name","settings name"]}]]></acpsearch>
|
||||
<acpsearch key="app=forums&module=forums&controller=savedActions&searchResult=form_1_topic_approve"><![CDATA[{"lang_key":"topic_approve","restriction":"savedActions_manage","keywords":["hide","unhide"]}]]></acpsearch>
|
||||
@@ -123,6 +127,7 @@
|
||||
<acpsearch key="app=forums&module=forums&controller=settings&searchResult=form_forums_posts_per_page"><![CDATA[{"lang_key":"forums_posts_per_page","restriction":"settings_access","keywords":["posts per page"]}]]></acpsearch>
|
||||
<acpsearch key="app=forums&module=forums&controller=settings&searchResult=form_forums_questions_downvote"><![CDATA[{"lang_key":"forums_questions_downvote","restriction":"settings_access","keywords":["answers","questions"]}]]></acpsearch>
|
||||
<acpsearch key="app=forums&module=forums&controller=settings&searchResult=form_forums_rss"><![CDATA[{"lang_key":"forums_rss","restriction":"settings_access","keywords":["rss export"]}]]></acpsearch>
|
||||
<acpsearch key="app=forums&module=forums&controller=settings&searchResult=form_forums_solved_topic_reengage"><![CDATA[{"lang_key":"forums_solved_topic_reengage","restriction":"settings_access","keywords":["email","notification","solved"]}]]></acpsearch>
|
||||
<acpsearch key="app=forums&module=forums&controller=settings&searchResult=form_forums_topic_activity"><![CDATA[{"lang_key":"forums_topic_activity","restriction":"settings_access","keywords":["desktop","topic","topic activity","topic summary"]}]]></acpsearch>
|
||||
<acpsearch key="app=forums&module=forums&controller=settings&searchResult=form_forums_topic_activity_features"><![CDATA[{"lang_key":"forums_topic_activity_features","restriction":"settings_access","keywords":["attachments","top post","topic summary"]}]]></acpsearch>
|
||||
<acpsearch key="app=forums&module=forums&controller=settings&searchResult=form_forums_topics_show_meta"><![CDATA[{"lang_key":"forums_topics_show_meta","restriction":"settings_access","keywords":["comments","posts"]}]]></acpsearch>
|
||||
@@ -130,6 +135,12 @@
|
||||
<acpsearch key="app=forums&module=forums&controller=settings&tab=archiving"><![CDATA[{"lang_key":"archiving","restriction":"archive_manage","keywords":["archive","archiving"]}]]></acpsearch>
|
||||
<acpsearch key="app=forums&module=forums&controller=settings&tab=archiving&searchResult=form_archive_on"><![CDATA[{"lang_key":"archive_on","restriction":"settings_access","keywords":["enable archiving"]}]]></acpsearch>
|
||||
<acpsearch key="app=forums&module=forums&controller=settings&tab=settings"><![CDATA[{"lang_key":"forum_settings","restriction":"settings_access","keywords":["forum settings"]}]]></acpsearch>
|
||||
<acpsearch key="app=forums&module=forums&controller=settings&tab=settings&searchResult=form_forums_solved_topic_reengage"><![CDATA[{"lang_key":"forums_solved_topic_reengage","restriction":"settings_access","keywords":["notifications","solved"]}]]></acpsearch>
|
||||
<acpsearch key="app=forums&module=stats&controller=posts"><![CDATA[{"lang_key":"menu__forums_stats_posts","restriction":"posts_manage","keywords":["New Post Statistics","new post stats","post statistics","post stats"]}]]></acpsearch>
|
||||
<acpsearch key="app=forums&module=stats&controller=solved"><![CDATA[{"lang_key":"menu__forums_stats_solved","restriction":"topics_manage","keywords":["mark as solved","solution","solved"]}]]></acpsearch>
|
||||
<acpsearch key="app=forums&module=stats&controller=solved&tab=_default"><![CDATA[{"lang_key":"dynamic_chart_overview","restriction":"topics_manage","keywords":["solved","time to solved"]}]]></acpsearch>
|
||||
<acpsearch key="app=forums&module=stats&controller=solved&tab=percentage"><![CDATA[{"lang_key":"forums_solved_stats_percentage","restriction":"topics_manage","keywords":["solved"]}]]></acpsearch>
|
||||
<acpsearch key="app=forums&module=stats&controller=solved&tab=solved"><![CDATA[{"lang_key":"stats_topics_tab_solved","restriction":"topics_manage","keywords":["solved"]}]]></acpsearch>
|
||||
<acpsearch key="app=forums&module=stats&controller=solved&tab=time"><![CDATA[{"lang_key":"forums_solved_stats_time","restriction":"topics_manage","keywords":["solved"]}]]></acpsearch>
|
||||
<acpsearch key="app=forums&module=stats&controller=topics"><![CDATA[{"lang_key":"menu__forums_stats_topics","restriction":"topics_manage","keywords":["new topic stats","topic statistics","topic stats"]}]]></acpsearch>
|
||||
</build>
|
||||
@@ -6,6 +6,9 @@
|
||||
"ContentRouter": {
|
||||
"Topics": "IPS\\forums\\extensions\\core\\ContentRouter\\Topics"
|
||||
},
|
||||
"AchievementAction": {
|
||||
"AnswerMarkedBest": "IPS\\forums\\extensions\\core\\AchievementAction\\AnswerMarkedBest"
|
||||
},
|
||||
"LiveSearch": {
|
||||
"Forums": "IPS\\forums\\extensions\\core\\LiveSearch\\Forums"
|
||||
},
|
||||
@@ -30,6 +33,7 @@
|
||||
},
|
||||
"Queue": {
|
||||
"DeleteLegacyTopics": "IPS\\forums\\extensions\\core\\Queue\\DeleteLegacyTopics",
|
||||
"RebuildSolvedStats": "IPS\\forums\\extensions\\core\\Queue\\RebuildSolvedStats",
|
||||
"TopicStarterIds": "IPS\\forums\\extensions\\core\\Queue\\TopicStarterIds",
|
||||
"DeleteLegacyPosts": "IPS\\forums\\extensions\\core\\Queue\\DeleteLegacyPosts",
|
||||
"HiddenFirstPost": "IPS\\forums\\extensions\\core\\Queue\\HiddenFirstPost",
|
||||
@@ -58,9 +62,6 @@
|
||||
"IndexView": "IPS\\forums\\extensions\\core\\AdvertisementLocations\\IndexView",
|
||||
"TopicView": "IPS\\forums\\extensions\\core\\AdvertisementLocations\\TopicView",
|
||||
"ForumListing": "IPS\\forums\\extensions\\core\\AdvertisementLocations\\ForumListing"
|
||||
},
|
||||
"AchievementAction": {
|
||||
"AnswerMarkedBest": "IPS\\forums\\extensions\\core\\AchievementAction\\AnswerMarkedBest"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<javascript app="forums">
|
||||
<file javascript_app="forums" javascript_location="front" javascript_path="controllers/forum" javascript_name="ips.forum.flow.js" javascript_type="controller" javascript_version="107014" javascript_position="1000100"><![CDATA[/**
|
||||
<file javascript_app="forums" javascript_location="front" javascript_path="controllers/forum" javascript_name="ips.forum.flow.js" javascript_type="controller" javascript_version="107601" javascript_position="1000050"><![CDATA[/**
|
||||
* Invision Community
|
||||
* (c) Invision Power Services, Inc. - https://www.invisioncommunity.com
|
||||
*
|
||||
@@ -46,13 +46,18 @@
|
||||
/* Check URL */
|
||||
this._ids = decodeURIComponent( _ids ).split(',');
|
||||
} else if ( this._rootForum ) {
|
||||
var found = false;
|
||||
if( ! _.isUndefined( ips.utils.cookie.get('forums_flowIdsRoots') ) ) {
|
||||
/* Check local storage */
|
||||
var _jsonIds = JSON.parse(ips.utils.cookie.get('forums_flowIdsRoots'))[this._rootForum];
|
||||
if (!_.isUndefined(_jsonIds)) {
|
||||
this._ids = _jsonIds;
|
||||
}
|
||||
} else {
|
||||
try {
|
||||
var _jsonIds = JSON.parse(ips.utils.cookie.get('forums_flowIdsRoots'))[this._rootForum];
|
||||
found = true;
|
||||
if (!_.isUndefined(_jsonIds)) {
|
||||
this._ids = _jsonIds;
|
||||
}
|
||||
} catch( exc ) { }
|
||||
}
|
||||
if ( ! found ) {
|
||||
this.scope.find('[data-node-id]').each(function (i, node) {
|
||||
var id = $(node).attr('data-node-id');
|
||||
self._ids.push(id);
|
||||
@@ -267,7 +272,7 @@
|
||||
}
|
||||
});
|
||||
}(jQuery, _));]]></file>
|
||||
<file javascript_app="forums" javascript_location="front" javascript_path="controllers/forum" javascript_name="ips.forum.forumList.js" javascript_type="controller" javascript_version="107014" javascript_position="1000100"><![CDATA[/**
|
||||
<file javascript_app="forums" javascript_location="front" javascript_path="controllers/forum" javascript_name="ips.forum.forumList.js" javascript_type="controller" javascript_version="107601" javascript_position="1000050"><![CDATA[/**
|
||||
* Invision Community
|
||||
* (c) Invision Power Services, Inc. - https://www.invisioncommunity.com
|
||||
*
|
||||
@@ -346,7 +351,7 @@
|
||||
}
|
||||
});
|
||||
}(jQuery, _));]]></file>
|
||||
<file javascript_app="forums" javascript_location="front" javascript_path="controllers/forum" javascript_name="ips.forum.forumPage.js" javascript_type="controller" javascript_version="107014" javascript_position="1000100">/**
|
||||
<file javascript_app="forums" javascript_location="front" javascript_path="controllers/forum" javascript_name="ips.forum.forumPage.js" javascript_type="controller" javascript_version="107601" javascript_position="1000050">/**
|
||||
* Invision Community
|
||||
* (c) Invision Power Services, Inc. - https://www.invisioncommunity.com
|
||||
*
|
||||
@@ -405,7 +410,7 @@
|
||||
}
|
||||
});
|
||||
}(jQuery, _));</file>
|
||||
<file javascript_app="forums" javascript_location="front" javascript_path="controllers/forum" javascript_name="ips.forum.hovercard.js" javascript_type="controller" javascript_version="107014" javascript_position="1000100">/**
|
||||
<file javascript_app="forums" javascript_location="front" javascript_path="controllers/forum" javascript_name="ips.forum.hovercard.js" javascript_type="controller" javascript_version="107601" javascript_position="1000050">/**
|
||||
* Invision Community
|
||||
* (c) Invision Power Services, Inc. - https://www.invisioncommunity.com
|
||||
*
|
||||
@@ -455,7 +460,7 @@
|
||||
}
|
||||
});
|
||||
}(jQuery, _));</file>
|
||||
<file javascript_app="forums" javascript_location="admin" javascript_path="controllers/settings" javascript_name="ips.settings.archiveRules.js" javascript_type="controller" javascript_version="107014" javascript_position="1000050"><![CDATA[/**
|
||||
<file javascript_app="forums" javascript_location="admin" javascript_path="controllers/settings" javascript_name="ips.settings.archiveRules.js" javascript_type="controller" javascript_version="107601" javascript_position="1000050"><![CDATA[/**
|
||||
* Invision Community
|
||||
* (c) Invision Power Services, Inc. - https://www.invisioncommunity.com
|
||||
*
|
||||
@@ -520,7 +525,7 @@
|
||||
});
|
||||
}(jQuery, _));
|
||||
]]></file>
|
||||
<file javascript_app="forums" javascript_location="front" javascript_path="controllers/topic" javascript_name="ips.topic.activity.js" javascript_type="controller" javascript_version="107014" javascript_position="1000050">/**
|
||||
<file javascript_app="forums" javascript_location="front" javascript_path="controllers/topic" javascript_name="ips.topic.activity.js" javascript_type="controller" javascript_version="107601" javascript_position="1000100">/**
|
||||
* Invision Community
|
||||
* (c) Invision Power Services, Inc. - https://www.invisioncommunity.com
|
||||
*
|
||||
@@ -552,7 +557,7 @@
|
||||
}
|
||||
});
|
||||
}(jQuery, _));</file>
|
||||
<file javascript_app="forums" javascript_location="front" javascript_path="controllers/topic" javascript_name="ips.topic.answers.js" javascript_type="controller" javascript_version="107014" javascript_position="1000050"><![CDATA[/**
|
||||
<file javascript_app="forums" javascript_location="front" javascript_path="controllers/topic" javascript_name="ips.topic.answers.js" javascript_type="controller" javascript_version="107601" javascript_position="1000100"><![CDATA[/**
|
||||
* Invision Community
|
||||
* (c) Invision Power Services, Inc. - https://www.invisioncommunity.com
|
||||
*
|
||||
@@ -692,7 +697,7 @@
|
||||
}
|
||||
});
|
||||
}(jQuery, _));]]></file>
|
||||
<file javascript_app="forums" javascript_location="front" javascript_path="controllers/topic" javascript_name="ips.topic.reply.js" javascript_type="controller" javascript_version="107014" javascript_position="1000050">/**
|
||||
<file javascript_app="forums" javascript_location="front" javascript_path="controllers/topic" javascript_name="ips.topic.reply.js" javascript_type="controller" javascript_version="107601" javascript_position="1000100">/**
|
||||
* Invision Community
|
||||
* (c) Invision Power Services, Inc. - https://www.invisioncommunity.com
|
||||
*
|
||||
@@ -720,7 +725,45 @@
|
||||
}
|
||||
});
|
||||
}(jQuery, _));</file>
|
||||
<file javascript_app="forums" javascript_location="front" javascript_path="controllers/topic" javascript_name="ips.topic.view.js" javascript_type="controller" javascript_version="107014" javascript_position="1000050">/**
|
||||
<file javascript_app="forums" javascript_location="front" javascript_path="controllers/topic" javascript_name="ips.topic.solved.js" javascript_type="controller" javascript_version="107601" javascript_position="1000100"><![CDATA[/**
|
||||
* Invision Community
|
||||
* (c) Invision Power Services, Inc. - https://www.invisioncommunity.com
|
||||
*
|
||||
* ips.topic.solved.js - Topic view controller
|
||||
*
|
||||
* Author: Matthew Mecham
|
||||
*/
|
||||
;( function($, _, undefined){
|
||||
"use strict";
|
||||
|
||||
ips.controller.register('forums.front.topic.solved', {
|
||||
|
||||
initialize: function () {
|
||||
this.on( 'click', '[data-action="mailSolvedReminders"]', this.mailSolvedReminders );
|
||||
},
|
||||
|
||||
/**
|
||||
* Toggle on email reminders to come back and mark replies as the solution
|
||||
*
|
||||
* @param {event} e Event object
|
||||
* @returns {void}
|
||||
*/
|
||||
mailSolvedReminders: function (e) {
|
||||
e.preventDefault();
|
||||
var _self = this;
|
||||
|
||||
// Load the content
|
||||
ips.getAjax()( ips.getSetting('baseURL') + 'index.php?app=core&module=system&controller=ajax&do=subscribeToSolved' )
|
||||
.done( function (response) {
|
||||
var elem = _self.scope.find('[data-action="mailSolvedReminders"]');
|
||||
|
||||
ips.utils.anim.go( 'fadeOutDown', elem );
|
||||
ips.ui.flashMsg.show( response.message, { timeout: 5 } );
|
||||
});
|
||||
}
|
||||
});
|
||||
}(jQuery, _));]]></file>
|
||||
<file javascript_app="forums" javascript_location="front" javascript_path="controllers/topic" javascript_name="ips.topic.view.js" javascript_type="controller" javascript_version="107601" javascript_position="1000100">/**
|
||||
* Invision Community
|
||||
* (c) Invision Power Services, Inc. - https://www.invisioncommunity.com
|
||||
*
|
||||
@@ -782,4 +825,23 @@
|
||||
}
|
||||
});
|
||||
}(jQuery, _));</file>
|
||||
<order app="global" path="/dev/js//framework/">templates
|
||||
common/ips.loader.js
|
||||
common/ui
|
||||
common/utils
|
||||
common
|
||||
controllers</order>
|
||||
<order app="global" path="/dev/js//library/">underscore
|
||||
jquery
|
||||
mustache
|
||||
jstz
|
||||
IntersectionObserver
|
||||
Debug.js
|
||||
app.js</order>
|
||||
<order app="global" path="/dev/js//library//jquery">jquery.js
|
||||
jquery-migrate.js
|
||||
jquery.history.js
|
||||
jquery.transform.js</order>
|
||||
<order app="global" path="/dev/js//library//linkify">linkify.min.js
|
||||
linkify-jquery.min.js</order>
|
||||
</javascript>
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<language>
|
||||
<app key="forums" version="107014">
|
||||
<app key="forums" version="107601">
|
||||
<word key="__app_forums" js="0">Forums</word>
|
||||
<word key="frontnavigation_forums" js="0">Forums</word>
|
||||
<word key="__indefart_post" js="0">a post in a topic</word>
|
||||
@@ -34,6 +34,7 @@
|
||||
<word key="menu__forums_stats" js="0">Forums</word>
|
||||
<word key="menu__forums_stats_topics" js="0">Topics</word>
|
||||
<word key="menu__forums_stats_posts" js="0">Posts</word>
|
||||
<word key="menu__forums_stats_solved" js="0">Solved</word>
|
||||
<word key="r__forums" js="0">Forums</word>
|
||||
<word key="r__forums_manage" js="0">Can view forums?</word>
|
||||
<word key="r__forums_add" js="0">Can create forums?</word>
|
||||
@@ -83,6 +84,8 @@
|
||||
<word key="can_edit_item_message_topic" js="0">Can edit messages on topics?</word>
|
||||
<word key="can_delete_item_message_topic" js="0">Can delete messages on topics?</word>
|
||||
<word key="can_toggle_item_moderation_topic" js="0">Can enable/disable moderation on topics?</word>
|
||||
<word key="can_future_publish_topic" js="0">Can set a future publishing date?</word>
|
||||
<word key="can_view_future_topic" js="0">Can view pending publishing items authored by other members?</word>
|
||||
<word key="forums" js="0">Forums</word>
|
||||
<word key="forums_sg" js="0">Forum</word>
|
||||
<word key="forums_sg_lc" js="0">forum</word>
|
||||
@@ -166,7 +169,6 @@
|
||||
<word key="forum_tag_predefined_desc" js="0">If using a closed system, users will have to choose from these tags. If using an open system, tags entered here will show as suggestions.</word>
|
||||
<word key="forum_ipseo_priority" js="0">Sitemap Priority</word>
|
||||
<word key="forum_ipseo_priority_desc" js="0"><![CDATA[The priority value in a sitemap file indicates to search engines how important a page is compared to other pages on the site. <a href='{internal.app=core&module=promotion&controller=seo&tab=sitemap}'>Sitemap Settings</a>]]></word>
|
||||
<word key="forum_viglink" js="0">Enable VigLink?</word>
|
||||
<word key="forum_qa_rate_questions" js="0">Who can rate questions?</word>
|
||||
<word key="forum_qa_rate_questions_desc" js="0">Questions that have been rated the best within the last 30 days will show under 'Popular Questions' in the forum home.</word>
|
||||
<word key="forum_qa_rate_answers" js="0">Who can rate answers?</word>
|
||||
@@ -187,7 +189,7 @@
|
||||
<word key="forum_card_image" js="0">Grid Card Image</word>
|
||||
<word key="forum_card_image_desc" js="0">When viewing forums as a grid, your chosen image will appear as the background.</word>
|
||||
<word key="bw_enable_answers_moderator" js="0">Enable Solved?</word>
|
||||
<word key="bw_enable_answers_moderator_desc" js="0">Moderators can mark posts as the solution.</word>
|
||||
<word key="bw_enable_answers_moderator_desc" js="0">Moderators (and optionally topic starters) can mark posts as the solution.</word>
|
||||
<word key="bw_enable_answers__member" js="0">Allow the topic starter to mark solved?</word>
|
||||
<word key="bw_enable_answers__member_desc" js="0">Optionally allow the topic starter to also mark posts as the solution.</word>
|
||||
<word key="rebuilding_starter_ids" js="0">Rebuilding topic starter IDs</word>
|
||||
@@ -346,6 +348,7 @@
|
||||
<word key="topic_poll" js="0"></word>
|
||||
<word key="topic_open_time" js="0">Unlock time</word>
|
||||
<word key="topic_close_time" js="0">Lock time</word>
|
||||
<word key="topic_date" js="0">Publish</word>
|
||||
<word key="topic_type" js="0">Filter</word>
|
||||
<word key="all_topics" js="0">All</word>
|
||||
<word key="open_topics" js="0">Unlocked</word>
|
||||
@@ -372,7 +375,6 @@
|
||||
<word key="asc" js="0">Ascending (oldest first/alphabetically)</word>
|
||||
<word key="desc" js="0">Descending (newest first)</word>
|
||||
<word key="time_frame" js="0">Last Reply</word>
|
||||
<word key="show_all" js="0">Anytime</word>
|
||||
<word key="since_last_visit" js="0">My Last Login (%s)</word>
|
||||
<word key="forum_home" js="0">Forum Home</word>
|
||||
<word key="all_questions" js="0">All questions in this forum</word>
|
||||
@@ -650,6 +652,16 @@
|
||||
<word key="solved_solved" js="0">Solved</word>
|
||||
<word key="solved_unsolved" js="0">Unsolved</word>
|
||||
<word key="solved_byline" js="0">Solved by %s</word>
|
||||
<word key="forums_solved_topic_reengage" js="0">Email author to mark a reply as a solution</word>
|
||||
<word key="forums_solved_topic_reengage_prefix" js="0">if the topic is not solved and the topic was started</word>
|
||||
<word key="forums_solved_topic_reengage_suffix" js="0">days ago or more</word>
|
||||
<word key="forums_solved_topic_reengage_never" js="0">never email the author to ask</word>
|
||||
<word key="forums_solved_stats_time" js="0">Time To Solved (in days)</word>
|
||||
<word key="forums_solved_stats_percentage" js="0">Percentage Solved</word>
|
||||
<word key="solved_stats_rebuild_started" js="0">Statistics rebuild started</word>
|
||||
<word key="solved_stats_rebuild_button" js="0">Rebuild Solved Statistics</word>
|
||||
<word key="solved_rebuilding_stats" js="0">Rebuilding solved statistics for forum %s</word>
|
||||
<word key="solved_stats_chart_desc" js="0">The data in this chart updates once per day.</word>
|
||||
<word key="forums_simple_name_with_container" js="0"><![CDATA[By %s in <a href='%s'>%s</a>]]></word>
|
||||
<word key="forums_show_all_forums" js="0">Table view</word>
|
||||
<word key="forums_show_all_forums_tooltip" js="0">Show a table of categories and forums</word>
|
||||
|
||||
@@ -548,20 +548,6 @@
|
||||
"values": [],
|
||||
"zerofill": false
|
||||
},
|
||||
"viglink": {
|
||||
"allow_null": false,
|
||||
"auto_increment": false,
|
||||
"binary": false,
|
||||
"comment": "",
|
||||
"decimals": null,
|
||||
"default": "1",
|
||||
"length": 1,
|
||||
"name": "viglink",
|
||||
"type": "TINYINT",
|
||||
"unsigned": false,
|
||||
"values": [],
|
||||
"zerofill": false
|
||||
},
|
||||
"qa_rate_questions": {
|
||||
"allow_null": true,
|
||||
"auto_increment": false,
|
||||
@@ -669,6 +655,18 @@
|
||||
"comment": "",
|
||||
"unsigned": true,
|
||||
"auto_increment": false
|
||||
},
|
||||
"solved_stats_from": {
|
||||
"name": "solved_stats_from",
|
||||
"type": "INT",
|
||||
"length": null,
|
||||
"decimals": null,
|
||||
"values": null,
|
||||
"allow_null": false,
|
||||
"default": 0,
|
||||
"comment": "",
|
||||
"unsigned": true,
|
||||
"auto_increment": false
|
||||
}
|
||||
},
|
||||
"indexes": {
|
||||
@@ -784,7 +782,6 @@
|
||||
"archived_topics": 0,
|
||||
"archived_posts": 0,
|
||||
"ipseo_priority": "-1",
|
||||
"viglink": 1,
|
||||
"qa_rate_questions": "*",
|
||||
"qa_rate_answers": "*",
|
||||
"icon": null
|
||||
@@ -829,7 +826,6 @@
|
||||
"archived_topics": 0,
|
||||
"archived_posts": 0,
|
||||
"ipseo_priority": "-1",
|
||||
"viglink": 1,
|
||||
"qa_rate_questions": "*",
|
||||
"qa_rate_answers": "*",
|
||||
"icon": null
|
||||
@@ -1338,6 +1334,42 @@
|
||||
"comment": "",
|
||||
"unsigned": true,
|
||||
"auto_increment": false
|
||||
},
|
||||
"solved_reminder_sent": {
|
||||
"name": "solved_reminder_sent",
|
||||
"type": "INT",
|
||||
"length": null,
|
||||
"decimals": null,
|
||||
"values": null,
|
||||
"allow_null": false,
|
||||
"default": 0,
|
||||
"comment": "",
|
||||
"unsigned": true,
|
||||
"auto_increment": false
|
||||
},
|
||||
"is_future_entry": {
|
||||
"name": "is_future_entry",
|
||||
"type": "TINYINT",
|
||||
"length": null,
|
||||
"decimals": null,
|
||||
"values": null,
|
||||
"allow_null": false,
|
||||
"default": 0,
|
||||
"comment": "",
|
||||
"unsigned": true,
|
||||
"auto_increment": false
|
||||
},
|
||||
"publish_date": {
|
||||
"name": "publish_date",
|
||||
"type": "INT",
|
||||
"length": null,
|
||||
"decimals": null,
|
||||
"values": null,
|
||||
"allow_null": false,
|
||||
"default": 0,
|
||||
"comment": "",
|
||||
"unsigned": true,
|
||||
"auto_increment": false
|
||||
}
|
||||
},
|
||||
"indexes": {
|
||||
@@ -1957,7 +1989,7 @@
|
||||
"author_name": "<%ADMIN_NAME%>",
|
||||
"ip_address": "<%IP_ADDRESS%>",
|
||||
"post_date": "<%TIME%>",
|
||||
"post": "<p>Welcome to your new Invision Community!<\/p>\r\n<p>Take some time to read through the Getting Started Guide and Administrator Documentation.<\/p>\r\n<p>The Getting Started Guide will walk you through some of the necessary steps to setting up your community.<\/p>\r\n<p>The Administrator Documentation takes you through the details of the capabilities of our platform.<\/p>\r\n<p><a href='https:\/\/remoteservices.invisionpower.com\/docs\/getting-started' rel='external'>Go to the Documentation<\/a><\/p><br \/><p>Nulled by IPBMafia.ru<\/p>",
|
||||
"post": "<p>Welcome to your new Invision Community!<\/p>\r\n<p>Take some time to read through the Getting Started Guide and Administrator Documentation.<\/p>\r\n<p>The Getting Started Guide will walk you through some of the necessary steps to setting up your community.<\/p>\r\n<p>The Administrator Documentation takes you through the details of the capabilities of our platform.<\/p>\r\n<p><a href='https:\/\/remoteservices.invisionpower.com\/docs\/getting-started' rel='external'>Go to the Documentation<\/a><\/p>",
|
||||
"queued": "0",
|
||||
"topic_id": "1",
|
||||
"new_topic": "1",
|
||||
|
||||
@@ -99,6 +99,11 @@
|
||||
"default": "1",
|
||||
"report": "full"
|
||||
},
|
||||
{
|
||||
"key": "forums_solved_topic_reengage",
|
||||
"default": "14",
|
||||
"report": "full"
|
||||
},
|
||||
{
|
||||
"key": "forums_topic_activity",
|
||||
"default": "[\"desktop\",\"mobile\"]",
|
||||
|
||||
@@ -1 +1 @@
|
||||
{"archive":"P0Y0M0DT0H5M0S","unarchive":"P0Y0M0DT0H5M0S"}
|
||||
{"archive":"P0Y0M0DT0H5M0S","unarchive":"P0Y0M0DT0H5M0S","solvedNotifications":"P0Y0M0DT6H0M0S","solvedStatsAggregation":"P0Y0M1DT0H0M0S"}
|
||||
@@ -27,7 +27,7 @@
|
||||
</div>]]></template>
|
||||
<template template_group="forums" template_name="forumButtons" template_data="$forum" template_location="front" template_app="forums"><![CDATA[{{if $forum->isCombinedView()}}
|
||||
<li class='ipsToolList_primaryAction'>
|
||||
<a class="ipsButton ipsButton_medium ipsButton_important ipsButton_fullWidth" href="{$forum->url()->setQueryString( [ 'do' => 'createMenu', 'root' => $forum->id ] )}" data-ipsDialog-title='{lang="select_forum"}' data-ipsDialog data-ipsDialog-size='narrow' title='{lang="topic_create"}' rel='nofollow noindex'>{lang="start_new_topic"}</a>
|
||||
<a class="ipsButton ipsButton_medium ipsButton_important ipsButton_fullWidth" href="{$forum->url()->setQueryString( [ 'do' => 'createMenu', 'root' => $forum->id ] )}" data-ipsDialog-title='{lang="select_forum"}' data-ipsDialog data-ipsDialog-size='narrow' title='{lang="create_new_topic"}' rel='nofollow noindex'>{lang="start_new_topic"}</a>
|
||||
</li>
|
||||
{{elseif $forum->can('add')}}
|
||||
<li class='ipsToolList_primaryAction'>
|
||||
@@ -54,7 +54,7 @@
|
||||
{{$followerCount = \IPS\forums\Topic::containerFollowerCount( $forum );}}
|
||||
<div class="ipsPageHeader {{if $forum->feature_color}}ipsPageHeader--hasFeatureColor{{endif}} ipsBox ipsResponsive_pull ipsPadding ipsClearfix" {{if $forum->feature_color}}style="border-color: {$forum->feature_color}"{{endif}}>
|
||||
<header>
|
||||
{{if \IPS\Application::appIsEnabled('cloud') }}
|
||||
{{if \IPS\Application::appIsEnabled('cloud') AND \IPS\cloud\Application::featureIsEnabled( 'realtime' )}}
|
||||
<div data-controller='cloud.front.realtime.whosViewing' data-location='{expression="\IPS\cloud\Realtime::i()->getLocationHash()"}' data-visibleClass='ipsMargin_bottom:half'></div>
|
||||
{{endif}}
|
||||
<h1 class="ipsType_pageTitle">{$forum->_title}</h1>
|
||||
@@ -80,7 +80,12 @@
|
||||
{{endif}}
|
||||
</header>
|
||||
</div>
|
||||
|
||||
{{if $forum->isCombinedView()}}
|
||||
<li class='ipsToolList_primaryAction ipsResponsive_hideDesktop ipsResponsive_block'>
|
||||
<a class="ipsButton ipsButton_medium ipsButton_link ipsButton_fullWidth" href="#" rel="nofollow" data-ipsDialog data-ipsDialog-title='{lang="forums_simple_dialog_title"}' data-ipsDialog-content='#elFluidFormFilters'>
|
||||
<span data-role='fluidForumMobileDesc'>{lang="forums_simple_filter_by"}</span> <i class='fa fa-angle-down'></i></a>
|
||||
</li>
|
||||
{{endif}}
|
||||
{{if ! $forum->isCombinedView() and $forum->children()}}
|
||||
<div class='ipsList_reset cForumList ipsBox ipsSpacer_bottom ipsResponsive_pull' data-controller='core.global.core.table, forums.front.forum.forumList' data-baseURL=''>
|
||||
<h2 class='ipsType_sectionTitle ipsType_reset'>{{if $forum->sub_can_post}}{lang="subforums_header"}{{else}}{lang="subforums_header_category"}{{endif}}</h2>
|
||||
@@ -830,7 +835,7 @@
|
||||
</li>
|
||||
{{endif}}
|
||||
{{else}}
|
||||
<li class="ipsDataItem ipsDataItem_responsivePhoto {{if $row->groupsPosted}}ipsDataItem_highlighted{{endif}} {{if $row->unread()}}ipsDataItem_unread{{endif}} {{if method_exists( $row, 'tableClass' ) && $row->tableClass()}}ipsDataItem_{$row->tableClass()}{{endif}} {{if $row->hidden()}}ipsModerated{{endif}}" data-rowID='{$row->$idField}' data-location='{$row->locationHash}' data-controller='forums.front.forum.topicRow'>
|
||||
<li class="ipsDataItem ipsDataItem_responsivePhoto {{if $row->groupsPosted}}ipsDataItem_highlighted{{endif}} {{if $row->unread()}}ipsDataItem_unread{{endif}} {{if method_exists( $row, 'tableClass' ) && $row->tableClass()}}ipsDataItem_{$row->tableClass()}{{endif}} {{if $row->hidden() or $row->isFutureDate()}}ipsModerated{{endif}} {{if $row->isFutureDate()}}ipsModerated_alternate{{endif}}" data-rowID='{$row->$idField}' data-location='{$row->locationHash}' data-controller='forums.front.forum.topicRow'>
|
||||
{{if member.member_id}}
|
||||
<div class='ipsDataItem_icon ipsPos_top'>
|
||||
{{if $row->unread()}}
|
||||
@@ -871,8 +876,10 @@
|
||||
<span><span class="ipsBadge ipsBadge_icon ipsBadge_small ipsBadge_neutral" data-ipsTooltip title='{lang="topic_has_poll"}'><i class='fa fa-question'></i></span></span>
|
||||
{{endif}}
|
||||
|
||||
{{if $row->mapped('pinned') || $row->mapped('featured') || $row->hidden() === -1 || $row->hidden() === 1}}
|
||||
{{if $row->hidden() === -1}}
|
||||
{{if $row->isFutureDate() || $row->mapped('pinned') || $row->mapped('featured') || $row->hidden() === -1 || $row->hidden() === 1}}
|
||||
{{if $row->isFutureDate()}}
|
||||
<span><span class="ipsBadge ipsBadge_icon ipsBadge_small ipsBadge_warning" data-ipsTooltip title='{$row->futureDateBlurb()}'><i class='fa fa-clock-o'></i></span></span>
|
||||
{{elseif $row->hidden() === -1}}
|
||||
<span><span class="ipsBadge ipsBadge_icon ipsBadge_small ipsBadge_warning" data-ipsTooltip title='{$row->hiddenBlurb()}'><i class='fa fa-eye-slash'></i></span></span>
|
||||
{{elseif $row->hidden() === 1}}
|
||||
<span><span class="ipsBadge ipsBadge_icon ipsBadge_small ipsBadge_warning" data-ipsTooltip title='{lang="pending_approval"}'><i class='fa fa-warning'></i></span></span>
|
||||
@@ -1028,7 +1035,7 @@
|
||||
</li>
|
||||
{{endif}}
|
||||
{{else}}
|
||||
<li class="ipsDataItem ipsTopicSnippet {{if $row->groupsPosted}}ipsDataItem_highlighted{{endif}} {{if $row->unread()}}ipsDataItem_unread{{else}}ipsDataItem_read{{endif}} {{if method_exists( $row, 'tableClass' ) && $row->tableClass()}}ipsDataItem_{$row->tableClass()}{{endif}} {{if $row->hidden()}}ipsModerated{{endif}}" data-rowID='{$row->$idField}'>
|
||||
<li class="ipsDataItem ipsTopicSnippet {{if $row->groupsPosted}}ipsDataItem_highlighted{{endif}} {{if $row->unread()}}ipsDataItem_unread{{else}}ipsDataItem_read{{endif}} {{if method_exists( $row, 'tableClass' ) && $row->tableClass()}}ipsDataItem_{$row->tableClass()}{{endif}} {{if $row->hidden() or $row->isFutureDate()}}ipsModerated{{endif}}{{if $row->isFutureDate()}} ipsModerated_alternate{{endif}}" data-rowID='{$row->$idField}' {{if isset($row->locationHash)}}data-location='{$row->locationHash}'{{endif}}'>
|
||||
|
||||
<div class='ipsTopicSnippet__top ipsFlex ipsFlex-ai:start'>
|
||||
<!-- Topic starter avatar -->
|
||||
@@ -1039,8 +1046,10 @@
|
||||
<div class='ipsTopicSnippet__top-main ipsFlex-flex:11 ipsFlex ipsFlex-ai:start ipsFlex-jc:between sm:ipsFlex-fd:column'>
|
||||
<div class='ipsTopicSnippet__title ipsFlex-flex:11'>
|
||||
<h4 class='ipsDataItem_title'>
|
||||
|
||||
{{if $row->locked()}}
|
||||
{{if $row->isFutureDate()}}
|
||||
<span><span class="ipsBadge ipsBadge_icon ipsBadge_small ipsBadge_warning" data-ipsTooltip title='{$row->futureDateBlurb()}'><i class='fa fa-clock-o'></i></span></span>
|
||||
{{endif}}
|
||||
{{if $row->locked()}}
|
||||
<span>
|
||||
<i class='ipsType_medium fa fa-lock' data-ipsTooltip title='{lang="topic_locked"}'></i>
|
||||
</span>
|
||||
@@ -1120,7 +1129,7 @@
|
||||
</li>
|
||||
{{endif}}
|
||||
{{foreach $row->stats(FALSE) as $k => $v}}
|
||||
<li {{if $k == 'num_views'}}class='ipsType_light'{{elseif \in_array( $k, $row->hotStats )}}class="ipsDataItem_stats_hot" data-text='{lang="hot_item"}' data-ipsTooltip title='{lang="hot_item_desc"}'{{endif}}>
|
||||
<li {{if $k == 'num_views'}}class='ipsType_light'{{elseif \in_array( $k, $row->hotStats )}}class="ipsDataItem_stats_hot" data-text='{lang="hot_item"}' data-ipsTooltip title='{lang="hot_item_desc"}'{{endif}} data-statType="{$k}">
|
||||
<span class='ipsDataItem_stats_number'>{number="$v" format="short"}</span>
|
||||
<span class='ipsDataItem_stats_type'>{lang="{$k}" pluralize="$v" format="short"}</span>
|
||||
{{if ( $k == 'forums_comments' OR $k == 'answers_no_number' ) && \IPS\forums\Topic::modPermission( 'unhide', NULL, $row->container() ) AND $unapprovedComments = $row->mapped('unapproved_comments')}}
|
||||
@@ -1350,7 +1359,7 @@
|
||||
{{endif}}
|
||||
|
||||
<span class='ipsType_break ipsContained'>
|
||||
<a href='{$topic->url( "getPrefComment" )}' {{if $topic->canView()}}data-ipsHover data-ipsHover-target='{$topic->url()->setQueryString('preview', 1)}' data-ipsHover-timeout='1.5' {{endif}}>
|
||||
<a href='{$topic->url( "getPrefComment" )}' {{if $topic->tableHoverUrl AND $topic->canView()}}data-ipsHover data-ipsHover-target='{$topic->url()->setQueryString('preview', 1)}' data-ipsHover-timeout='1.5' {{endif}}>
|
||||
{{if $topic->isQuestion()}}
|
||||
<strong class='ipsType_light'>{lang="question_title"}:</strong>
|
||||
{{endif}}
|
||||
@@ -2093,7 +2102,7 @@
|
||||
</li>
|
||||
{{endif}}
|
||||
{{else}}
|
||||
<li class="ipsDataItem ipsDataItem_responsivePhoto {{if $row->unread()}}ipsDataItem_unread{{endif}} {{if method_exists( $row, 'tableClass' ) && $row->tableClass()}}ipsDataItem_{$row->tableClass()}{{endif}} {{if $row->hidden()}}ipsModerated{{endif}}" data-rowID='{$row->$idField}'>
|
||||
<li class="ipsDataItem ipsDataItem_responsivePhoto {{if $row->unread()}}ipsDataItem_unread{{endif}} {{if method_exists( $row, 'tableClass' ) && $row->tableClass()}}ipsDataItem_{$row->tableClass()}{{endif}} {{if $row->hidden() or $row->isFutureDate()}}ipsModerated{{endif}}{{if $row->isFutureDate()}} ipsModerated_alternate{{endif}}" data-rowID='{$row->$idField}' {{if isset($row->locationHash)}}data-location='{$row->locationHash}'{{endif}}>
|
||||
<div class='ipsDataItem_icon ipsType_blendLinks'>
|
||||
{template="userPhoto" app="core" group="global" params="$row->author(), 'tiny'"}
|
||||
</div>
|
||||
@@ -2132,9 +2141,11 @@
|
||||
<span><span class="ipsBadge ipsBadge_icon ipsBadge_small ipsBadge_neutral" data-ipsTooltip title='{lang="topic_has_poll"}'><i class='fa fa-question'></i></span></span>
|
||||
{{endif}}
|
||||
|
||||
{{if $row->mapped('pinned') || $row->mapped('featured') || $row->hidden() === -1 || $row->hidden() === 1 || $row->isSolved()}}
|
||||
{{if $row->hidden() === -1}}
|
||||
<span><span class="ipsBadge ipsBadge_icon ipsBadge_small ipsBadge_warning" data-ipsTooltip title='{$row->hiddenBlurb()}'><i class='fa fa-eye-slash'></i></span></span>
|
||||
{{if $row->isFutureDate() || $row->mapped('pinned') || $row->mapped('featured') || $row->hidden() === -1 || $row->hidden() === 1 || $row->isSolved()}}
|
||||
{{if $row->isFutureDate()}}
|
||||
<span><span class="ipsBadge ipsBadge_icon ipsBadge_small ipsBadge_warning" data-ipsTooltip title='{$row->futureDateBlurb()}'><i class='fa fa-clock-o'></i></span></span>
|
||||
{{elseif $row->hidden() === -1}}
|
||||
<span><span class="ipsBadge ipsBadge_icon ipsBadge_small ipsBadge_warning" data-ipsTooltip title='{$row->hiddenBlurb()}'><i class='fa fa-eye-slash'></i></span></span>
|
||||
{{elseif $row->hidden() === 1}}
|
||||
<span><span class="ipsBadge ipsBadge_icon ipsBadge_small ipsBadge_warning" data-ipsTooltip title='{lang="pending_approval"}'><i class='fa fa-warning'></i></span></span>
|
||||
{{endif}}
|
||||
@@ -2287,7 +2298,7 @@
|
||||
</li>
|
||||
{{endif}}
|
||||
{{else}}
|
||||
<li class="ipsDataItem ipsTopicSnippet {{if $row->groupsPosted}}ipsDataItem_highlighted{{endif}} {{if $row->unread()}}ipsDataItem_unread{{else}}ipsDataItem_read{{endif}} {{if method_exists( $row, 'tableClass' ) && $row->tableClass()}}ipsDataItem_{$row->tableClass()}{{endif}} {{if $row->hidden()}}ipsModerated{{endif}}" data-rowID='{$row->$idField}'>
|
||||
<li class="ipsDataItem ipsTopicSnippet {{if $row->groupsPosted}}ipsDataItem_highlighted{{endif}} {{if $row->unread()}}ipsDataItem_unread{{else}}ipsDataItem_read{{endif}} {{if method_exists( $row, 'tableClass' ) && $row->tableClass()}}ipsDataItem_{$row->tableClass()}{{endif}} {{if $row->hidden() or $row->isFutureDate()}}ipsModerated{{endif}}{{if $row->isFutureDate()}} ipsModerated_alternate{{endif}}" data-rowID='{$row->$idField}' {{if isset($row->locationHash)}}data-location='{$row->locationHash}'{{endif}}>
|
||||
|
||||
<div class='ipsTopicSnippet__top ipsFlex ipsFlex-ai:start'>
|
||||
<!-- Topic starter avatar -->
|
||||
@@ -2303,8 +2314,11 @@
|
||||
<span>
|
||||
<i class='ipsType_medium fa fa-lock' data-ipsTooltip title='{lang="topic_locked"}'></i>
|
||||
</span>
|
||||
{{endif}}
|
||||
{{if $row->isSolved()}}
|
||||
{{endif}}
|
||||
{{if $row->isFutureDate()}}
|
||||
<span><span class="ipsBadge ipsBadge_icon ipsBadge_small ipsBadge_warning" data-ipsTooltip title='{$row->futureDateBlurb()}'><i class='fa fa-clock-o'></i></span></span>
|
||||
{{endif}}
|
||||
{{if $row->isSolved()}}
|
||||
<span><span class="ipsBadge ipsBadge_icon ipsBadge_small ipsBadge_positive" data-ipsTooltip title='{lang="this_is_solved"}'><i class='fa fa-check'></i></span></span>
|
||||
{{endif}}
|
||||
{{if $row->hidden() === -1}}
|
||||
@@ -2379,7 +2393,7 @@
|
||||
</li>
|
||||
{{endif}}
|
||||
{{foreach $row->stats(FALSE) as $k => $v}}
|
||||
<li {{if $k == 'num_views'}}class='ipsType_light'{{elseif \in_array( $k, $row->hotStats )}}class="ipsDataItem_stats_hot" data-text='{lang="hot_item"}' data-ipsTooltip title='{lang="hot_item_desc"}'{{endif}}>
|
||||
<li {{if $k == 'num_views'}}class='ipsType_light'{{elseif \in_array( $k, $row->hotStats )}}class="ipsDataItem_stats_hot" data-text='{lang="hot_item"}' data-ipsTooltip title='{lang="hot_item_desc"}'{{endif}} data-statType="{$k}">
|
||||
<span class='ipsDataItem_stats_number'>{number="$v" format="short"}</span>
|
||||
<span class='ipsDataItem_stats_type'>{lang="{$k}" pluralize="$v" format="short"}</span>
|
||||
{{if ( $k == 'forums_comments' OR $k == 'answers_no_number' ) && \IPS\forums\Topic::modPermission( 'unhide', NULL, $row->container() ) AND $unapprovedComments = $row->mapped('unapproved_comments')}}
|
||||
@@ -3089,13 +3103,13 @@
|
||||
{{else}}
|
||||
{{if $comment instanceof \IPS\Content\Hideable}}
|
||||
{{if !$comment->hidden() and $comment->canHide()}}
|
||||
<li class='ipsMenu_item'><a href='{$comment->url('hide')}' data-ipsDialog data-ipsDialog-title="{lang="hide"}">{lang="hide"}</a></li>
|
||||
<li class='ipsMenu_item'><a href='{$comment->url('hide')}' data-ipsDialog data-ipsDialog-title="{lang="hide"}" data-ipsDialog-destructOnClose='true'>{lang="hide"}</a></li>
|
||||
{{elseif $comment->hidden() and $comment->canUnhide()}}
|
||||
<li class='ipsMenu_item'><a href='{$comment->url('unhide')->csrf()}'>{lang="unhide"}</a></li>
|
||||
{{endif}}
|
||||
{{endif}}
|
||||
{{if $comment->canSplit()}}
|
||||
<li class='ipsMenu_item'><a href='{$comment->url('split')}' data-action='splitComment' data-ipsDialog data-ipsDialog-title="{lang="split_to_new" sprintf="\IPS\Member::loggedIn()->language()->addToStack( $item::$title )"}">{lang="split"}</a></li>
|
||||
<li class='ipsMenu_item'><a href='{$comment->url('split')}' data-action='splitComment' data-ipsDialog data-ipsDialog-title="{lang="split_to_new" sprintf="\IPS\Member::loggedIn()->language()->addToStack( $item::$title )"}" data-ipsDialog-destructOnClose='true'>{lang="split"}</a></li>
|
||||
{{endif}}
|
||||
{{if $comment->canDelete()}}
|
||||
<li class='ipsMenu_item'><a href='{$comment->url('delete')->csrf()->setPage('page',\IPS\Request::i()->page)}' data-action='deleteComment' data-updateOnDelete="#commentCount">{lang="delete"}</a></li>
|
||||
@@ -3104,7 +3118,7 @@
|
||||
<li class='ipsMenu_item'><a href='{$comment->url('unfeature')->csrf()->setPage('page',\IPS\Request::i()->page)}' data-action="unrecommendComment">{lang="unrecommend_content"}</a></li>
|
||||
{{endif}}
|
||||
{{if !$comment->isFeatured() AND $item->canFeatureComment()}}
|
||||
<li class='ipsMenu_item'><a href='{$comment->url('feature')->setPage('page',\IPS\Request::i()->page)}' data-ipsDialog data-ipsDialog-title='{lang="recommend_post"}' data-ipsDialog-remoteSubmit data-ipsDialog-size='medium' data-action="recommendComment">{lang="recommend_content"}</a></li>
|
||||
<li class='ipsMenu_item'><a href='{$comment->url('feature')->setPage('page',\IPS\Request::i()->page)}' data-ipsDialog data-ipsDialog-title='{lang="recommend_post"}' data-ipsDialog-remoteSubmit data-ipsDialog-size='medium' data-action="recommendComment" data-ipsDialog-destructOnClose='true'>{lang="recommend_content"}</a></li>
|
||||
{{endif}}
|
||||
{{if ( ! $comment->mapped('first') and $comment->canPromoteToSocialMedia() )}}
|
||||
<li class='ipsMenu_item'>{template="promoteLink" app="core" group="global" params="$comment"}</li>
|
||||
@@ -3192,15 +3206,18 @@
|
||||
{{endif}}
|
||||
{{endif}}
|
||||
{{if $comment->canSplit()}}
|
||||
<li class='ipsMenu_item'><a href='{$comment->url('split')}' data-action='splitComment' data-ipsDialog data-ipsDialog-title="{lang="split_to_new" sprintf="\IPS\Member::loggedIn()->language()->addToStack( $item::$title )"}">{lang="split"}</a></li>
|
||||
<li class='ipsMenu_item'><a href='{$comment->url('split')}' data-action='splitComment' data-ipsDialog data-ipsDialog-title="{lang="split_to_new" sprintf="\IPS\Member::loggedIn()->language()->addToStack( $item::$title )"}" data-ipsDialog-destructOnClose='true'>{lang="split"}</a></li>
|
||||
{{endif}}
|
||||
{{if $comment instanceof \IPS\Content\Hideable and $comment->canHide()}}
|
||||
<li class='ipsMenu_item'><a href='{$comment->url('hide')->csrf()}' data-ipsDialog data-ipsDialog-title="{lang="hide"}">{lang="hide"}</a></li>
|
||||
<li class='ipsMenu_item'><a href='{$comment->url('hide')->csrf()}' data-ipsDialog data-ipsDialog-title="{lang="hide"}" data-ipsDialog-destructOnClose='true'>{lang="hide"}</a></li>
|
||||
{{endif}}
|
||||
</ul>
|
||||
</li>
|
||||
{{endif}}
|
||||
{{else}}
|
||||
{{if ! $comment->mapped('first') AND $comment->item()->canSolve() AND ! $comment->item()->isSolved() AND $comment->item()->isNotModeratorButCanSolve()}}
|
||||
<li><a href='{$item->url()->csrf()->setQueryString( array( 'do' => 'solve', 'answer' => $comment->pid ) )}' data-action="solveComment" class="ipsButton ipsButton_verySmall"><i class="fa fa-check"></i> {lang="solve_content"}</a></li>
|
||||
{{endif}}
|
||||
{{if $comment->hidden() === 0 and $item->canComment() and $editorName}}
|
||||
<li data-ipsQuote-editor='{$editorName}' data-ipsQuote-target='#comment-{$comment->$idField}' class='ipsJS_show'>
|
||||
<button class='ipsButton ipsButton_light ipsButton_verySmall ipsButton_narrow cMultiQuote ipsHide' data-action='multiQuoteComment' data-ipsTooltip data-ipsQuote-multiQuote data-mqId='mq{$comment->$idField}' title='{lang="multiquote"}'><i class='fa fa-plus'></i></button>
|
||||
@@ -3212,9 +3229,9 @@
|
||||
{{if ( $comment->item()->isSolved() and $comment->item()->mapped('solved_comment_id') == $comment->pid ) AND $comment->item()->canSolve()}}
|
||||
<li><a href='{$item->url()->csrf()->setQueryString( array( 'do' => 'unsolve', 'answer' => $comment->pid ) )}' data-action="unsolveComment">{lang="unsolve_content"}</a></li>
|
||||
{{endif}}
|
||||
{{if $comment->item()->canSolve() AND ! $comment->item()->isSolved()}}
|
||||
{{if $comment->item()->canSolve() AND ! $comment->item()->isSolved() AND ! $comment->item()->isNotModeratorButCanSolve()}}
|
||||
<li><a href='{$item->url()->csrf()->setQueryString( array( 'do' => 'solve', 'answer' => $comment->pid ) )}' data-action="solveComment">{lang="solve_content"}</a></li>
|
||||
{{endif}}
|
||||
{{endif}}
|
||||
{{endif}}
|
||||
<li class='ipsHide' data-role='commentLoading'>
|
||||
<span class='ipsLoading ipsLoading_tiny ipsLoading_noAnim'></span>
|
||||
@@ -3223,7 +3240,7 @@
|
||||
</div>
|
||||
{{endif}}
|
||||
|
||||
{{if trim( $comment->author()->signature )}}
|
||||
{{if $comment->author()->signature AND trim( $comment->author()->signature )}}
|
||||
{template="signature" group="global" app="core" params="$comment->author()"}
|
||||
{{endif}}
|
||||
</div>
|
||||
@@ -3426,7 +3443,7 @@
|
||||
{{endif}}
|
||||
|
||||
<div class='ipsPageHeader ipsResponsive_pull ipsBox ipsPadding sm:ipsPadding:half ipsMargin_bottom'>
|
||||
{{if \IPS\Application::appIsEnabled('cloud') }}
|
||||
{{if \IPS\Application::appIsEnabled('cloud') AND \IPS\cloud\Application::featureIsEnabled( 'realtime' )}}
|
||||
<div data-controller='cloud.front.realtime.whosViewing' data-location='{expression="\IPS\cloud\Realtime::i()->getLocationHash()"}' data-visibleClass='ipsMargin_bottom:half'></div>
|
||||
{{endif}}
|
||||
{{if $topic->isQuestion()}}
|
||||
@@ -3459,8 +3476,10 @@
|
||||
<div class='ipsFlex ipsFlex-ai:center ipsFlex-fw:wrap ipsGap:4'>
|
||||
<div class='ipsFlex-flex:11'>
|
||||
<h1 class='ipsType_pageTitle ipsContained_container'>
|
||||
{{if $topic->mapped('pinned') || $topic->mapped('featured') || $topic->hidden() === -1 || $topic->hidden() === 1 || $topic->hidden() === -2 || $topic->isSolved() || ( $topic->canToggleItemModeration() and $topic->itemModerationEnabled() )}}
|
||||
{{if $topic->hidden() === -1}}
|
||||
{{if $topic->isFutureDate() || $topic->mapped('pinned') || $topic->mapped('featured') || $topic->hidden() === -1 || $topic->hidden() === 1 || $topic->hidden() === -2 || $topic->isSolved() || ( $topic->canToggleItemModeration() and $topic->itemModerationEnabled() )}}
|
||||
{{if $topic->isFutureDate()}}
|
||||
<span><span class="ipsBadge ipsBadge_icon ipsBadge_warning" data-ipsTooltip title='{$topic->futureDateBlurb()}'><i class='fa fa-clock-o'></i></span></span>
|
||||
{{elseif $topic->hidden() === -1}}
|
||||
<span><span class="ipsBadge ipsBadge_icon ipsBadge_warning" data-ipsTooltip title='{$topic->hiddenBlurb()}'><i class='fa fa-eye-slash'></i></span></span>
|
||||
{{elseif $topic->hidden() === -2}}
|
||||
<span><span class="ipsBadge ipsBadge_icon ipsBadge_warning" data-ipsTooltip title='{$topic->deletedBlurb()}'><i class='fa fa-trash'></i></span></span>
|
||||
@@ -3498,7 +3517,7 @@
|
||||
<p class='ipsType_reset ipsType_medium'><strong><i class='fa fa-clock-o'></i> {lang="topic_locks_at" htmlsprintf="\IPS\DateTime::ts( $topic->topic_close_time )->html(), \IPS\DateTime::ts( $topic->topic_close_time )->localeTime( FALSE )"}</strong></p>
|
||||
{{endif}}
|
||||
{{if \count( $topic->tags() ) OR ( $topic->canEdit() AND $topic::canTag( NULL, $topic->container() ) )}}
|
||||
{template="tags" group="global" app="core" params="$topic->tags(), FALSE, FALSE, ( $topic->canEdit() AND $topic::canTag( NULL, $topic->container() ) ) ? $topic->url() : NULL"}
|
||||
{template="tags" group="global" app="core" params="$topic->tags(), FALSE, FALSE, ( $topic->canEdit() AND ( \count( $topic->tags() ) OR $topic::canTag( NULL, $topic->container() ) ) ) ? $topic->url() : NULL"}
|
||||
{{endif}}
|
||||
</div>
|
||||
{{if $topic->container()->forum_allow_rating}}
|
||||
@@ -3524,7 +3543,7 @@
|
||||
<strong>{lang="ask_byline_no_date" htmlsprintf="$topic->author()->link( $topic->warningRef(), NULL, $topic->isAnonymous() )"},</strong><br />
|
||||
<span class='ipsType_light'>{datetime="$topic->start_date"}</span>
|
||||
{{else}}
|
||||
<strong>{lang="byline_itemprop" htmlsprintf="$topic->author()->link( $topic->warningRef(), NULL, $topic->isAnonymous() )"}</strong><br />
|
||||
<strong>{lang="byline_nodate" htmlsprintf="$topic->author()->link( $topic->warningRef(), NULL, $topic->isAnonymous() )"}</strong><br />
|
||||
<span class='ipsType_light'>{datetime="$topic->start_date"} {lang="in"} <a href="{$topic->container()->url()}">{$topic->container()->_formattedTitle|raw}</a></span>
|
||||
{{endif}}
|
||||
</span>
|
||||
@@ -3562,11 +3581,26 @@
|
||||
{{endif}}
|
||||
</div>
|
||||
|
||||
{{if $topic->canSolve() AND ! $topic->isSolved() AND $topic->isNotModeratorButCanSolve()}}
|
||||
<div class='cContentMessage cContentMessage_color ipsMessage_success ipsMargin_vertical' data-controller='forums.front.topic.solved'>
|
||||
<h3 class='cContentMessage__header'>{lang="solved_did_it_tho_title" sprintf="\IPS\Member::loggedIn()->name"}</h3>
|
||||
<div class='ipsPadding'>
|
||||
{lang="solved_did_it_tho_desc"}
|
||||
{{if member.members_bitoptions['no_solved_reenage']}}
|
||||
<div class='ipsMargin_top'>
|
||||
<a href="#" data-action="mailSolvedReminders" class="ipsButton ipsButton_verySmall"><i class="fa fa-envelope"></i> {lang="solved_reengage_on"}</a>
|
||||
</div>
|
||||
{{endif}}
|
||||
</div>
|
||||
</div>
|
||||
{{endif}}
|
||||
|
||||
{template="contentItemMessages" group="global" app="core" params="$topic->getMessages(), $topic"}
|
||||
|
||||
{{if $topic->hidden() === 1 and $topic->canUnhide()}}
|
||||
<div class="ipsMessage ipsMessage_warning ipsSpacer_top">
|
||||
<p class="ipsType_reset">{lang="topic_pending_approval"}</p>
|
||||
<p class="ipsType_reset">{$topic->hiddenBlurb()}</p>
|
||||
|
||||
<ul class='ipsList_inline ipsSpacer_top'>
|
||||
<li><a href="{$topic->url()->csrf()->setQueryString( array( 'do' => 'moderate', 'action' => 'unhide' ) )}" class="ipsButton ipsButton_positive ipsButton_verySmall" title='{lang="approve_title_topic"}'><i class="fa fa-check"></i> {lang="approve"}</a></li>
|
||||
{{if $topic->canDelete()}}
|
||||
@@ -3598,7 +3632,7 @@
|
||||
{{endif}}
|
||||
</li>
|
||||
{{endif}}
|
||||
{{if ( $topic->canPin() or $topic->canUnpin() or $topic->canFeature() or $topic->canUnfeature() or $topic->canHide() or $topic->canUnhide() or $topic->canMove() or $topic->canLock() or $topic->canUnlock() or $topic->canDelete() or $topic->availableSavedActions() or $topic->canMerge() or $topic->canUnarchive() or $topic->canRemoveArchiveExcludeFlag() or \IPS\Member::loggedIn()->modPermission('can_view_moderation_log') or $topic->canToggleItemModeration() ) or ( $topic->hidden() == -2 AND \IPS\Member::loggedIn()->modPermission('can_manage_deleted_content') )}}
|
||||
{{if ( $topic->canPin() or $topic->canUnpin() or $topic->canFeature() or $topic->canUnfeature() or $topic->canHide() or $topic->canUnhide() or $topic->canMove() or $topic->canLock() or $topic->canUnlock() or $topic->canDelete() or $topic->availableSavedActions() or $topic->canMerge() or $topic->canUnarchive() or $topic->canRemoveArchiveExcludeFlag() or \IPS\Member::loggedIn()->modPermission('can_view_moderation_log') or $topic->canToggleItemModeration() ) or ( $topic->isFutureDate() and $topic::canFuturePublish( NULL, $topic->container() ) ) or ( $topic->hidden() == -2 AND \IPS\Member::loggedIn()->modPermission('can_manage_deleted_content') )}}
|
||||
<li>
|
||||
<a href='#elTopicActions_menu' id='elTopicActions' class='ipsButton ipsButton_link ipsButton_medium ipsButton_fullWidth' data-ipsMenu>{lang="moderator_actions"} <i class='fa fa-caret-down'></i></a>
|
||||
<ul id='elTopicActions_menu' class='ipsMenu ipsMenu_auto ipsHide'>
|
||||
@@ -3607,6 +3641,9 @@
|
||||
<li class='ipsMenu_item'><a href='{$topic->url()->csrf()->setQueryString( array( 'do' => 'moderate', 'action' => 'restoreAsHidden' ) )}' data-confirm data-confirmSubMessage='{lang="restore_as_hidden_desc"}'>{lang="restore_as_hidden"}</a></li>
|
||||
<li class='ipsMenu_item'><a href='{$topic->url()->csrf()->setQueryString( array( 'do' => 'moderate', 'action' => 'delete', 'immediate' => 1 ) )}' data-confirm data-confirmSubMessage='{lang="delete_immediately_desc"}'>{lang="delete_immediately"}</a></li>
|
||||
{{else}}
|
||||
{{if $topic->isFutureDate() and $topic::canFuturePublish( NULL, $topic->container() )}}
|
||||
<li class='ipsMenu_item'><a href='{$topic->url('moderate')->csrf()->setQueryString( array( 'action' => 'publish' ) )}' data-confirm title='{lang="publish_now"}'>{lang="publish"}</a></li>
|
||||
{{endif}}
|
||||
{{if $topic->canFeature()}}
|
||||
<li class='ipsMenu_item'><a href='{$topic->url()->csrf()->setQueryString( array( 'do' => 'moderate', 'action' => 'feature' ) )}'>{lang="feature"}</a></li>
|
||||
{{endif}}
|
||||
@@ -3620,22 +3657,22 @@
|
||||
<li class='ipsMenu_item'><a href='{$topic->url()->csrf()->setQueryString( array( 'do' => 'moderate', 'action' => 'unpin' ) )}' >{lang="unpin"}</a></li>
|
||||
{{endif}}
|
||||
{{if $topic->canHide()}}
|
||||
<li class='ipsMenu_item'><a href='{$topic->url()->setQueryString( array( 'do' => 'moderate', 'action' => 'hide' ) )}' data-ipsDialog data-ipsDialog-title="{lang="hide"}">{lang="hide"}</a></li>
|
||||
<li class='ipsMenu_item'><a href='{$topic->url()->csrf()->setQueryString( array( 'do' => 'moderate', 'action' => 'hide' ) )}' data-ipsDialog data-ipsDialog-size='medium' data-ipsDialog-title="{lang="hide"}" data-ipsDialog-destructOnClose='true'>{lang="hide"}</a></li>
|
||||
{{endif}}
|
||||
{{if $topic->canUnhide()}}
|
||||
<li class='ipsMenu_item'><a href='{$topic->url()->csrf()->setQueryString( array( 'do' => 'moderate', 'action' => 'unhide' ) )}' >{{if $topic->hidden() === 1}}{lang="approve"}{{else}}{lang="unhide"}{{endif}}</a></li>
|
||||
<li class='ipsMenu_item'><a href='{$topic->url()->csrf()->setQueryString( array( 'do' => 'moderate', 'action' => 'unhide' ) )}' data-ipsDialog-destructOnClose='true'>{{if $topic->hidden() === 1}}{lang="approve"}{{else}}{lang="unhide"}{{endif}}</a></li>
|
||||
{{endif}}
|
||||
{{if $topic->canLock()}}
|
||||
<li class='ipsMenu_item'><a href='{$topic->url()->csrf()->setQueryString( array( 'do' => 'moderate', 'action' => 'lock' ) )}' >{lang="lock"}</a></li>
|
||||
<li class='ipsMenu_item'><a href='{$topic->url()->csrf()->setQueryString( array( 'do' => 'moderate', 'action' => 'lock' ) )}' {{if member.modPermission('can_manage_alerts') AND $topic->author()->member_id }} data-ipsDialog data-ipsDialog-size='medium' data-ipsDialog-title="{lang="lock"}" data-ipsDialog-destructOnClose='true' {{endif}}>{lang="lock"}</a></li>
|
||||
{{endif}}
|
||||
{{if $topic->canUnlock()}}
|
||||
<li class='ipsMenu_item'><a href='{$topic->url()->csrf()->setQueryString( array( 'do' => 'moderate', 'action' => 'unlock' ) )}' >{lang="unlock"}</a></li>
|
||||
{{endif}}
|
||||
{{if $topic->canMove()}}
|
||||
<li class='ipsMenu_item'><a href='{$topic->url()->setQueryString( array( 'do' => 'move' ) )}' data-ipsDialog data-ipsDialog-size='narrow' data-ipsDialog-title="{lang="move"}" >{lang="move"}</a></li>
|
||||
<li class='ipsMenu_item'><a href='{$topic->url()->csrf()->setQueryString( array( 'do' => 'move' ) )}' data-ipsDialog data-ipsDialog-size='medium' data-ipsDialog-title="{lang="move"}" data-ipsDialog-destructOnClose='true'>{lang="move"}</a></li>
|
||||
{{endif}}
|
||||
{{if $topic->canMerge()}}
|
||||
<li class='ipsMenu_item'><a href='{$topic->url()->setQueryString( array( 'do' => 'merge' ) )}' data-ipsDialog data-ipsDialog-size='narrow' data-ipsDialog-title="{lang="merge"}" >{lang="merge"}</a></li>
|
||||
<li class='ipsMenu_item'><a href='{$topic->url()->csrf()->setQueryString( array( 'do' => 'merge' ) )}' data-ipsDialog data-ipsDialog-size='medium' data-ipsDialog-title="{lang="merge"}" data-ipsDialog-destructOnClose='true'>{lang="merge"}</a></li>
|
||||
{{endif}}
|
||||
{{if $topic->canUnarchive()}}
|
||||
<li class='ipsMenu_item'><a href='{$topic->url()->csrf()->setQueryString( array( 'do' => 'unarchive' ) )}' data-confirm data-confirmSubMessage="{$topic->unarchiveBlurb()}" >{lang="unarchive"}</a></li>
|
||||
@@ -3647,7 +3684,7 @@
|
||||
<li class='ipsMenu_item'><a href='{$topic->url()->csrf()->setQueryString( array( 'do' => 'moderate', 'action' => 'delete' ) )}' data-confirm >{lang="delete"}</a></li>
|
||||
{{endif}}
|
||||
{{if $topic->canOnMessage( 'add' )}}
|
||||
<li class='ipsMenu_item'><a href='{$topic->url()->setQueryString( array( 'do' => 'messageForm' ) )}' data-ipsDialog data-ipsDialog-title='{lang="add_message"}'>{lang="add_message"}</a></li>
|
||||
<li class='ipsMenu_item'><a href='{$topic->url()->setQueryString( array( 'do' => 'messageForm' ) )}' data-ipsDialog data-ipsDialog-title='{lang="add_message"}' data-ipsDialog-destructOnClose='true'>{lang="add_message"}</a></li>
|
||||
{{endif}}
|
||||
{{if $topic->canToggleItemModeration()}}
|
||||
<li class='ipsMenu_item'><a href='{$topic->url()->csrf()->setQueryString( array( 'do' => 'toggleItemModeration' ) )}' data-confirm data-confirmMessage='{{if $topic->itemModerationEnabled()}}{lang="disable_topic_moderation_confirm"}{{else}}{lang="enable_topic_moderation_confirm"}{{endif}}'>{{if $topic->itemModerationEnabled()}}{lang="disable_topic_moderation"}{{else}}{lang="enable_topic_moderation"}{{endif}}</a></li>
|
||||
@@ -3820,7 +3857,7 @@
|
||||
|
||||
{{if $topic->commentForm() || $topic->locked() || \IPS\Member::loggedIn()->restrict_post || \IPS\Member::loggedIn()->members_bitoptions['unacknowledged_warnings'] || !\IPS\Member::loggedIn()->checkPostsPerDay()}}
|
||||
<a id='replyForm'></a>
|
||||
<div data-role='replyArea' class='cTopicPostArea ipsBox ipsResponsive_pull ipsPadding {{if !$topic->canComment()}}cTopicPostArea_noSize{{endif}} ipsSpacer_top' data-controller='cloud.front.realtime.forumsReplyArea,cloud.front.realtime.whosTyping'>
|
||||
<div data-role='replyArea' class='cTopicPostArea ipsBox ipsResponsive_pull ipsPadding {{if !$topic->canComment()}}cTopicPostArea_noSize{{endif}} ipsSpacer_top' {{if \IPS\Application::appIsEnabled('cloud') AND \IPS\cloud\Application::featureIsEnabled( 'realtime' )}}data-controller='cloud.front.realtime.forumsReplyArea,cloud.front.realtime.whosTyping'{{endif}}>
|
||||
{{if $topic->commentForm()}}
|
||||
{{if $topic->locked()}}
|
||||
<p class='ipsType_reset ipsType_warning ipsComposeArea_warning ipsSpacer_bottom ipsSpacer_half'><i class='fa fa-info-circle'></i> {lang="topic_locked_can_comment"}</p>
|
||||
@@ -3890,16 +3927,16 @@
|
||||
<li class='ipsMenu_item'><a href='{$topic->url()->csrf()->setQueryString( array( 'do' => 'moderate', 'action' => 'unhide' ) )}' >{{if $topic->hidden() === 1}}{lang="approve"}{{else}}{lang="unhide"}{{endif}}</a></li>
|
||||
{{endif}}
|
||||
{{if $topic->canLock()}}
|
||||
<li class='ipsMenu_item'><a href='{$topic->url()->csrf()->setQueryString( array( 'do' => 'moderate', 'action' => 'lock' ) )}' >{lang="lock"}</a></li>
|
||||
<li class='ipsMenu_item'><a href='{$topic->url()->csrf()->setQueryString( array( 'do' => 'moderate', 'action' => 'lock' ) )}' {{if member.modPermission('can_manage_alerts') AND $topic->author()->member_id }} data-ipsDialog data-ipsDialog-size='medium' data-ipsDialog-title="{lang="lock"}" data-ipsDialog-destructOnClose='true' {{endif}}>{lang="lock"}</a></li>
|
||||
{{endif}}
|
||||
{{if $topic->canUnlock()}}
|
||||
<li class='ipsMenu_item'><a href='{$topic->url()->csrf()->setQueryString( array( 'do' => 'moderate', 'action' => 'unlock' ) )}' >{lang="unlock"}</a></li>
|
||||
{{endif}}
|
||||
{{if $topic->canMove()}}
|
||||
<li class='ipsMenu_item'><a href='{$topic->url()->setQueryString( array( 'do' => 'move' ) )}' data-ipsDialog data-ipsDialog-size='narrow' data-ipsDialog-title="{lang="move"}" >{lang="move"}</a></li>
|
||||
<li class='ipsMenu_item'><a href='{$topic->url()->setQueryString( array( 'do' => 'move' ) )}' data-ipsDialog data-ipsDialog-size='medium' data-ipsDialog-title="{lang="move"}" >{lang="move"}</a></li>
|
||||
{{endif}}
|
||||
{{if $topic->canMerge()}}
|
||||
<li class='ipsMenu_item'><a href='{$topic->url()->setQueryString( array( 'do' => 'merge' ) )}' data-ipsDialog data-ipsDialog-size='narrow' data-ipsDialog-title="{lang="merge"}" >{lang="merge"}</a></li>
|
||||
<li class='ipsMenu_item'><a href='{$topic->url()->setQueryString( array( 'do' => 'merge' ) )}' data-ipsDialog data-ipsDialog-size='medium' data-ipsDialog-title="{lang="merge"}" >{lang="merge"}</a></li>
|
||||
{{endif}}
|
||||
{{if $topic->canUnarchive()}}
|
||||
<li class='ipsMenu_item'><a href='{$topic->url()->csrf()->setQueryString( array( 'do' => 'unarchive' ) )}' data-confirm data-confirmSubMessage="{$topic->unarchiveBlurb()}" >{lang="unarchive"}</a></li>
|
||||
|
||||
@@ -448,5 +448,52 @@
|
||||
"107011": "4.7.0 Beta 9",
|
||||
"107012": "4.7.0 Beta 10",
|
||||
"107013": "4.7.0",
|
||||
"107014": "4.7.0"
|
||||
"107014": "4.7.0",
|
||||
"107015": "4.7.0",
|
||||
"107016": "4.7.0",
|
||||
"107017": "4.7.0",
|
||||
"107018": "4.7.1 Beta 1",
|
||||
"107019": "4.7.1 Beta 1",
|
||||
"107020": "4.7.1 Beta 2",
|
||||
"107021": "4.7.1",
|
||||
"107022": "4.7.1",
|
||||
"107023": "4.7.1",
|
||||
"107024": "4.7.1",
|
||||
"107025": "4.7.2 Beta 1",
|
||||
"107026": "4.7.2 Beta 1",
|
||||
"107027": "4.7.2 Beta 2",
|
||||
"107028": "4.7.2 Beta 3",
|
||||
"107029": "4.7.2 Beta 4",
|
||||
"107030": "4.7.2 Beta 5",
|
||||
"107031": "4.7.2 Beta 6",
|
||||
"107032": "4.7.2",
|
||||
"107033": "4.7.2",
|
||||
"107034": "4.7.2.1",
|
||||
"107035": "4.7.2.1",
|
||||
"107036": "4.7.2.1",
|
||||
"107037": "4.7.2.1",
|
||||
"107038": "4.7.2.1",
|
||||
"107300": "4.7.3 Beta 1",
|
||||
"107301": "4.7.3 Beta 2",
|
||||
"107302": "4.7.3 Beta 3",
|
||||
"107303": "4.7.3 Beta 4",
|
||||
"107304": "4.7.3",
|
||||
"107305": "4.7.3",
|
||||
"107306": "4.7.3",
|
||||
"107307": "4.7.3",
|
||||
"107400": "4.7.4 Beta 1",
|
||||
"107401": "4.7.4 Beta 2",
|
||||
"107402": "4.7.4 Beta 3",
|
||||
"107403": "4.7.4",
|
||||
"107404": "4.7.4",
|
||||
"107405": "4.7.4",
|
||||
"107406": "4.7.4",
|
||||
"107500": "4.7.5 Beta 1",
|
||||
"107501": "4.7.5",
|
||||
"107502": "4.7.5",
|
||||
"107503": "4.7.5",
|
||||
"107504": "4.7.5",
|
||||
"107505": "4.7.5",
|
||||
"107600": "4.7.6 Beta 1",
|
||||
"107601": "4.7.6"
|
||||
}
|
||||
@@ -28,6 +28,11 @@ class _Topics
|
||||
*/
|
||||
public $classes = array();
|
||||
|
||||
/**
|
||||
* @brief Can be shown in similar content
|
||||
*/
|
||||
public $similarContent = TRUE;
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
|
||||
@@ -57,7 +57,7 @@ class _Forums
|
||||
public function canBeModerated( $member, $field )
|
||||
{
|
||||
/* Creating/editing a forum */
|
||||
if ( preg_match( '/^forums\-(?:forum|rules|permerror)\-\d+$/', $field->options['autoSaveKey'] ) or preg_match( '/^forums\-new\-(?:forum|rules|permerror)\d+$/', $field->options['autoSaveKey'] ) )
|
||||
if ( preg_match( '/^forums\-(?:forum|rules|permerror)\-\d+$/', $field->options['autoSaveKey'] ) or preg_match( '/^forums\-new\-(?:forum|rules|permerror)\d*$/', $field->options['autoSaveKey'] ) )
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
@@ -66,6 +66,11 @@ class _Forums
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
/* Merging multiple posts */
|
||||
elseif ( mb_substr( $field->options['autoSaveKey'], 0, 10 ) === 'mod-merge-' )
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
/* Unknown */
|
||||
else
|
||||
{
|
||||
|
||||
@@ -0,0 +1,177 @@
|
||||
<?php
|
||||
/**
|
||||
* @brief Background Task
|
||||
* @author <a href='https://www.invisioncommunity.com'>Invision Power Services, Inc.</a>
|
||||
* @copyright (c) Invision Power Services, Inc.
|
||||
* @license https://www.invisioncommunity.com/legal/standards/
|
||||
* @package Invision Community
|
||||
* @subpackage Forums
|
||||
* @since 27 Jul 2022
|
||||
*/
|
||||
|
||||
namespace IPS\forums\extensions\core\Queue;
|
||||
|
||||
/* To prevent PHP errors (extending class does not exist) revealing path */
|
||||
if ( !\defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
{
|
||||
header( ( isset( $_SERVER['SERVER_PROTOCOL'] ) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.0' ) . ' 403 Forbidden' );
|
||||
exit;
|
||||
}
|
||||
|
||||
/**
|
||||
* Background Task
|
||||
*/
|
||||
class _RebuildSolvedStats
|
||||
{
|
||||
/**
|
||||
* @brief Number of days to rebuild per cycle
|
||||
*/
|
||||
public $rebuild = 30;
|
||||
|
||||
/**
|
||||
* Parse data before queuing
|
||||
*
|
||||
* @param array $data
|
||||
* @return array
|
||||
*/
|
||||
public function preQueueData( $data )
|
||||
{
|
||||
try
|
||||
{
|
||||
$forum = \IPS\forums\Forum::load( $data['forum_id'] );
|
||||
$timezone = new \DateTimeZone( \IPS\Settings::i()->reputation_timezone );
|
||||
|
||||
/* Reset solved time */
|
||||
$forum->solved_stats_from = 0;
|
||||
$forum->save();
|
||||
|
||||
/* We work a day in arrears */
|
||||
$oldest = \IPS\DateTime::ts( $forum->getFirstSolvedTime() )->setTimezone( $timezone )->setTime( 12, 0 );
|
||||
$newest = \IPS\DateTime::create()->setTimezone( $timezone )->setTime( 12, 0 );
|
||||
|
||||
$diff = $newest->diff( $oldest );
|
||||
|
||||
$data['count'] = $diff->days;
|
||||
$data['date'] = $oldest->getTimeStamp();
|
||||
$data['max'] = $newest->getTimeStamp();
|
||||
|
||||
\IPS\Db::i()->delete( 'core_statistics', [ 'type=? and value_1=?', 'solved', $forum->_id ] );
|
||||
}
|
||||
catch( \Exception $ex )
|
||||
{
|
||||
throw new \OutOfRangeException;
|
||||
}
|
||||
|
||||
if( $data['count'] == 0 )
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
return $data;
|
||||
}
|
||||
|
||||
/**
|
||||
* Run Background Task
|
||||
*
|
||||
* @param mixed $data Data as it was passed to \IPS\Task::queue()
|
||||
* @param int $offset Offset
|
||||
* @return int New offset
|
||||
* @throws \IPS\Task\Queue\OutOfRangeException Indicates offset doesn't exist and thus task is complete
|
||||
*/
|
||||
public function run( &$data, $offset )
|
||||
{
|
||||
if ( !class_exists( 'IPS\forums\Topic' ) OR !\IPS\Application::appisEnabled( 'forums' ) )
|
||||
{
|
||||
throw new \IPS\Task\Queue\OutOfRangeException;
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
$forum = \IPS\forums\Forum::load( $data['forum_id'] );
|
||||
}
|
||||
catch( \Exception $ex )
|
||||
{
|
||||
throw new \IPS\Task\Queue\OutOfRangeException;
|
||||
}
|
||||
|
||||
$done = 0;
|
||||
for( $i = 0; $i < $this->rebuild; $i++ )
|
||||
{
|
||||
$timezone = new \DateTimeZone( \IPS\Settings::i()->reputation_timezone );
|
||||
$end = \IPS\DateTime::ts( $data['date'], true )->setTimezone( $timezone )->sub( new \DateInterval('P1D') )->setTime( 23, 59 );
|
||||
|
||||
if ( $end->getTimeStamp() >= $data['max'] )
|
||||
{
|
||||
/* We're done */
|
||||
throw new \IPS\Task\Queue\OutOfRangeException;
|
||||
}
|
||||
|
||||
$start = \IPS\DateTime::ts( $forum->getFirstSolvedTime() )->setTimezone( $timezone );
|
||||
|
||||
$where = [
|
||||
[ \IPS\Db::i()->in( 'state', array( 'link', 'merged' ), TRUE ) ],
|
||||
[ \IPS\Db::i()->in( 'approved', array( -2, -3 ), TRUE ) ],
|
||||
[ 'forum_id=?', $forum->_id ],
|
||||
[ 'start_date > ? AND start_date < ?', $start->getTimestamp(), $end->getTimestamp() ]
|
||||
];
|
||||
|
||||
|
||||
$total = \IPS\Db::i()->select( 'COUNT(*)', 'forums_topics', $where )->first();
|
||||
$solved = \IPS\Db::i()->select( 'COUNT(*)', 'forums_topics', array_merge( $where, [ [ 'core_solved_index.id IS NOT NULL' ] ] ) )->join( 'core_solved_index', "core_solved_index.app='forums' AND core_solved_index.item_id=forums_topics.tid")->first();
|
||||
$avg = \IPS\Db::i()->select( 'AVG(core_solved_index.solved_date-forums_topics.start_date)', 'forums_topics', array_merge( $where, [ [ 'core_solved_index.id IS NOT NULL' ] ] ) )->join( 'core_solved_index', "core_solved_index.app='forums' AND core_solved_index.item_id=forums_topics.tid")->first();
|
||||
|
||||
\IPS\Db::i()->insert( 'core_statistics', [
|
||||
'type' => 'solved',
|
||||
'value_1' => $forum->_id,
|
||||
'value_2' => $total,
|
||||
'value_3' => $solved,
|
||||
'value_4' => $avg,
|
||||
'time' => $end->getTimestamp()
|
||||
] );
|
||||
|
||||
$data['date'] = \IPS\DateTime::ts( $data['date'] )->add( new \DateInterval('P1D') )->getTimeStamp();
|
||||
$done++;
|
||||
}
|
||||
|
||||
if ( ! $done )
|
||||
{
|
||||
throw new \IPS\Task\Queue\OutOfRangeException;
|
||||
}
|
||||
|
||||
return $done + $offset;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get Progress
|
||||
*
|
||||
* @param mixed $data Data as it was passed to \IPS\Task::queue()
|
||||
* @param int $offset Offset
|
||||
* @return array( 'text' => 'Doing something...', 'complete' => 50 ) Text explaining task and percentage complete
|
||||
* @throws \OutOfRangeException Indicates offset doesn't exist and thus task is complete
|
||||
*/
|
||||
public function getProgress( $data, $offset )
|
||||
{
|
||||
try
|
||||
{
|
||||
$forum = \IPS\forums\Forum::load( $data['forum_id'] );
|
||||
}
|
||||
catch( \Exception $ex )
|
||||
{
|
||||
throw new \OutOfRangeException;
|
||||
}
|
||||
|
||||
return array( 'text' => \IPS\Member::loggedIn()->language()->addToStack('solved_rebuilding_stats', NULL, [ 'sprintf' => [ $forum->_title ] ] ), 'complete' => $data['count'] ? ( round( 100 / $data['count'] * $offset, 2 ) ) : 100 );
|
||||
}
|
||||
|
||||
/**
|
||||
* Perform post-completion processing
|
||||
*
|
||||
* @param array $data Data returned from preQueueData
|
||||
* @param bool $processed Was anything processed or not? If preQueueData returns NULL, this will be FALSE.
|
||||
* @return void
|
||||
*/
|
||||
public function postComplete( $data, $processed = TRUE )
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
@@ -106,7 +106,7 @@ class _RssImport
|
||||
/* Add to search index */
|
||||
\IPS\Content\Search\Index::i()->index( $topic );
|
||||
|
||||
$post = \IPS\forums\Topic\Post::create( $topic, $content, TRUE, NULL, \IPS\forums\Topic\Post::incrementPostCount( $container ), $member, $article['date'] );
|
||||
$post = \IPS\forums\Topic\Post::create( $topic, $content, TRUE, NULL, \IPS\forums\Topic\Post::incrementPostCount( $container ), $member, $article['date'], ( array_key_exists( 'SERVER_ADDR', $_SERVER ) ) ? $_SERVER['SERVER_ADDR'] : NULL );
|
||||
$topic->topic_firstpost = $post->pid;
|
||||
|
||||
$topic->save();
|
||||
|
||||
@@ -663,6 +663,7 @@ class _settings extends \IPS\Dispatcher\Controller
|
||||
) ) ) );
|
||||
|
||||
$form->add( new \IPS\Helpers\Form\YesNo( 'forums_mod_actions_anon', !\IPS\Settings::i()->forums_mod_actions_anon, FALSE, array(), NULL, NULL, NULL, 'forums_mod_actions_anon' ) );
|
||||
$form->add( new \IPS\Helpers\Form\Number( 'forums_solved_topic_reengage', \IPS\Settings::i()->forums_solved_topic_reengage , FALSE, array( 'min' => 1, 'max' => 365, 'unlimited' => 0, 'unlimitedLang' => 'forums_solved_topic_reengage_never' ), NULL, \IPS\Member::loggedIn()->language()->addToStack('forums_solved_topic_reengage_prefix'), \IPS\Member::loggedIn()->language()->addToStack('forums_solved_topic_reengage_suffix') ) );
|
||||
|
||||
$form->addHeader('topic_summary_settings');
|
||||
|
||||
|
||||
@@ -0,0 +1,258 @@
|
||||
<?php
|
||||
/**
|
||||
* @brief solved
|
||||
* @author <a href='https://www.invisioncommunity.com'>Invision Power Services, Inc.</a>
|
||||
* @copyright (c) Invision Power Services, Inc.
|
||||
* @license https://www.invisioncommunity.com/legal/standards/
|
||||
* @package Invision Community
|
||||
* @subpackage Forums
|
||||
* @since 25 Jul 2022
|
||||
*/
|
||||
|
||||
namespace IPS\forums\modules\admin\stats;
|
||||
|
||||
/* To prevent PHP errors (extending class does not exist) revealing path */
|
||||
if ( !\defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
{
|
||||
header( ( isset( $_SERVER['SERVER_PROTOCOL'] ) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.0' ) . ' 403 Forbidden' );
|
||||
exit;
|
||||
}
|
||||
|
||||
/**
|
||||
* solved
|
||||
*/
|
||||
class _solved extends \IPS\Dispatcher\Controller
|
||||
{
|
||||
/**
|
||||
* @brief Has been CSRF-protected
|
||||
*/
|
||||
public static $csrfProtected = TRUE;
|
||||
|
||||
/**
|
||||
* @brief Allow MySQL RW separation for efficiency
|
||||
*/
|
||||
public static $allowRWSeparation = TRUE;
|
||||
|
||||
/**
|
||||
* Execute
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function execute()
|
||||
{
|
||||
\IPS\Dispatcher::i()->checkAcpPermission( 'topics_manage' );
|
||||
parent::execute();
|
||||
}
|
||||
|
||||
/**
|
||||
* Show the stats then
|
||||
*
|
||||
* core_statistics mapping:
|
||||
* type: solved
|
||||
* value_1: forum_id
|
||||
* value_2: total topics added
|
||||
* value_3: total solved
|
||||
* value_4: AVG time to solved (in seconds)
|
||||
* time: timestamp of the start of the day (so 0:00:00)
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
protected function manage()
|
||||
{
|
||||
$tabs = array(
|
||||
'time' => 'forums_solved_stats_time',
|
||||
'percentage' => 'forums_solved_stats_percentage',
|
||||
'solved' => 'stats_topics_tab_solved'
|
||||
);
|
||||
|
||||
/* Show button to adjust settings */
|
||||
\IPS\Output::i()->sidebar['actions']['settings'] = array(
|
||||
'icon' => 'cog',
|
||||
'title' => 'solved_stats_rebuild_button',
|
||||
'link' => \IPS\Http\Url::internal( 'app=forums&module=stats&controller=solved&do=rebuildStats' )->csrf(),
|
||||
'data' => array( 'confirm' => '' )
|
||||
);
|
||||
|
||||
$activeTab = ( isset( \IPS\Request::i()->tab ) and array_key_exists( \IPS\Request::i()->tab, $tabs ) ) ? \IPS\Request::i()->tab : 'time';
|
||||
|
||||
/* Determine minimum date */
|
||||
$minimumDate = NULL;
|
||||
|
||||
/* We can't retrieve any stats prior to the new tracking being implemented */
|
||||
try
|
||||
{
|
||||
$oldestLog = \IPS\Db::i()->select( 'MIN(time)', 'core_statistics', array( 'type=?', 'solved' ) )->first();
|
||||
|
||||
if( !$minimumDate OR $oldestLog < $minimumDate->getTimestamp() )
|
||||
{
|
||||
$minimumDate = \IPS\DateTime::ts( $oldestLog );
|
||||
}
|
||||
}
|
||||
catch( \UnderflowException $e )
|
||||
{
|
||||
/* We have nothing tracked, set minimum date to today */
|
||||
$minimumDate = \IPS\DateTime::create();
|
||||
}
|
||||
|
||||
if ( $activeTab === 'time' )
|
||||
{
|
||||
$chart = new \IPS\Helpers\Chart\Database( \IPS\Http\Url::internal( 'app=forums&module=stats&controller=solved&tab=' . $activeTab ), 'core_statistics', 'time', '', array(
|
||||
'isStacked' => FALSE,
|
||||
'backgroundColor' => '#ffffff',
|
||||
'hAxis' => array('gridlines' => array('color' => '#f5f5f5')),
|
||||
'lineWidth' => 1,
|
||||
'areaOpacity' => 0.4
|
||||
),
|
||||
'AreaChart',
|
||||
'daily',
|
||||
array('start' => $minimumDate, 'end' => 0),
|
||||
array(),
|
||||
);
|
||||
|
||||
$chart->description = \IPS\Member::loggedIn()->language()->addToStack( 'solved_stats_chart_desc' );
|
||||
$chart->availableTypes = array('AreaChart', 'ColumnChart', 'BarChart');
|
||||
$chart->enableHourly = FALSE;
|
||||
$chart->groupBy = 'value_1';
|
||||
$chart->title = \IPS\Member::loggedIn()->language()->addToStack('forums_solved_stats_time');
|
||||
|
||||
foreach( $validForumIds = $this->getValidForumIds() as $forumId => $forum )
|
||||
{
|
||||
$chart->addSeries( $forum->_title, 'number', 'AVG(value_4) / 3600', TRUE, $forumId );
|
||||
}
|
||||
}
|
||||
else if ( $activeTab === 'percentage' )
|
||||
{
|
||||
$chart = new \IPS\Helpers\Chart\Database( \IPS\Http\Url::internal( 'app=forums&module=stats&controller=solved&tab=' . $activeTab ), 'core_statistics', 'time', '', array(
|
||||
'isStacked' => FALSE,
|
||||
'backgroundColor' => '#ffffff',
|
||||
'hAxis' => array('gridlines' => array('color' => '#f5f5f5')),
|
||||
'lineWidth' => 1,
|
||||
'areaOpacity' => 0.4
|
||||
),
|
||||
'AreaChart',
|
||||
'daily',
|
||||
array('start' => $minimumDate, 'end' => 0),
|
||||
array(),
|
||||
);
|
||||
|
||||
$chart->description = \IPS\Member::loggedIn()->language()->addToStack( 'solved_stats_chart_desc' );
|
||||
$chart->availableTypes = array('AreaChart', 'ColumnChart', 'BarChart');
|
||||
$chart->enableHourly = FALSE;
|
||||
$chart->groupBy = 'value_1';
|
||||
$chart->title = \IPS\Member::loggedIn()->language()->addToStack('forums_solved_stats_percentage');
|
||||
|
||||
foreach( $validForumIds = $this->getValidForumIds() as $forumId => $forum )
|
||||
{
|
||||
$chart->addSeries( $forum->_title, 'number', '( SUM(value_3) / SUM(value_2) ) * 100', TRUE, $forumId );
|
||||
}
|
||||
}
|
||||
else if( $activeTab === 'solved' )
|
||||
{
|
||||
$chart = new \IPS\Helpers\Chart\Database( \IPS\Http\Url::internal( "app=forums&module=stats&controller=solved&tab=" . $activeTab ), 'core_solved_index', 'solved_date', '', array(
|
||||
'isStacked' => FALSE,
|
||||
'backgroundColor' => '#ffffff',
|
||||
'hAxis' => array( 'gridlines' => array( 'color' => '#f5f5f5' ) ),
|
||||
'lineWidth' => 1,
|
||||
'areaOpacity' => 0.4,
|
||||
'chartArea' => array( 'width' => '70%', 'left' => '5%' ),
|
||||
'height' => 400,
|
||||
),
|
||||
'LineChart',
|
||||
'monthly',
|
||||
array( 'start' => ( new \IPS\DateTime )->sub( new \DateInterval('P90D') ), 'end' => new \IPS\DateTime ),
|
||||
array(),
|
||||
'solved'
|
||||
);
|
||||
|
||||
$chart->joins = array( array( 'forums_topics', array( 'comment_class=? and core_solved_index.item_id=forums_topics.tid', 'IPS\forums\Topic\Post' ) ) );
|
||||
$chart->where = array( array( \IPS\Db::i()->in( 'state', array( 'link', 'merged' ), TRUE ) ), array( \IPS\Db::i()->in( 'approved', array( -2, -3 ), TRUE ) ) );
|
||||
$chart->title = \IPS\Member::loggedIn()->language()->addToStack( 'stats_topics_title_solved' );
|
||||
$chart->availableTypes = array( 'LineChart', 'ColumnChart' );
|
||||
|
||||
$chart->groupBy = 'forum_id';
|
||||
$customValues = ( isset( $chart->savedCustomFilters['chart_forums'] ) ? array_values( explode( ',', $chart->savedCustomFilters['chart_forums'] ) ) : 0 );
|
||||
|
||||
$chart->customFiltersForm = array(
|
||||
'form' => array(
|
||||
new \IPS\Helpers\Form\Node( 'chart_forums', $customValues, FALSE, array( 'class' => 'IPS\forums\Forum', 'zeroVal' => 'any', 'multiple' => TRUE, 'permissionCheck' => function ( $forum )
|
||||
{
|
||||
return $forum->sub_can_post and !$forum->redirect_url;
|
||||
} ), NULL, NULL, NULL, 'chart_forums' )
|
||||
),
|
||||
'where' => function( $values )
|
||||
{
|
||||
$forumIds = \is_array( $values['chart_forums'] ) ? array_keys( $values['chart_forums'] ) : explode( ',', $values['chart_forums'] );
|
||||
return \IPS\Db::i()->in( 'forum_id', $forumIds );
|
||||
},
|
||||
'groupBy' => 'forum_id',
|
||||
'series' => function( $values )
|
||||
{
|
||||
$series = array();
|
||||
$forumIds = \is_array( $values['chart_forums'] ) ? array_keys( $values['chart_forums'] ) : explode( ',', $values['chart_forums'] );
|
||||
foreach( $forumIds as $id )
|
||||
{
|
||||
$series[] = array( \IPS\Member::loggedIn()->language()->addToStack( 'forums_forum_' . $id ), 'number', 'COUNT(*)', FALSE, $id );
|
||||
}
|
||||
return $series;
|
||||
},
|
||||
'defaultSeries' => function()
|
||||
{
|
||||
$series = array();
|
||||
foreach( \IPS\Db::i()->select( '*', 'forums_forums', array( 'topics>? and ( forums_bitoptions & ? or forums_bitoptions & ? or forums_bitoptions & ? )', 0, 4, 8, 16 ), 'last_post desc', array( 0, 50 ) ) as $forum )
|
||||
{
|
||||
$series[] = array( \IPS\Member::loggedIn()->language()->addToStack( 'forums_forum_' . $forum['id'] ), 'number', 'COUNT(*)', FALSE, $forum['id'] );
|
||||
}
|
||||
|
||||
return $series;
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
if ( \IPS\Request::i()->isAjax() )
|
||||
{
|
||||
\IPS\Output::i()->output = (string)$chart;
|
||||
}
|
||||
else
|
||||
{
|
||||
\IPS\Output::i()->title = \IPS\Member::loggedIn()->language()->addToStack( 'menu__forums_stats_solved' );
|
||||
\IPS\Output::i()->output = \IPS\Theme::i()->getTemplate( 'global', 'core' )->tabs( $tabs, $activeTab, (string)$chart, \IPS\Http\Url::internal( "app=forums&module=stats&controller=solved" ), 'tab', '', 'ipsPad' );
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Kick off a rebuild of the stats
|
||||
*
|
||||
*/
|
||||
public function rebuildStats()
|
||||
{
|
||||
\IPS\Session::i()->csrfCheck();
|
||||
|
||||
foreach( \IPS\Db::i()->select( '*', 'forums_forums', array( 'topics>? and ( forums_bitoptions & ? or forums_bitoptions & ? or forums_bitoptions & ? )', 0, 4, 8, 16 ) ) as $forum )
|
||||
{
|
||||
\IPS\Task::queue( 'forums', 'RebuildSolvedStats', array( 'forum_id' => $forum['id'] ) );
|
||||
}
|
||||
|
||||
\IPS\Output::i()->redirect( \IPS\Http\Url::internal('app=forums&module=stats&controller=solved'), 'solved_stats_rebuild_started' );
|
||||
}
|
||||
|
||||
/**
|
||||
* Get valid forum IDs to protect against bad data when a forum is removed
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
protected function getValidForumIds()
|
||||
{
|
||||
$validForumIds = [];
|
||||
|
||||
foreach( \IPS\Db::i()->select( 'value_1', 'core_statistics', [ 'type=?', 'solved' ], NULL, NULL, 'value_1' ) as $forumId )
|
||||
{
|
||||
try
|
||||
{
|
||||
$validForumIds[ $forumId ] = \IPS\forums\Forum::load( $forumId );
|
||||
}
|
||||
catch( \Exception $e ) { }
|
||||
}
|
||||
|
||||
return $validForumIds;
|
||||
}
|
||||
}
|
||||
@@ -49,11 +49,6 @@ class _topics extends \IPS\Dispatcher\Controller
|
||||
$tabs[ 'byforum'] = 'stats_topics_tab_byforum';
|
||||
}
|
||||
|
||||
if( \IPS\Db::i()->select( 'COUNT(*)', 'forums_forums', array( 'topics>? and ( forums_bitoptions & ? or forums_bitoptions & ? or forums_bitoptions & ? )', 0, 4, 8, 16 ) )->first() )
|
||||
{
|
||||
$tabs[ 'solved'] = 'stats_topics_tab_solved';
|
||||
}
|
||||
|
||||
$activeTab = ( isset( \IPS\Request::i()->tab ) and array_key_exists( \IPS\Request::i()->tab, $tabs ) ) ? \IPS\Request::i()->tab : 'total';
|
||||
|
||||
if ( $activeTab === 'total' )
|
||||
@@ -74,67 +69,6 @@ class _topics extends \IPS\Dispatcher\Controller
|
||||
$chart->title = \IPS\Member::loggedIn()->language()->addToStack( 'stats_topics_title' );
|
||||
$chart->availableTypes = array( 'AreaChart', 'ColumnChart', 'BarChart' );
|
||||
}
|
||||
else if( $activeTab === 'solved' )
|
||||
{
|
||||
$chart = new \IPS\Helpers\Chart\Database( \IPS\Http\Url::internal( "app=forums&module=stats&controller=topics&tab=" . $activeTab ), 'core_solved_index', 'solved_date', '', array(
|
||||
'isStacked' => FALSE,
|
||||
'backgroundColor' => '#ffffff',
|
||||
'hAxis' => array( 'gridlines' => array( 'color' => '#f5f5f5' ) ),
|
||||
'lineWidth' => 1,
|
||||
'areaOpacity' => 0.4,
|
||||
'chartArea' => array( 'width' => '70%', 'left' => '5%' ),
|
||||
'height' => 400,
|
||||
),
|
||||
'LineChart',
|
||||
'monthly',
|
||||
array( 'start' => ( new \IPS\DateTime )->sub( new \DateInterval('P90D') ), 'end' => new \IPS\DateTime ),
|
||||
array(),
|
||||
'solved'
|
||||
);
|
||||
|
||||
$chart->joins = array( array( 'forums_topics', array( 'comment_class=? and core_solved_index.item_id=forums_topics.tid', 'IPS\forums\Topic\Post' ) ) );
|
||||
$chart->where = array( array( \IPS\Db::i()->in( 'state', array( 'link', 'merged' ), TRUE ) ), array( \IPS\Db::i()->in( 'approved', array( -2, -3 ), TRUE ) ) );
|
||||
$chart->title = \IPS\Member::loggedIn()->language()->addToStack( 'stats_topics_title_solved' );
|
||||
$chart->availableTypes = array( 'LineChart', 'ColumnChart' );
|
||||
|
||||
$chart->groupBy = 'forum_id';
|
||||
$customValues = ( isset( $chart->savedCustomFilters['chart_forums'] ) ? array_values( explode( ',', $chart->savedCustomFilters['chart_forums'] ) ) : 0 );
|
||||
|
||||
$chart->customFiltersForm = array(
|
||||
'form' => array(
|
||||
new \IPS\Helpers\Form\Node( 'chart_forums', $customValues, FALSE, array( 'class' => 'IPS\forums\Forum', 'zeroVal' => 'any', 'multiple' => TRUE, 'permissionCheck' => function ( $forum )
|
||||
{
|
||||
return $forum->sub_can_post and !$forum->redirect_url;
|
||||
} ), NULL, NULL, NULL, 'chart_forums' )
|
||||
),
|
||||
'where' => function( $values )
|
||||
{
|
||||
$forumIds = \is_array( $values['chart_forums'] ) ? array_keys( $values['chart_forums'] ) : explode( ',', $values['chart_forums'] );
|
||||
return \IPS\Db::i()->in( 'forum_id', $forumIds );
|
||||
},
|
||||
'groupBy' => 'forum_id',
|
||||
'series' => function( $values )
|
||||
{
|
||||
$series = array();
|
||||
$forumIds = \is_array( $values['chart_forums'] ) ? array_keys( $values['chart_forums'] ) : explode( ',', $values['chart_forums'] );
|
||||
foreach( $forumIds as $id )
|
||||
{
|
||||
$series[] = array( \IPS\Member::loggedIn()->language()->addToStack( 'forums_forum_' . $id ), 'number', 'COUNT(*)', FALSE, $id );
|
||||
}
|
||||
return $series;
|
||||
},
|
||||
'defaultSeries' => function()
|
||||
{
|
||||
$series = array();
|
||||
foreach( \IPS\Db::i()->select( '*', 'forums_forums', array( 'topics>? and ( forums_bitoptions & ? or forums_bitoptions & ? or forums_bitoptions & ? )', 0, 4, 8, 16 ), 'last_post desc', array( 0, 50 ) ) as $forum )
|
||||
{
|
||||
$series[] = array( \IPS\Member::loggedIn()->language()->addToStack( 'forums_forum_' . $forum['id'] ), 'number', 'COUNT(*)', FALSE, $forum['id'] );
|
||||
}
|
||||
|
||||
return $series;
|
||||
}
|
||||
);
|
||||
}
|
||||
else
|
||||
{
|
||||
$chart = new \IPS\Helpers\Chart\Database( \IPS\Http\Url::internal( "app=forums&module=stats&controller=topics&tab=" . $activeTab ), 'forums_topics', 'start_date', '', array(
|
||||
|
||||
@@ -79,6 +79,10 @@ class _forums extends \IPS\Dispatcher\Controller
|
||||
\IPS\Output::i()->redirect( $forum->url(), '', 302 );
|
||||
}
|
||||
}
|
||||
|
||||
/* Theme */
|
||||
$forum->setTheme();
|
||||
$this->themeGroup = \IPS\Theme::i()->getTemplate( 'forums', 'forums', 'front' );
|
||||
|
||||
/* Password protected */
|
||||
if ( $form = $forum->passwordForm() )
|
||||
@@ -87,16 +91,12 @@ class _forums extends \IPS\Dispatcher\Controller
|
||||
\IPS\Output::i()->output = $form->customTemplate( array( \IPS\Theme::i()->getTemplate( 'forums', 'forums', 'front' ), 'forumPasswordPopup' ), $forum );
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
/* We can read? */
|
||||
if ( $forum->sub_can_post and !$forum->permission_showtopic and !$forum->can('read') )
|
||||
{
|
||||
\IPS\Output::i()->error( $forum->errorMessage(), '1F176/3', 403, '' );
|
||||
}
|
||||
|
||||
/* Theme */
|
||||
$forum->setTheme();
|
||||
$this->themeGroup = \IPS\Theme::i()->getTemplate( 'forums', 'forums', 'front' );
|
||||
|
||||
/* Users can see topics posted by other users? */
|
||||
$where = array();
|
||||
@@ -242,11 +242,18 @@ class _forums extends \IPS\Dispatcher\Controller
|
||||
\IPS\Output::i()->contextualSearchOptions[ \IPS\Member::loggedIn()->language()->addToStack( 'search_contextual_item_forums' ) ] = array( 'type' => 'forums_topic', 'nodes' => $forum->_id );
|
||||
}
|
||||
|
||||
/* If there's only one forum and we're not in a club, we actually don't want the nav */
|
||||
if ( \IPS\forums\Forum::theOnlyForum() and !$forum->club() )
|
||||
/* If there's only one forum and we're not in a club, and we're not in a sub-forum, we actually don't want the nav */
|
||||
if ( $theOnlyForum = \IPS\forums\Forum::theOnlyForum() AND $theOnlyForum->_id == $forum->_id and !$forum->club() )
|
||||
{
|
||||
\IPS\Output::i()->breadcrumb = isset( \IPS\Output::i()->breadcrumb['module'] ) ? array('module' => \IPS\Output::i()->breadcrumb['module']) : array();
|
||||
}
|
||||
|
||||
/* We need to shift the breadcrumb if we are in a sub-forum and we have $theOnlyForum */
|
||||
if ( $theOnlyForum AND $theOnlyForum->_id != $forum->_id )
|
||||
{
|
||||
array_shift( \IPS\Output::i()->breadcrumb );
|
||||
array_shift( \IPS\Output::i()->breadcrumb );
|
||||
}
|
||||
|
||||
$table->hover = TRUE;
|
||||
if ( isset( $table->sortOptions['num_comments'] ) )
|
||||
@@ -563,6 +570,9 @@ class _forums extends \IPS\Dispatcher\Controller
|
||||
|
||||
$table = $this->postProcessTable( $table );
|
||||
|
||||
/* Set default search to this forum */
|
||||
\IPS\Output::i()->defaultSearchOption = array( 'forums_topic', 'forums_topic_el' );
|
||||
|
||||
\IPS\Output::i()->jsFiles = array_merge( \IPS\Output::i()->jsFiles, \IPS\Output::i()->js('front_forum.js', 'forums' ) );
|
||||
\IPS\Output::i()->output = $this->themeGroup->forumDisplay( $forum, $forumOutput );
|
||||
}
|
||||
|
||||
@@ -86,14 +86,22 @@ class _topic extends \IPS\Content\Controller
|
||||
|
||||
$topic->container()->clubCheckRules();
|
||||
|
||||
/* If there's only one forum and we're not in a club, we actually don't want the nav */
|
||||
if ( !$topic->container()->club() AND ( \IPS\forums\Forum::theOnlyForum() or \IPS\forums\Forum::isSimpleView() ) )
|
||||
/* If there's only one forum and we're not in a club, and we're not in a sub-forum, we actually don't want the nav */
|
||||
$theOnlyForum = NULL;
|
||||
if ( !$topic->container()->club() AND ( ( $theOnlyForum = \IPS\forums\Forum::theOnlyForum() AND $theOnlyForum->_id == $topic->container()->_id ) or \IPS\forums\Forum::isSimpleView() ) )
|
||||
{
|
||||
$topicBreadcrumb = array_pop( \IPS\Output::i()->breadcrumb );
|
||||
\IPS\Output::i()->breadcrumb = isset( \IPS\Output::i()->breadcrumb['module'] ) ? array( 'module' => \IPS\Output::i()->breadcrumb['module'] ) : array();
|
||||
\IPS\Output::i()->breadcrumb[] = $topicBreadcrumb;
|
||||
}
|
||||
|
||||
/* We need to shift the breadcrumb if we are in a sub-forum and we have $theOnlyForum */
|
||||
if ( $theOnlyForum AND $theOnlyForum->_id != $topic->container()->_id )
|
||||
{
|
||||
array_shift( \IPS\Output::i()->breadcrumb );
|
||||
array_shift( \IPS\Output::i()->breadcrumb );
|
||||
}
|
||||
|
||||
/* Legacy findpost redirect */
|
||||
if ( \IPS\Request::i()->findpost )
|
||||
{
|
||||
@@ -560,6 +568,9 @@ class _topic extends \IPS\Content\Controller
|
||||
)
|
||||
), \IPS\Output::i()->jsonLd['topic'] );
|
||||
|
||||
/* Set default search to this topic */
|
||||
\IPS\Output::i()->defaultSearchOption = array( 'forums_topic', 'forums_topic_el' );
|
||||
|
||||
/* Show topic */
|
||||
\IPS\Output::i()->cssFiles = array_merge( \IPS\Output::i()->cssFiles, \IPS\Theme::i()->css( 'topics.css', 'forums' ) );
|
||||
\IPS\Output::i()->output .= \IPS\Theme::i()->getTemplate( 'topics' )->topic( $topic, $comments, $question, $votes, $nextUnread, $pagination, $topicVotes );
|
||||
@@ -1259,9 +1270,9 @@ class _topic extends \IPS\Content\Controller
|
||||
* @param \IPS\Content\Item $item The item
|
||||
* @return \IPS\Helpers\Form
|
||||
*/
|
||||
protected function _splitForm( \IPS\Content\Item $item )
|
||||
protected function _splitForm( \IPS\Content\Item $item, $comment = NULL )
|
||||
{
|
||||
$form = parent::_splitForm( $item );
|
||||
$form = parent::_splitForm( $item, $comment );
|
||||
|
||||
if ( isset( $form->elements['']['topic_create_state'] ) )
|
||||
{
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
{
|
||||
"id": 107015,
|
||||
"name": "4.7.0",
|
||||
"steps": {
|
||||
"queries": false,
|
||||
"lang": false,
|
||||
"theme": false,
|
||||
"themeSettings": false,
|
||||
"javascript": false,
|
||||
"emailTemplates": false,
|
||||
"hooks": false,
|
||||
"acpSearchKeywords": false,
|
||||
"settings": false,
|
||||
"tasks": false,
|
||||
"modules": false,
|
||||
"widgets": false,
|
||||
"whatsnew": false,
|
||||
"customOptions": false,
|
||||
"customRoutines": false
|
||||
},
|
||||
"forceMainUpgrader": false,
|
||||
"forceManualDownloadNoCiC": false,
|
||||
"forceManualDownloadCiC": false
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
{
|
||||
"id": 107016,
|
||||
"name": "4.7.0",
|
||||
"steps": {
|
||||
"queries": false,
|
||||
"lang": false,
|
||||
"theme": false,
|
||||
"themeSettings": false,
|
||||
"javascript": false,
|
||||
"emailTemplates": false,
|
||||
"hooks": false,
|
||||
"acpSearchKeywords": false,
|
||||
"settings": false,
|
||||
"tasks": false,
|
||||
"modules": false,
|
||||
"widgets": false,
|
||||
"whatsnew": false,
|
||||
"customOptions": false,
|
||||
"customRoutines": false
|
||||
},
|
||||
"forceMainUpgrader": false,
|
||||
"forceManualDownloadNoCiC": false,
|
||||
"forceManualDownloadCiC": false
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
{
|
||||
"id": 107017,
|
||||
"name": "4.7.0",
|
||||
"steps": {
|
||||
"queries": false,
|
||||
"lang": false,
|
||||
"theme": false,
|
||||
"themeSettings": false,
|
||||
"javascript": false,
|
||||
"emailTemplates": false,
|
||||
"hooks": false,
|
||||
"acpSearchKeywords": false,
|
||||
"settings": false,
|
||||
"tasks": false,
|
||||
"modules": false,
|
||||
"widgets": false,
|
||||
"whatsnew": false,
|
||||
"customOptions": false,
|
||||
"customRoutines": false
|
||||
},
|
||||
"forceMainUpgrader": false,
|
||||
"forceManualDownloadNoCiC": false,
|
||||
"forceManualDownloadCiC": false
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
{
|
||||
"id": 107018,
|
||||
"name": "4.7.1 Beta 1",
|
||||
"steps": {
|
||||
"queries": true,
|
||||
"lang": true,
|
||||
"theme": true,
|
||||
"themeSettings": false,
|
||||
"javascript": true,
|
||||
"emailTemplates": false,
|
||||
"hooks": false,
|
||||
"acpSearchKeywords": false,
|
||||
"settings": false,
|
||||
"tasks": false,
|
||||
"modules": false,
|
||||
"widgets": false,
|
||||
"whatsnew": false,
|
||||
"customOptions": false,
|
||||
"customRoutines": false
|
||||
},
|
||||
"forceMainUpgrader": false,
|
||||
"forceManualDownloadNoCiC": false,
|
||||
"forceManualDownloadCiC": false
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
{
|
||||
"files": {
|
||||
"added": [],
|
||||
"edited": [],
|
||||
"removed": []
|
||||
},
|
||||
"orders": {
|
||||
"added": [
|
||||
"global\/\/dev\/js\/\/framework\/",
|
||||
"global\/\/dev\/js\/\/library\/",
|
||||
"global\/\/dev\/js\/\/library\/\/jquery",
|
||||
"global\/\/dev\/js\/\/library\/\/linkify"
|
||||
],
|
||||
"edited": [],
|
||||
"removed": []
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
{
|
||||
"normal": {
|
||||
"added": [
|
||||
"topic_date"
|
||||
],
|
||||
"edited": [],
|
||||
"removed": []
|
||||
},
|
||||
"js": {
|
||||
"added": [],
|
||||
"edited": [],
|
||||
"removed": []
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
{
|
||||
"1": {
|
||||
"method": "addColumn",
|
||||
"params": [
|
||||
"forums_topics",
|
||||
{
|
||||
"name": "is_future_entry",
|
||||
"type": "TINYINT",
|
||||
"length": null,
|
||||
"decimals": null,
|
||||
"values": null,
|
||||
"allow_null": false,
|
||||
"default": 0,
|
||||
"comment": "",
|
||||
"unsigned": true,
|
||||
"auto_increment": false
|
||||
}
|
||||
]
|
||||
},
|
||||
"2": {
|
||||
"method": "addColumn",
|
||||
"params": [
|
||||
"forums_topics",
|
||||
{
|
||||
"name": "publish_date",
|
||||
"type": "INT",
|
||||
"length": null,
|
||||
"decimals": null,
|
||||
"values": null,
|
||||
"allow_null": false,
|
||||
"default": 0,
|
||||
"comment": "",
|
||||
"unsigned": true,
|
||||
"auto_increment": false
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
{
|
||||
"html": {
|
||||
"added": [],
|
||||
"edited": [
|
||||
"front\/forums\/topicRow",
|
||||
"front\/topics\/topic"
|
||||
],
|
||||
"removed": []
|
||||
},
|
||||
"css": {
|
||||
"added": [],
|
||||
"edited": [],
|
||||
"removed": []
|
||||
},
|
||||
"resources": {
|
||||
"added": [],
|
||||
"edited": [],
|
||||
"removed": []
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
{
|
||||
"id": 107019,
|
||||
"name": "4.7.1 Beta 1",
|
||||
"steps": {
|
||||
"queries": false,
|
||||
"lang": false,
|
||||
"theme": false,
|
||||
"themeSettings": false,
|
||||
"javascript": false,
|
||||
"emailTemplates": false,
|
||||
"hooks": false,
|
||||
"acpSearchKeywords": false,
|
||||
"settings": false,
|
||||
"tasks": false,
|
||||
"modules": false,
|
||||
"widgets": false,
|
||||
"whatsnew": false,
|
||||
"customOptions": false,
|
||||
"customRoutines": false
|
||||
},
|
||||
"forceMainUpgrader": false,
|
||||
"forceManualDownloadNoCiC": false,
|
||||
"forceManualDownloadCiC": false
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
{
|
||||
"id": 107020,
|
||||
"name": "4.7.1 Beta 2",
|
||||
"steps": {
|
||||
"queries": false,
|
||||
"lang": false,
|
||||
"theme": true,
|
||||
"themeSettings": false,
|
||||
"javascript": false,
|
||||
"emailTemplates": false,
|
||||
"hooks": false,
|
||||
"acpSearchKeywords": false,
|
||||
"settings": false,
|
||||
"tasks": false,
|
||||
"modules": false,
|
||||
"widgets": false,
|
||||
"whatsnew": false,
|
||||
"customOptions": false,
|
||||
"customRoutines": false
|
||||
},
|
||||
"forceMainUpgrader": false,
|
||||
"forceManualDownloadNoCiC": false,
|
||||
"forceManualDownloadCiC": false
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"html": {
|
||||
"added": [],
|
||||
"edited": [
|
||||
"front\/forums\/topicRowSnippet",
|
||||
"front\/index\/simplifiedTopicRow",
|
||||
"front\/index\/simplifiedTopicRowSnippet"
|
||||
],
|
||||
"removed": []
|
||||
},
|
||||
"css": {
|
||||
"added": [],
|
||||
"edited": [],
|
||||
"removed": []
|
||||
},
|
||||
"resources": {
|
||||
"added": [],
|
||||
"edited": [],
|
||||
"removed": []
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
{
|
||||
"id": 107021,
|
||||
"name": "4.7.1",
|
||||
"steps": {
|
||||
"queries": false,
|
||||
"lang": false,
|
||||
"theme": false,
|
||||
"themeSettings": false,
|
||||
"javascript": false,
|
||||
"emailTemplates": false,
|
||||
"hooks": false,
|
||||
"acpSearchKeywords": false,
|
||||
"settings": false,
|
||||
"tasks": false,
|
||||
"modules": false,
|
||||
"widgets": false,
|
||||
"whatsnew": false,
|
||||
"customOptions": false,
|
||||
"customRoutines": false
|
||||
},
|
||||
"forceMainUpgrader": false,
|
||||
"forceManualDownloadNoCiC": false,
|
||||
"forceManualDownloadCiC": false
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
{
|
||||
"id": 107022,
|
||||
"name": "4.7.1",
|
||||
"steps": {
|
||||
"queries": false,
|
||||
"lang": false,
|
||||
"theme": false,
|
||||
"themeSettings": false,
|
||||
"javascript": false,
|
||||
"emailTemplates": false,
|
||||
"hooks": false,
|
||||
"acpSearchKeywords": false,
|
||||
"settings": false,
|
||||
"tasks": false,
|
||||
"modules": false,
|
||||
"widgets": false,
|
||||
"whatsnew": false,
|
||||
"customOptions": false,
|
||||
"customRoutines": false
|
||||
},
|
||||
"forceMainUpgrader": false,
|
||||
"forceManualDownloadNoCiC": false,
|
||||
"forceManualDownloadCiC": false
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
{
|
||||
"id": 107023,
|
||||
"name": "4.7.1",
|
||||
"steps": {
|
||||
"queries": false,
|
||||
"lang": false,
|
||||
"theme": false,
|
||||
"themeSettings": false,
|
||||
"javascript": false,
|
||||
"emailTemplates": false,
|
||||
"hooks": false,
|
||||
"acpSearchKeywords": false,
|
||||
"settings": false,
|
||||
"tasks": false,
|
||||
"modules": false,
|
||||
"widgets": false,
|
||||
"whatsnew": false,
|
||||
"customOptions": false,
|
||||
"customRoutines": false
|
||||
},
|
||||
"forceMainUpgrader": false,
|
||||
"forceManualDownloadNoCiC": false,
|
||||
"forceManualDownloadCiC": false
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
{
|
||||
"id": 107024,
|
||||
"name": "4.7.1",
|
||||
"steps": {
|
||||
"queries": false,
|
||||
"lang": false,
|
||||
"theme": false,
|
||||
"themeSettings": false,
|
||||
"javascript": false,
|
||||
"emailTemplates": false,
|
||||
"hooks": false,
|
||||
"acpSearchKeywords": false,
|
||||
"settings": false,
|
||||
"tasks": false,
|
||||
"modules": false,
|
||||
"widgets": false,
|
||||
"whatsnew": false,
|
||||
"customOptions": false,
|
||||
"customRoutines": false
|
||||
},
|
||||
"forceMainUpgrader": false,
|
||||
"forceManualDownloadNoCiC": false,
|
||||
"forceManualDownloadCiC": false
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
{
|
||||
"added": [
|
||||
"app=forums&module=forums&controller=forums&do=form&searchResult=bw_enable_answers__member",
|
||||
"app=forums&module=forums&controller=settings&searchResult=form_forums_solved_topic_reengage",
|
||||
"app=forums&module=forums&controller=settings&tab=settings&searchResult=form_forums_solved_topic_reengage",
|
||||
"app=forums&module=stats&controller=solved",
|
||||
"app=forums&module=stats&controller=solved&tab=_default",
|
||||
"app=forums&module=stats&controller=solved&tab=percentage",
|
||||
"app=forums&module=stats&controller=solved&tab=solved",
|
||||
"app=forums&module=stats&controller=solved&tab=time"
|
||||
],
|
||||
"edited": [
|
||||
"app=forums&module=forums&controller=forums",
|
||||
"app=forums&module=forums&controller=savedActions"
|
||||
],
|
||||
"removed": []
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
{
|
||||
"id": 107025,
|
||||
"name": "4.7.2 Beta 1",
|
||||
"steps": {
|
||||
"queries": true,
|
||||
"lang": true,
|
||||
"theme": true,
|
||||
"themeSettings": false,
|
||||
"javascript": true,
|
||||
"emailTemplates": false,
|
||||
"hooks": false,
|
||||
"acpSearchKeywords": true,
|
||||
"settings": true,
|
||||
"tasks": true,
|
||||
"modules": false,
|
||||
"widgets": false,
|
||||
"whatsnew": false,
|
||||
"customOptions": false,
|
||||
"customRoutines": true
|
||||
},
|
||||
"forceMainUpgrader": true,
|
||||
"forceManualDownloadNoCiC": false,
|
||||
"forceManualDownloadCiC": false
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
{
|
||||
"files": {
|
||||
"added": [
|
||||
"forums\/front\/controllers\/topic\/ips.topic.solved.js"
|
||||
],
|
||||
"edited": [],
|
||||
"removed": []
|
||||
},
|
||||
"orders": {
|
||||
"added": [],
|
||||
"edited": [],
|
||||
"removed": [
|
||||
"global\/\/dev\/js\/\/framework\/",
|
||||
"global\/\/dev\/js\/\/library\/",
|
||||
"global\/\/dev\/js\/\/library\/\/jquery",
|
||||
"global\/\/dev\/js\/\/library\/\/linkify"
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
{
|
||||
"normal": {
|
||||
"added": [
|
||||
"menu__forums_stats_solved",
|
||||
"forums_solved_topic_reengage",
|
||||
"forums_solved_topic_reengage_prefix",
|
||||
"forums_solved_topic_reengage_suffix",
|
||||
"forums_solved_topic_reengage_never",
|
||||
"forums_solved_stats_time",
|
||||
"forums_solved_stats_percentage",
|
||||
"solved_stats_rebuild_started",
|
||||
"solved_stats_rebuild_button",
|
||||
"solved_rebuilding_stats",
|
||||
"solved_stats_chart_desc"
|
||||
],
|
||||
"edited": [
|
||||
"bw_enable_answers_moderator_desc"
|
||||
],
|
||||
"removed": [
|
||||
"show_all"
|
||||
]
|
||||
},
|
||||
"js": {
|
||||
"added": [],
|
||||
"edited": [],
|
||||
"removed": []
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
{
|
||||
"1": {
|
||||
"method": "addColumn",
|
||||
"params": [
|
||||
"forums_topics",
|
||||
{
|
||||
"name": "solved_reminder_sent",
|
||||
"type": "INT",
|
||||
"length": null,
|
||||
"decimals": null,
|
||||
"values": null,
|
||||
"allow_null": false,
|
||||
"default": 0,
|
||||
"comment": "",
|
||||
"unsigned": true,
|
||||
"auto_increment": false
|
||||
}
|
||||
]
|
||||
},
|
||||
"2": {
|
||||
"method": "addColumn",
|
||||
"params": [
|
||||
"forums_forums",
|
||||
{
|
||||
"name": "solved_stats_from",
|
||||
"type": "INT",
|
||||
"length": null,
|
||||
"decimals": null,
|
||||
"values": null,
|
||||
"allow_null": false,
|
||||
"default": 0,
|
||||
"comment": "",
|
||||
"unsigned": true,
|
||||
"auto_increment": false
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"added": [
|
||||
"forums_solved_topic_reengage"
|
||||
],
|
||||
"edited": [],
|
||||
"removed": []
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"added": [
|
||||
"solvedNotifications",
|
||||
"solvedStatsAggregation"
|
||||
],
|
||||
"edited": [],
|
||||
"removed": []
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
{
|
||||
"html": {
|
||||
"added": [],
|
||||
"edited": [
|
||||
"front\/topics\/post",
|
||||
"front\/topics\/topic"
|
||||
],
|
||||
"removed": []
|
||||
},
|
||||
"css": {
|
||||
"added": [],
|
||||
"edited": [],
|
||||
"removed": []
|
||||
},
|
||||
"resources": {
|
||||
"added": [],
|
||||
"edited": [],
|
||||
"removed": []
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
<?php
|
||||
/**
|
||||
* @brief 4.7.2 Beta 1 Upgrade Code
|
||||
* @author <a href='https://www.invisioncommunity.com'>Invision Power Services, Inc.</a>
|
||||
* @copyright (c) Invision Power Services, Inc.
|
||||
* @license https://www.invisioncommunity.com/legal/standards/
|
||||
* @package Invision Community
|
||||
* @subpackage Forums
|
||||
* @since 22 Jul 2022
|
||||
*/
|
||||
|
||||
namespace IPS\forums\setup\upg_107025;
|
||||
|
||||
/* To prevent PHP errors (extending class does not exist) revealing path */
|
||||
if ( !\defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
{
|
||||
header( ( isset( $_SERVER['SERVER_PROTOCOL'] ) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.0' ) . ' 403 Forbidden' );
|
||||
exit;
|
||||
}
|
||||
|
||||
/**
|
||||
* 4.7.2 Beta 1 Upgrade Code
|
||||
*/
|
||||
class _Upgrade
|
||||
{
|
||||
/**
|
||||
* Changes to solved mode
|
||||
*
|
||||
* @return bool|array If returns TRUE, upgrader will proceed to next step. If it returns any other value, it will set this as the value of the 'extra' GET parameter and rerun this step (useful for loops)
|
||||
*/
|
||||
public function step1()
|
||||
{
|
||||
/* Prevent all topics from being emailed after upgrade, just leave those that have been started within the last 14 days as able to be emailed */
|
||||
\IPS\Db::i()->update( 'forums_topics', [ 'solved_reminder_sent' => time() ], [ 'start_date < ?', ( time() - ( 14 * 86400 ) ) ] );
|
||||
|
||||
/* Kick off a rebuild so stats are populated */
|
||||
foreach( \IPS\Db::i()->select( '*', 'forums_forums', array( 'topics>? and ( forums_bitoptions & ? or forums_bitoptions & ? or forums_bitoptions & ? )', 0, 4, 8, 16 ) ) as $forum )
|
||||
{
|
||||
\IPS\Task::queue( 'forums', 'RebuildSolvedStats', array( 'forum_id' => $forum['id'] ) );
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
// You can create as many additional methods (step2, step3, etc.) as is necessary.
|
||||
// Each step will be executed in a new HTTP request
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
{
|
||||
"id": 107026,
|
||||
"name": "4.7.2 Beta 1",
|
||||
"steps": {
|
||||
"queries": false,
|
||||
"lang": false,
|
||||
"theme": false,
|
||||
"themeSettings": false,
|
||||
"javascript": false,
|
||||
"emailTemplates": false,
|
||||
"hooks": false,
|
||||
"acpSearchKeywords": false,
|
||||
"settings": false,
|
||||
"tasks": false,
|
||||
"modules": false,
|
||||
"widgets": false,
|
||||
"whatsnew": false,
|
||||
"customOptions": false,
|
||||
"customRoutines": false
|
||||
},
|
||||
"forceMainUpgrader": false,
|
||||
"forceManualDownloadNoCiC": false,
|
||||
"forceManualDownloadCiC": false
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
{
|
||||
"id": 107027,
|
||||
"name": "4.7.2 Beta 2",
|
||||
"steps": {
|
||||
"queries": false,
|
||||
"lang": false,
|
||||
"theme": true,
|
||||
"themeSettings": false,
|
||||
"javascript": false,
|
||||
"emailTemplates": false,
|
||||
"hooks": false,
|
||||
"acpSearchKeywords": false,
|
||||
"settings": false,
|
||||
"tasks": false,
|
||||
"modules": false,
|
||||
"widgets": false,
|
||||
"whatsnew": false,
|
||||
"customOptions": false,
|
||||
"customRoutines": false
|
||||
},
|
||||
"forceMainUpgrader": false,
|
||||
"forceManualDownloadNoCiC": false,
|
||||
"forceManualDownloadCiC": false
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
{
|
||||
"html": {
|
||||
"added": [],
|
||||
"edited": [
|
||||
"front\/forums\/forumButtons"
|
||||
],
|
||||
"removed": []
|
||||
},
|
||||
"css": {
|
||||
"added": [],
|
||||
"edited": [],
|
||||
"removed": []
|
||||
},
|
||||
"resources": {
|
||||
"added": [],
|
||||
"edited": [],
|
||||
"removed": []
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"id": 107028,
|
||||
"name": "4.7.2 Beta 3",
|
||||
"steps": {
|
||||
"queries": false,
|
||||
"lang": true,
|
||||
"theme": true,
|
||||
"themeSettings": false,
|
||||
"javascript": true,
|
||||
"emailTemplates": false,
|
||||
"hooks": false,
|
||||
"acpSearchKeywords": false,
|
||||
"settings": false,
|
||||
"tasks": false,
|
||||
"modules": false,
|
||||
"widgets": false,
|
||||
"customOptions": false,
|
||||
"customRoutines": true
|
||||
},
|
||||
"forceMainUpgrader": false,
|
||||
"forceManualDownloadNoCiC": false,
|
||||
"forceManualDownloadCiC": false
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
{
|
||||
"files": {
|
||||
"added": [],
|
||||
"edited": [
|
||||
"forums\/front\/controllers\/forum\/ips.forum.flow.js"
|
||||
],
|
||||
"removed": []
|
||||
},
|
||||
"orders": {
|
||||
"added": [],
|
||||
"edited": [],
|
||||
"removed": []
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
{
|
||||
"normal": {
|
||||
"added": [
|
||||
"can_future_publish_topic",
|
||||
"can_view_future_topic"
|
||||
],
|
||||
"edited": [],
|
||||
"removed": []
|
||||
},
|
||||
"js": {
|
||||
"added": [],
|
||||
"edited": [],
|
||||
"removed": []
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
{
|
||||
"html": {
|
||||
"added": [],
|
||||
"edited": [
|
||||
"front\/forums\/forumDisplay",
|
||||
"front\/topics\/topic"
|
||||
],
|
||||
"removed": []
|
||||
},
|
||||
"css": {
|
||||
"added": [],
|
||||
"edited": [],
|
||||
"removed": []
|
||||
},
|
||||
"resources": {
|
||||
"added": [],
|
||||
"edited": [],
|
||||
"removed": []
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
<?php
|
||||
/**
|
||||
* @brief 4.7.2 Beta 3 Upgrade Code
|
||||
* @author <a href='https://www.invisioncommunity.com'>Invision Power Services, Inc.</a>
|
||||
* @copyright (c) Invision Power Services, Inc.
|
||||
* @license https://www.invisioncommunity.com/legal/standards/
|
||||
* @package Invision Community
|
||||
* @subpackage Forums
|
||||
* @since 30 Aug 2022
|
||||
*/
|
||||
|
||||
namespace IPS\forums\setup\upg_107028;
|
||||
|
||||
/* To prevent PHP errors (extending class does not exist) revealing path */
|
||||
if ( !\defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
{
|
||||
header( ( isset( $_SERVER['SERVER_PROTOCOL'] ) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.0' ) . ' 403 Forbidden' );
|
||||
exit;
|
||||
}
|
||||
|
||||
/**
|
||||
* 4.7.2 Beta 3 Upgrade Code
|
||||
*/
|
||||
class _Upgrade
|
||||
{
|
||||
/**
|
||||
* Recount forums.
|
||||
*
|
||||
* @return bool|array If returns TRUE, upgrader will proceed to next step. If it returns any other value, it will set this as the value of the 'extra' GET parameter and rerun this step (useful for loops)
|
||||
*/
|
||||
public function step1()
|
||||
{
|
||||
\IPS\Task::queue( 'core', 'RebuildContainerCounts', array( 'class' => 'IPS\forums\Forum', 'count' => 0 ), 4, array( 'class' ) );
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
// You can create as many additional methods (step2, step3, etc.) as is necessary.
|
||||
// Each step will be executed in a new HTTP request
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"id": 107029,
|
||||
"name": "4.7.2 Beta 4",
|
||||
"steps": {
|
||||
"queries": false,
|
||||
"lang": false,
|
||||
"theme": false,
|
||||
"themeSettings": false,
|
||||
"javascript": false,
|
||||
"emailTemplates": false,
|
||||
"hooks": false,
|
||||
"acpSearchKeywords": false,
|
||||
"settings": false,
|
||||
"tasks": false,
|
||||
"modules": false,
|
||||
"widgets": false,
|
||||
"customOptions": false,
|
||||
"customRoutines": false
|
||||
},
|
||||
"forceMainUpgrader": false,
|
||||
"forceManualDownloadNoCiC": false,
|
||||
"forceManualDownloadCiC": false
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"id": 107030,
|
||||
"name": "4.7.2 Beta 5",
|
||||
"steps": {
|
||||
"queries": false,
|
||||
"lang": false,
|
||||
"theme": false,
|
||||
"themeSettings": false,
|
||||
"javascript": false,
|
||||
"emailTemplates": false,
|
||||
"hooks": false,
|
||||
"acpSearchKeywords": false,
|
||||
"settings": false,
|
||||
"tasks": false,
|
||||
"modules": false,
|
||||
"widgets": false,
|
||||
"customOptions": false,
|
||||
"customRoutines": false
|
||||
},
|
||||
"forceMainUpgrader": false,
|
||||
"forceManualDownloadNoCiC": false,
|
||||
"forceManualDownloadCiC": false
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"id": 107031,
|
||||
"name": "4.7.2 Beta 6",
|
||||
"steps": {
|
||||
"queries": false,
|
||||
"lang": false,
|
||||
"theme": false,
|
||||
"themeSettings": false,
|
||||
"javascript": false,
|
||||
"emailTemplates": false,
|
||||
"hooks": false,
|
||||
"acpSearchKeywords": false,
|
||||
"settings": false,
|
||||
"tasks": false,
|
||||
"modules": false,
|
||||
"widgets": false,
|
||||
"customOptions": false,
|
||||
"customRoutines": false
|
||||
},
|
||||
"forceMainUpgrader": false,
|
||||
"forceManualDownloadNoCiC": false,
|
||||
"forceManualDownloadCiC": false
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"id": 107032,
|
||||
"name": "4.7.2",
|
||||
"steps": {
|
||||
"queries": false,
|
||||
"lang": false,
|
||||
"theme": false,
|
||||
"themeSettings": false,
|
||||
"javascript": false,
|
||||
"emailTemplates": false,
|
||||
"hooks": false,
|
||||
"acpSearchKeywords": false,
|
||||
"settings": false,
|
||||
"tasks": false,
|
||||
"modules": false,
|
||||
"widgets": false,
|
||||
"customOptions": false,
|
||||
"customRoutines": false
|
||||
},
|
||||
"forceMainUpgrader": false,
|
||||
"forceManualDownloadNoCiC": false,
|
||||
"forceManualDownloadCiC": false
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"id": 107033,
|
||||
"name": "4.7.2",
|
||||
"steps": {
|
||||
"queries": false,
|
||||
"lang": false,
|
||||
"theme": false,
|
||||
"themeSettings": false,
|
||||
"javascript": false,
|
||||
"emailTemplates": false,
|
||||
"hooks": false,
|
||||
"acpSearchKeywords": false,
|
||||
"settings": false,
|
||||
"tasks": false,
|
||||
"modules": false,
|
||||
"widgets": false,
|
||||
"customOptions": false,
|
||||
"customRoutines": false
|
||||
},
|
||||
"forceMainUpgrader": false,
|
||||
"forceManualDownloadNoCiC": false,
|
||||
"forceManualDownloadCiC": false
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"id": 107034,
|
||||
"name": "4.7.2.1",
|
||||
"steps": {
|
||||
"queries": false,
|
||||
"lang": false,
|
||||
"theme": false,
|
||||
"themeSettings": false,
|
||||
"javascript": false,
|
||||
"emailTemplates": false,
|
||||
"hooks": false,
|
||||
"acpSearchKeywords": false,
|
||||
"settings": false,
|
||||
"tasks": false,
|
||||
"modules": false,
|
||||
"widgets": false,
|
||||
"customOptions": false,
|
||||
"customRoutines": false
|
||||
},
|
||||
"forceMainUpgrader": false,
|
||||
"forceManualDownloadNoCiC": false,
|
||||
"forceManualDownloadCiC": false
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"id": 107035,
|
||||
"name": "4.7.2.1",
|
||||
"steps": {
|
||||
"queries": false,
|
||||
"lang": false,
|
||||
"theme": false,
|
||||
"themeSettings": false,
|
||||
"javascript": false,
|
||||
"emailTemplates": false,
|
||||
"hooks": false,
|
||||
"acpSearchKeywords": false,
|
||||
"settings": false,
|
||||
"tasks": false,
|
||||
"modules": false,
|
||||
"widgets": false,
|
||||
"customOptions": false,
|
||||
"customRoutines": false
|
||||
},
|
||||
"forceMainUpgrader": false,
|
||||
"forceManualDownloadNoCiC": false,
|
||||
"forceManualDownloadCiC": false
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"id": 107036,
|
||||
"name": "4.7.2.1",
|
||||
"steps": {
|
||||
"queries": false,
|
||||
"lang": false,
|
||||
"theme": false,
|
||||
"themeSettings": false,
|
||||
"javascript": true,
|
||||
"emailTemplates": false,
|
||||
"hooks": false,
|
||||
"acpSearchKeywords": false,
|
||||
"settings": false,
|
||||
"tasks": false,
|
||||
"modules": false,
|
||||
"widgets": false,
|
||||
"customOptions": false,
|
||||
"customRoutines": false
|
||||
},
|
||||
"forceMainUpgrader": true,
|
||||
"forceManualDownloadNoCiC": false,
|
||||
"forceManualDownloadCiC": false
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
{
|
||||
"files": {
|
||||
"added": [],
|
||||
"edited": [],
|
||||
"removed": []
|
||||
},
|
||||
"orders": {
|
||||
"added": [
|
||||
"global\/\/dev\/js\/\/framework\/",
|
||||
"global\/\/dev\/js\/\/library\/",
|
||||
"global\/\/dev\/js\/\/library\/\/jquery",
|
||||
"global\/\/dev\/js\/\/library\/\/linkify"
|
||||
],
|
||||
"edited": [],
|
||||
"removed": []
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"id": 107037,
|
||||
"name": "4.7.2.1",
|
||||
"steps": {
|
||||
"queries": false,
|
||||
"lang": false,
|
||||
"theme": false,
|
||||
"themeSettings": false,
|
||||
"javascript": false,
|
||||
"emailTemplates": false,
|
||||
"hooks": false,
|
||||
"acpSearchKeywords": false,
|
||||
"settings": false,
|
||||
"tasks": false,
|
||||
"modules": false,
|
||||
"widgets": false,
|
||||
"customOptions": false,
|
||||
"customRoutines": false
|
||||
},
|
||||
"forceMainUpgrader": false,
|
||||
"forceManualDownloadNoCiC": false,
|
||||
"forceManualDownloadCiC": false
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"id": 107038,
|
||||
"name": "4.7.2.1",
|
||||
"steps": {
|
||||
"queries": false,
|
||||
"lang": false,
|
||||
"theme": false,
|
||||
"themeSettings": false,
|
||||
"javascript": false,
|
||||
"emailTemplates": false,
|
||||
"hooks": false,
|
||||
"acpSearchKeywords": false,
|
||||
"settings": false,
|
||||
"tasks": false,
|
||||
"modules": false,
|
||||
"widgets": false,
|
||||
"customOptions": false,
|
||||
"customRoutines": false
|
||||
},
|
||||
"forceMainUpgrader": false,
|
||||
"forceManualDownloadNoCiC": false,
|
||||
"forceManualDownloadCiC": false
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"id": 107300,
|
||||
"name": "4.7.3 Beta 1",
|
||||
"steps": {
|
||||
"queries": false,
|
||||
"lang": false,
|
||||
"theme": false,
|
||||
"themeSettings": false,
|
||||
"javascript": true,
|
||||
"emailTemplates": false,
|
||||
"hooks": false,
|
||||
"acpSearchKeywords": false,
|
||||
"settings": false,
|
||||
"tasks": false,
|
||||
"modules": false,
|
||||
"widgets": false,
|
||||
"customOptions": false,
|
||||
"customRoutines": false
|
||||
},
|
||||
"forceMainUpgrader": true,
|
||||
"forceManualDownloadNoCiC": false,
|
||||
"forceManualDownloadCiC": false
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
{
|
||||
"files": {
|
||||
"added": [],
|
||||
"edited": [],
|
||||
"removed": []
|
||||
},
|
||||
"orders": {
|
||||
"added": [],
|
||||
"edited": [],
|
||||
"removed": [
|
||||
"global\/\/dev\/js\/\/framework\/",
|
||||
"global\/\/dev\/js\/\/library\/",
|
||||
"global\/\/dev\/js\/\/library\/\/jquery",
|
||||
"global\/\/dev\/js\/\/library\/\/linkify"
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"added": [],
|
||||
"edited": [],
|
||||
"removed": [
|
||||
"app=forums&module=forums&controller=forums&do=form&searchResult=solved_stats_from"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"id": 107301,
|
||||
"name": "4.7.3 Beta 2",
|
||||
"steps": {
|
||||
"queries": false,
|
||||
"lang": false,
|
||||
"theme": false,
|
||||
"themeSettings": false,
|
||||
"javascript": false,
|
||||
"emailTemplates": false,
|
||||
"hooks": false,
|
||||
"acpSearchKeywords": true,
|
||||
"settings": false,
|
||||
"tasks": false,
|
||||
"modules": false,
|
||||
"widgets": false,
|
||||
"customOptions": false,
|
||||
"customRoutines": false
|
||||
},
|
||||
"forceMainUpgrader": false,
|
||||
"forceManualDownloadNoCiC": false,
|
||||
"forceManualDownloadCiC": false
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"id": 107302,
|
||||
"name": "4.7.3 Beta 3",
|
||||
"steps": {
|
||||
"queries": false,
|
||||
"lang": false,
|
||||
"theme": true,
|
||||
"themeSettings": false,
|
||||
"javascript": false,
|
||||
"emailTemplates": false,
|
||||
"hooks": false,
|
||||
"acpSearchKeywords": false,
|
||||
"settings": false,
|
||||
"tasks": false,
|
||||
"modules": false,
|
||||
"widgets": false,
|
||||
"customOptions": false,
|
||||
"customRoutines": false
|
||||
},
|
||||
"forceMainUpgrader": false,
|
||||
"forceManualDownloadNoCiC": false,
|
||||
"forceManualDownloadCiC": false
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"html": {
|
||||
"added": [],
|
||||
"edited": [
|
||||
"front\/forums\/topicRowSnippet",
|
||||
"front\/index\/simplifiedTopicRow",
|
||||
"front\/index\/simplifiedTopicRowSnippet"
|
||||
],
|
||||
"removed": []
|
||||
},
|
||||
"css": {
|
||||
"added": [],
|
||||
"edited": [],
|
||||
"removed": []
|
||||
},
|
||||
"resources": {
|
||||
"added": [],
|
||||
"edited": [],
|
||||
"removed": []
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"id": 107303,
|
||||
"name": "4.7.3 Beta 4",
|
||||
"steps": {
|
||||
"queries": false,
|
||||
"lang": false,
|
||||
"theme": false,
|
||||
"themeSettings": false,
|
||||
"javascript": false,
|
||||
"emailTemplates": false,
|
||||
"hooks": false,
|
||||
"acpSearchKeywords": false,
|
||||
"settings": false,
|
||||
"tasks": false,
|
||||
"modules": false,
|
||||
"widgets": false,
|
||||
"customOptions": false,
|
||||
"customRoutines": false
|
||||
},
|
||||
"forceMainUpgrader": false,
|
||||
"forceManualDownloadNoCiC": false,
|
||||
"forceManualDownloadCiC": false
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"id": 107304,
|
||||
"name": "4.7.3",
|
||||
"steps": {
|
||||
"queries": false,
|
||||
"lang": false,
|
||||
"theme": false,
|
||||
"themeSettings": false,
|
||||
"javascript": false,
|
||||
"emailTemplates": false,
|
||||
"hooks": false,
|
||||
"acpSearchKeywords": false,
|
||||
"settings": false,
|
||||
"tasks": false,
|
||||
"modules": false,
|
||||
"widgets": false,
|
||||
"customOptions": false,
|
||||
"customRoutines": false
|
||||
},
|
||||
"forceMainUpgrader": false,
|
||||
"forceManualDownloadNoCiC": false,
|
||||
"forceManualDownloadCiC": false
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"id": 107305,
|
||||
"name": "4.7.3",
|
||||
"steps": {
|
||||
"queries": false,
|
||||
"lang": false,
|
||||
"theme": false,
|
||||
"themeSettings": false,
|
||||
"javascript": true,
|
||||
"emailTemplates": false,
|
||||
"hooks": false,
|
||||
"acpSearchKeywords": false,
|
||||
"settings": false,
|
||||
"tasks": false,
|
||||
"modules": false,
|
||||
"widgets": false,
|
||||
"customOptions": false,
|
||||
"customRoutines": false
|
||||
},
|
||||
"forceMainUpgrader": true,
|
||||
"forceManualDownloadNoCiC": false,
|
||||
"forceManualDownloadCiC": false
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
{
|
||||
"files": {
|
||||
"added": [],
|
||||
"edited": [],
|
||||
"removed": []
|
||||
},
|
||||
"orders": {
|
||||
"added": [
|
||||
"global\/\/dev\/js\/\/framework\/",
|
||||
"global\/\/dev\/js\/\/library\/",
|
||||
"global\/\/dev\/js\/\/library\/\/jquery",
|
||||
"global\/\/dev\/js\/\/library\/\/linkify"
|
||||
],
|
||||
"edited": [],
|
||||
"removed": []
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"id": 107306,
|
||||
"name": "4.7.3",
|
||||
"steps": {
|
||||
"queries": false,
|
||||
"lang": false,
|
||||
"theme": false,
|
||||
"themeSettings": false,
|
||||
"javascript": false,
|
||||
"emailTemplates": false,
|
||||
"hooks": false,
|
||||
"acpSearchKeywords": false,
|
||||
"settings": false,
|
||||
"tasks": false,
|
||||
"modules": false,
|
||||
"widgets": false,
|
||||
"customOptions": false,
|
||||
"customRoutines": false
|
||||
},
|
||||
"forceMainUpgrader": false,
|
||||
"forceManualDownloadNoCiC": false,
|
||||
"forceManualDownloadCiC": false
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"id": 107307,
|
||||
"name": "4.7.3",
|
||||
"steps": {
|
||||
"queries": false,
|
||||
"lang": false,
|
||||
"theme": false,
|
||||
"themeSettings": false,
|
||||
"javascript": false,
|
||||
"emailTemplates": false,
|
||||
"hooks": false,
|
||||
"acpSearchKeywords": false,
|
||||
"settings": false,
|
||||
"tasks": false,
|
||||
"modules": false,
|
||||
"widgets": false,
|
||||
"customOptions": false,
|
||||
"customRoutines": false
|
||||
},
|
||||
"forceMainUpgrader": false,
|
||||
"forceManualDownloadNoCiC": false,
|
||||
"forceManualDownloadCiC": false
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"id": 107400,
|
||||
"name": "4.7.4 Beta 1",
|
||||
"steps": {
|
||||
"queries": true,
|
||||
"lang": true,
|
||||
"theme": true,
|
||||
"themeSettings": false,
|
||||
"javascript": false,
|
||||
"emailTemplates": false,
|
||||
"hooks": false,
|
||||
"acpSearchKeywords": false,
|
||||
"settings": false,
|
||||
"tasks": false,
|
||||
"modules": false,
|
||||
"widgets": false,
|
||||
"customOptions": false,
|
||||
"customRoutines": false
|
||||
},
|
||||
"forceMainUpgrader": false,
|
||||
"forceManualDownloadNoCiC": false,
|
||||
"forceManualDownloadCiC": false
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
{
|
||||
"normal": {
|
||||
"added": [],
|
||||
"edited": [],
|
||||
"removed": [
|
||||
"forum_viglink"
|
||||
]
|
||||
},
|
||||
"js": {
|
||||
"added": [],
|
||||
"edited": [],
|
||||
"removed": []
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"1": {
|
||||
"method": "dropColumn",
|
||||
"params": [
|
||||
"forums_forums",
|
||||
"viglink"
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"html": {
|
||||
"added": [],
|
||||
"edited": [
|
||||
"front\/forums\/forumDisplay",
|
||||
"front\/topics\/post",
|
||||
"front\/topics\/topic"
|
||||
],
|
||||
"removed": []
|
||||
},
|
||||
"css": {
|
||||
"added": [],
|
||||
"edited": [],
|
||||
"removed": []
|
||||
},
|
||||
"resources": {
|
||||
"added": [],
|
||||
"edited": [],
|
||||
"removed": []
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"id": 107401,
|
||||
"name": "4.7.4 Beta 2",
|
||||
"steps": {
|
||||
"queries": false,
|
||||
"lang": false,
|
||||
"theme": false,
|
||||
"themeSettings": false,
|
||||
"javascript": false,
|
||||
"emailTemplates": false,
|
||||
"hooks": false,
|
||||
"acpSearchKeywords": false,
|
||||
"settings": false,
|
||||
"tasks": false,
|
||||
"modules": false,
|
||||
"widgets": false,
|
||||
"customOptions": false,
|
||||
"customRoutines": false
|
||||
},
|
||||
"forceMainUpgrader": false,
|
||||
"forceManualDownloadNoCiC": false,
|
||||
"forceManualDownloadCiC": false
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"id": 107402,
|
||||
"name": "4.7.4 Beta 3",
|
||||
"steps": {
|
||||
"queries": false,
|
||||
"lang": false,
|
||||
"theme": false,
|
||||
"themeSettings": false,
|
||||
"javascript": false,
|
||||
"emailTemplates": false,
|
||||
"hooks": false,
|
||||
"acpSearchKeywords": false,
|
||||
"settings": false,
|
||||
"tasks": false,
|
||||
"modules": false,
|
||||
"widgets": false,
|
||||
"customOptions": false,
|
||||
"customRoutines": false
|
||||
},
|
||||
"forceMainUpgrader": false,
|
||||
"forceManualDownloadNoCiC": false,
|
||||
"forceManualDownloadCiC": false
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"id": 107403,
|
||||
"name": "4.7.4",
|
||||
"steps": {
|
||||
"queries": false,
|
||||
"lang": false,
|
||||
"theme": false,
|
||||
"themeSettings": false,
|
||||
"javascript": false,
|
||||
"emailTemplates": false,
|
||||
"hooks": false,
|
||||
"acpSearchKeywords": false,
|
||||
"settings": false,
|
||||
"tasks": false,
|
||||
"modules": false,
|
||||
"widgets": false,
|
||||
"customOptions": false,
|
||||
"customRoutines": false
|
||||
},
|
||||
"forceMainUpgrader": false,
|
||||
"forceManualDownloadNoCiC": false,
|
||||
"forceManualDownloadCiC": false
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"id": 107404,
|
||||
"name": "4.7.4",
|
||||
"steps": {
|
||||
"queries": false,
|
||||
"lang": false,
|
||||
"theme": false,
|
||||
"themeSettings": false,
|
||||
"javascript": false,
|
||||
"emailTemplates": false,
|
||||
"hooks": false,
|
||||
"acpSearchKeywords": false,
|
||||
"settings": false,
|
||||
"tasks": false,
|
||||
"modules": false,
|
||||
"widgets": false,
|
||||
"customOptions": false,
|
||||
"customRoutines": false
|
||||
},
|
||||
"forceMainUpgrader": false,
|
||||
"forceManualDownloadNoCiC": false,
|
||||
"forceManualDownloadCiC": false
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"id": 107405,
|
||||
"name": "4.7.4",
|
||||
"steps": {
|
||||
"queries": false,
|
||||
"lang": false,
|
||||
"theme": false,
|
||||
"themeSettings": false,
|
||||
"javascript": false,
|
||||
"emailTemplates": false,
|
||||
"hooks": false,
|
||||
"acpSearchKeywords": false,
|
||||
"settings": false,
|
||||
"tasks": false,
|
||||
"modules": false,
|
||||
"widgets": false,
|
||||
"customOptions": false,
|
||||
"customRoutines": false
|
||||
},
|
||||
"forceMainUpgrader": false,
|
||||
"forceManualDownloadNoCiC": false,
|
||||
"forceManualDownloadCiC": false
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"id": 107406,
|
||||
"name": "4.7.4",
|
||||
"steps": {
|
||||
"queries": false,
|
||||
"lang": false,
|
||||
"theme": true,
|
||||
"themeSettings": false,
|
||||
"javascript": false,
|
||||
"emailTemplates": false,
|
||||
"hooks": false,
|
||||
"acpSearchKeywords": false,
|
||||
"settings": false,
|
||||
"tasks": false,
|
||||
"modules": false,
|
||||
"widgets": false,
|
||||
"customOptions": false,
|
||||
"customRoutines": false
|
||||
},
|
||||
"forceMainUpgrader": false,
|
||||
"forceManualDownloadNoCiC": false,
|
||||
"forceManualDownloadCiC": false
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
{
|
||||
"html": {
|
||||
"added": [],
|
||||
"edited": [
|
||||
"front\/topics\/topic"
|
||||
],
|
||||
"removed": []
|
||||
},
|
||||
"css": {
|
||||
"added": [],
|
||||
"edited": [],
|
||||
"removed": []
|
||||
},
|
||||
"resources": {
|
||||
"added": [],
|
||||
"edited": [],
|
||||
"removed": []
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"id": 107500,
|
||||
"name": "4.7.5 Beta 1",
|
||||
"steps": {
|
||||
"queries": false,
|
||||
"lang": false,
|
||||
"theme": true,
|
||||
"themeSettings": false,
|
||||
"javascript": false,
|
||||
"emailTemplates": false,
|
||||
"hooks": false,
|
||||
"acpSearchKeywords": false,
|
||||
"settings": false,
|
||||
"tasks": false,
|
||||
"modules": false,
|
||||
"widgets": false,
|
||||
"customOptions": false,
|
||||
"customRoutines": false
|
||||
},
|
||||
"forceMainUpgrader": false,
|
||||
"forceManualDownloadNoCiC": false,
|
||||
"forceManualDownloadCiC": false
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
{
|
||||
"html": {
|
||||
"added": [],
|
||||
"edited": [
|
||||
"front\/topics\/post",
|
||||
"front\/topics\/topic"
|
||||
],
|
||||
"removed": []
|
||||
},
|
||||
"css": {
|
||||
"added": [],
|
||||
"edited": [],
|
||||
"removed": []
|
||||
},
|
||||
"resources": {
|
||||
"added": [],
|
||||
"edited": [],
|
||||
"removed": []
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"id": 107501,
|
||||
"name": "4.7.5",
|
||||
"steps": {
|
||||
"queries": false,
|
||||
"lang": false,
|
||||
"theme": false,
|
||||
"themeSettings": false,
|
||||
"javascript": false,
|
||||
"emailTemplates": false,
|
||||
"hooks": false,
|
||||
"acpSearchKeywords": false,
|
||||
"settings": false,
|
||||
"tasks": false,
|
||||
"modules": false,
|
||||
"widgets": false,
|
||||
"customOptions": false,
|
||||
"customRoutines": false
|
||||
},
|
||||
"forceMainUpgrader": false,
|
||||
"forceManualDownloadNoCiC": false,
|
||||
"forceManualDownloadCiC": false
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"id": 107502,
|
||||
"name": "4.7.5",
|
||||
"steps": {
|
||||
"queries": false,
|
||||
"lang": false,
|
||||
"theme": false,
|
||||
"themeSettings": false,
|
||||
"javascript": false,
|
||||
"emailTemplates": false,
|
||||
"hooks": false,
|
||||
"acpSearchKeywords": false,
|
||||
"settings": false,
|
||||
"tasks": false,
|
||||
"modules": false,
|
||||
"widgets": false,
|
||||
"customOptions": false,
|
||||
"customRoutines": false
|
||||
},
|
||||
"forceMainUpgrader": false,
|
||||
"forceManualDownloadNoCiC": false,
|
||||
"forceManualDownloadCiC": false
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"id": 107503,
|
||||
"name": "4.7.5",
|
||||
"steps": {
|
||||
"queries": false,
|
||||
"lang": false,
|
||||
"theme": false,
|
||||
"themeSettings": false,
|
||||
"javascript": false,
|
||||
"emailTemplates": false,
|
||||
"hooks": false,
|
||||
"acpSearchKeywords": false,
|
||||
"settings": false,
|
||||
"tasks": false,
|
||||
"modules": false,
|
||||
"widgets": false,
|
||||
"customOptions": false,
|
||||
"customRoutines": false
|
||||
},
|
||||
"forceMainUpgrader": false,
|
||||
"forceManualDownloadNoCiC": false,
|
||||
"forceManualDownloadCiC": false
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"id": 107504,
|
||||
"name": "4.7.5",
|
||||
"steps": {
|
||||
"queries": false,
|
||||
"lang": false,
|
||||
"theme": false,
|
||||
"themeSettings": false,
|
||||
"javascript": false,
|
||||
"emailTemplates": false,
|
||||
"hooks": false,
|
||||
"acpSearchKeywords": false,
|
||||
"settings": false,
|
||||
"tasks": false,
|
||||
"modules": false,
|
||||
"widgets": false,
|
||||
"customOptions": false,
|
||||
"customRoutines": false
|
||||
},
|
||||
"forceMainUpgrader": false,
|
||||
"forceManualDownloadNoCiC": false,
|
||||
"forceManualDownloadCiC": false
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"id": 107505,
|
||||
"name": "4.7.5",
|
||||
"steps": {
|
||||
"queries": false,
|
||||
"lang": false,
|
||||
"theme": false,
|
||||
"themeSettings": false,
|
||||
"javascript": false,
|
||||
"emailTemplates": false,
|
||||
"hooks": false,
|
||||
"acpSearchKeywords": false,
|
||||
"settings": false,
|
||||
"tasks": false,
|
||||
"modules": false,
|
||||
"widgets": false,
|
||||
"customOptions": false,
|
||||
"customRoutines": false
|
||||
},
|
||||
"forceMainUpgrader": false,
|
||||
"forceManualDownloadNoCiC": false,
|
||||
"forceManualDownloadCiC": false
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"id": 107600,
|
||||
"name": "4.7.6 Beta 1",
|
||||
"steps": {
|
||||
"queries": false,
|
||||
"lang": false,
|
||||
"theme": true,
|
||||
"themeSettings": false,
|
||||
"javascript": false,
|
||||
"emailTemplates": false,
|
||||
"hooks": false,
|
||||
"acpSearchKeywords": false,
|
||||
"settings": false,
|
||||
"tasks": false,
|
||||
"modules": false,
|
||||
"widgets": false,
|
||||
"customOptions": false,
|
||||
"customRoutines": false
|
||||
},
|
||||
"forceMainUpgrader": false,
|
||||
"forceManualDownloadNoCiC": false,
|
||||
"forceManualDownloadCiC": false
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
{
|
||||
"html": {
|
||||
"added": [],
|
||||
"edited": [
|
||||
"front\/global\/row",
|
||||
"front\/topics\/topic"
|
||||
],
|
||||
"removed": []
|
||||
},
|
||||
"css": {
|
||||
"added": [],
|
||||
"edited": [],
|
||||
"removed": []
|
||||
},
|
||||
"resources": {
|
||||
"added": [],
|
||||
"edited": [],
|
||||
"removed": []
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"id": 107601,
|
||||
"name": "4.7.6",
|
||||
"steps": {
|
||||
"queries": false,
|
||||
"lang": false,
|
||||
"theme": false,
|
||||
"themeSettings": false,
|
||||
"javascript": false,
|
||||
"emailTemplates": false,
|
||||
"hooks": false,
|
||||
"acpSearchKeywords": false,
|
||||
"settings": false,
|
||||
"tasks": false,
|
||||
"modules": false,
|
||||
"widgets": false,
|
||||
"customOptions": false,
|
||||
"customRoutines": false
|
||||
},
|
||||
"forceMainUpgrader": false,
|
||||
"forceManualDownloadNoCiC": false,
|
||||
"forceManualDownloadCiC": false
|
||||
}
|
||||
@@ -343,11 +343,14 @@ class _Forum extends \IPS\Node\Model implements \IPS\Node\Permissions
|
||||
{
|
||||
/*
|
||||
* We prefer fetching post, joining topic, etc. but that is not efficient and causes a temp table and filesort against posts table so we'll lean on the cached last_post value for the topic
|
||||
* We also need to fetch from the write server in the event that something has just been deleted and the comment hasn't been passed
|
||||
* We also need to fetch from the write server in the event that something has just been deleted and the comment hasn't been passed.
|
||||
* We also cannot look for future entries since this code is used in older upgrades, but we can look for the date instead.
|
||||
*/
|
||||
$select = \IPS\Db::i()->select( '*', 'forums_topics', array( "forums_topics.forum_id=? AND forums_topics.approved=1 AND forums_topics.state != ?", $this->id, 'link' ), 'forums_topics.last_post DESC', 1, NULL, NULL, \IPS\Db::SELECT_FROM_WRITE_SERVER )->first();
|
||||
|
||||
$select = \IPS\Db::i()->select( '*', 'forums_topics', array( "forums_topics.forum_id=? AND forums_topics.approved=1 AND forums_topics.state != ? AND forums_topics.last_post<=?", $this->id, 'link', time() ), 'forums_topics.last_post DESC', 1, NULL, NULL, \IPS\Db::SELECT_FROM_WRITE_SERVER )->first();
|
||||
|
||||
$topic = \IPS\forums\Topic::constructFromData( $select );
|
||||
|
||||
|
||||
if ( $topic->last_poster_id and ! $topic->last_poster_name )
|
||||
{
|
||||
$member = \IPS\Member::load( $topic->last_poster_id );
|
||||
@@ -436,7 +439,7 @@ class _Forum extends \IPS\Node\Model implements \IPS\Node\Permissions
|
||||
{
|
||||
try
|
||||
{
|
||||
$lastPost = \IPS\forums\Topic\Post::constructFromData( \IPS\Db::i()->select( '*', 'forums_posts', array( 'topic_id=? AND queued=0', \IPS\Db::i()->select( 'tid', 'forums_topics', array( 'forum_id=? AND approved=1 AND starter_id=?', $this->_id, \IPS\Member::loggedIn()->member_id ), 'last_post DESC', 1 )->first() ), 'post_date DESC', 1 )->first() );
|
||||
$lastPost = \IPS\forums\Topic\Post::constructFromData( \IPS\Db::i()->select( '*', 'forums_posts', array( 'topic_id=? AND queued=0', \IPS\Db::i()->select( 'tid', 'forums_topics', array( 'forum_id=? AND approved=1 AND starter_id=? AND is_future_entry=0', $this->_id, \IPS\Member::loggedIn()->member_id ), 'last_post DESC', 1 )->first() ), 'post_date DESC', 1 )->first() );
|
||||
$result = array(
|
||||
'author' => $lastPost->author(),
|
||||
'topic_url' => $lastPost->item()->url(),
|
||||
@@ -663,11 +666,6 @@ class _Forum extends \IPS\Node\Model implements \IPS\Node\Permissions
|
||||
}
|
||||
catch ( \Exception $e ) { }
|
||||
}
|
||||
|
||||
if ( !$this->viglink )
|
||||
{
|
||||
\IPS\Settings::i()->viglink_enabled = FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -883,7 +881,6 @@ class _Forum extends \IPS\Node\Model implements \IPS\Node\Permissions
|
||||
'normal' => array( // make sure when adding here that you also add to qa below
|
||||
'forum_password_on',
|
||||
'forum_ipseo_priority',
|
||||
'forum_viglink',
|
||||
'forum_min_posts_view',
|
||||
'forum_can_view_others',
|
||||
'forum_permission_showtopic',
|
||||
@@ -903,7 +900,6 @@ class _Forum extends \IPS\Node\Model implements \IPS\Node\Permissions
|
||||
'qa' => array(
|
||||
'forum_password_on',
|
||||
'forum_ipseo_priority',
|
||||
'forum_viglink',
|
||||
'forum_min_posts_view',
|
||||
'forum_can_view_others_qa',
|
||||
'forum_permission_showtopic_qa',
|
||||
@@ -1010,11 +1006,6 @@ class _Forum extends \IPS\Node\Model implements \IPS\Node\Permissions
|
||||
)
|
||||
), NULL, NULL, NULL, 'forum_ipseo_priority' ) );
|
||||
|
||||
if ( \IPS\Settings::i()->viglink_enabled )
|
||||
{
|
||||
$form->add( new \IPS\Helpers\Form\YesNo( 'forum_viglink', $this->id ? $this->viglink : TRUE, FALSE, array(), NULL, NULL, NULL, 'forum_viglink' ) );
|
||||
}
|
||||
|
||||
$form->addHeader( 'permissions' );
|
||||
$form->add( new \IPS\Helpers\Form\Number( 'forum_min_posts_view', $this->id ? $this->min_posts_view : 0, FALSE, array( 'unlimited' => 0, 'unlimitedLang' => 'no_restriction' ), NULL, NULL, \IPS\Member::loggedIn()->language()->addToStack('approved_posts_comments'), 'forum_min_posts_view' ) );
|
||||
$form->add( new \IPS\Helpers\Form\YesNo( 'forum_can_view_others', $this->id ? $this->can_view_others : TRUE, FALSE, array(), NULL, NULL, NULL, 'forum_can_view_others' ) );
|
||||
@@ -1074,7 +1065,7 @@ class _Forum extends \IPS\Node\Model implements \IPS\Node\Permissions
|
||||
$form->add( new \IPS\Helpers\Form\YesNo( 'forum_disable_sharelinks', $this->id ? !$this->disable_sharelinks : TRUE, FALSE, array(), NULL, NULL, NULL, 'forum_disable_sharelinks' ) );
|
||||
$form->add( new \IPS\Helpers\Form\YesNo( 'bw_enable_answers_moderator', $this->id ? $this->forums_bitoptions['bw_enable_answers_moderator'] : FALSE, FALSE, array( 'togglesOn' => array( 'bw_enable_answers__member' ) ), NULL, NULL, NULL, 'forum_best_answer' ) );
|
||||
$form->add( new \IPS\Helpers\Form\YesNo( 'bw_enable_answers__member', $this->id ? $this->forums_bitoptions['bw_enable_answers_member'] : FALSE, FALSE, array(), NULL, NULL, NULL, 'bw_enable_answers__member' ) );
|
||||
|
||||
|
||||
$form->addTab( 'posting_settings' );
|
||||
$form->addHeader('posts');
|
||||
|
||||
@@ -1213,8 +1204,18 @@ class _Forum extends \IPS\Node\Model implements \IPS\Node\Permissions
|
||||
{
|
||||
if( isset( $values[ $k ] ) )
|
||||
{
|
||||
$values['forums_bitoptions'][ $k ] = ( $k == 'bw_enable_answers_member' or $k == 'bw_enable_answers_moderator' or $k == 'bw_fluid_view' ) ? $values[ $k ] : !$values[ $k ];
|
||||
unset( $values[ $k ] );
|
||||
/* If were disabling bw_enable_answers_moderator for discussion forums, we need to make sure bw_enable_answers_member is also disabled */
|
||||
if ( $k == 'bw_enable_answers_moderator' AND !$values[ $k ] )
|
||||
{
|
||||
$values['forums_bitoptions']['bw_enable_answers_moderator'] = FALSE;
|
||||
$values['forums_bitoptions']['bw_enable_answers_member'] = FALSE;
|
||||
unset( $values['bw_enable_answers_moderator'], $values['bw_enable_answers_member'] );
|
||||
}
|
||||
else
|
||||
{
|
||||
$values['forums_bitoptions'][ $k ] = ( $k == 'bw_enable_answers_member' or $k == 'bw_enable_answers_moderator' or $k == 'bw_fluid_view' ) ? $values[ $k ] : !$values[ $k ];
|
||||
unset( $values[ $k ] );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1281,6 +1282,8 @@ class _Forum extends \IPS\Node\Model implements \IPS\Node\Permissions
|
||||
$values['preview_posts'] = 0;
|
||||
}
|
||||
}
|
||||
|
||||
$values['min_posts_post'] = (int) $values['min_posts_post'];
|
||||
|
||||
/* Feature color */
|
||||
if ( isset( $values['use_feature_color'] ) )
|
||||
@@ -1889,6 +1892,43 @@ class _Forum extends \IPS\Node\Model implements \IPS\Node\Permissions
|
||||
|
||||
return $return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the time the first topic was marked as solved in this forum
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
public function getFirstSolvedTime(): int
|
||||
{
|
||||
if ( ! $this->solved_stats_from )
|
||||
{
|
||||
try
|
||||
{
|
||||
$post = \IPS\Db::i()->select( '*', 'forums_posts', [
|
||||
'pid IN (?)', \IPS\Db::i()->select( 'topic_answered_pid', 'forums_topics', ['forum_id=?', $this->_id] )
|
||||
], 'post_date ASC', 1 )->first();
|
||||
|
||||
try
|
||||
{
|
||||
$this->solved_stats_from = \IPS\Db::i()->select( 'solved_date', 'core_solved_index', [ 'app=? and comment_id=?', 'forums', $post['pid'] ] )->first();
|
||||
}
|
||||
catch( \Exception $e )
|
||||
{
|
||||
/* If that goes wrong... */
|
||||
$this->solved_stats_from = $post['post_date'];
|
||||
}
|
||||
}
|
||||
catch( \UnderflowException $e )
|
||||
{
|
||||
/* If all that goes wrong, we have nothing marked so just store now to prevent it rebuilding over and over */
|
||||
$this->solved_stats_from = time();
|
||||
}
|
||||
|
||||
$this->save();
|
||||
}
|
||||
|
||||
return $this->solved_stats_from;
|
||||
}
|
||||
|
||||
/* !Clubs */
|
||||
|
||||
@@ -2016,7 +2056,7 @@ class _Forum extends \IPS\Node\Model implements \IPS\Node\Permissions
|
||||
$method = ( isset( \IPS\Request::i()->cookie['forum_list_view'] ) ) ? \IPS\Request::i()->cookie['forum_list_view'] : NULL;
|
||||
$chooseable = \IPS\Settings::i()->forums_view_list_choose;
|
||||
|
||||
if ( ! $chooseable )
|
||||
if ( ! $chooseable or !\IPS\Member::loggedIn()->member_id )
|
||||
{
|
||||
return \IPS\Settings::i()->forums_view_list_method;
|
||||
}
|
||||
@@ -2049,7 +2089,7 @@ class _Forum extends \IPS\Node\Model implements \IPS\Node\Permissions
|
||||
$method = ( isset( \IPS\Request::i()->cookie['forum_view'] ) ) ? \IPS\Request::i()->cookie['forum_view'] : NULL;
|
||||
$chooseable = \IPS\Settings::i()->forums_default_view_choose ? json_decode( \IPS\Settings::i()->forums_default_view_choose , TRUE ) : FALSE;
|
||||
|
||||
if ( ! $chooseable )
|
||||
if ( ! $chooseable or !\IPS\Member::loggedIn()->member_id )
|
||||
{
|
||||
return \IPS\Settings::i()->forums_default_view;
|
||||
}
|
||||
@@ -2172,4 +2212,33 @@ class _Forum extends \IPS\Node\Model implements \IPS\Node\Permissions
|
||||
|
||||
return $type;
|
||||
}
|
||||
|
||||
/**
|
||||
* Content was held for approval by container
|
||||
* Allow node classes that can determine if content should be held for approval in individual nodes
|
||||
*
|
||||
* @param string $content The type of content we are checking (item, comment, review).
|
||||
* @param \IPS\Member|NULL $member Member to check or NULL for currently logged in member.
|
||||
* @return bool
|
||||
*/
|
||||
public function contentHeldForApprovalByNode( string $content, ?\IPS\Member $member = NULL ): bool
|
||||
{
|
||||
/* If members group bypasses, then no. */
|
||||
$member = $member ?: \IPS\Member::loggedIn();
|
||||
if ( $member->group['g_avoid_q'] )
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
switch( $content )
|
||||
{
|
||||
case 'item':
|
||||
return (bool) ( \in_array( $this->preview_posts, array( 1, 2 ) ) );
|
||||
break;
|
||||
|
||||
case 'comment':
|
||||
return (bool) ( \In_array( $this->preview_posts, array( 1, 3 ) ) );
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
Loaded 100 of 1085 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user