Version 4.0.13.1
This commit is contained in:
1 parent
f9e857d255
commit
c6a86f0d9b
7517 files changed
+597400
-668041
No files matched your search
@@ -0,0 +1,91 @@
|
||||
<?php
|
||||
/**
|
||||
* @brief Core Application Class
|
||||
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
|
||||
* @copyright (c) 2001 - SVN_YYYY Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/legal/standards/
|
||||
* @package IPS Social Suite
|
||||
* @since 18 Feb 2013
|
||||
* @version SVN_VERSION_NUMBER
|
||||
*/
|
||||
|
||||
namespace IPS\core;
|
||||
|
||||
/* 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;
|
||||
}
|
||||
|
||||
/**
|
||||
* Core Application Class
|
||||
*/
|
||||
class _Application extends \IPS\Application
|
||||
{
|
||||
/**
|
||||
* ACP Menu Numbers
|
||||
*
|
||||
* @param array $queryString Query String
|
||||
* @return int
|
||||
*/
|
||||
public function acpMenuNumber( $queryString )
|
||||
{
|
||||
parse_str( $queryString, $queryString );
|
||||
switch ( $queryString['controller'] )
|
||||
{
|
||||
case 'advertisements':
|
||||
return \IPS\Db::i()->select( 'COUNT(*)', 'core_advertisements', array( 'ad_active=-1' ) )->first();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the custom badge for each row
|
||||
*
|
||||
* @return NULL|array Null for no badge, or an array of badge data (0 => CSS class type, 1 => language string, 2 => optional raw HTML to show instead of language string)
|
||||
*/
|
||||
public function get__badge()
|
||||
{
|
||||
/* Is there an update to show? */
|
||||
$badge = NULL;
|
||||
|
||||
if( $this->update_version )
|
||||
{
|
||||
$data = json_decode( $this->update_version, TRUE );
|
||||
|
||||
if( !empty($data['longversion']) AND $data['longversion'] > $this->long_version )
|
||||
{
|
||||
$released = NULL;
|
||||
|
||||
if( $data['released'] AND intval($data['released']) == $data['released'] AND \strlen($data['released']) == 10 )
|
||||
{
|
||||
$released = (string) \IPS\DateTime::ts( $data['released'] )->localeDate();
|
||||
}
|
||||
else if( $data['released'] )
|
||||
{
|
||||
$released = $data['released'];
|
||||
}
|
||||
|
||||
$badge = array(
|
||||
0 => 'new',
|
||||
1 => '',
|
||||
2 => \IPS\Theme::i()->getTemplate( 'global', 'core' )->updatebadge( $data['version'], \IPS\Http\Url::internal( 'app=core&module=overview&controller=dashboard&do=upgrade', 'admin' ), $released, FALSE )
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
return $badge;
|
||||
}
|
||||
|
||||
/**
|
||||
* [Node] Get Icon for tree
|
||||
*
|
||||
* @note Return the class for the icon (e.g. 'globe')
|
||||
* @return string|null
|
||||
*/
|
||||
protected function get__icon()
|
||||
{
|
||||
return 'cogs';
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,268 @@
|
||||
{
|
||||
"overview": {
|
||||
"dashboard": {
|
||||
"tab": "core",
|
||||
"controller": "dashboard",
|
||||
"do": "",
|
||||
"restriction": null
|
||||
},
|
||||
"security": {
|
||||
"tab": "core",
|
||||
"controller": "security",
|
||||
"do": "",
|
||||
"restriction": "security_manage"
|
||||
},
|
||||
"files": {
|
||||
"tab": "core",
|
||||
"controller": "files",
|
||||
"do": "",
|
||||
"restriction": "files_view"
|
||||
}
|
||||
},
|
||||
"applications": {
|
||||
"applications": {
|
||||
"tab": "core",
|
||||
"controller": "applications",
|
||||
"do": "",
|
||||
"restriction": "app_manage"
|
||||
},
|
||||
"enhancements": {
|
||||
"tab": "core",
|
||||
"controller": "enhancements",
|
||||
"do": "",
|
||||
"restriction": "enhancements_manage"
|
||||
},
|
||||
"plugins": {
|
||||
"tab": "core",
|
||||
"controller": "plugins",
|
||||
"do": "",
|
||||
"restriction": "plugins_view"
|
||||
}
|
||||
},
|
||||
"settings": {
|
||||
"general": {
|
||||
"tab": "core",
|
||||
"controller": "general",
|
||||
"do": "",
|
||||
"restriction": "general_manage"
|
||||
},
|
||||
"licensekey": {
|
||||
"tab": "core",
|
||||
"controller": "licensekey",
|
||||
"do": "",
|
||||
"restriction": "licensekey_manage"
|
||||
},
|
||||
"terms": {
|
||||
"tab": "core",
|
||||
"controller": "terms",
|
||||
"do": "",
|
||||
"restriction": "terms_manage"
|
||||
},
|
||||
"posting": {
|
||||
"tab": "core",
|
||||
"controller": "posting",
|
||||
"do": "",
|
||||
"restriction": null
|
||||
},
|
||||
"email": {
|
||||
"tab": "core",
|
||||
"controller": "email",
|
||||
"do": "",
|
||||
"restriction": "email_manage"
|
||||
},
|
||||
"login": {
|
||||
"tab": "core",
|
||||
"controller": "login",
|
||||
"do": "",
|
||||
"restriction": "login_manage"
|
||||
},
|
||||
"advanced": {
|
||||
"tab": "core",
|
||||
"controller": "advanced",
|
||||
"do": "",
|
||||
"restriction": "advanced_manage"
|
||||
},
|
||||
"search": {
|
||||
"tab": "core",
|
||||
"controller": "search",
|
||||
"do": "",
|
||||
"restriction": "search_manage"
|
||||
}
|
||||
},
|
||||
"promotion": {
|
||||
"advertisements": {
|
||||
"tab": "core",
|
||||
"controller": "advertisements",
|
||||
"do": "",
|
||||
"restriction": "advertisements_manage"
|
||||
},
|
||||
"seo": {
|
||||
"tab": "core",
|
||||
"controller": "seo",
|
||||
"do": "",
|
||||
"restriction": "seo_manage"
|
||||
},
|
||||
"sharelinks": {
|
||||
"tab": "core",
|
||||
"controller": "sharelinks",
|
||||
"do": "",
|
||||
"restriction": "sharelinks_manage"
|
||||
}
|
||||
},
|
||||
"members": {
|
||||
"members": {
|
||||
"tab": "members",
|
||||
"controller": "members",
|
||||
"do": "",
|
||||
"restriction": null
|
||||
},
|
||||
"groups": {
|
||||
"tab": "members",
|
||||
"controller": "groups",
|
||||
"do": "",
|
||||
"restriction": "groups_manage"
|
||||
},
|
||||
"ip": {
|
||||
"tab": "members",
|
||||
"controller": "ip",
|
||||
"do": "",
|
||||
"restriction": "membertools_ip"
|
||||
}
|
||||
},
|
||||
"membersettings": {
|
||||
"registration": {
|
||||
"tab": "members",
|
||||
"controller": "registration",
|
||||
"do": "",
|
||||
"restriction": "registration_manage"
|
||||
},
|
||||
"spam": {
|
||||
"tab": "members",
|
||||
"controller": "spam",
|
||||
"do": "",
|
||||
"restriction": "spam_manage"
|
||||
},
|
||||
"profiles": {
|
||||
"tab": "members",
|
||||
"controller": "profiles",
|
||||
"do": "",
|
||||
"restriction": "profiles_manage"
|
||||
},
|
||||
"reputation": {
|
||||
"tab": "members",
|
||||
"controller": "reputation",
|
||||
"do": "",
|
||||
"restriction": "reps_manage"
|
||||
},
|
||||
"warnings": {
|
||||
"tab": "members",
|
||||
"controller": "warnings",
|
||||
"do": "",
|
||||
"restriction": "warn_settings"
|
||||
},
|
||||
"notifications": {
|
||||
"tab": "members",
|
||||
"controller": "notifications",
|
||||
"do": "",
|
||||
"restriction": "notifications_manage"
|
||||
},
|
||||
"ban": {
|
||||
"tab": "members",
|
||||
"controller": "ban",
|
||||
"do": "",
|
||||
"restriction": "ban_manage"
|
||||
},
|
||||
"ranks": {
|
||||
"tab": "members",
|
||||
"controller": "ranks",
|
||||
"do": "",
|
||||
"restriction": "ranks_manage"
|
||||
}
|
||||
},
|
||||
"staff": {
|
||||
"moderators": {
|
||||
"tab": "members",
|
||||
"controller": "moderators",
|
||||
"do": "",
|
||||
"restriction": "moderators_manage"
|
||||
},
|
||||
"admin": {
|
||||
"tab": "members",
|
||||
"controller": "admin",
|
||||
"do": "",
|
||||
"restriction": "restrictions_manage"
|
||||
},
|
||||
"directory": {
|
||||
"tab": "members",
|
||||
"controller": "directory",
|
||||
"do": "",
|
||||
"restriction": "leaders_manage"
|
||||
}
|
||||
},
|
||||
"bulkmail": {
|
||||
"bulkmail": {
|
||||
"tab": "members",
|
||||
"controller": "bulkmail",
|
||||
"do": "",
|
||||
"restriction": "bulkmail_manage"
|
||||
}
|
||||
},
|
||||
"customization": {
|
||||
"themes": {
|
||||
"tab": "customization",
|
||||
"controller": "themes",
|
||||
"do": "",
|
||||
"restriction": "theme_templates_manage"
|
||||
},
|
||||
"emails": {
|
||||
"tab": "customization",
|
||||
"controller": "emails",
|
||||
"do": "",
|
||||
"restriction": "emails_manage"
|
||||
}
|
||||
},
|
||||
"editor": {
|
||||
"toolbar": {
|
||||
"tab": "customization",
|
||||
"controller": "toolbar",
|
||||
"do": "",
|
||||
"restriction": "toolbar_manage"
|
||||
},
|
||||
"emoticons": {
|
||||
"tab": "customization",
|
||||
"controller": "emoticons",
|
||||
"do": "",
|
||||
"restriction": "emoticons_manage"
|
||||
}
|
||||
},
|
||||
"languages": {
|
||||
"languages": {
|
||||
"tab": "customization",
|
||||
"controller": "languages",
|
||||
"do": "",
|
||||
"restriction": "lang_packs"
|
||||
}
|
||||
},
|
||||
"support": {
|
||||
"dashboard": {
|
||||
"tab": "core",
|
||||
"controller": "support",
|
||||
"do": "&_new=1",
|
||||
"restriction": "get_support"
|
||||
}
|
||||
},
|
||||
"stats": {
|
||||
"registrationstats": {
|
||||
"tab": "stats",
|
||||
"controller": "registrationstats",
|
||||
"do": "",
|
||||
"restriction": "registrations_manage"
|
||||
},
|
||||
"pmstats": {
|
||||
"tab": "stats",
|
||||
"controller": "pmstats",
|
||||
"do": "",
|
||||
"restriction": null
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,256 @@
|
||||
{
|
||||
"applications": {
|
||||
"core_manage_apps": {
|
||||
"app_manage": "app_manage",
|
||||
"app_delete": "app_delete",
|
||||
"app_install": "app_install",
|
||||
"module_manage": "module_manage"
|
||||
},
|
||||
"enhancements": {
|
||||
"enhancements_manage": "enhancements_manage"
|
||||
},
|
||||
"plugins": {
|
||||
"plugins_view": "plugins_view",
|
||||
"plugins_install": "plugins_install",
|
||||
"plugins_edit": "plugins_edit",
|
||||
"plugins_uninstall": "plugins_uninstall"
|
||||
}
|
||||
},
|
||||
"promotion": {
|
||||
"seo": {
|
||||
"seo_manage": "seo_manage"
|
||||
},
|
||||
"sharelinks": {
|
||||
"sharelinks_manage": "sharelinks_manage"
|
||||
},
|
||||
"advertisements": {
|
||||
"advertisements_manage": "advertisements_manage",
|
||||
"advertisements_add": "advertisements_add",
|
||||
"advertisements_edit": "advertisements_edit",
|
||||
"advertisements_delete": "advertisements_delete"
|
||||
}
|
||||
},
|
||||
"settings": {
|
||||
"login": {
|
||||
"login_manage": "login_manage"
|
||||
},
|
||||
"email": {
|
||||
"email_manage": "email_manage",
|
||||
"email_test": "email_test",
|
||||
"email_errorlog": "email_errorlog",
|
||||
"email_errorlog_prune": "email_errorlog_prune"
|
||||
},
|
||||
"general": {
|
||||
"general_manage": "general_manage"
|
||||
},
|
||||
"licensekey": {
|
||||
"licensekey_manage": "licensekey_manage"
|
||||
},
|
||||
"terms": {
|
||||
"terms_manage": "terms_manage"
|
||||
},
|
||||
"files": {
|
||||
"files_manage": "files_manage"
|
||||
},
|
||||
"security": {
|
||||
"security_manage": "security_manage"
|
||||
},
|
||||
"posting": {
|
||||
"posting_manage": "posting_manage",
|
||||
"posting_manage_profanity": "posting_manage_profanity",
|
||||
"posting_manage_url": "posting_manage_url",
|
||||
"posting_manage_acronym": "posting_manage_acronym",
|
||||
"posting_manage_tags": "posting_manage_tags",
|
||||
"posting_manage_attachments": "posting_manage_attachments",
|
||||
"posting_manage_polls": "posting_manage_polls"
|
||||
},
|
||||
"advanced": {
|
||||
"advanced_manage": "advanced_manage",
|
||||
"advanced_manage_server": "advanced_manage_server",
|
||||
"advanced_manage_tasks": "advanced_manage_tasks",
|
||||
"advanced_manage_furls": "advanced_manage_furls",
|
||||
"datastore": "datastore"
|
||||
},
|
||||
"search": {
|
||||
"search_manage": "search_manage"
|
||||
}
|
||||
},
|
||||
"members": {
|
||||
"members": {
|
||||
"member_view": "member_view",
|
||||
"member_add": "member_add",
|
||||
"member_add_admin": "member_add_admin",
|
||||
"member_edit": "member_edit",
|
||||
"member_edit_admin": "member_edit_admin",
|
||||
"member_delete": "member_delete",
|
||||
"member_delete_admin": "member_delete_admin",
|
||||
"member_login": "member_login",
|
||||
"members_merge": "members_merge",
|
||||
"member_move_admin1": "member_move_admin1",
|
||||
"member_move_admin2": "member_move_admin2",
|
||||
"member_ban": "member_ban",
|
||||
"member_ban_admin": "member_ban_admin",
|
||||
"member_photo": "member_photo",
|
||||
"member_photo_admin": "member_photo_admin",
|
||||
"membertools_validating": "membertools_validating",
|
||||
"membertools_locked": "membertools_locked",
|
||||
"membertools_delete": "membertools_delete",
|
||||
"membertools_ip": "membertools_ip",
|
||||
"member_recount_content": "member_recount_content"
|
||||
},
|
||||
"groups": {
|
||||
"groups_manage": "groups_manage",
|
||||
"groups_add": "groups_add",
|
||||
"groups_edit": "groups_edit",
|
||||
"groups_delete": "groups_delete"
|
||||
},
|
||||
"messages": {
|
||||
"messages_manage": "messages_manage"
|
||||
},
|
||||
"registrations": {
|
||||
"registrations_manage": "registrations_manage"
|
||||
}
|
||||
},
|
||||
"membersettings": {
|
||||
"members_reputation": {
|
||||
"reps_settings": "reps_settings",
|
||||
"reps_manage": "reps_manage",
|
||||
"reps_delete": "reps_delete"
|
||||
},
|
||||
"profiles": {
|
||||
"profiles_manage": "profiles_manage",
|
||||
"profilefields_manage": "profilefields_manage",
|
||||
"profilefields_add": "profilefields_add",
|
||||
"profilefields_edit": "profilefields_edit",
|
||||
"profilefields_delete": "profilefields_delete",
|
||||
"profilefieldgroups_add": "profilefieldgroups_add",
|
||||
"profilefieldgroups_edit": "profilefieldgroups_edit",
|
||||
"profilefieldgroups_delete": "profilefieldgroups_delete"
|
||||
},
|
||||
"ranks": {
|
||||
"ranks_manage": "ranks_manage"
|
||||
},
|
||||
"ban": {
|
||||
"ban_manage": "ban_manage"
|
||||
},
|
||||
"spam": {
|
||||
"spam_manage": "spam_manage",
|
||||
"spam_service_log": "spam_service_log",
|
||||
"qanda_manage": "qanda_manage",
|
||||
"qanda_add": "qanda_add",
|
||||
"qanda_edit": "qanda_edit",
|
||||
"qanda_delete": "qanda_delete"
|
||||
},
|
||||
"notifications": {
|
||||
"notifications_manage": "notifications_manage"
|
||||
},
|
||||
"warnings": {
|
||||
"warn_settings": "warn_settings",
|
||||
"reasons_view": "reasons_view",
|
||||
"reasons_edit": "reasons_edit",
|
||||
"reasons_add": "reasons_add",
|
||||
"reasons_delete": "reasons_delete",
|
||||
"actions_view": "actions_view",
|
||||
"actions_edit": "actions_edit",
|
||||
"actions_add": "actions_add",
|
||||
"actions_delete": "actions_delete"
|
||||
},
|
||||
"registration": {
|
||||
"registration_manage": "registration_manage"
|
||||
}
|
||||
},
|
||||
"staff": {
|
||||
"staff_admin": {
|
||||
"restrictions_manage": "restrictions_manage",
|
||||
"restrictions_add_member": "restrictions_add_member",
|
||||
"restrictions_add_group": "restrictions_add_group",
|
||||
"restrictions_edit_member": "restrictions_edit_member",
|
||||
"restrictions_edit_group": "restrictions_edit_group",
|
||||
"restrictions_delete_member": "restrictions_delete_member",
|
||||
"restrictions_delete_group": "restrictions_delete_group",
|
||||
"restrictions_adminlogs": "restrictions_adminlogs",
|
||||
"restrictions_adminlogs_prune": "restrictions_adminlogs_prune",
|
||||
"restrictions_acploginlogs": "restrictions_acploginlogs",
|
||||
"restrictions_acploginlogs_prune": "restrictions_acploginlogs_prune"
|
||||
},
|
||||
"moderators": {
|
||||
"moderators_manage": "moderators_manage",
|
||||
"moderators_add_member": "moderators_add_member",
|
||||
"moderators_add_group": "moderators_add_group",
|
||||
"moderators_edit_member": "moderators_edit_member",
|
||||
"moderators_edit_group": "moderators_edit_group",
|
||||
"moderators_delete_member": "moderators_delete_member",
|
||||
"moderators_delete_group": "moderators_delete_group",
|
||||
"restrictions_moderatorlogs": "restrictions_moderatorlogs",
|
||||
"restrictions_moderatorlogs_prune": "restrictions_moderatorlogs_prune"
|
||||
},
|
||||
"leaders": {
|
||||
"leaders_manage": "leaders_manage",
|
||||
"leaders_add": "leaders_add",
|
||||
"leaders_edit": "leaders_edit",
|
||||
"leaders_delete": "leaders_delete"
|
||||
}
|
||||
},
|
||||
"editor": {
|
||||
"toolbar": {
|
||||
"toolbar_manage": "toolbar_manage"
|
||||
},
|
||||
"emoticons": {
|
||||
"emoticons_manage": "emoticons_manage",
|
||||
"emoticons_add": "emoticons_add",
|
||||
"emoticons_edit": "emoticons_edit",
|
||||
"delete": "emoticons_delete"
|
||||
}
|
||||
},
|
||||
"customization": {
|
||||
"emails": {
|
||||
"emails_manage": "emails_manage"
|
||||
},
|
||||
"theme_sets": {
|
||||
"theme_sets_manage": "theme_sets_manage",
|
||||
"theme_settings_add": "theme_settings_add",
|
||||
"theme_settings_remove": "theme_settings_remove",
|
||||
"theme_download_upload": "theme_download_upload",
|
||||
"theme_templates_manage": "theme_templates_manage",
|
||||
"theme_easy_editor": "theme_easy_editor",
|
||||
"theme_designers_mode": "theme_designers_mode"
|
||||
}
|
||||
},
|
||||
"bulkmail": {
|
||||
"bulkmail": {
|
||||
"bulkmail_manage": "bulkmail_manage",
|
||||
"bulkmail_add": "bulkmail_add",
|
||||
"bulkmail_edit": "bulkmail_edit",
|
||||
"bulkmail_delete": "bulkmail_delete"
|
||||
}
|
||||
},
|
||||
"languages": {
|
||||
"languages": {
|
||||
"lang_words": "lang_words",
|
||||
"lang_packs": "lang_packs"
|
||||
}
|
||||
},
|
||||
"livesearch": {
|
||||
"livesearch": {
|
||||
"livesearch_manage": "livesearch_manage"
|
||||
}
|
||||
},
|
||||
"overview": {
|
||||
"files": {
|
||||
"files_view": "files_view",
|
||||
"files_delete": "files_delete",
|
||||
"files_settings": "files_settings",
|
||||
"orphaned_files": "orphaned_files"
|
||||
},
|
||||
"security": {
|
||||
"security_manage": "security_manage"
|
||||
}
|
||||
},
|
||||
"support": {
|
||||
"support": {
|
||||
"get_support": "get_support",
|
||||
"diagnostic_log_settings": "diagnostic_log_settings",
|
||||
"sql_toolbox": "sql_toolbox"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
{"app=core&module=settings&controller=posting&searchResult=form_attach_allowed_types":{"lang_key":"attach_allowed_types","restriction":null,"keywords":["file types","attachments","attachment restrictions","files"]},"app=core&module=settings&controller=posting&tab=urlFilters&searchResult=posts_add_nofollow_exclude":{"lang_key":"posts_add_nofollow_exclude","restriction":null,"keywords":["follow","pagerank","nofollow"]},"app=core&module=settings&controller=email&do=errorLog":{"lang_key":"emailerrorlogs","restriction":"email_errorlog","keywords":["email error logs","email logs","logs"]},"app=core&module=support&controller=errorLogs":{"lang_key":"error_logs","restriction":null,"keywords":["error log","errors","logs"]},"app=core&module=support&controller=systemLogs":{"lang_key":"system_logs","restriction":null,"keywords":["sql logs","driver errors","logs","sql error logs","system logs"]},"app=core&module=membersettings&controller=spam&do=serviceLogs":{"lang_key":"spamlogs","restriction":"spam_service_log","keywords":["spam logs"]},"app=core&module=staff&controller=admin&do=actionLogs":{"lang_key":"acplogs","restriction":"restrictions_adminlogs","keywords":["logs","acp logs","admin logs"]},"app=core&module=staff&controller=moderators&do=actionLogs":{"lang_key":"modlogs","restriction":"restrictions_moderatorlogs","keywords":["logs","staff logs","mod logs","moderator logs"]},"app=core&module=settings&controller=general&searchResult=form_site_online":{"lang_key":"site_online","restriction":"general_manage","keywords":["offline","online"]},"app=core&module=settings&controller=advanced&do=tasks":{"lang_key":"menu__core_settings_advanced","restriction":null,"keywords":["tasklog","cronjob","tasks","task","cron"]},"app=core&module=editor&controller=toolbar":{"lang_key":"editor_customization","restriction":"toolbar_manage","keywords":["mobile","tablet","phone","responsive","wysiwyg","editor","toolbars","post","comment","buttons","bbcode"]},"app=core&module=settings&controller=login&do=settings&searchResult=form_logins_over_https":{"lang_key":"logins_over_https","restriction":"login_manage","keywords":["https","ssl","secure logins"]},"app=core&module=stats&controller=pmstats":{"lang_key":"menu__core_members_pmstats","restriction":null,"keywords":["private messages","message statistics"]},"app=core&module=customization&controller=themes&do=designersmode&searchResult=form_theme_designers_mode":{"lang_key":"theme_designers_mode","restriction":"theme_templates_manage","keywords":["designers mode"]},"app=core&module=stats&controller=registrationstats":{"lang_key":"menu__core_members_registrationstats","restriction":"registrations_manage","keywords":["registration statistics"]},"app=core&module=applications&controller=enhancements&do=edit&id=core_Mandrill":{"lang_key":"menu__core_applications_enhancements","restriction":"enhancements_manage","keywords":["email","bulk mail","mandrill"]},"app=core&module=staff&controller=admin&do=loginLogs":{"lang_key":"menu__core_staff_admin","restriction":"restrictions_manage","keywords":["admin logins","acp logins"]},"app=core&module=staff&controller=admin":{"lang_key":"menu__core_staff_admin","restriction":"restrictions_manage","keywords":["staff","acp","admins","restrictions","administrators"]},"app=core&module=membersettings&controller=profiles":{"lang_key":"menu__core_membersettings_profiles","restriction":"profiles_manage","keywords":["custom profile fields","about me"]},"app=core&module=overview&controller=security&do=settings&searchResult=form_xforward_matching":{"lang_key":"xforward_matching","restriction":"security_manage","keywords":["http_x_forwarded_for","proxies","proxy","ip address"]},"app=core&module=members&controller=members":{"lang_key":"menu__core_members_members","restriction":null,"keywords":["locked","spammers","validating","banned","members","administrators","accounts"]},"app=core&module=members&controller=groups&searchResult=4_g_bypass_badwords":{"lang_key":"g_bypass_badwords","restriction":"groups_manage","keywords":["profanity","bad words","swear words"]},"app=core&module=members&controller=groups&searchResult=4_g_avoid_q":{"lang_key":"g_avoid_q","restriction":"groups_manage","keywords":["hiding","hidden","hide","queue","mod queue","moderation"]},"app=core&module=members&controller=groups&searchResult=4_g_avoid_flood":{"lang_key":"g_avoid_flood","restriction":"groups_manage","keywords":["posting flood control","post flood control","flood control"]},"app=core&module=members&controller=groups&searchResult=4_gbw_no_report":{"lang_key":"gbw_no_report","restriction":"groups_manage","keywords":["reporting","report"]},"app=core&module=members&controller=groups&searchResult=4_g_delete_own_posts":{"lang_key":"g_delete_own_posts","restriction":"groups_manage","keywords":["deleting","delete"]},"app=core&module=members&controller=groups&searchResult=4_gbw_soft_delete_own":{"lang_key":"gbw_soft_delete_own","restriction":"groups_manage","keywords":["hiding","hide"]},"app=core&moduleLine truncated
|
||||
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"application_title": "System",
|
||||
"app_author": "Invision Power Services, Inc.",
|
||||
"app_directory": "core",
|
||||
"app_protected": 1,
|
||||
"app_website": null,
|
||||
"app_update_check": null
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
<?php
|
||||
/**
|
||||
* @brief {subpackage} Application Class
|
||||
* @author <a href='{website}'>{author}</a>
|
||||
* @copyright (c) {year} {author}
|
||||
* @package IPS Social Suite
|
||||
* @subpackage {subpackage}
|
||||
* @since {date}
|
||||
* @version
|
||||
*/
|
||||
|
||||
namespace IPS\{app};
|
||||
|
||||
/**
|
||||
* {subpackage} Application Class
|
||||
*/
|
||||
class _Application extends \IPS\Application
|
||||
{
|
||||
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
<?php
|
||||
/**
|
||||
* @brief {controller}
|
||||
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
|
||||
* @copyright (c) 2001 - SVN_YYYY Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/legal/standards/
|
||||
* @package IPS Social Suite
|
||||
{subpackage}
|
||||
* @since {date}
|
||||
* @version SVN_VERSION_NUMBER
|
||||
*/
|
||||
|
||||
namespace IPS\{app}\modules\{location}\{module};
|
||||
|
||||
/* 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;
|
||||
}
|
||||
|
||||
/**
|
||||
* {controller}
|
||||
*/
|
||||
class _{controller} extends \IPS\Dispatcher\Controller
|
||||
{
|
||||
/**
|
||||
* Execute
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function execute()
|
||||
{
|
||||
{restriction}
|
||||
parent::execute();
|
||||
}
|
||||
|
||||
/**
|
||||
* ...
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
protected function manage()
|
||||
{
|
||||
// This is the default method if no 'do' parameter is specified
|
||||
}
|
||||
|
||||
// Create new methods with the same name as the 'do' parameter which should execute it
|
||||
}
|
||||
@@ -0,0 +1,51 @@
|
||||
<?php
|
||||
/**
|
||||
* @brief {controller}
|
||||
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
|
||||
* @copyright (c) 2001 - SVN_YYYY Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/legal/standards/
|
||||
* @package IPS Social Suite
|
||||
{subpackage}
|
||||
* @since {date}
|
||||
* @version SVN_VERSION_NUMBER
|
||||
*/
|
||||
|
||||
namespace IPS\{app}\modules\{location}\{module};
|
||||
|
||||
/* 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;
|
||||
}
|
||||
|
||||
/**
|
||||
* {controller}
|
||||
*/
|
||||
class _{controller} extends \IPS\Dispatcher\Controller
|
||||
{
|
||||
/**
|
||||
* Execute
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function execute()
|
||||
{
|
||||
{restriction}
|
||||
parent::execute();
|
||||
}
|
||||
|
||||
/**
|
||||
* Manage
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
protected function manage()
|
||||
{
|
||||
/* Create the table */
|
||||
$table = new \IPS\Helpers\Table\Db( '{table_name}', \IPS\Http\Url::internal( 'app={app}&module={module}&controller={controller}' ) );
|
||||
|
||||
/* Display */
|
||||
\IPS\Output::i()->output = \IPS\Theme::i()->getTemplate( 'global', 'core' )->block( 'title', (string) $table );
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
<?php
|
||||
/**
|
||||
* @brief {controller}
|
||||
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
|
||||
* @copyright (c) 2001 - SVN_YYYY Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/legal/standards/
|
||||
* @package IPS Social Suite
|
||||
{subpackage}
|
||||
* @since {date}
|
||||
* @version SVN_VERSION_NUMBER
|
||||
*/
|
||||
|
||||
namespace IPS\{app}\modules\{location}\{module};
|
||||
|
||||
/* 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;
|
||||
}
|
||||
|
||||
/**
|
||||
* {controller}
|
||||
*/
|
||||
class _{controller} extends \IPS\Node\Controller
|
||||
{
|
||||
/**
|
||||
* Node Class
|
||||
*/
|
||||
protected $nodeClass = '{node_model}';
|
||||
|
||||
/**
|
||||
* Execute
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function execute()
|
||||
{
|
||||
{restriction}
|
||||
parent::execute();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,56 @@
|
||||
<?php
|
||||
/**
|
||||
* @brief {key} Task
|
||||
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
|
||||
* @copyright (c) 2001 - SVN_YYYY Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/legal/standards/
|
||||
* @package IPS Social Suite
|
||||
{subpackage}
|
||||
* @since {date}
|
||||
* @version SVN_VERSION_NUMBER
|
||||
*/
|
||||
|
||||
namespace IPS\{namespace};
|
||||
|
||||
/* 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;
|
||||
}
|
||||
|
||||
/**
|
||||
* {key} Task
|
||||
*/
|
||||
class _{key} extends \IPS\Task
|
||||
{
|
||||
/**
|
||||
* Execute
|
||||
*
|
||||
* If ran successfully, should return anything worth logging. Only log something
|
||||
* worth mentioning (don't log "task ran successfully"). Return NULL (actual NULL, not '' or 0) to not log (which will be most cases).
|
||||
* If an error occurs which means the task could not finish running, throw an \IPS\Task\Exception - do not log an error as a normal log.
|
||||
* Tasks should execute within the time of a normal HTTP request.
|
||||
*
|
||||
* @return mixed Message to log or NULL
|
||||
* @throws \IPS\Task\Exception
|
||||
*/
|
||||
public function execute()
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/**
|
||||
* Cleanup
|
||||
*
|
||||
* If your task takes longer than 15 minutes to run, this method
|
||||
* will be called before execute(). Use it to clean up anything which
|
||||
* may not have been done
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function cleanup()
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
<?php
|
||||
/**
|
||||
* @brief {version_human} Upgrade Code
|
||||
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
|
||||
* @copyright (c) 2001 - SVN_YYYY Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/legal/standards/
|
||||
* @package IPS Social Suite
|
||||
{subpackage}
|
||||
* @since {date}
|
||||
* @version SVN_VERSION_NUMBER
|
||||
*/
|
||||
|
||||
namespace IPS\{app}\setup\upg_{version_long};
|
||||
|
||||
/* 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;
|
||||
}
|
||||
|
||||
/**
|
||||
* {version_human} Upgrade Code
|
||||
*/
|
||||
class _Upgrade
|
||||
{
|
||||
/**
|
||||
* ...
|
||||
*
|
||||
* @return 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()
|
||||
{
|
||||
|
||||
|
||||
|
||||
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,40 @@
|
||||
//<?php
|
||||
|
||||
/**
|
||||
* @brief {version_human} Upgrade Code
|
||||
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
|
||||
* @copyright (c) 2001 - SVN_YYYY Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/legal/standards/
|
||||
* @package IPS Social Suite
|
||||
{subpackage}
|
||||
* @since {date}
|
||||
* @version SVN_VERSION_NUMBER
|
||||
*/
|
||||
|
||||
/* 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;
|
||||
}
|
||||
|
||||
/**
|
||||
* {version_human} Upgrade Code
|
||||
*/
|
||||
class ips_{app}_setup_upg_{version_long}
|
||||
{
|
||||
/**
|
||||
* ...
|
||||
*
|
||||
* @return 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()
|
||||
{
|
||||
|
||||
|
||||
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,98 @@
|
||||
<?php
|
||||
/**
|
||||
* @brief {key} Widget
|
||||
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
|
||||
* @copyright (c) 2001 - SVN_YYYY Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/legal/standards/
|
||||
* @package IPS Social Suite
|
||||
{subpackage}
|
||||
* @since {date}
|
||||
* @version SVN_VERSION_NUMBER
|
||||
*/
|
||||
|
||||
namespace IPS\{namespace}\widgets;
|
||||
|
||||
/* 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;
|
||||
}
|
||||
|
||||
/**
|
||||
* {key} Widget
|
||||
*/
|
||||
class _{key} extends {class}
|
||||
{
|
||||
/**
|
||||
* @brief Widget Key
|
||||
*/
|
||||
public $key = '{key}';
|
||||
|
||||
/**
|
||||
* @brief App
|
||||
*/
|
||||
public $app = '{appkey}';
|
||||
|
||||
/**
|
||||
* @brief Plugin
|
||||
*/
|
||||
public $plugin = '{pluginid}';
|
||||
|
||||
/**
|
||||
* Initialise this widget
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function init()
|
||||
{
|
||||
// Use this to perform any set up and to assign a template that is not in the following format:
|
||||
// $this->template( array( \IPS\Theme::i()->getTemplate( 'widgets', $this->app, 'front' ), $this->key ) );
|
||||
// If you are creating a plugin, uncomment this line:
|
||||
// $this->template( array( \IPS\Theme::i()->getTemplate( 'plugins', 'core', 'global' ), $this->key ) );
|
||||
// And then create your template at located at plugins/<your plugin>/dev/html/{key}.phtml
|
||||
|
||||
|
||||
parent::init();
|
||||
}
|
||||
|
||||
/**
|
||||
* Specify widget configuration
|
||||
*
|
||||
* @param null|\IPS\Helpers\Form $form Form object
|
||||
* @return null|\IPS\Helpers\Form
|
||||
*/
|
||||
public function configuration( &$form=null )
|
||||
{
|
||||
if ( $form === null )
|
||||
{
|
||||
$form = new \IPS\Helpers\Form;
|
||||
}
|
||||
|
||||
// $$form->add( new \IPS\Helpers\Form\XXXX( .... ) );
|
||||
// return $form;
|
||||
}
|
||||
|
||||
/**
|
||||
* Ran before saving widget configuration
|
||||
*
|
||||
* @param array $values Values from form
|
||||
* @return array
|
||||
*/
|
||||
public function preConfig( $values )
|
||||
{
|
||||
return $values;
|
||||
}
|
||||
|
||||
/**
|
||||
* Render a widget
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function render()
|
||||
{
|
||||
return "";
|
||||
// Use $this->output( $foo, $bar ); to return a string generated by the template set in init() or manually added via $widget->template( $callback );
|
||||
// Note you MUST route output through $this->output() rather than calling \IPS\Theme::i()->getTemplate() because of the way widgets are cached
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
<?php
|
||||
/**
|
||||
* @brief Advertisement locations extension
|
||||
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
|
||||
* @copyright (c) 2001 - SVN_YYYY Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/legal/standards/
|
||||
* @package IPS Social Suite
|
||||
{subpackage}
|
||||
* @since {date}
|
||||
* @version SVN_VERSION_NUMBER
|
||||
*/
|
||||
|
||||
namespace IPS\{app}\extensions\core\AdvertisementLocations;
|
||||
|
||||
/* 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;
|
||||
}
|
||||
|
||||
/**
|
||||
* Advertisement locations extension
|
||||
*/
|
||||
class _{class}
|
||||
{
|
||||
/**
|
||||
* Get the locations and the additional settings
|
||||
*
|
||||
* @param array $settings Current setting values
|
||||
* @return array Array with two elements: 'locations' which should have keys as the location keys and values as the fields to toggle, and 'settings' which are additional fields to add to the form
|
||||
*/
|
||||
public function getSettings( $settings )
|
||||
{
|
||||
return array( 'locations' => array(), 'settings' => array() );
|
||||
}
|
||||
|
||||
/**
|
||||
* Return an array of setting values to store
|
||||
*
|
||||
* @param array $values Values from the form submission
|
||||
* @return array Array of setting key => value to store
|
||||
*/
|
||||
public function parseSettings( $values )
|
||||
{
|
||||
return array();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
<?php
|
||||
/**
|
||||
* @brief Announcements Extension
|
||||
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
|
||||
* @copyright (c) 2001 - SVN_YYYY Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/legal/standards/
|
||||
* @package IPS Social Suite
|
||||
{subpackage}
|
||||
* @since {date}
|
||||
* @version SVN_VERSION_NUMBER
|
||||
*/
|
||||
|
||||
namespace IPS\{app}\extensions\core\Announcements;
|
||||
|
||||
/* 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;
|
||||
}
|
||||
|
||||
/**
|
||||
* Announcements Extension
|
||||
*/
|
||||
class _{class}
|
||||
{
|
||||
public static $idField = "id";
|
||||
|
||||
public static $controllers = array();
|
||||
|
||||
/**
|
||||
* Get Setting Field
|
||||
*
|
||||
* @param \IPS\core\Announcements\Announcement $announcement
|
||||
* @return Form element
|
||||
*/
|
||||
public function getSettingField( $announcement )
|
||||
{
|
||||
return new \IPS\Helpers\Form\Node( 'announce_download_categories', ( $announcement ) ? explode( ",", $announcement->ids ) : NULL, FALSE, array( 'class' => 'IPS\downloads\Category', 'zeroVal' => 'any', 'multiple' => TRUE ), NULL, NULL, NULL, 'announce_download_categories' );
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,46 @@
|
||||
<?php
|
||||
/**
|
||||
* @brief Build process plugin
|
||||
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
|
||||
* @copyright (c) 2001 - SVN_YYYY Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/legal/standards/
|
||||
* @package IPS Social Suite
|
||||
{subpackage}
|
||||
* @since {date}
|
||||
* @version SVN_VERSION_NUMBER
|
||||
*/
|
||||
|
||||
namespace IPS\{app}\extensions\core\Build;
|
||||
|
||||
/* 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;
|
||||
}
|
||||
|
||||
/**
|
||||
* Build process plugin
|
||||
*/
|
||||
class _{class}
|
||||
{
|
||||
/**
|
||||
* Build
|
||||
*
|
||||
* @return void
|
||||
* @throws \RuntimeException
|
||||
*/
|
||||
public function build()
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Finish Build
|
||||
* Moved the pbckcode acs.js file over from development as CKEditor's build routine seems to break it
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
protected function finish()
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,73 @@
|
||||
<?php
|
||||
/**
|
||||
* @brief Bulk mail extension
|
||||
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
|
||||
* @copyright (c) 2001 - SVN_YYYY Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/legal/standards/
|
||||
* @package IPS Social Suite
|
||||
{subpackage}
|
||||
* @since {date}
|
||||
* @version SVN_VERSION_NUMBER
|
||||
*/
|
||||
|
||||
namespace IPS\{app}\extensions\core\BulkMail;
|
||||
|
||||
/* 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;
|
||||
}
|
||||
|
||||
/**
|
||||
* Bulk mail extension
|
||||
*/
|
||||
class _{class}
|
||||
{
|
||||
/**
|
||||
* Get Setting Field
|
||||
*
|
||||
* @param mixed $criteria Value returned from the save() method
|
||||
* @return array Array of form elements
|
||||
*/
|
||||
public function getSettingField( $criteria )
|
||||
{
|
||||
return array();
|
||||
}
|
||||
|
||||
/**
|
||||
* Save the filter data
|
||||
*
|
||||
* @param array $post Form values
|
||||
* @return mixed False, or an array of data to use later when filtering the members
|
||||
* @throws \LogicException
|
||||
*/
|
||||
public function save( $post )
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get where clause to add to the member retrieval database query
|
||||
*
|
||||
* @param mixed $data The array returned from the save() method
|
||||
* @return string|array|NULL Where clause
|
||||
*/
|
||||
public function getQueryWhereClause( $data )
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/**
|
||||
* Callback for member retrieval database query
|
||||
* Can be used to set joins
|
||||
*
|
||||
* @param mixed $data The array returned from the save() method
|
||||
* @param \IPS\Db\Query $query The query
|
||||
* @return void
|
||||
*/
|
||||
public function queryCallback( &$query )
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,124 @@
|
||||
<?php
|
||||
/**
|
||||
* @brief Community Enhancements
|
||||
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
|
||||
* @copyright (c) 2001 - SVN_YYYY Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/legal/standards/
|
||||
* @package IPS Social Suite
|
||||
{subpackage}
|
||||
* @since {date}
|
||||
* @version SVN_VERSION_NUMBER
|
||||
*/
|
||||
|
||||
namespace IPS\{app}\extensions\core\CommunityEnhancements;
|
||||
|
||||
/* 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;
|
||||
}
|
||||
|
||||
/**
|
||||
* Community Enhancement
|
||||
*/
|
||||
class _{class}
|
||||
{
|
||||
/**
|
||||
* @brief Enhancement is enabled?
|
||||
*/
|
||||
public $enabled = FALSE;
|
||||
|
||||
/**
|
||||
* @brief IPS-provided enhancement?
|
||||
*/
|
||||
public $ips = FALSE;
|
||||
|
||||
/**
|
||||
* @brief Enhancement has configuration options?
|
||||
*/
|
||||
public $hasOptions = TRUE;
|
||||
|
||||
/**
|
||||
* @brief Icon data
|
||||
*/
|
||||
public $icon = "";
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
//$this->enabled = \IPS\Settings::i()->xxxxxx;
|
||||
}
|
||||
|
||||
/**
|
||||
* Edit
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function edit()
|
||||
{
|
||||
$form = new \IPS\Helpers\Form;
|
||||
//$form->add( ... );
|
||||
if ( $form->values() )
|
||||
{
|
||||
try
|
||||
{
|
||||
$this->testSettings();
|
||||
$form->saveAsSettings();
|
||||
|
||||
\IPS\Output::i()->inlineMessage = \IPS\Member::loggedIn()->language()->addToStack('saved');
|
||||
}
|
||||
catch ( \LogicException $e )
|
||||
{
|
||||
$form->error = $e->getMessage();
|
||||
}
|
||||
}
|
||||
|
||||
\IPS\Output::i()->sidebar['actions'] = array(
|
||||
'help' => array(
|
||||
'title' => 'help',
|
||||
'icon' => 'question-circle',
|
||||
'link' => \IPS\Http\Url::internal( "http://www.example.com" ),
|
||||
'target' => '_blank'
|
||||
),
|
||||
);
|
||||
|
||||
\IPS\Output::i()->output = \IPS\Theme::i()->getTemplate( 'global' )->block( 'enhancements__{app}_{class}', $form );
|
||||
}
|
||||
|
||||
/**
|
||||
* Enable/Disable
|
||||
*
|
||||
* @param $enabled bool Enable/Disable
|
||||
* @return void
|
||||
* @throws \LogicException
|
||||
*/
|
||||
public function toggle( $enabled )
|
||||
{
|
||||
if ( $enabled )
|
||||
{
|
||||
$this->testSettings();
|
||||
}
|
||||
|
||||
//\IPS\Db::i()->update( 'core_sys_conf_settings', array( 'conf_value' => $enabled ), array( 'conf_key=?', 'xxxxxx' ) );
|
||||
//unset( \IPS\Data\Store::i()->settings );
|
||||
}
|
||||
|
||||
/**
|
||||
* Test Settings
|
||||
*
|
||||
* @return void
|
||||
* @throws \LogicException
|
||||
*/
|
||||
protected function testSettings()
|
||||
{
|
||||
if ( FALSE )
|
||||
{
|
||||
throw new \LogicException( 'error' );
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
/**
|
||||
* @brief Content Router extension: {class}
|
||||
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
|
||||
* @copyright (c) 2001 - SVN_YYYY Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/legal/standards/
|
||||
* @package IPS Social Suite
|
||||
{subpackage}
|
||||
* @since {date}
|
||||
* @version SVN_VERSION_NUMBER
|
||||
*/
|
||||
|
||||
namespace IPS\{app}\extensions\core\ContentRouter;
|
||||
|
||||
/* 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;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Content Router extension: {class}
|
||||
*/
|
||||
class _{class}
|
||||
{
|
||||
/**
|
||||
* @brief Content Item Classes
|
||||
*/
|
||||
public $classes = array( 'IPS\{app}\Example' );
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
<?php
|
||||
/**
|
||||
* @brief Create Menu Extension : {class}
|
||||
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
|
||||
* @copyright (c) 2001 - SVN_YYYY Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/legal/standards/
|
||||
* @package IPS Social Suite
|
||||
{subpackage}
|
||||
* @since {date}
|
||||
* @version SVN_VERSION_NUMBER
|
||||
*/
|
||||
|
||||
namespace IPS\{app}\extensions\core\CreateMenu;
|
||||
|
||||
/* 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;
|
||||
}
|
||||
|
||||
/**
|
||||
* Create Menu Extension: {class}
|
||||
*/
|
||||
class _{class}
|
||||
{
|
||||
/**
|
||||
* Get Items
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function getItems()
|
||||
{
|
||||
return array(
|
||||
'example_key' => array(
|
||||
'link' => \IPS\Http\Url::internal( '...', 'front' ),
|
||||
'title' => 'example',
|
||||
'flashMessage' => 'saved',
|
||||
'extraData' => array( 'data-ipsDialog' => true )
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,46 @@
|
||||
<?php
|
||||
/**
|
||||
* @brief Dashboard extension: {class}
|
||||
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
|
||||
* @copyright (c) 2001 - SVN_YYYY Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/legal/standards/
|
||||
* @package IPS Social Suite
|
||||
{subpackage}
|
||||
* @since {date}
|
||||
* @version SVN_VERSION_NUMBER
|
||||
*/
|
||||
|
||||
namespace IPS\{app}\extensions\core\Dashboard;
|
||||
|
||||
/* 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;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Dashboard extension: {class}
|
||||
*/
|
||||
class _{class}
|
||||
{
|
||||
/**
|
||||
* Can the current user view this dashboard item?
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function canView()
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the block HTML show on the dashboard
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getBlock()
|
||||
{
|
||||
return '';
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,112 @@
|
||||
<?php
|
||||
/**
|
||||
* @brief Editor Extension: {class}
|
||||
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
|
||||
* @copyright (c) 2001 - SVN_YYYY Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/legal/standards/
|
||||
* @package IPS Social Suite
|
||||
{subpackage}
|
||||
* @since {date}
|
||||
* @version SVN_VERSION_NUMBER
|
||||
*/
|
||||
|
||||
namespace IPS\{app}\extensions\core\EditorLocations;
|
||||
|
||||
/* 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;
|
||||
}
|
||||
|
||||
/**
|
||||
* Editor Extension: {class}
|
||||
*/
|
||||
class _{class}
|
||||
{
|
||||
/**
|
||||
* Can we use HTML in this editor?
|
||||
*
|
||||
* @param \IPS\Member $member The member
|
||||
* @return bool|null NULL will cause the default value (based on the member's permissions) to be used, and is recommended in most cases. A boolean value will override that.
|
||||
*/
|
||||
public function canUseHtml( $member )
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/**
|
||||
* Can we use attachments in this editor?
|
||||
*
|
||||
* @param \IPS\Member $member The member
|
||||
* @param \IPS\Helpers\Form\Editor $field The editor field
|
||||
* @return bool|null NULL will cause the default value (based on the member's permissions) to be used, and is recommended in most cases. A boolean value will override that.
|
||||
*/
|
||||
public function canAttach( $member, $field )
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/**
|
||||
* Permission check for attachments
|
||||
*
|
||||
* @param \IPS\Member $member The member
|
||||
* @param int|null $id1 Primary ID
|
||||
* @param int|null $id2 Secondary ID
|
||||
* @param string|null $id3 Arbitrary data
|
||||
* @param array $attachment The attachment data
|
||||
* @return bool
|
||||
*/
|
||||
public function attachmentPermissionCheck( $member, $id1, $id2, $id3, $attachment )
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/**
|
||||
* Attachment lookup
|
||||
*
|
||||
* @param int|null $id1 Primary ID
|
||||
* @param int|null $id2 Secondary ID
|
||||
* @param string|null $id3 Arbitrary data
|
||||
* @return \IPS\Http\Url|\IPS\Content|\IPS\Node\Model
|
||||
* @throws \LogicException
|
||||
*/
|
||||
public function attachmentLookup( $id1, $id2, $id3 )
|
||||
{
|
||||
// return \IPS\Http\Url::internal( ... );
|
||||
}
|
||||
|
||||
/**
|
||||
* Rebuild attachment images in non-content item areas
|
||||
*
|
||||
* @param int|null $offset Offset to start from
|
||||
* @param int|null $max Maximum to parse
|
||||
* @return int Number completed
|
||||
* @note This method is optional and will only be called if it exists
|
||||
*/
|
||||
//public function rebuildAttachmentImages( $offset, $max )
|
||||
//{
|
||||
//}
|
||||
|
||||
/**
|
||||
* Rebuild content post-upgrade
|
||||
*
|
||||
* @param int|null $offset Offset to start from
|
||||
* @param int|null $max Maximum to parse
|
||||
* @return int Number completed
|
||||
* @note This method is optional and will only be called if it exists
|
||||
*/
|
||||
//public function rebuildContent( $offset, $max )
|
||||
//{
|
||||
//}
|
||||
|
||||
/**
|
||||
* Total content count to be used in progress indicator
|
||||
*
|
||||
* @return int Total Count
|
||||
*/
|
||||
//public function contentCount()
|
||||
//{
|
||||
// return \IPS\Db::i()->select( 'COUNT(*) as count', '...', "..." )->setKeyField('count')->first();
|
||||
//}
|
||||
}
|
||||
@@ -0,0 +1,54 @@
|
||||
<?php
|
||||
/**
|
||||
* @brief Editor Media: {class}
|
||||
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
|
||||
* @copyright (c) 2001 - SVN_YYYY Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/legal/standards/
|
||||
* @package IPS Social Suite
|
||||
{subpackage}
|
||||
* @since {date}
|
||||
* @version SVN_VERSION_NUMBER
|
||||
*/
|
||||
|
||||
namespace IPS\{app}\extensions\core\EditorMedia;
|
||||
|
||||
/* 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;
|
||||
}
|
||||
|
||||
/**
|
||||
* Editor Media: {class}
|
||||
*/
|
||||
class _{class}
|
||||
{
|
||||
/**
|
||||
* Get Counts
|
||||
*
|
||||
* @param \IPS\Member $member The member
|
||||
* @param bool $images TRUE = Images. FALSE = other attachments.
|
||||
* @return int array( 'Title' => 0 )
|
||||
*/
|
||||
public function count( $member, $images )
|
||||
{
|
||||
return array();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get Files
|
||||
*
|
||||
* @param \IPS\Member $member The member
|
||||
* @param bool $images TRUE = Images. FALSE = other attachments.
|
||||
* @param string|null $search The search term (or NULL for all)
|
||||
* @param string $postKey The post key
|
||||
* @param int $page Page
|
||||
* @param int $limit Number to get
|
||||
* @return array array( 'Title' => array( (IPS\File, \IPS\File, ... ), ... )
|
||||
*/
|
||||
public function get( $member, $images, $search, $postKey, $page, $limit )
|
||||
{
|
||||
return array();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,69 @@
|
||||
<?php
|
||||
/**
|
||||
* @brief File Storage Extension: {class}
|
||||
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
|
||||
* @copyright (c) 2001 - SVN_YYYY Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/legal/standards/
|
||||
* @package IPS Social Suite
|
||||
{subpackage}
|
||||
* @since {date}
|
||||
* @version SVN_VERSION_NUMBER
|
||||
*/
|
||||
|
||||
namespace IPS\{app}\extensions\core\FileStorage;
|
||||
|
||||
/* 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;
|
||||
}
|
||||
|
||||
/**
|
||||
* File Storage Extension: {class}
|
||||
*/
|
||||
class _{class}
|
||||
{
|
||||
/**
|
||||
* Count stored files
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
public function count()
|
||||
{
|
||||
return \IPS\Db::i()->select( 'COUNT(*)', '...', '...' )->first();
|
||||
}
|
||||
|
||||
/**
|
||||
* Move stored files
|
||||
*
|
||||
* @param int $offset This will be sent starting with 0, increasing to get all files stored by this extension
|
||||
* @param int $storageConfiguration New storage configuration ID
|
||||
* @param int|NULL $oldConfiguration Old storage configuration ID
|
||||
* @throws \UnderflowException When file record doesn't exist. Indicating there are no more files to move
|
||||
* @return void|int An offset integer to use on the next cycle, or nothing
|
||||
*/
|
||||
public function move( $offset, $storageConfiguration, $oldConfiguration=NULL )
|
||||
{
|
||||
\IPS\File::get( $oldConfiguration ?: '{app}_{class}', ... )->move( $storageConfiguration );
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a file is valid
|
||||
*
|
||||
* @param \IPS\Http\Url $file The file to check
|
||||
* @return bool
|
||||
*/
|
||||
public function isValidFile( $file )
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete all stored files
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function delete()
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,76 @@
|
||||
<?php
|
||||
/**
|
||||
* @brief Front Navigation Extension: {class}
|
||||
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
|
||||
* @copyright (c) 2001 - SVN_YYYY Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/legal/standards/
|
||||
* @package IPS Social Suite
|
||||
{subpackage}
|
||||
* @since {date}
|
||||
* @version SVN_VERSION_NUMBER
|
||||
*/
|
||||
|
||||
namespace IPS\{app}\extensions\core\FrontNavigation;
|
||||
|
||||
/* 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;
|
||||
}
|
||||
|
||||
/**
|
||||
* Front Navigation Extension: {class}
|
||||
*/
|
||||
class _{class}
|
||||
{
|
||||
/**
|
||||
* Can access?
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function canView()
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get Title
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function title()
|
||||
{
|
||||
return \IPS\Member::loggedIn()->language()->addToStack('frontnavigation_{app}');
|
||||
}
|
||||
|
||||
/**
|
||||
* Get Link
|
||||
*
|
||||
* @return \IPS\Http\Url
|
||||
*/
|
||||
public function link()
|
||||
{
|
||||
return \IPS\Http\Url::internal( "app={app}" );
|
||||
}
|
||||
|
||||
/**
|
||||
* Is Active?
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function active()
|
||||
{
|
||||
return \IPS\Dispatcher::i()->application->directory === '{app}';
|
||||
}
|
||||
|
||||
/**
|
||||
* Children
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function children()
|
||||
{
|
||||
return array();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,50 @@
|
||||
<?php
|
||||
/**
|
||||
* @brief Admin CP Group Form
|
||||
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
|
||||
* @copyright (c) 2001 - SVN_YYYY Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/legal/standards/
|
||||
* @package IPS Social Suite
|
||||
{subpackage}
|
||||
* @since {date}
|
||||
* @version SVN_VERSION_NUMBER
|
||||
*/
|
||||
|
||||
namespace IPS\{app}\extensions\core\GroupForm;
|
||||
|
||||
/* 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;
|
||||
}
|
||||
|
||||
/**
|
||||
* Admin CP Group Form
|
||||
*/
|
||||
class _{class}
|
||||
{
|
||||
/**
|
||||
* Process Form
|
||||
*
|
||||
* @param \IPS\Form\Tabbed $form The form
|
||||
* @param \IPS\Member\Group $group Existing Group
|
||||
* @return void
|
||||
*/
|
||||
public function process( &$form, $group )
|
||||
{
|
||||
$form->add( new \IPS\Helpers\Form\Text( 'example' ) );
|
||||
}
|
||||
|
||||
/**
|
||||
* Save
|
||||
*
|
||||
* @param array $values Values from form
|
||||
* @param \IPS\Member\Group $group The group
|
||||
* @return void
|
||||
*/
|
||||
public function save( $values, &$group )
|
||||
{
|
||||
$group->example = $values['example'];
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,44 @@
|
||||
<?php
|
||||
/**
|
||||
* @brief Group Limits
|
||||
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
|
||||
* @copyright (c) 2001 - SVN_YYYY Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/legal/standards/
|
||||
* @package IPS Social Suite
|
||||
{subpackage}
|
||||
* @since {date}
|
||||
* @version SVN_VERSION_NUMBER
|
||||
*/
|
||||
|
||||
namespace IPS\{app}\extensions\core\GroupLimits;
|
||||
|
||||
/* 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;
|
||||
}
|
||||
|
||||
/**
|
||||
* Group Limits
|
||||
*
|
||||
* This extension is used to define which limit values "win" when a user has secondary groups defined
|
||||
*
|
||||
*/
|
||||
class _{class}
|
||||
{
|
||||
/**
|
||||
* Get group limits by priority
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function getLimits()
|
||||
{
|
||||
return array (
|
||||
'exclude' => array(),
|
||||
'lessIsMore' => array(),
|
||||
'neg1IsBest' => array(),
|
||||
'zeroIsBest' => array(),
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,55 @@
|
||||
<?php
|
||||
/**
|
||||
* @brief Incoming Email Handler
|
||||
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
|
||||
* @copyright (c) 2001 - SVN_YYYY Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/legal/standards/
|
||||
* @package IPS Social Suite
|
||||
{subpackage}
|
||||
* @since {date}
|
||||
* @version SVN_VERSION_NUMBER
|
||||
*/
|
||||
|
||||
namespace IPS\{app}\extensions\core\IncomingEmail;
|
||||
|
||||
/* 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;
|
||||
}
|
||||
|
||||
/**
|
||||
* Incoming Email Handler
|
||||
*/
|
||||
class _{class}
|
||||
{
|
||||
/**
|
||||
* Handle email
|
||||
*
|
||||
* @param \IPS\Email\Incoming $email The email
|
||||
* @return bool
|
||||
*/
|
||||
public function process( \IPS\Email\Incoming $email )
|
||||
{
|
||||
if ( ... )
|
||||
{
|
||||
// Do something with the email...
|
||||
|
||||
/* Save attachments */
|
||||
foreach ( $files as $file )
|
||||
{
|
||||
$attachment = $file->makeAttachment('');
|
||||
|
||||
\IPS\Db::i()->insert( 'core_attachments_map', array(
|
||||
'attachment_id' => $attachment['attach_id'],
|
||||
'location_key' => ...,
|
||||
'id1' => ...,
|
||||
'id2' => ...,
|
||||
) );
|
||||
}
|
||||
}
|
||||
|
||||
return FALSE; // Must return false if not processing
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,71 @@
|
||||
<?php
|
||||
/**
|
||||
* @brief IP Address Lookup extension
|
||||
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
|
||||
* @copyright (c) 2001 - SVN_YYYY Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/legal/standards/
|
||||
* @package IPS Social Suite
|
||||
{subpackage}
|
||||
* @since {date}
|
||||
* @version SVN_VERSION_NUMBER
|
||||
*/
|
||||
|
||||
namespace IPS\{app}\extensions\core\IpAddresses;
|
||||
|
||||
/* 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;
|
||||
}
|
||||
|
||||
/**
|
||||
* IP Address Lookup extension
|
||||
*/
|
||||
class _{class}
|
||||
{
|
||||
/**
|
||||
* Find Records by IP
|
||||
*
|
||||
* @param string $ip The IP Address
|
||||
* @param \IPS\Http\Url $baseUrl URL table will be displayed on or NULL to return a count
|
||||
* @return \IPS\Helpers\Table|int|null
|
||||
*/
|
||||
public function findByIp( $ip, \IPS\Http\Url $baseUrl = NULL )
|
||||
{
|
||||
/* Return count */
|
||||
if ( $baseUrl === NULL )
|
||||
{
|
||||
return \IPS\Db::i()->select( 'COUNT(*)', 'database_table_name', array( "ip_address LIKE CONCAT( ?, '%' )", $ip ) )->first();
|
||||
}
|
||||
|
||||
/* Init Table */
|
||||
// Replace database_table_name with the database table
|
||||
$table = new \IPS\Helpers\Table\Db( 'database_table_name', $baseUrl, array( "ip_address LIKE CONCAT( ?, '%' )", $ip ) );
|
||||
|
||||
/* Return */
|
||||
return (string) $table;
|
||||
}
|
||||
|
||||
/**
|
||||
* Find IPs by Member
|
||||
*
|
||||
* @code
|
||||
return array(
|
||||
'::1' => array(
|
||||
'ip' => '::1'// string (IP Address)
|
||||
'count' => ... // int (number of times this member has used this IP)
|
||||
'first' => ... // int (timestamp of first use)
|
||||
'last' => ... // int (timestamp of most recent use)
|
||||
),
|
||||
...
|
||||
);
|
||||
* @endcode
|
||||
* @param \IPS\Member $member The member
|
||||
* @return array|NULL
|
||||
*/
|
||||
public function findByMember( $member )
|
||||
{
|
||||
return array();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,58 @@
|
||||
<?php
|
||||
/**
|
||||
* @brief ACP Live Search Extension
|
||||
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
|
||||
* @copyright (c) 2001 - SVN_YYYY Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/legal/standards/
|
||||
* @package IPS Social Suite
|
||||
{subpackage}
|
||||
* @since {date}
|
||||
* @version SVN_VERSION_NUMBER
|
||||
*/
|
||||
|
||||
namespace IPS\{app}\extensions\core\LiveSearch;
|
||||
|
||||
/* 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;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief ACP Live Search Extension
|
||||
*/
|
||||
class _{class}
|
||||
{
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
/* Check Permissions */
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the search results
|
||||
*
|
||||
* @param string Search Term
|
||||
* @return array Array of results
|
||||
*/
|
||||
public function getResults( $searchTerm )
|
||||
{
|
||||
return array();
|
||||
}
|
||||
|
||||
/**
|
||||
* Check we have access
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function hasAccess()
|
||||
{
|
||||
/* Check Permissions */
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,68 @@
|
||||
<?php
|
||||
/**
|
||||
* @brief Admin CP Member Form
|
||||
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
|
||||
* @copyright (c) 2001 - SVN_YYYY Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/legal/standards/
|
||||
* @package IPS Social Suite
|
||||
{subpackage}
|
||||
* @since {date}
|
||||
* @version SVN_VERSION_NUMBER
|
||||
*/
|
||||
|
||||
namespace IPS\{app}\extensions\core\MemberForm;
|
||||
|
||||
/* 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;
|
||||
}
|
||||
|
||||
/**
|
||||
* Admin CP Member Form
|
||||
*/
|
||||
class _{class}
|
||||
{
|
||||
/**
|
||||
* Action Buttons
|
||||
*
|
||||
* @param \IPS\Member $member The Member
|
||||
* @return array
|
||||
*/
|
||||
public function actionButtons( $member )
|
||||
{
|
||||
return array(
|
||||
'id' => array(
|
||||
'title' => 'title',
|
||||
'icon' => 'cog',
|
||||
'link' => \IPS\Http\Url::internal( "app={app}&module=&controller=&do=&id={$member->member_id}" ),
|
||||
'class' => ''
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Process Form
|
||||
*
|
||||
* @param \IPS\Form\Tabbed $form The form
|
||||
* @param \IPS\Member $member Existing Member
|
||||
* @return void
|
||||
*/
|
||||
public function process( &$form, $member )
|
||||
{
|
||||
$form->add( new \IPS\Helpers\Form\Text( 'example' ) );
|
||||
}
|
||||
|
||||
/**
|
||||
* Save
|
||||
*
|
||||
* @param array $values Values from form
|
||||
* @param \IPS\Member $member The member
|
||||
* @return void
|
||||
*/
|
||||
public function save( $values, &$member )
|
||||
{
|
||||
$member->example = $values['example'];
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,128 @@
|
||||
<?php
|
||||
/**
|
||||
* @brief Member Sync
|
||||
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
|
||||
* @copyright (c) 2001 - SVN_YYYY Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/legal/standards/
|
||||
* @package IPS Social Suite
|
||||
{subpackage}
|
||||
* @since {date}
|
||||
* @version SVN_VERSION_NUMBER
|
||||
*/
|
||||
|
||||
namespace IPS\{app}\extensions\core\MemberSync;
|
||||
|
||||
/* 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;
|
||||
}
|
||||
|
||||
/**
|
||||
* Member Sync
|
||||
*/
|
||||
class _{class}
|
||||
{
|
||||
/**
|
||||
* Member account has been created
|
||||
*
|
||||
* @param $member \IPS\Member New member account
|
||||
* @return void
|
||||
*/
|
||||
public function onCreateAccount( $member )
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Member has validated
|
||||
*
|
||||
* @param \IPS\Member $member Member validated
|
||||
* @return void
|
||||
*/
|
||||
public function onValidate( $member )
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Member has logged on
|
||||
*
|
||||
* @param \IPS\Member $member Member that logged in
|
||||
* @param \IPS\Http\Url $redirectUrl The URL to send the user back to
|
||||
* @return void
|
||||
*/
|
||||
public function onLogin( $member, $returnUrl )
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Member has logged out
|
||||
*
|
||||
* @param \IPS\Member $member Member that logged out
|
||||
* @param \IPS\Http\Url $redirectUrl The URL to send the user back to
|
||||
* @return void
|
||||
*/
|
||||
public function onLogout( $member, $returnUrl )
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Member account has been updated
|
||||
*
|
||||
* @param $member \IPS\Member Member updating profile
|
||||
* @param $changes array The changes
|
||||
* @return void
|
||||
*/
|
||||
public function onProfileUpdate( $member, $changes )
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Member is flagged as spammer
|
||||
*
|
||||
* @param $member \IPS\Member The member
|
||||
* @return void
|
||||
*/
|
||||
public function onSetAsSpammer( $member )
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Member is unflagged as spammer
|
||||
*
|
||||
* @param $member \IPS\Member The member
|
||||
* @return void
|
||||
*/
|
||||
public function onUnSetAsSpammer( $member )
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Member is merged with another member
|
||||
*
|
||||
* @param \IPS\Member $member Member being kept
|
||||
* @param \IPS\Member $member2 Member being removed
|
||||
* @return void
|
||||
*/
|
||||
public function onMerge( $member, $member2 )
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Member is deleted
|
||||
*
|
||||
* @param $member \IPS\Member The member
|
||||
* @return void
|
||||
*/
|
||||
public function onDelete( $member )
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
<?php
|
||||
/**
|
||||
* @brief Moderator Control Panel Extension: {class}
|
||||
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
|
||||
* @copyright (c) 2001 - SVN_YYYY Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/legal/standards/
|
||||
* @package IPS Social Suite
|
||||
{subpackage}
|
||||
* @since {date}
|
||||
* @version SVN_VERSION_NUMBER
|
||||
*/
|
||||
|
||||
namespace IPS\{app}\extensions\core\ModCp;
|
||||
|
||||
/* 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;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Moderator Control Panel Extension: {class}
|
||||
*/
|
||||
class _{class}
|
||||
{
|
||||
/**
|
||||
* Returns the primary tab key for the navigation bar
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getTab()
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Manage
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function manage()
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,44 @@
|
||||
<?php
|
||||
/**
|
||||
* @brief Moderator Control Panel Member Management Extension: {class}
|
||||
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
|
||||
* @copyright (c) 2001 - SVN_YYYY Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/legal/standards/
|
||||
* @package IPS Social Suite
|
||||
{subpackage}
|
||||
* @since {date}
|
||||
* @version SVN_VERSION_NUMBER
|
||||
*/
|
||||
|
||||
namespace IPS\{app}\extensions\core\ModCpMemberManagement;
|
||||
|
||||
/* 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;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Moderator Control Panel Member Management Extension: {class}
|
||||
*/
|
||||
class _{class}
|
||||
{
|
||||
/**
|
||||
* Returns the tab key for the navigation bar
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getTab()
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Get content to display
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function manage()
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,71 @@
|
||||
<?php
|
||||
/**
|
||||
* @brief Moderator Permissions
|
||||
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
|
||||
* @copyright (c) 2001 - SVN_YYYY Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/legal/standards/
|
||||
* @package IPS Social Suite
|
||||
{subpackage}
|
||||
* @since {date}
|
||||
* @version SVN_VERSION_NUMBER
|
||||
*/
|
||||
|
||||
namespace IPS\{app}\extensions\core\ModeratorPermissions;
|
||||
|
||||
/* 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;
|
||||
}
|
||||
|
||||
/**
|
||||
* Moderator Permissions
|
||||
*/
|
||||
class _{class}
|
||||
{
|
||||
/**
|
||||
* Get Permissions
|
||||
*
|
||||
* @code
|
||||
return array(
|
||||
'key' => 'YesNo', // Can just return a string with type
|
||||
'key' => array( // Or an array for more options
|
||||
'YesNo', // Type
|
||||
array( ... ), // Options (as defined by type's class)
|
||||
'prefix', // Prefix
|
||||
'suffix', // Suffix
|
||||
),
|
||||
...
|
||||
);
|
||||
* @endcode
|
||||
* @return array
|
||||
*/
|
||||
public function getPermissions()
|
||||
{
|
||||
return array();
|
||||
}
|
||||
|
||||
/**
|
||||
* After change
|
||||
*
|
||||
* @param array $moderator The moderator
|
||||
* @param array $changed Values that were changed
|
||||
* @return void
|
||||
*/
|
||||
public function onChange( $moderator, $changed )
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* After delete
|
||||
*
|
||||
* @param array $moderator The moderator
|
||||
* @return void
|
||||
*/
|
||||
public function onDelete( $moderator )
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,74 @@
|
||||
<?php
|
||||
/**
|
||||
* @brief Notification Options
|
||||
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
|
||||
* @copyright (c) 2001 - SVN_YYYY Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/legal/standards/
|
||||
* @package IPS Social Suite
|
||||
{subpackage}
|
||||
* @since {date}
|
||||
* @version SVN_VERSION_NUMBER
|
||||
*/
|
||||
|
||||
namespace IPS\{app}\extensions\core\Notifications;
|
||||
|
||||
/* 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;
|
||||
}
|
||||
|
||||
/**
|
||||
* Notification Options
|
||||
*/
|
||||
class _{class}
|
||||
{
|
||||
/**
|
||||
* Get configuration
|
||||
*
|
||||
* @param \IPS\Member $member The member
|
||||
* @return array
|
||||
*/
|
||||
public function getConfiguration( $member )
|
||||
{
|
||||
// Basically just return a list of the keys for the types of notification your app will send
|
||||
// keys can be anything you want. You can specify what should be the default value and any disabled values (acceptable values are "email" and "inline")
|
||||
// For each key, create a language string "notifications__<key>" which is what will display in the user's Notification Options screen
|
||||
|
||||
return array(
|
||||
'key' => array( 'default' => array( 'email' ), 'disabled' => array() ),
|
||||
);
|
||||
}
|
||||
|
||||
// For each type of notification you need a method like this which controls what will be displayed when the user clicks on the notification icon in the header:
|
||||
// Note that for each type of notification you must *also* create email templates. See documentation for details: https://remoteservices.invisionpower.com/docs/devdocs-notifications
|
||||
|
||||
/**
|
||||
* Parse notification: key
|
||||
*
|
||||
* @param \IPS\Notification\Inline $notification The notification
|
||||
* @return array
|
||||
* @code
|
||||
return array(
|
||||
'title' => "Mark has replied to A Topic", // The notification title
|
||||
'url' => new \IPS\Http\Url( ... ), // The URL the notification should link to
|
||||
'content' => "Lorem ipsum dolar sit", // [Optional] Any appropriate content. Do not format this like an email where the text
|
||||
// explains what the notification is about - just include any appropriate content.
|
||||
// For example, if the notification is about a post, set this as the body of the post.
|
||||
'author' => \IPS\Member::load( 1 ), // [Optional] The user whose photo should be displayed for this notification
|
||||
);
|
||||
* @endcode
|
||||
*/
|
||||
public function parse_key( \IPS\Notification\Inline $notification )
|
||||
{
|
||||
return array(
|
||||
'title' => "Mark has replied to A Topic", // The notification title
|
||||
'url' => new \IPS\Http\Url( ... ), // The URL the notification should link to
|
||||
'content' => "Lorem ipsum dolar sit", // [Optional] Any appropriate content. Do not format this like an email where the text
|
||||
// explains what the notification is about - just include any appropriate content.
|
||||
// For example, if the notification is about a post, set this as the body of the post.
|
||||
'author' => \IPS\Member::load( 1 ), // [Optional] The user whose photo should be displayed for this notification
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
<?php
|
||||
/**
|
||||
* @brief Template Plugin
|
||||
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
|
||||
* @copyright (c) 2001 - SVN_YYYY Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/legal/standards/
|
||||
* @package IPS Social Suite
|
||||
{subpackage}
|
||||
* @since {date}
|
||||
* @version SVN_VERSION_NUMBER
|
||||
*/
|
||||
|
||||
namespace IPS\{app}\extensions\core\OutputPlugins;
|
||||
|
||||
/* 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;
|
||||
}
|
||||
|
||||
/**
|
||||
* Template Plugin
|
||||
*/
|
||||
class _{class}
|
||||
{
|
||||
/**
|
||||
* @brief Can be used when compiling CSS
|
||||
*/
|
||||
public static $canBeUsedInCss = FALSE;
|
||||
|
||||
/**
|
||||
* Run the plug-in
|
||||
*
|
||||
* @param string $data The initial data from the tag
|
||||
* @param array $options Array of options
|
||||
* @return string Code to eval
|
||||
*/
|
||||
public static function runPlugin( $data, $options )
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
<?php
|
||||
/**
|
||||
* @brief Permissions
|
||||
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
|
||||
* @copyright (c) 2001 - SVN_YYYY Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/legal/standards/
|
||||
* @package IPS Social Suite
|
||||
{subpackage}
|
||||
* @since {date}
|
||||
* @version SVN_VERSION_NUMBER
|
||||
*/
|
||||
|
||||
namespace IPS\{app}\extensions\core\Permissions;
|
||||
|
||||
/* 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;
|
||||
}
|
||||
|
||||
/**
|
||||
* Permissions
|
||||
*/
|
||||
class _{class}
|
||||
{
|
||||
/**
|
||||
* Get node classes
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function getNodeClasses()
|
||||
{
|
||||
return array();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,62 @@
|
||||
<?php
|
||||
/**
|
||||
* @brief Profile extension: {class}
|
||||
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
|
||||
* @copyright (c) 2001 - SVN_YYYY Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/legal/standards/
|
||||
* @package IPS Social Suite
|
||||
{subpackage}
|
||||
* @since {date}
|
||||
* @version SVN_VERSION_NUMBER
|
||||
*/
|
||||
|
||||
namespace IPS\{app}\extensions\core\Profile;
|
||||
|
||||
/* 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;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Profile extension: {class}
|
||||
*/
|
||||
class _{class}
|
||||
{
|
||||
/**
|
||||
* Member
|
||||
*/
|
||||
protected $member;
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param \IPS\Member $member Member whose profile we are viewing
|
||||
* @return void
|
||||
*/
|
||||
public function __construct( \IPS\Member $member )
|
||||
{
|
||||
$this->member = $member;
|
||||
}
|
||||
|
||||
/**
|
||||
* Is there content to display?
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function showTab()
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/**
|
||||
* Display
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function render()
|
||||
{
|
||||
return 'content to display';
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,52 @@
|
||||
<?php
|
||||
/**
|
||||
* @brief Background Task
|
||||
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
|
||||
* @copyright (c) 2001 - SVN_YYYY Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/legal/standards/
|
||||
* @package IPS Social Suite
|
||||
{subpackage}
|
||||
* @since {date}
|
||||
* @version SVN_VERSION_NUMBER
|
||||
*/
|
||||
|
||||
namespace IPS\{app}\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 _{class}
|
||||
{
|
||||
/**
|
||||
* Run Background Task
|
||||
*
|
||||
* @param mixed $data Data as it was passed to \IPS\Task::queue()
|
||||
* @param int $offset Offset
|
||||
* @return int|null New offset or NULL if complete
|
||||
* @throws \OutOfRangeException Indicates offset doesn't exist and thus task is complete
|
||||
*/
|
||||
public function run( $data, $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 explaning task and percentage complete
|
||||
* @throws \OutOfRangeException Indicates offset doesn't exist and thus task is complete
|
||||
*/
|
||||
public function getProgress( $data, $offset )
|
||||
{
|
||||
return array( 'text' => 'Doing something...', 'complete' => 50 );
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,71 @@
|
||||
<?php
|
||||
/**
|
||||
* @brief Support {class} in sitemaps
|
||||
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
|
||||
* @copyright (c) 2001 - SVN_YYYY Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/legal/standards/
|
||||
* @package IPS Social Suite
|
||||
{subpackage}
|
||||
* @since {date}
|
||||
* @version SVN_VERSION_NUMBER
|
||||
*/
|
||||
|
||||
namespace IPS\{app}\extensions\core\Sitemap;
|
||||
|
||||
/* 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;
|
||||
}
|
||||
|
||||
/**
|
||||
* Support {class} in sitemaps
|
||||
*/
|
||||
class _{class}
|
||||
{
|
||||
/**
|
||||
* @brief Recommended Settings
|
||||
*/
|
||||
public $recommendedSettings = array();
|
||||
|
||||
/**
|
||||
* Add settings for ACP configuration to the form
|
||||
*
|
||||
* @param IPS\Helpers\Form $form Form to add any settings to
|
||||
* @return void
|
||||
*/
|
||||
public function settings( &$form )
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Check to see if any settings this extension provides options for have been modified from their default values
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function hasModifiedSettings()
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the sitemap filename(s)
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function getFilenames()
|
||||
{
|
||||
return array( 'sitemap_' . mb_strtolower('{class}') );
|
||||
}
|
||||
|
||||
/**
|
||||
* Generate the sitemap
|
||||
*
|
||||
* @param string $filename The sitemap file to build (should be one returned from getFilenames())
|
||||
* @param \IPS\Sitemap $sitemap Sitemap object reference
|
||||
* @return void
|
||||
*/
|
||||
public function generateSitemap( $filename, $sitemap )
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,46 @@
|
||||
<?php
|
||||
/**
|
||||
* @brief Uninstall callback
|
||||
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
|
||||
* @copyright (c) 2001 - SVN_YYYY Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/legal/standards/
|
||||
* @package IPS Social Suite
|
||||
{subpackage}
|
||||
* @since {date}
|
||||
* @version SVN_VERSION_NUMBER
|
||||
*/
|
||||
|
||||
namespace IPS\{app}\extensions\core\Uninstall;
|
||||
|
||||
/* 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;
|
||||
}
|
||||
|
||||
/**
|
||||
* Uninstall callback
|
||||
*/
|
||||
class _{class}
|
||||
{
|
||||
/**
|
||||
* Code to execute before the application has been uninstalled
|
||||
*
|
||||
* @param string $application Application directory
|
||||
* @return array
|
||||
*/
|
||||
public function preUninstall( $application )
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Code to execute after the application has been uninstalled
|
||||
*
|
||||
* @param string $application Application directory
|
||||
* @return array
|
||||
*/
|
||||
public function postUninstall( $application )
|
||||
{
|
||||
}
|
||||
}
|
||||
Whitespace-only changes.
Whitespace-only changes.
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,362 @@
|
||||
/**
|
||||
* Friendly URL Structure
|
||||
*
|
||||
* For each value in the $furl array:
|
||||
* The key should be the "SEO Template" - an identifier which you'll use when displaying a URL.
|
||||
* The value should be an associative array with two or three elements: 'friendly' and 'real', and optionally 'verify':
|
||||
* 'friendly'
|
||||
* The friendly URL to use - encase variables in {curly braces} containing a symbol, followed by the name of the parameter that matches in the "real" URL
|
||||
* The symbol should be # for numbers or @ for strings
|
||||
* For example, if the "real" URL contains id=XXX, where XXX is a number, you should include {#id} somewhere in the friendly URL.
|
||||
* You can also use the tag {?} for the "SEO Title" (that is, any variables that shouldn't be part of the real URL, such as the name of the topipc being viewed).
|
||||
* If you want to support more than one SEO Title, you can give them zero-indexed keys like so: {?0} {?1} {?2}
|
||||
* 'real'
|
||||
* This should be the base of the real URL. You should not include parameters which will be parsed out from the friendly URL.
|
||||
* 'verify'
|
||||
* This should be the name of a class that contains a loadFromUrl() and an url() method. The dynamic URL (i.e. app=core&...) will be passed to loadFromUrl(), and the url()
|
||||
* method will subsequently be called to retrieve the correct URL, ideal with ActiveRecord pattern classes.
|
||||
*
|
||||
* IMPORTANT: Ensure values are listed with the most specific ones first. This is to ensure that non-FURL redirects are done correctly. For example, if you have these FURLs:
|
||||
* /index.php?app=myapp&module=mymodule&controller=mycontroller&do=myaction -> /myfolder/myaction
|
||||
* /index.php?app=myapp&module=mymodule&controller=mycontroller -> /myfolder
|
||||
* They must be provided in that order, otherwise the former will redirec to /myfolder/?do=myaction rather than /myfolder/myaction
|
||||
*/
|
||||
{
|
||||
"topLevel": "",
|
||||
"pages": {
|
||||
|
||||
/* Login */
|
||||
"login": {
|
||||
"friendly": "login",
|
||||
"real": "app=core&module=system&controller=login"
|
||||
},
|
||||
"logout": {
|
||||
"friendly": "logout",
|
||||
"real": "app=core&module=system&controller=login&do=logout"
|
||||
},
|
||||
"lostpassword": {
|
||||
"friendly": "lostpassword",
|
||||
"real": "app=core&module=system&controller=lostpass"
|
||||
},
|
||||
|
||||
/* User CP */
|
||||
"settings_email": {
|
||||
"friendly": "settings/email",
|
||||
"real": "app=core&module=system&controller=settings&area=email"
|
||||
},
|
||||
"settings_password": {
|
||||
"friendly": "settings/password",
|
||||
"real": "app=core&module=system&controller=settings&area=password"
|
||||
},
|
||||
"settings_username": {
|
||||
"friendly": "settings/username",
|
||||
"real": "app=core&module=system&controller=settings&area=username"
|
||||
},
|
||||
"settings_signature": {
|
||||
"friendly": "settings/signature",
|
||||
"real": "app=core&module=system&controller=settings&area=signature"
|
||||
},
|
||||
"settings_Facebook": {
|
||||
"friendly": "settings/facebook",
|
||||
"real": "app=core&module=system&controller=settings&area=profilesync&service=Facebook"
|
||||
},
|
||||
"settings_Google": {
|
||||
"friendly": "settings/google",
|
||||
"real": "app=core&module=system&controller=settings&area=profilesync&service=Google"
|
||||
},
|
||||
"settings_LinkedIn": {
|
||||
"friendly": "settings/linkedin",
|
||||
"real": "app=core&module=system&controller=settings&area=profilesync&service=LinkedIn"
|
||||
},
|
||||
"settings_Microsoft": {
|
||||
"friendly": "settings/microsoft",
|
||||
"real": "app=core&module=system&controller=settings&area=profilesync&service=Microsoft"
|
||||
},
|
||||
"settings_Twitter": {
|
||||
"friendly": "settings/twitter",
|
||||
"real": "app=core&module=system&controller=settings&area=profilesync&service=Twitter"
|
||||
},
|
||||
"settings": {
|
||||
"friendly": "settings",
|
||||
"real": "app=core&module=system&controller=settings"
|
||||
},
|
||||
"unsubscribe": {
|
||||
"friendly": "unsubscribe",
|
||||
"real": "app=core&module=system&controller=unsubscribe"
|
||||
},
|
||||
"privacy": {
|
||||
"friendly": "privacy",
|
||||
"real": "app=core&module=system&controller=privacy",
|
||||
"alias": "privacypolicy"
|
||||
},
|
||||
"register": {
|
||||
"friendly": "register",
|
||||
"real": "app=core&module=system&controller=register"
|
||||
},
|
||||
"attachments": {
|
||||
"friendly": "attachments",
|
||||
"real": "app=core&module=system&controller=attachments"
|
||||
},
|
||||
|
||||
/* Messenger */
|
||||
"messenger_compose": {
|
||||
"friendly": "messenger/compose",
|
||||
"real": "app=core&module=messaging&controller=messenger&do=compose"
|
||||
},
|
||||
"messenger_convo": {
|
||||
"friendly": "messenger/{#id}",
|
||||
"real": "app=core&module=messaging&controller=messenger"
|
||||
},
|
||||
"messenger_unread": {
|
||||
"friendly": "messenger/unread",
|
||||
"real": "app=core&module=messaging&controller=messenger&folder=unread"
|
||||
},
|
||||
"messenger_drafts": {
|
||||
"friendly": "messenger/drafts",
|
||||
"real": "app=core&module=messaging&controller=messenger&folder=drafts"
|
||||
},
|
||||
"messaging": {
|
||||
"friendly": "messenger",
|
||||
"real": "app=core&module=messaging&controller=messenger"
|
||||
},
|
||||
|
||||
/* Profiles */
|
||||
"warn_add": {
|
||||
"friendly": "profile/{#id}-{?}/warnings/add",
|
||||
"real": "app=core&module=system&controller=warnings&do=warn",
|
||||
"seoTitles": [
|
||||
{
|
||||
"class": "\\IPS\\Member",
|
||||
"queryParam": "id",
|
||||
"property": "members_seo_name"
|
||||
}
|
||||
]
|
||||
},
|
||||
"warn_view": {
|
||||
"friendly": "profile/{#id}-{?}/warnings/{#w}",
|
||||
"real": "app=core&module=system&controller=warnings&do=view",
|
||||
"verify": "\\IPS\\core\\Warnings\\Warning"
|
||||
},
|
||||
"warn_list": {
|
||||
"friendly": "profile/{#id}-{?}/warnings",
|
||||
"real": "app=core&module=system&controller=warnings",
|
||||
"seoTitles": [
|
||||
{
|
||||
"class": "\\IPS\\Member",
|
||||
"queryParam": "id",
|
||||
"property": "members_seo_name"
|
||||
}
|
||||
]
|
||||
},
|
||||
"profile_content": {
|
||||
"friendly": "profile/{#id}-{?}/content",
|
||||
"real": "app=core&module=members&controller=profile&do=content",
|
||||
"seoTitles": [
|
||||
{
|
||||
"class": "\\IPS\\Member",
|
||||
"queryParam": "id",
|
||||
"property": "members_seo_name"
|
||||
}
|
||||
]
|
||||
},
|
||||
"profile_reputation": {
|
||||
"friendly": "profile/{#id}-{?}/reputation",
|
||||
"real": "app=core&module=members&controller=profile&do=reputation",
|
||||
"seoTitles": [
|
||||
{
|
||||
"class": "\\IPS\\Member",
|
||||
"queryParam": "id",
|
||||
"property": "members_seo_name"
|
||||
}
|
||||
]
|
||||
},
|
||||
"edit_profile": {
|
||||
"friendly": "profile/{#id}-{?}/edit",
|
||||
"real": "app=core&module=members&controller=profile&do=edit",
|
||||
"seoTitles": [
|
||||
{
|
||||
"class": "\\IPS\\Member",
|
||||
"queryParam": "id",
|
||||
"property": "members_seo_name"
|
||||
}
|
||||
]
|
||||
},
|
||||
"edit_profile_photo": {
|
||||
"friendly": "profile/{#id}-{?}/photo",
|
||||
"real": "app=core&module=members&controller=profile&do=editPhoto",
|
||||
"seoTitles": [
|
||||
{
|
||||
"class": "\\IPS\\Member",
|
||||
"queryParam": "id",
|
||||
"property": "members_seo_name"
|
||||
}
|
||||
]
|
||||
},
|
||||
"flag_as_spammer": {
|
||||
"friendly": "profile/{#id}-{?}/spammer",
|
||||
"real": "app=core&module=system&controller=moderation&do=flagAsSpammer",
|
||||
"seoTitles": [
|
||||
{
|
||||
"class": "\\IPS\\Member",
|
||||
"queryParam": "id",
|
||||
"property": "members_seo_name"
|
||||
}
|
||||
]
|
||||
},
|
||||
"profile_followers": {
|
||||
"friendly": "profile/{#id}-{?}/followers",
|
||||
"real": "app=core&module=members&controller=profile&do=followers",
|
||||
"seoTitles": [
|
||||
{
|
||||
"class": "\\IPS\\Member",
|
||||
"queryParam": "id",
|
||||
"property": "members_seo_name"
|
||||
}
|
||||
]
|
||||
},
|
||||
"profile": {
|
||||
"friendly": "profile/{#id}-{?}",
|
||||
"real": "app=core&module=members&controller=profile",
|
||||
"verify": "\\IPS\\Member",
|
||||
"alias": "user/{#id}-{?}"
|
||||
},
|
||||
|
||||
/* Status Updates */
|
||||
"status_following": {
|
||||
"friendly": "statuses/following",
|
||||
"real": "app=core&module=status&controller=feed&following=1"
|
||||
},
|
||||
"status": {
|
||||
"friendly": "statuses",
|
||||
"real": "app=core&module=status&controller=feed"
|
||||
},
|
||||
|
||||
/* Mod CP */
|
||||
"modcp_announcements": {
|
||||
"friendly": "modcp/announcements",
|
||||
"real": "app=core&module=modcp&controller=modcp&tab=announcements"
|
||||
},
|
||||
"modcp_report": {
|
||||
"friendly": "modcp/reports/{#id}",
|
||||
"real": "app=core&module=modcp&controller=modcp&tab=reports&action=view"
|
||||
},
|
||||
"modcp": {
|
||||
"friendly": "modcp",
|
||||
"real": "app=core&module=modcp&controller=modcp"
|
||||
},
|
||||
"modcp_members": {
|
||||
"friendly": "modcp/members",
|
||||
"real": "app=core&module=modcp&controller=modcp&tab=members"
|
||||
},
|
||||
"modcp_reports": {
|
||||
"friendly": "modcp/reports",
|
||||
"real": "app=core&module=modcp&controller=modcp&tab=reports"
|
||||
},
|
||||
"modcp_content": {
|
||||
"friendly": "modcp/content",
|
||||
"real": "app=core&module=modcp&controller=modcp&tab=hidden"
|
||||
},
|
||||
"modcp_approval": {
|
||||
"friendly": "modcp/approval-queue",
|
||||
"real": "app=core&module=modcp&controller=modcp&tab=approval"
|
||||
},
|
||||
"modcp_recent_warnings": {
|
||||
"friendly": "modcp/recent-warnings",
|
||||
"real": "app=core&module=modcp&controller=modcp&tab=recent_warnings"
|
||||
},
|
||||
"modcp_ip_tools": {
|
||||
"friendly": "modcp/ip-tools",
|
||||
"real": "app=core&module=modcp&controller=modcp&tab=ip_tools"
|
||||
},
|
||||
|
||||
/* Ignore */
|
||||
"ignore": {
|
||||
"friendly": "ignore",
|
||||
"real": "app=core&module=system&controller=ignore"
|
||||
},
|
||||
|
||||
/* Online Users */
|
||||
"online": {
|
||||
"friendly": "online",
|
||||
"real": "app=core&module=online&controller=online"
|
||||
},
|
||||
|
||||
/* Staff directory */
|
||||
"staffdirectory": {
|
||||
"friendly": "staff",
|
||||
"real": "app=core&module=staffdirectory&controller=directory"
|
||||
},
|
||||
|
||||
/* Guidelines */
|
||||
"guidelines": {
|
||||
"friendly": "guidelines",
|
||||
"real": "app=core&module=system&controller=guidelines"
|
||||
},
|
||||
|
||||
/* Notifications */
|
||||
"notifications_options": {
|
||||
"friendly": "notifications/options",
|
||||
"real": "app=core&module=system&controller=notifications&do=options"
|
||||
},
|
||||
"notifications_rss": {
|
||||
"friendly": "notifications.xml",
|
||||
"real": "app=core&module=system&controller=notifications&format=rss"
|
||||
},
|
||||
"notifications": {
|
||||
"friendly": "notifications",
|
||||
"real": "app=core&module=system&controller=notifications"
|
||||
},
|
||||
"terms": {
|
||||
"friendly": "terms",
|
||||
"real": "app=core&module=system&controller=terms"
|
||||
},
|
||||
"announcement": {
|
||||
"friendly": "announcement/{#id}-{?}",
|
||||
"real": "app=core&module=system&controller=announcement"
|
||||
},
|
||||
"contact": {
|
||||
"friendly": "contact",
|
||||
"real": "app=core&module=contact&controller=contact"
|
||||
},
|
||||
"followed_content": {
|
||||
"friendly": "followed",
|
||||
"real": "app=core&module=system&controller=followed"
|
||||
},
|
||||
|
||||
/* Search */
|
||||
"search": {
|
||||
"friendly": "search",
|
||||
"real": "app=core&module=search&controller=search"
|
||||
},
|
||||
|
||||
/* New Content */
|
||||
"vnc" : {
|
||||
"friendly": "new-content",
|
||||
"real": "app=core&module=system&controller=vnc"
|
||||
},
|
||||
|
||||
/* New Content */
|
||||
"activity" : {
|
||||
"friendly": "activity",
|
||||
"real": "app=core&module=activity&controller=activity"
|
||||
},
|
||||
|
||||
/* Language Selector */
|
||||
"language": {
|
||||
"friendly": "language",
|
||||
"real": "app=core&module=system&controller=language"
|
||||
},
|
||||
|
||||
/* Theme Selector */
|
||||
"theme": {
|
||||
"friendly": "theme",
|
||||
"real": "app=core&module=system&controller=theme"
|
||||
},
|
||||
|
||||
/* Mark site as read */
|
||||
"mark_site_as_read": {
|
||||
"friendly": "markallread",
|
||||
"real": "app=core&module=system&controller=markread"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
[]
|
||||
@@ -0,0 +1,7 @@
|
||||
<ips:template parameters="$message" />
|
||||
<p>
|
||||
<strong>Error</strong>
|
||||
<br>
|
||||
<br>
|
||||
{$message}
|
||||
</p>
|
||||
@@ -0,0 +1,37 @@
|
||||
<ips:template parameters="$output, $title" />
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
|
||||
<title>{$title}</title>
|
||||
<style type="text/css">
|
||||
* { font-family: Helvetica, Arial, sans-serif; font-size: 14px; }
|
||||
body{width:100% !important; -webkit-text-size-adjust:100%; -ms-text-size-adjust:100%; margin:0; padding:0; background-color: #d7d7d7 }
|
||||
a img {border:none;}
|
||||
|
||||
p {margin: 1em 0;}
|
||||
|
||||
a {color: #4a8aca;}
|
||||
|
||||
#strip { background-color: #262e33; height: 35px; padding: 12px; }
|
||||
#logo { height: 25px; font-size: 20px; color: #ffffff; }
|
||||
#logo img { vertical-align: bottom; }
|
||||
#wrapper { width: 800px; margin: 0px auto; background: #ffffff; -webkit-box-shadow: 0px 3px 45px rgba(0,0,0,0.04); box-shadow: 0px 3px 45px rgba(0,0,0,0.04); }
|
||||
#content { line-height: 120%; min-height: 500px; padding: 30px; background: #ffffff; }
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div id='strip'>
|
||||
<div id='logo'>
|
||||
<img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABoAAAAZCAYAAAAv3j5gAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAZZJREFUeNq8lr9Lw0AUx2OETAUhIAiZBMFBKLg4+R8IroKbWCgOxY7+GYIiWAKCjl0rZHKJ4CqCg3RyKBWhQqmLgRK/py/hcn13TWzqFz5D837de7xcasdxbP0HtvWraxDPCZE7LfRozU8/uRdEW5ADnsB6yUVeQBVESUcRqIFxiUVErgPKnY5O6B6cl1hI5HpIfynbUQHdeHZ1KdfE1iX6BPUSuqlTrlQ243QHWjMUaVGOjJKtU7UEnoFXsEgPbICharA1AcM/jrDGFTEVEroFNwWKCN9Aa51yR7mgn2PL+uQ79a7b1pzjAzRydNMgX05bckchODGcqG3opm2IO6bcmUJfYE0TsAIGTJEB2biYVTBKCsnLIC7WK037b6DJPG+SjZMPKuoyhNIpjwyj6Eh+HYPfoeQ3MbpEol3PMMJ3QjcyTxlzyN11FrV7aRjhJqEb2QVw876wO2DfcM30NLY9sGu6GSLGdsadzCCXYlRlPnxBgUCdTsEy8zyQt84BPvOuvILFHH+nHPJV3zGfbNrPROn6FmAANAMI1RO30/8AAAAASUVORK5CYII=" width="26" height="25" />
|
||||
IPS Social Suite
|
||||
</div>
|
||||
</div>
|
||||
<div id='wrapper'>
|
||||
<div id='content'>
|
||||
{$output|raw}
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
Whitespace-only changes.
@@ -0,0 +1,13 @@
|
||||
<ips:template parameters="$url, $message" />
|
||||
<meta http-equiv="refresh" content="2; url={$url}">
|
||||
<p>
|
||||
<strong>$message</strong><br>
|
||||
<br>
|
||||
Please wait while we redirect you
|
||||
</p>
|
||||
<script type="text/javascript">
|
||||
setTimeout( function()
|
||||
{
|
||||
window.location = "{$url}".replace( /&/g, '&' );
|
||||
}, 2000 );
|
||||
</script>
|
||||
Whitespace-only changes.
Whitespace-only changes.
Whitespace-only changes.
File diff suppressed because it is too large.
Load diff
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,130 @@
|
||||
{
|
||||
"admin": {
|
||||
"overview": {
|
||||
"default_controller": "dashboard",
|
||||
"protected": 0
|
||||
},
|
||||
"system": {
|
||||
"default_controller": "login",
|
||||
"protected": 1
|
||||
},
|
||||
"applications": {
|
||||
"default_controller": "applications",
|
||||
"protected": null
|
||||
},
|
||||
"settings": {
|
||||
"default_controller": "general",
|
||||
"protected": null
|
||||
},
|
||||
"members": {
|
||||
"default_controller": "members",
|
||||
"protected": null
|
||||
},
|
||||
"membersettings": {
|
||||
"default_controller": "general",
|
||||
"protected": null
|
||||
},
|
||||
"staff": {
|
||||
"default_controller": "moderators",
|
||||
"protected": null
|
||||
},
|
||||
"customization": {
|
||||
"default_controller": "skins",
|
||||
"protected": null
|
||||
},
|
||||
"languages": {
|
||||
"default_controller": "languages",
|
||||
"protected": null
|
||||
},
|
||||
"editor": {
|
||||
"default_controller": "toolbar",
|
||||
"protected": null
|
||||
},
|
||||
"bulkmail": {
|
||||
"default_controller": "bulkmail",
|
||||
"protected": null
|
||||
},
|
||||
"livesearch": {
|
||||
"default_controller": null,
|
||||
"protected": null
|
||||
},
|
||||
"promotion": {
|
||||
"default_controller": null,
|
||||
"protected": null
|
||||
},
|
||||
"dashboard": {
|
||||
"default_controller": null,
|
||||
"protected": 1
|
||||
},
|
||||
"stats": {
|
||||
"default_controller": null,
|
||||
"protected": null
|
||||
},
|
||||
"support": {
|
||||
"default_controller": null,
|
||||
"protected": 0
|
||||
},
|
||||
"logs": {
|
||||
"default_controller": "admin",
|
||||
"protected": null
|
||||
},
|
||||
"logsettings": {
|
||||
"default_controller": null,
|
||||
"protected": null
|
||||
},
|
||||
"diagnostics": {
|
||||
"default_controller": null,
|
||||
"protected": null
|
||||
}
|
||||
},
|
||||
"front": {
|
||||
"system": {
|
||||
"default_controller": "splash",
|
||||
"protected": 1
|
||||
},
|
||||
"members": {
|
||||
"default_controller": "profile",
|
||||
"protected": 0
|
||||
},
|
||||
"search": {
|
||||
"default_controller": null,
|
||||
"protected": null
|
||||
},
|
||||
"messaging": {
|
||||
"default_controller": "messenger",
|
||||
"protected": null
|
||||
},
|
||||
"online": {
|
||||
"default_controller": "online",
|
||||
"protected": 0
|
||||
},
|
||||
"modcp": {
|
||||
"default_controller": "modcp",
|
||||
"protected": null
|
||||
},
|
||||
"sitemap": {
|
||||
"default_controller": null,
|
||||
"protected": 0
|
||||
},
|
||||
"contact": {
|
||||
"default_controller": null,
|
||||
"protected": 0
|
||||
},
|
||||
"status": {
|
||||
"default_controller": "",
|
||||
"protected": 0
|
||||
},
|
||||
"dashboard": {
|
||||
"default_controller": "dashboard",
|
||||
"protected": 1
|
||||
},
|
||||
"activity": {
|
||||
"default_controller": "",
|
||||
"protected": 0
|
||||
},
|
||||
"staffdirectory": {
|
||||
"default_controller": "directory",
|
||||
"protected": 0
|
||||
}
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,806 @@
|
||||
[
|
||||
{
|
||||
"key": "acp_dashboard_blocks",
|
||||
"default": ""
|
||||
},
|
||||
{
|
||||
"key": "acp_notes",
|
||||
"default": ""
|
||||
},
|
||||
{
|
||||
"key": "acp_notes_updated",
|
||||
"default": ""
|
||||
},
|
||||
{
|
||||
"key": "ads_circulation",
|
||||
"default": "random"
|
||||
},
|
||||
{
|
||||
"key": "ads_exist",
|
||||
"default": "0"
|
||||
},
|
||||
{
|
||||
"key": "allow_creator_vote",
|
||||
"default": "1"
|
||||
},
|
||||
{
|
||||
"key": "allow_gravatars",
|
||||
"default": "0"
|
||||
},
|
||||
{
|
||||
"key": "allow_reg",
|
||||
"default": "1"
|
||||
},
|
||||
{
|
||||
"key": "allow_result_view",
|
||||
"default": "1"
|
||||
},
|
||||
{
|
||||
"key": "attach_allowed_extensions",
|
||||
"default": ""
|
||||
},
|
||||
{
|
||||
"key": "attach_allowed_types",
|
||||
"default": "all"
|
||||
},
|
||||
{
|
||||
"key": "attachment_image_size",
|
||||
"default": "1000x750"
|
||||
},
|
||||
{
|
||||
"key": "attachment_resample_size",
|
||||
"default": "0x0"
|
||||
},
|
||||
{
|
||||
"key": "auto_track_method",
|
||||
"default": "0"
|
||||
},
|
||||
{
|
||||
"key": "autoforum_sub_groups",
|
||||
"default": ""
|
||||
},
|
||||
{
|
||||
"key": "base_url_stored",
|
||||
"default": ""
|
||||
},
|
||||
{
|
||||
"key": "board_name",
|
||||
"default": "IPS Community Suite"
|
||||
},
|
||||
{
|
||||
"key": "bot_antispam_type",
|
||||
"default": "recaptcha"
|
||||
},
|
||||
{
|
||||
"key": "ckeditor_extraPlugins",
|
||||
"default": ""
|
||||
},
|
||||
{
|
||||
"key": "ckeditor_permissions",
|
||||
"default": "{}"
|
||||
},
|
||||
{
|
||||
"key": "ckeditor_toolbars",
|
||||
"default": "{\"desktop\":[{\"name\":\"row1\",\"items\":[\"Bold\",\"Italic\",\"Underline\",\"-\",\"ipsLink\",\"ipsQuote\",\"pbckcode\",\"ipsEmoticon\",\"-\",\"BulletedList\",\"NumberedList\",\"-\",\"JustifyLeft\",\"JustifyCenter\",\"JustifyRight\",\"-\",\"Strike\",\"Superscript\",\"Subscript\",\"-\",\"TextColor\",\"Font\",\"FontSize\"]}],\"tablet\":[{\"name\":\"row1\",\"items\":[\"Bold\",\"Italic\",\"Underline\",\"-\",\"ipsLink\",\"ipsQuote\",\"ipsEmoticon\",\"-\",\"BulletedList\",\"NumberedList\",\"-\",\"JustifyLeft\",\"JustifyCenter\",\"JustifyRight\"]}],\"phone\":[{\"name\":\"row1\",\"items\":[\"Bold\",\"Italic\",\"Underline\",\"-\",\"ipsEmoticon\",\"-\",\"ipsLink\"]}]}"
|
||||
},
|
||||
{
|
||||
"key": "connect_slaves",
|
||||
"default": "0"
|
||||
},
|
||||
{
|
||||
"key": "coppa_address",
|
||||
"default": ""
|
||||
},
|
||||
{
|
||||
"key": "coppa_consent_extra",
|
||||
"default": ""
|
||||
},
|
||||
{
|
||||
"key": "coppa_fax",
|
||||
"default": ""
|
||||
},
|
||||
{
|
||||
"key": "copyright_line",
|
||||
"default": ""
|
||||
},
|
||||
{
|
||||
"key": "diagnostics",
|
||||
"default": "1"
|
||||
},
|
||||
{
|
||||
"key": "disable_anonymous",
|
||||
"default": "0"
|
||||
},
|
||||
{
|
||||
"key": "edit_log",
|
||||
"default": "1"
|
||||
},
|
||||
{
|
||||
"key": "edit_log_prune",
|
||||
"default": "30"
|
||||
},
|
||||
{
|
||||
"key": "edit_log_public",
|
||||
"default": "0"
|
||||
},
|
||||
{
|
||||
"key": "editor_allowed_classes",
|
||||
"default": ""
|
||||
},
|
||||
{
|
||||
"key": "editor_allowed_datacontrollers",
|
||||
"default": ""
|
||||
},
|
||||
{
|
||||
"key": "email_color",
|
||||
"default": "#3f6d98"
|
||||
},
|
||||
{
|
||||
"key": "email_in",
|
||||
"default": ""
|
||||
},
|
||||
{
|
||||
"key": "email_logo",
|
||||
"default": ""
|
||||
},
|
||||
{
|
||||
"key": "email_out",
|
||||
"default": ""
|
||||
},
|
||||
{
|
||||
"key": "error_log",
|
||||
"default": "1"
|
||||
},
|
||||
{
|
||||
"key": "error_log_level",
|
||||
"default": "3"
|
||||
},
|
||||
{
|
||||
"key": "error_notify",
|
||||
"default": "0"
|
||||
},
|
||||
{
|
||||
"key": "error_notify_level",
|
||||
"default": "3"
|
||||
},
|
||||
{
|
||||
"key": "fbc_bot_group",
|
||||
"default": "2"
|
||||
},
|
||||
{
|
||||
"key": "flood_control",
|
||||
"default": "0"
|
||||
},
|
||||
{
|
||||
"key": "furl_configuration",
|
||||
"default": ""
|
||||
},
|
||||
{
|
||||
"key": "gl_guidelines",
|
||||
"default": ""
|
||||
},
|
||||
{
|
||||
"key": "gl_link",
|
||||
"default": ""
|
||||
},
|
||||
{
|
||||
"key": "gl_type",
|
||||
"default": "none"
|
||||
},
|
||||
{
|
||||
"key": "googlemaps",
|
||||
"default": "1"
|
||||
},
|
||||
{
|
||||
"key": "googleplacesautocomplete",
|
||||
"default": "1"
|
||||
},
|
||||
{
|
||||
"key": "guest_captcha",
|
||||
"default": "1"
|
||||
},
|
||||
{
|
||||
"key": "home_url",
|
||||
"default": ""
|
||||
},
|
||||
{
|
||||
"key": "htaccess_mod_rewrite",
|
||||
"default": "0"
|
||||
},
|
||||
{
|
||||
"key": "image_jpg_quality",
|
||||
"default": "75"
|
||||
},
|
||||
{
|
||||
"key": "image_png_quality_gd",
|
||||
"default": "8"
|
||||
},
|
||||
{
|
||||
"key": "image_suite",
|
||||
"default": "gd"
|
||||
},
|
||||
{
|
||||
"key": "ipb_bruteforce_attempts",
|
||||
"default": "3"
|
||||
},
|
||||
{
|
||||
"key": "ipb_bruteforce_period",
|
||||
"default": "15"
|
||||
},
|
||||
{
|
||||
"key": "ipb_bruteforce_unlock",
|
||||
"default": "1"
|
||||
},
|
||||
{
|
||||
"key": "ipb_copy_number",
|
||||
"default": ""
|
||||
},
|
||||
{
|
||||
"key": "ipb_poll_only",
|
||||
"default": "0"
|
||||
},
|
||||
{
|
||||
"key": "ipb_reg_number",
|
||||
"default": ""
|
||||
},
|
||||
{
|
||||
"key": "ipb_url_blacklist",
|
||||
"default": ""
|
||||
},
|
||||
{
|
||||
"key": "ipb_url_filter_option",
|
||||
"default": "none"
|
||||
},
|
||||
{
|
||||
"key": "ipb_url_whitelist",
|
||||
"default": ""
|
||||
},
|
||||
{
|
||||
"key": "ipbseo_ga_enabled",
|
||||
"default": "1"
|
||||
},
|
||||
{
|
||||
"key": "ips_cp_purchase",
|
||||
"default": "0"
|
||||
},
|
||||
{
|
||||
"key": "ipseo_ga",
|
||||
"default": ""
|
||||
},
|
||||
{
|
||||
"key": "ipsgeoip",
|
||||
"default": "1"
|
||||
},
|
||||
{
|
||||
"key": "keycaptcha_privatekey",
|
||||
"default": ""
|
||||
},
|
||||
{
|
||||
"key": "links_external",
|
||||
"default": "1"
|
||||
},
|
||||
{
|
||||
"key": "logins_over_https",
|
||||
"default": "0"
|
||||
},
|
||||
{
|
||||
"key": "lp_method",
|
||||
"default": "random"
|
||||
},
|
||||
{
|
||||
"key": "mail_method",
|
||||
"default": "php"
|
||||
},
|
||||
{
|
||||
"key": "mandrill_api_key",
|
||||
"default": ""
|
||||
},
|
||||
{
|
||||
"key": "mandrill_use_for",
|
||||
"default": "0"
|
||||
},
|
||||
{
|
||||
"key": "mandrill_username",
|
||||
"default": ""
|
||||
},
|
||||
{
|
||||
"key": "match_browser",
|
||||
"default": "0"
|
||||
},
|
||||
{
|
||||
"key": "match_ipaddress",
|
||||
"default": "1"
|
||||
},
|
||||
{
|
||||
"key": "max_poll_choices",
|
||||
"default": "20"
|
||||
},
|
||||
{
|
||||
"key": "max_poll_questions",
|
||||
"default": "3"
|
||||
},
|
||||
{
|
||||
"key": "max_title_length",
|
||||
"default": "255"
|
||||
},
|
||||
{
|
||||
"key": "max_user_name_length",
|
||||
"default": "26"
|
||||
},
|
||||
{
|
||||
"key": "max_video_width",
|
||||
"default": "0"
|
||||
},
|
||||
{
|
||||
"key": "max_video_width_css",
|
||||
"default": "none"
|
||||
},
|
||||
{
|
||||
"key": "merge_concurrent_posts",
|
||||
"default": "0"
|
||||
},
|
||||
{
|
||||
"key": "most_online",
|
||||
"default": "{\"count\":0,\"time\":0}"
|
||||
},
|
||||
{
|
||||
"key": "new_reg_notify",
|
||||
"default": "0"
|
||||
},
|
||||
{
|
||||
"key": "php_mail_extra",
|
||||
"default": ""
|
||||
},
|
||||
{
|
||||
"key": "poll_allow_public",
|
||||
"default": "1"
|
||||
},
|
||||
{
|
||||
"key": "poll_allow_vdelete",
|
||||
"default": "0"
|
||||
},
|
||||
{
|
||||
"key": "pop3_password",
|
||||
"default": ""
|
||||
},
|
||||
{
|
||||
"key": "pop3_port",
|
||||
"default": "995"
|
||||
},
|
||||
{
|
||||
"key": "pop3_server",
|
||||
"default": ""
|
||||
},
|
||||
{
|
||||
"key": "pop3_tls",
|
||||
"default": "1"
|
||||
},
|
||||
{
|
||||
"key": "pop3_user",
|
||||
"default": ""
|
||||
},
|
||||
{
|
||||
"key": "post_titlechange",
|
||||
"default": "500"
|
||||
},
|
||||
{
|
||||
"key": "posts_add_nofollow",
|
||||
"default": "1"
|
||||
},
|
||||
{
|
||||
"key": "posts_add_nofollow_exclude",
|
||||
"default": ""
|
||||
},
|
||||
{
|
||||
"key": "privacy_link",
|
||||
"default": ""
|
||||
},
|
||||
{
|
||||
"key": "privacy_text",
|
||||
"default": ""
|
||||
},
|
||||
{
|
||||
"key": "privacy_type",
|
||||
"default": "none"
|
||||
},
|
||||
{
|
||||
"key": "profile_comment_approval",
|
||||
"default": "0"
|
||||
},
|
||||
{
|
||||
"key": "profile_comments",
|
||||
"default": "1"
|
||||
},
|
||||
{
|
||||
"key": "prune_emailerrorlogs",
|
||||
"default": "3"
|
||||
},
|
||||
{
|
||||
"key": "prune_log_admin",
|
||||
"default": "0"
|
||||
},
|
||||
{
|
||||
"key": "prune_log_adminlogin",
|
||||
"default": "30"
|
||||
},
|
||||
{
|
||||
"key": "prune_log_email_error",
|
||||
"default": "30"
|
||||
},
|
||||
{
|
||||
"key": "prune_log_error",
|
||||
"default": "30"
|
||||
},
|
||||
{
|
||||
"key": "prune_log_moderator",
|
||||
"default": "0"
|
||||
},
|
||||
{
|
||||
"key": "prune_log_spam",
|
||||
"default": "30"
|
||||
},
|
||||
{
|
||||
"key": "prune_log_system",
|
||||
"default": "0"
|
||||
},
|
||||
{
|
||||
"key": "prune_log_tasks",
|
||||
"default": "30"
|
||||
},
|
||||
{
|
||||
"key": "prune_notifications",
|
||||
"default": "3"
|
||||
},
|
||||
{
|
||||
"key": "recaptcha2_private_key",
|
||||
"default": ""
|
||||
},
|
||||
{
|
||||
"key": "recaptcha2_public_key",
|
||||
"default": ""
|
||||
},
|
||||
{
|
||||
"key": "recaptcha2_theme",
|
||||
"default": "light"
|
||||
},
|
||||
{
|
||||
"key": "recaptcha_private_key",
|
||||
"default": "6LcpWAMAAAAAAETX5jHd9NlPtIHJA4G-ra3X2RQB"
|
||||
},
|
||||
{
|
||||
"key": "recaptcha_public_key",
|
||||
"default": "6LcpWAMAAAAAAA4klDtDNuDH6LsGgBX5mBoJ3naK"
|
||||
},
|
||||
{
|
||||
"key": "recaptcha_theme",
|
||||
"default": "white"
|
||||
},
|
||||
{
|
||||
"key": "reg_auth_type",
|
||||
"default": "user"
|
||||
},
|
||||
{
|
||||
"key": "reg_rules",
|
||||
"default": "<p>Please take a moment to review these rules.<\/p><p>Please remember that we are not responsible for any messages posted. We do not vouch for or warrant the accuracy, completeness or usefulness of any message, and are not responsible for the contents of any message.<\/p><p>The messages express the views of the author of the message, not necessarily the views of this website. Any user who feels that a posted message is objectionable is encouraged to contact us immediately by email. We have the ability to remove objectionable messages and we will make every effort to do so, within a reasonable time frame, if we determine that removal is necessary.<\/p><p>You agree, through your use of this service, that you will not use this website to post any material which is knowingly false and\/or defamatory, inaccurate, abusive, vulgar, hateful, harassing, obscene, profane, sexually oriented, threatening, invasive of a person's privacy, or otherwise violative of any law.<\/p><p>You agree not to post any copyrighted material unless the copyright is owned by you or by this website.<\/p><p>Our software uses cookies to distinguish you from other users of our website. This helps us to provide you with a personalized experience when you browse this site.<\/p>"
|
||||
},
|
||||
{
|
||||
"key": "reputation_can_self_vote",
|
||||
"default": "0"
|
||||
},
|
||||
{
|
||||
"key": "reputation_enabled",
|
||||
"default": "1"
|
||||
},
|
||||
{
|
||||
"key": "reputation_highlight",
|
||||
"default": "50"
|
||||
},
|
||||
{
|
||||
"key": "reputation_point_types",
|
||||
"default": "like"
|
||||
},
|
||||
{
|
||||
"key": "reputation_protected_groups",
|
||||
"default": ""
|
||||
},
|
||||
{
|
||||
"key": "reputation_show_content",
|
||||
"default": "1"
|
||||
},
|
||||
{
|
||||
"key": "reputation_show_profile",
|
||||
"default": "1"
|
||||
},
|
||||
{
|
||||
"key": "reviews_rating_out_of",
|
||||
"default": "5"
|
||||
},
|
||||
{
|
||||
"key": "search_engine",
|
||||
"default": "mysql"
|
||||
},
|
||||
{
|
||||
"key": "search_index_timeframe",
|
||||
"default": "0"
|
||||
},
|
||||
{
|
||||
"key": "search_sphinx_port",
|
||||
"default": "3312"
|
||||
},
|
||||
{
|
||||
"key": "search_sphinx_server",
|
||||
"default": ""
|
||||
},
|
||||
{
|
||||
"key": "security_remove_acp_link",
|
||||
"default": "0"
|
||||
},
|
||||
{
|
||||
"key": "seo_r_on",
|
||||
"default": "1"
|
||||
},
|
||||
{
|
||||
"key": "setup_in_progress",
|
||||
"default": "0"
|
||||
},
|
||||
{
|
||||
"key": "show_home_link",
|
||||
"default": "0"
|
||||
},
|
||||
{
|
||||
"key": "signatures_enabled",
|
||||
"default": "0"
|
||||
},
|
||||
{
|
||||
"key": "site_address",
|
||||
"default": ""
|
||||
},
|
||||
{
|
||||
"key": "site_offline_message",
|
||||
"default": ""
|
||||
},
|
||||
{
|
||||
"key": "site_online",
|
||||
"default": "1"
|
||||
},
|
||||
{
|
||||
"key": "sitemap_content_settings",
|
||||
"default": "{}"
|
||||
},
|
||||
{
|
||||
"key": "sitemap_last_ping",
|
||||
"default": "0"
|
||||
},
|
||||
{
|
||||
"key": "sitemap_path",
|
||||
"default": ""
|
||||
},
|
||||
{
|
||||
"key": "sitemap_profiles_count",
|
||||
"default": "-1"
|
||||
},
|
||||
{
|
||||
"key": "sitemap_profiles_priority",
|
||||
"default": "-1"
|
||||
},
|
||||
{
|
||||
"key": "sitemap_url",
|
||||
"default": ""
|
||||
},
|
||||
{
|
||||
"key": "sixty_second_emails",
|
||||
"default": "1"
|
||||
},
|
||||
{
|
||||
"key": "smtp_host",
|
||||
"default": "localhost"
|
||||
},
|
||||
{
|
||||
"key": "smtp_pass",
|
||||
"default": ""
|
||||
},
|
||||
{
|
||||
"key": "smtp_port",
|
||||
"default": "25"
|
||||
},
|
||||
{
|
||||
"key": "smtp_user",
|
||||
"default": ""
|
||||
},
|
||||
{
|
||||
"key": "spam_service_action_0",
|
||||
"default": "1"
|
||||
},
|
||||
{
|
||||
"key": "spam_service_action_1",
|
||||
"default": "1"
|
||||
},
|
||||
{
|
||||
"key": "spam_service_action_2",
|
||||
"default": "1"
|
||||
},
|
||||
{
|
||||
"key": "spam_service_action_3",
|
||||
"default": "2"
|
||||
},
|
||||
{
|
||||
"key": "spam_service_action_4",
|
||||
"default": "4"
|
||||
},
|
||||
{
|
||||
"key": "spam_service_enabled",
|
||||
"default": "1"
|
||||
},
|
||||
{
|
||||
"key": "spam_service_send_to_ips",
|
||||
"default": "1"
|
||||
},
|
||||
{
|
||||
"key": "sphinx_base_path",
|
||||
"default": ""
|
||||
},
|
||||
{
|
||||
"key": "sphinx_id_map",
|
||||
"default": ""
|
||||
},
|
||||
{
|
||||
"key": "sphinx_prefix",
|
||||
"default": ""
|
||||
},
|
||||
{
|
||||
"key": "spm_notify",
|
||||
"default": "0"
|
||||
},
|
||||
{
|
||||
"key": "spm_option",
|
||||
"default": "disable,unapprove"
|
||||
},
|
||||
{
|
||||
"key": "spm_post_days",
|
||||
"default": "3"
|
||||
},
|
||||
{
|
||||
"key": "staff_directory_empty",
|
||||
"default": "0"
|
||||
},
|
||||
{
|
||||
"key": "startpoll_cutoff",
|
||||
"default": "24"
|
||||
},
|
||||
{
|
||||
"key": "strip_quotes",
|
||||
"default": "1"
|
||||
},
|
||||
{
|
||||
"key": "subs_autoprune",
|
||||
"default": "0"
|
||||
},
|
||||
{
|
||||
"key": "tags_can_prefix",
|
||||
"default": "1"
|
||||
},
|
||||
{
|
||||
"key": "tags_clean",
|
||||
"default": "0"
|
||||
},
|
||||
{
|
||||
"key": "tags_enabled",
|
||||
"default": "1"
|
||||
},
|
||||
{
|
||||
"key": "tags_force_lower",
|
||||
"default": "1"
|
||||
},
|
||||
{
|
||||
"key": "tags_len_max",
|
||||
"default": "0"
|
||||
},
|
||||
{
|
||||
"key": "tags_len_min",
|
||||
"default": "0"
|
||||
},
|
||||
{
|
||||
"key": "tags_max",
|
||||
"default": "0"
|
||||
},
|
||||
{
|
||||
"key": "tags_min",
|
||||
"default": "0"
|
||||
},
|
||||
{
|
||||
"key": "tags_min_req",
|
||||
"default": "0"
|
||||
},
|
||||
{
|
||||
"key": "tags_open_system",
|
||||
"default": "1"
|
||||
},
|
||||
{
|
||||
"key": "tags_predefined",
|
||||
"default": ""
|
||||
},
|
||||
{
|
||||
"key": "task_cron_key",
|
||||
"default": ""
|
||||
},
|
||||
{
|
||||
"key": "task_use_cron",
|
||||
"default": "0"
|
||||
},
|
||||
{
|
||||
"key": "theme_designers_mode",
|
||||
"default": "0"
|
||||
},
|
||||
{
|
||||
"key": "topic_redirect_prune",
|
||||
"default": "30"
|
||||
},
|
||||
{
|
||||
"key": "twitter_hashtag",
|
||||
"default": ""
|
||||
},
|
||||
{
|
||||
"key": "upload_settings",
|
||||
"default": ""
|
||||
},
|
||||
{
|
||||
"key": "use_coppa",
|
||||
"default": "0"
|
||||
},
|
||||
{
|
||||
"key": "use_friendly_urls",
|
||||
"default": "1"
|
||||
},
|
||||
{
|
||||
"key": "username_characters",
|
||||
"default": ""
|
||||
},
|
||||
{
|
||||
"key": "validate_day_prune",
|
||||
"default": "30"
|
||||
},
|
||||
{
|
||||
"key": "viglink_api_key",
|
||||
"default": ""
|
||||
},
|
||||
{
|
||||
"key": "viglink_enabled",
|
||||
"default": "0"
|
||||
},
|
||||
{
|
||||
"key": "viglink_groups",
|
||||
"default": ""
|
||||
},
|
||||
{
|
||||
"key": "viglink_norewrite",
|
||||
"default": ""
|
||||
},
|
||||
{
|
||||
"key": "viglink_subid",
|
||||
"default": ""
|
||||
},
|
||||
{
|
||||
"key": "warn_on",
|
||||
"default": "1"
|
||||
},
|
||||
{
|
||||
"key": "warn_protected",
|
||||
"default": ""
|
||||
},
|
||||
{
|
||||
"key": "warn_show_own",
|
||||
"default": "1"
|
||||
},
|
||||
{
|
||||
"key": "warnings_acknowledge",
|
||||
"default": "0"
|
||||
},
|
||||
{
|
||||
"key": "widget_cache_ttl",
|
||||
"default": "300"
|
||||
},
|
||||
{
|
||||
"key": "xforward_matching",
|
||||
"default": "0"
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1 @@
|
||||
{"profilesync":"P0Y0M0DT1H0M0S","bulkmail":"P0Y0M0DT0H10M0S","updatecheck":"P0Y0M1DT0H0M0S","cleanup":"P0Y0M1DT0H0M0S","sitemapgenerator":"P0Y0M0DT1H0M0S","connect":"P0Y0M0DT1H0M0S","queue":"P0Y0M0DT0H1M0S","pop":"P0Y0M0DT0H10M0S","digest":"P0Y0M0DT0H10M0S","publish":"P0Y0M0DT0H10M0S","clearcache":"P0Y0M0DT0H10M0S","clearsessions":"P0Y0M0DT0H30M0S"}
|
||||
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,590 @@
|
||||
[
|
||||
{
|
||||
"sc_key": "ajax_pagination",
|
||||
"sc_type": "YesNo",
|
||||
"sc_multiple": 0,
|
||||
"sc_content": "[{\"key\":\"\",\"value\":\"\"}]",
|
||||
"sc_app": "core",
|
||||
"sc_default": "1",
|
||||
"sc_tab_key": "custom",
|
||||
"sc_show_in_vse": 1,
|
||||
"sc_title": "themesetting_ajax_pagination",
|
||||
"sc_order": 9
|
||||
},
|
||||
{
|
||||
"sc_key": "alternate_button",
|
||||
"sc_type": "Color",
|
||||
"sc_multiple": 0,
|
||||
"sc_content": "[{\"key\":\"\",\"value\":\"\"}]",
|
||||
"sc_app": "core",
|
||||
"sc_default": "#2d4760",
|
||||
"sc_tab_key": "buttoncolors",
|
||||
"sc_show_in_vse": 0,
|
||||
"sc_title": "themesetting_alternate_button",
|
||||
"sc_order": 3
|
||||
},
|
||||
{
|
||||
"sc_key": "alternate_button_font",
|
||||
"sc_type": "Color",
|
||||
"sc_multiple": 0,
|
||||
"sc_content": "[]",
|
||||
"sc_app": "core",
|
||||
"sc_default": "#ffffff",
|
||||
"sc_tab_key": "buttoncolors",
|
||||
"sc_show_in_vse": 0,
|
||||
"sc_title": "themesetting_alternate_button_font",
|
||||
"sc_order": 4
|
||||
},
|
||||
{
|
||||
"sc_key": "area_background",
|
||||
"sc_type": "Color",
|
||||
"sc_multiple": 0,
|
||||
"sc_content": "[]",
|
||||
"sc_app": "core",
|
||||
"sc_default": "#ebebeb",
|
||||
"sc_tab_key": "frontendcolors",
|
||||
"sc_show_in_vse": 0,
|
||||
"sc_title": "themesetting_area_background",
|
||||
"sc_order": 7
|
||||
},
|
||||
{
|
||||
"sc_key": "area_background_dark",
|
||||
"sc_type": "Color",
|
||||
"sc_multiple": 0,
|
||||
"sc_content": "[]",
|
||||
"sc_app": "core",
|
||||
"sc_default": "#283a4a",
|
||||
"sc_tab_key": "frontendcolors",
|
||||
"sc_show_in_vse": 0,
|
||||
"sc_title": "themesetting_area_background_dark",
|
||||
"sc_order": 8
|
||||
},
|
||||
{
|
||||
"sc_key": "area_background_light",
|
||||
"sc_type": "Color",
|
||||
"sc_multiple": 0,
|
||||
"sc_content": "[]",
|
||||
"sc_app": "core",
|
||||
"sc_default": "#fafafa",
|
||||
"sc_tab_key": "frontendcolors",
|
||||
"sc_show_in_vse": 0,
|
||||
"sc_title": "themesetting_area_background_light",
|
||||
"sc_order": 9
|
||||
},
|
||||
{
|
||||
"sc_key": "area_background_reset",
|
||||
"sc_type": "Color",
|
||||
"sc_multiple": 0,
|
||||
"sc_content": "[]",
|
||||
"sc_app": "core",
|
||||
"sc_default": "#ffffff",
|
||||
"sc_tab_key": "frontendcolors",
|
||||
"sc_show_in_vse": 0,
|
||||
"sc_title": "themesetting_area_background_reset",
|
||||
"sc_order": 10
|
||||
},
|
||||
{
|
||||
"sc_key": "button_bar",
|
||||
"sc_type": "Color",
|
||||
"sc_multiple": 0,
|
||||
"sc_content": "[]",
|
||||
"sc_app": "core",
|
||||
"sc_default": "#3d5e78",
|
||||
"sc_tab_key": "buttoncolors",
|
||||
"sc_show_in_vse": 0,
|
||||
"sc_title": "themesetting_button_bar",
|
||||
"sc_order": 13
|
||||
},
|
||||
{
|
||||
"sc_key": "enable_fluid_width",
|
||||
"sc_type": "YesNo",
|
||||
"sc_multiple": 0,
|
||||
"sc_content": "[{\"key\":\"\",\"value\":\"\"},{\"key\":\"\",\"value\":\"\"}]",
|
||||
"sc_app": "core",
|
||||
"sc_default": "0",
|
||||
"sc_tab_key": "custom",
|
||||
"sc_show_in_vse": 1,
|
||||
"sc_title": "themesetting_enable_fluid_width",
|
||||
"sc_order": 6
|
||||
},
|
||||
{
|
||||
"sc_key": "fluid_width_size",
|
||||
"sc_type": "Number",
|
||||
"sc_multiple": 0,
|
||||
"sc_content": "[]",
|
||||
"sc_app": "core",
|
||||
"sc_default": "95",
|
||||
"sc_tab_key": "custom",
|
||||
"sc_show_in_vse": 1,
|
||||
"sc_title": "themesetting_fluid_width_size",
|
||||
"sc_order": 7
|
||||
},
|
||||
{
|
||||
"sc_key": "header",
|
||||
"sc_type": "Color",
|
||||
"sc_multiple": 0,
|
||||
"sc_content": "[]",
|
||||
"sc_app": "core",
|
||||
"sc_default": "#3d5e78",
|
||||
"sc_tab_key": "frontendcolors",
|
||||
"sc_show_in_vse": 0,
|
||||
"sc_title": "themesetting_header",
|
||||
"sc_order": 2
|
||||
},
|
||||
{
|
||||
"sc_key": "important_button",
|
||||
"sc_type": "Color",
|
||||
"sc_multiple": 0,
|
||||
"sc_content": "[]",
|
||||
"sc_app": "core",
|
||||
"sc_default": "#558e7c",
|
||||
"sc_tab_key": "buttoncolors",
|
||||
"sc_show_in_vse": 0,
|
||||
"sc_title": "themesetting_important_button",
|
||||
"sc_order": 7
|
||||
},
|
||||
{
|
||||
"sc_key": "important_button_font",
|
||||
"sc_type": "Color",
|
||||
"sc_multiple": 0,
|
||||
"sc_content": "[]",
|
||||
"sc_app": "core",
|
||||
"sc_default": "#ffffff",
|
||||
"sc_tab_key": "buttoncolors",
|
||||
"sc_show_in_vse": 0,
|
||||
"sc_title": "themesetting_important_button_font",
|
||||
"sc_order": 8
|
||||
},
|
||||
{
|
||||
"sc_key": "js_include",
|
||||
"sc_type": "Radio",
|
||||
"sc_multiple": 0,
|
||||
"sc_content": "[{\"key\":\"head\",\"value\":\"Inside the <head>\"},{\"key\":\"footer\",\"value\":\"Just before <\\\/body> tag\"}]",
|
||||
"sc_app": "core",
|
||||
"sc_default": "head",
|
||||
"sc_tab_key": "custom",
|
||||
"sc_show_in_vse": 0,
|
||||
"sc_title": "Javascript include location",
|
||||
"sc_order": 8
|
||||
},
|
||||
{
|
||||
"sc_key": "light_button",
|
||||
"sc_type": "Color",
|
||||
"sc_multiple": 0,
|
||||
"sc_content": "[]",
|
||||
"sc_app": "core",
|
||||
"sc_default": "#e5e5e5",
|
||||
"sc_tab_key": "buttoncolors",
|
||||
"sc_show_in_vse": 0,
|
||||
"sc_title": "themesetting_light_button",
|
||||
"sc_order": 9
|
||||
},
|
||||
{
|
||||
"sc_key": "light_button_font",
|
||||
"sc_type": "Color",
|
||||
"sc_multiple": 0,
|
||||
"sc_content": "[]",
|
||||
"sc_app": "core",
|
||||
"sc_default": "#333333",
|
||||
"sc_tab_key": "buttoncolors",
|
||||
"sc_show_in_vse": 0,
|
||||
"sc_title": "themesetting_light_button_font",
|
||||
"sc_order": 10
|
||||
},
|
||||
{
|
||||
"sc_key": "link",
|
||||
"sc_type": "Color",
|
||||
"sc_multiple": 0,
|
||||
"sc_content": "[]",
|
||||
"sc_app": "core",
|
||||
"sc_default": "#255b79",
|
||||
"sc_tab_key": "textcolors",
|
||||
"sc_show_in_vse": 0,
|
||||
"sc_title": "themesetting_link",
|
||||
"sc_order": 3
|
||||
},
|
||||
{
|
||||
"sc_key": "link_hover",
|
||||
"sc_type": "Color",
|
||||
"sc_multiple": 0,
|
||||
"sc_content": "[]",
|
||||
"sc_app": "core",
|
||||
"sc_default": "#cd3816",
|
||||
"sc_tab_key": "textcolors",
|
||||
"sc_show_in_vse": 0,
|
||||
"sc_title": "themesetting_link_hover",
|
||||
"sc_order": 4
|
||||
},
|
||||
{
|
||||
"sc_key": "main_nav",
|
||||
"sc_type": "Color",
|
||||
"sc_multiple": 0,
|
||||
"sc_content": "[]",
|
||||
"sc_app": "core",
|
||||
"sc_default": "#283a4a",
|
||||
"sc_tab_key": "frontendcolors",
|
||||
"sc_show_in_vse": 0,
|
||||
"sc_title": "themesetting_main_nav",
|
||||
"sc_order": 3
|
||||
},
|
||||
{
|
||||
"sc_key": "moderated",
|
||||
"sc_type": "Color",
|
||||
"sc_multiple": 0,
|
||||
"sc_content": "[{\"key\":\"\",\"value\":\"\"}]",
|
||||
"sc_app": "core",
|
||||
"sc_default": "#f5efef",
|
||||
"sc_tab_key": "frontendcolors",
|
||||
"sc_show_in_vse": 0,
|
||||
"sc_title": "themesetting_moderated",
|
||||
"sc_order": 12
|
||||
},
|
||||
{
|
||||
"sc_key": "moderated_light",
|
||||
"sc_type": "Color",
|
||||
"sc_multiple": 0,
|
||||
"sc_content": "[{\"key\":\"\",\"value\":\"\"}]",
|
||||
"sc_app": "core",
|
||||
"sc_default": "#faf7f7",
|
||||
"sc_tab_key": "frontendcolors",
|
||||
"sc_show_in_vse": 0,
|
||||
"sc_title": "themesetting_moderated_light",
|
||||
"sc_order": 13
|
||||
},
|
||||
{
|
||||
"sc_key": "moderated_text",
|
||||
"sc_type": "Color",
|
||||
"sc_multiple": 0,
|
||||
"sc_content": "[{\"key\":\"\",\"value\":\"\"}]",
|
||||
"sc_app": "core",
|
||||
"sc_default": "#834250",
|
||||
"sc_tab_key": "frontendcolors",
|
||||
"sc_show_in_vse": 0,
|
||||
"sc_title": "themesetting_moderated_text",
|
||||
"sc_order": 14
|
||||
},
|
||||
{
|
||||
"sc_key": "moderated_text_light",
|
||||
"sc_type": "Color",
|
||||
"sc_multiple": 0,
|
||||
"sc_content": "[{\"key\":\"\",\"value\":\"\"}]",
|
||||
"sc_app": "core",
|
||||
"sc_default": "#ac8c88",
|
||||
"sc_tab_key": "frontendcolors",
|
||||
"sc_show_in_vse": 0,
|
||||
"sc_title": "themesetting_moderated_text_light",
|
||||
"sc_order": 15
|
||||
},
|
||||
{
|
||||
"sc_key": "normal_button",
|
||||
"sc_type": "Color",
|
||||
"sc_multiple": 0,
|
||||
"sc_content": "[]",
|
||||
"sc_app": "core",
|
||||
"sc_default": "#417ba3",
|
||||
"sc_tab_key": "buttoncolors",
|
||||
"sc_show_in_vse": 0,
|
||||
"sc_title": "themesetting_normal_button",
|
||||
"sc_order": 5
|
||||
},
|
||||
{
|
||||
"sc_key": "normal_button_font",
|
||||
"sc_type": "Color",
|
||||
"sc_multiple": 0,
|
||||
"sc_content": "[]",
|
||||
"sc_app": "core",
|
||||
"sc_default": "#ffffff",
|
||||
"sc_tab_key": "buttoncolors",
|
||||
"sc_show_in_vse": 0,
|
||||
"sc_title": "themesetting_normal_button_font",
|
||||
"sc_order": 6
|
||||
},
|
||||
{
|
||||
"sc_key": "page_background",
|
||||
"sc_type": "Color",
|
||||
"sc_multiple": 0,
|
||||
"sc_content": "[]",
|
||||
"sc_app": "core",
|
||||
"sc_default": "#e9e9e9",
|
||||
"sc_tab_key": "frontendcolors",
|
||||
"sc_show_in_vse": 0,
|
||||
"sc_title": "themesetting_page_background",
|
||||
"sc_order": 1
|
||||
},
|
||||
{
|
||||
"sc_key": "poll_bar",
|
||||
"sc_type": "Color",
|
||||
"sc_multiple": 0,
|
||||
"sc_content": "[]",
|
||||
"sc_app": "core",
|
||||
"sc_default": "#2a94de",
|
||||
"sc_tab_key": "frontendcolors",
|
||||
"sc_show_in_vse": 1,
|
||||
"sc_title": "themesetting_poll_bar",
|
||||
"sc_order": 16
|
||||
},
|
||||
{
|
||||
"sc_key": "prefix",
|
||||
"sc_type": "Color",
|
||||
"sc_multiple": 0,
|
||||
"sc_content": "[]",
|
||||
"sc_app": "core",
|
||||
"sc_default": "#903246",
|
||||
"sc_tab_key": "frontendcolors",
|
||||
"sc_show_in_vse": 1,
|
||||
"sc_title": "themesetting_prefix",
|
||||
"sc_order": 5
|
||||
},
|
||||
{
|
||||
"sc_key": "price",
|
||||
"sc_type": "Color",
|
||||
"sc_multiple": 0,
|
||||
"sc_content": "[{\"key\":\"\",\"value\":\"\"}]",
|
||||
"sc_app": "core",
|
||||
"sc_default": "#cd3816",
|
||||
"sc_tab_key": "textcolors",
|
||||
"sc_show_in_vse": 1,
|
||||
"sc_title": "Price",
|
||||
"sc_order": 9
|
||||
},
|
||||
{
|
||||
"sc_key": "primary_button",
|
||||
"sc_type": "Color",
|
||||
"sc_multiple": 0,
|
||||
"sc_content": "[]",
|
||||
"sc_app": "core",
|
||||
"sc_default": "#262e33",
|
||||
"sc_tab_key": "buttoncolors",
|
||||
"sc_show_in_vse": 0,
|
||||
"sc_title": "themesetting_primary_button",
|
||||
"sc_order": 1
|
||||
},
|
||||
{
|
||||
"sc_key": "primary_button_font",
|
||||
"sc_type": "Color",
|
||||
"sc_multiple": 0,
|
||||
"sc_content": "[]",
|
||||
"sc_app": "core",
|
||||
"sc_default": "#ffffff",
|
||||
"sc_tab_key": "buttoncolors",
|
||||
"sc_show_in_vse": 0,
|
||||
"sc_title": "themesetting_primary_button_font",
|
||||
"sc_order": 2
|
||||
},
|
||||
{
|
||||
"sc_key": "profile_header",
|
||||
"sc_type": "Color",
|
||||
"sc_multiple": 0,
|
||||
"sc_content": "[]",
|
||||
"sc_app": "core",
|
||||
"sc_default": "#262e33",
|
||||
"sc_tab_key": "frontendcolors",
|
||||
"sc_show_in_vse": 0,
|
||||
"sc_title": "themesetting_profile_header",
|
||||
"sc_order": 4
|
||||
},
|
||||
{
|
||||
"sc_key": "rating_hover",
|
||||
"sc_type": "Color",
|
||||
"sc_multiple": 0,
|
||||
"sc_content": "[]",
|
||||
"sc_app": "core",
|
||||
"sc_default": "#2a94de",
|
||||
"sc_tab_key": "frontendcolors",
|
||||
"sc_show_in_vse": 1,
|
||||
"sc_title": "themesetting_rating_hover",
|
||||
"sc_order": 17
|
||||
},
|
||||
{
|
||||
"sc_key": "rating_on",
|
||||
"sc_type": "Color",
|
||||
"sc_multiple": 0,
|
||||
"sc_content": "[]",
|
||||
"sc_app": "core",
|
||||
"sc_default": "#af2b35",
|
||||
"sc_tab_key": "frontendcolors",
|
||||
"sc_show_in_vse": 1,
|
||||
"sc_title": "themesetting_rating_on",
|
||||
"sc_order": 18
|
||||
},
|
||||
{
|
||||
"sc_key": "responsive",
|
||||
"sc_type": "YesNo",
|
||||
"sc_multiple": 0,
|
||||
"sc_content": "[{\"key\":\"\",\"value\":\"\"},{\"key\":\"\",\"value\":\"\"}]",
|
||||
"sc_app": "core",
|
||||
"sc_default": "1",
|
||||
"sc_tab_key": "custom",
|
||||
"sc_show_in_vse": 0,
|
||||
"sc_title": "themesetting_responsive",
|
||||
"sc_order": 1
|
||||
},
|
||||
{
|
||||
"sc_key": "rounded_photos",
|
||||
"sc_type": "YesNo",
|
||||
"sc_multiple": 0,
|
||||
"sc_content": "[{\"key\":\"\",\"value\":\"\"},{\"key\":\"\",\"value\":\"\"}]",
|
||||
"sc_app": "core",
|
||||
"sc_default": "1",
|
||||
"sc_tab_key": "custom",
|
||||
"sc_show_in_vse": 0,
|
||||
"sc_title": "themesetting_rounded_photos",
|
||||
"sc_order": 2
|
||||
},
|
||||
{
|
||||
"sc_key": "secondary_title",
|
||||
"sc_type": "Color",
|
||||
"sc_multiple": 0,
|
||||
"sc_content": "[{\"key\":\"\",\"value\":\"\"}]",
|
||||
"sc_app": "core",
|
||||
"sc_default": "#3d5e78",
|
||||
"sc_tab_key": "textcolors",
|
||||
"sc_show_in_vse": 0,
|
||||
"sc_title": "themesetting_secondary_title",
|
||||
"sc_order": 7
|
||||
},
|
||||
{
|
||||
"sc_key": "secondary_title_font",
|
||||
"sc_type": "Color",
|
||||
"sc_multiple": 0,
|
||||
"sc_content": "[{\"key\":\"\",\"value\":\"\"}]",
|
||||
"sc_app": "core",
|
||||
"sc_default": "#ffffff",
|
||||
"sc_tab_key": "textcolors",
|
||||
"sc_show_in_vse": 0,
|
||||
"sc_title": "themesetting_secondary_title_font",
|
||||
"sc_order": 8
|
||||
},
|
||||
{
|
||||
"sc_key": "section_title",
|
||||
"sc_type": "Color",
|
||||
"sc_multiple": 0,
|
||||
"sc_content": "[]",
|
||||
"sc_app": "core",
|
||||
"sc_default": "#283a4a",
|
||||
"sc_tab_key": "textcolors",
|
||||
"sc_show_in_vse": 0,
|
||||
"sc_title": "themesetting_section_title",
|
||||
"sc_order": 5
|
||||
},
|
||||
{
|
||||
"sc_key": "section_title_font",
|
||||
"sc_type": "Color",
|
||||
"sc_multiple": 0,
|
||||
"sc_content": "[]",
|
||||
"sc_app": "core",
|
||||
"sc_default": "#ffffff",
|
||||
"sc_tab_key": "textcolors",
|
||||
"sc_show_in_vse": 0,
|
||||
"sc_title": "themesetting_section_title_font",
|
||||
"sc_order": 6
|
||||
},
|
||||
{
|
||||
"sc_key": "selected",
|
||||
"sc_type": "Color",
|
||||
"sc_multiple": 0,
|
||||
"sc_content": "[]",
|
||||
"sc_app": "core",
|
||||
"sc_default": "#ebf4f9",
|
||||
"sc_tab_key": "frontendcolors",
|
||||
"sc_show_in_vse": 1,
|
||||
"sc_title": "themesetting_selected",
|
||||
"sc_order": 6
|
||||
},
|
||||
{
|
||||
"sc_key": "sidebar_position",
|
||||
"sc_type": "Select",
|
||||
"sc_multiple": 0,
|
||||
"sc_content": "[{\"key\":\"left\",\"value\":\"Left\"},{\"key\":\"right\",\"value\":\"Right\"}]",
|
||||
"sc_app": "core",
|
||||
"sc_default": "right",
|
||||
"sc_tab_key": "custom",
|
||||
"sc_show_in_vse": 0,
|
||||
"sc_title": "themesetting_sidebar_position",
|
||||
"sc_order": 3
|
||||
},
|
||||
{
|
||||
"sc_key": "sidebar_responsive",
|
||||
"sc_type": "YesNo",
|
||||
"sc_multiple": 0,
|
||||
"sc_content": "[{\"key\":\"\",\"value\":\"\"}]",
|
||||
"sc_app": "core",
|
||||
"sc_default": "1",
|
||||
"sc_tab_key": "custom",
|
||||
"sc_show_in_vse": 1,
|
||||
"sc_title": "themesetting_sidebar_responsive",
|
||||
"sc_order": 4
|
||||
},
|
||||
{
|
||||
"sc_key": "step_background",
|
||||
"sc_type": "Color",
|
||||
"sc_multiple": 0,
|
||||
"sc_content": "[]",
|
||||
"sc_app": "core",
|
||||
"sc_default": "#903246",
|
||||
"sc_tab_key": "frontendcolors",
|
||||
"sc_show_in_vse": 1,
|
||||
"sc_title": "themesetting_step_background",
|
||||
"sc_order": 19
|
||||
},
|
||||
{
|
||||
"sc_key": "text_color",
|
||||
"sc_type": "Color",
|
||||
"sc_multiple": 0,
|
||||
"sc_content": "[]",
|
||||
"sc_app": "core",
|
||||
"sc_default": "#525252",
|
||||
"sc_tab_key": "textcolors",
|
||||
"sc_show_in_vse": 0,
|
||||
"sc_title": "themesetting_text_color",
|
||||
"sc_order": 1
|
||||
},
|
||||
{
|
||||
"sc_key": "text_light",
|
||||
"sc_type": "Color",
|
||||
"sc_multiple": 0,
|
||||
"sc_content": "[]",
|
||||
"sc_app": "core",
|
||||
"sc_default": "#9c9c9c",
|
||||
"sc_tab_key": "textcolors",
|
||||
"sc_show_in_vse": 0,
|
||||
"sc_title": "themesetting_text_light",
|
||||
"sc_order": 2
|
||||
},
|
||||
{
|
||||
"sc_key": "very_light_button",
|
||||
"sc_type": "Color",
|
||||
"sc_multiple": 0,
|
||||
"sc_content": "[]",
|
||||
"sc_app": "core",
|
||||
"sc_default": "#ffffff",
|
||||
"sc_tab_key": "buttoncolors",
|
||||
"sc_show_in_vse": 0,
|
||||
"sc_title": "themesetting_very_light_button",
|
||||
"sc_order": 11
|
||||
},
|
||||
{
|
||||
"sc_key": "very_light_button_font",
|
||||
"sc_type": "Color",
|
||||
"sc_multiple": 0,
|
||||
"sc_content": "[]",
|
||||
"sc_app": "core",
|
||||
"sc_default": "#333333",
|
||||
"sc_tab_key": "buttoncolors",
|
||||
"sc_show_in_vse": 0,
|
||||
"sc_title": "themesetting_very_light_button_font",
|
||||
"sc_order": 12
|
||||
},
|
||||
{
|
||||
"sc_key": "widget_title_bar",
|
||||
"sc_type": "Color",
|
||||
"sc_multiple": 0,
|
||||
"sc_content": "[]",
|
||||
"sc_app": "core",
|
||||
"sc_default": "#283a4a",
|
||||
"sc_tab_key": "frontendcolors",
|
||||
"sc_show_in_vse": 0,
|
||||
"sc_title": "themesetting_widget_title_bar",
|
||||
"sc_order": 11
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,102 @@
|
||||
{
|
||||
"30001": "3.0.0 Beta 2",
|
||||
"30002": "3.0.0 Beta 3",
|
||||
"30003": "3.0.0 Beta 4",
|
||||
"30004": "3.0.0 Beta 5",
|
||||
"30005": "3.0.0 RC 1",
|
||||
"30006": "3.0.0 RC 2",
|
||||
"30007": "3.0.0",
|
||||
"30008": "3.0.1",
|
||||
"30009": "3.0.2",
|
||||
"30010": "3.0.3",
|
||||
"30011": "3.0.4",
|
||||
"30012": "3.0.5",
|
||||
"31000": "3.1.0 Beta 1",
|
||||
"31001": "3.1.0 Beta 2",
|
||||
"31002": "3.1.0 Beta 3",
|
||||
"31003": "3.1.0",
|
||||
"31004": "3.1.1",
|
||||
"31005": "3.1.2",
|
||||
"31006": "3.1.3",
|
||||
"31007": "3.1.4",
|
||||
"32000": "3.2.0 Beta 1",
|
||||
"32001": "3.2.0 Beta 2",
|
||||
"32002": "3.2.0 Beta 3",
|
||||
"32003": "3.2.0",
|
||||
"32004": "3.2.1",
|
||||
"32005": "3.2.2",
|
||||
"32006": "3.2.3",
|
||||
"33000": "3.3.0 Alpha 1",
|
||||
"33006": "3.3.0 Alpha 2",
|
||||
"33007": "3.3.0 Beta 1",
|
||||
"33008": "3.3.0 Beta 2",
|
||||
"33009": "3.3.0 Beta 3",
|
||||
"33010": "3.3.0 Beta 4",
|
||||
"33011": "3.3.0",
|
||||
"33012": "3.3.1",
|
||||
"33013": "3.3.2",
|
||||
"33014": "3.3.3",
|
||||
"33015": "3.3.4",
|
||||
"34000": "3.4.0 Alpha 1",
|
||||
"34001": "3.4.0 Beta 1",
|
||||
"34002": "3.4.0 Beta 2",
|
||||
"34003": "3.4.0 Beta 3",
|
||||
"34004": "3.4.0 Beta 4",
|
||||
"34005": "3.4.0 Beta 5",
|
||||
"34006": "3.4.0",
|
||||
"34007": "3.4.1",
|
||||
"34008": "3.4.2",
|
||||
"34009": "3.4.3",
|
||||
"34010": "3.4.4",
|
||||
"34011": "3.4.5",
|
||||
"34012": "3.4.6",
|
||||
"34013": "3.4.7",
|
||||
"34014": "3.4.8",
|
||||
"40000": "4.0.0 Alpha 1",
|
||||
"100000": "4.0.0 Beta 0",
|
||||
"100001": "4.0.0 Beta 1",
|
||||
"100002": "4.0.0 Beta 2",
|
||||
"100003": "4.0.0 Beta 3",
|
||||
"100004": "4.0.0 Beta 3a",
|
||||
"100005": "4.0.0 Beta 4",
|
||||
"100006": "4.0.0 Beta 4a",
|
||||
"100007": "4.0.0 Beta 4b",
|
||||
"100008": "4.0.0 Beta 5",
|
||||
"100009": "4.0.0 Beta 5a",
|
||||
"100010": "4.0.0 Beta 6",
|
||||
"100011": "4.0.0 Beta 7",
|
||||
"100012": "4.0.0 Beta 7a",
|
||||
"100013": "4.0.0 Beta 8",
|
||||
"100014": "4.0.0 RC1",
|
||||
"100015": "4.0.0 RC2",
|
||||
"100016": "4.0.0 RC3",
|
||||
"100017": "4.0.0 RC4",
|
||||
"100018": "4.0.0 RC5",
|
||||
"100019": "4.0.0 RC5a",
|
||||
"100020": "4.0.0 RC6",
|
||||
"100021": "4.0.0 RC7",
|
||||
"100022": "4.0.0 RC7a",
|
||||
"100023": "4.0.0",
|
||||
"100024": "4.0.1",
|
||||
"100025": "4.0.2",
|
||||
"100026": "4.0.3",
|
||||
"100027": "4.0.4",
|
||||
"100028": "4.0.5",
|
||||
"100029": "4.0.5.1",
|
||||
"100030": "4.0.6",
|
||||
"100031": "4.0.6.1",
|
||||
"100032": "4.0.7",
|
||||
"100033": "4.0.8",
|
||||
"100034": "4.0.8.1",
|
||||
"100035": "4.0.9",
|
||||
"100036": "4.0.9.1",
|
||||
"100037": "4.0.9.2",
|
||||
"100038": "4.0.10",
|
||||
"100039": "4.0.10.1",
|
||||
"100040": "4.0.10.2",
|
||||
"100041": "4.0.11",
|
||||
"100042": "4.0.12",
|
||||
"100043": "4.0.12.1",
|
||||
"100044": "4.0.13",
|
||||
"100045": "4.0.13.1"
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
{
|
||||
"activeUsers": {
|
||||
"class": "\\IPS\\Widget",
|
||||
"restrict": [],
|
||||
"default_area": "",
|
||||
"allow_reuse": false,
|
||||
"menu_style": "menu",
|
||||
"embeddable": true
|
||||
},
|
||||
"announcements": {
|
||||
"class": "\\IPS\\Widget\\PermissionCache",
|
||||
"restrict": [
|
||||
"sidebar",
|
||||
"cms"
|
||||
],
|
||||
"default_area": "header",
|
||||
"allow_reuse": false,
|
||||
"menu_style": "menu",
|
||||
"embeddable": true
|
||||
},
|
||||
"stats": {
|
||||
"class": "\\IPS\\Widget\\StaticCache",
|
||||
"restrict": [],
|
||||
"default_area": "",
|
||||
"allow_reuse": false,
|
||||
"menu_style": "menu",
|
||||
"embeddable": true
|
||||
},
|
||||
"relatedContent": {
|
||||
"class": "\\IPS\\Widget",
|
||||
"restrict": [],
|
||||
"default_area": "",
|
||||
"allow_reuse": false,
|
||||
"menu_style": "menu",
|
||||
"embeddable": true
|
||||
},
|
||||
"recentStatusUpdates": {
|
||||
"class": "\\IPS\\Widget\\StaticCache",
|
||||
"restrict": [],
|
||||
"default_area": "",
|
||||
"allow_reuse": false,
|
||||
"menu_style": "menu",
|
||||
"embeddable": true
|
||||
},
|
||||
"topContributors": {
|
||||
"class": "\\IPS\\Widget\\StaticCache",
|
||||
"restrict": [],
|
||||
"default_area": "",
|
||||
"allow_reuse": false,
|
||||
"menu_style": "menu",
|
||||
"embeddable": true
|
||||
},
|
||||
"whosOnline": {
|
||||
"class": "\\IPS\\Widget",
|
||||
"restrict": [],
|
||||
"default_area": "",
|
||||
"allow_reuse": false,
|
||||
"menu_style": "menu",
|
||||
"embeddable": true
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,87 @@
|
||||
<?php
|
||||
/**
|
||||
* @brief Build CKEditor for release
|
||||
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
|
||||
* @copyright (c) 2001 - SVN_YYYY Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/legal/standards/
|
||||
* @package IPS Social Suite
|
||||
* @since 19 Apr 2013
|
||||
* @version SVN_VERSION_NUMBER
|
||||
*/
|
||||
|
||||
namespace IPS\core\extensions\core\Build;
|
||||
|
||||
/* 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;
|
||||
}
|
||||
|
||||
/**
|
||||
* Build CKEditor for release
|
||||
*/
|
||||
class _Ckeditor
|
||||
{
|
||||
/**
|
||||
* Build
|
||||
*
|
||||
* @return void
|
||||
* @throws \RuntimeException
|
||||
* @note You can define JAVA_PATH in constants.php if you need to specify the path to your java executable
|
||||
*/
|
||||
public function build()
|
||||
{
|
||||
/* This is just to prevent CKEditor being build with every commit while we're doing deployment testing (which takes ages so it causes the deploy server to report a fail and usually isn't necessary) */
|
||||
if ( defined( 'BUILD_TOOL_SCRIPT' ) )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
$path = \IPS\ROOT_PATH;
|
||||
|
||||
$_javaPath = '';
|
||||
|
||||
if( defined('\IPS\JAVA_PATH') AND \IPS\JAVA_PATH )
|
||||
{
|
||||
$_javaPath = \IPS\JAVA_PATH;
|
||||
}
|
||||
|
||||
/* This can take a while.... */
|
||||
set_time_limit(0);
|
||||
|
||||
$command = "rm -R {$path}/applications/core/interface/ckeditor/ckeditor 2>&1";
|
||||
$output = array();
|
||||
\exec( $command, $output );
|
||||
|
||||
if ( is_dir( "{$path}/applications/core/interface/ckeditor/ckeditor" ) )
|
||||
{
|
||||
throw new \UnexpectedValueException( \IPS\Member::loggedIn()->language()->addToStack('dev_build_ckeditor_exists_err', FALSE, array( 'sprintf' => array( "{$path}/applications/core/interface/ckeditor/ckeditor" ) ) ) );
|
||||
}
|
||||
|
||||
$command = "{$_javaPath}java -jar {$path}/applications/core/dev/ckbuilder.jar --build {$path}/applications/core/dev/ckeditor {$path}/applications/core/interface/ckeditor --build-config {$path}/applications/core/dev/ckeditor/build-config.js --no-zip --no-tar --overwrite 2>&1";
|
||||
$output = array();
|
||||
\exec( $command, $output );
|
||||
|
||||
foreach ( $output as $line )
|
||||
{
|
||||
if ( $line === 'Release process completed:' )
|
||||
{
|
||||
$this->finish();
|
||||
return;
|
||||
}
|
||||
}
|
||||
throw new \UnexpectedValueException( \IPS\Member::loggedIn()->language()->addToStack('dev_build_ckeditor_err', FALSE, array( 'sprintf' => array( $command ) ) ) );
|
||||
}
|
||||
|
||||
/**
|
||||
* Finish Build
|
||||
* Moved the pbckcode acs.js file over from development as CKEditor's build routine seems to break it
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
protected function finish()
|
||||
{
|
||||
//@copy( \IPS\ROOT_PATH . '/applications/core/dev/ckeditor/plugins/pbckcode/dialogs/ace/ace.js', \IPS\ROOT_PATH . '/applications/core/interface/ckeditor/ckeditor/plugins/pbckcode/dialogs/ace/ace.js' );
|
||||
}
|
||||
}
|
||||
Whitespace-only changes.
@@ -0,0 +1,79 @@
|
||||
<?php
|
||||
/**
|
||||
* @brief Bulk mail filter extension: member groups
|
||||
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
|
||||
* @copyright (c) 2001 - SVN_YYYY Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/legal/standards/
|
||||
* @package IPS Social Suite
|
||||
* @since 20 June 2013
|
||||
* @version SVN_VERSION_NUMBER
|
||||
*/
|
||||
|
||||
namespace IPS\core\extensions\core\BulkMail;
|
||||
|
||||
/* 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;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Bulkmail filter: Member group
|
||||
*/
|
||||
class _Group
|
||||
{
|
||||
/**
|
||||
* Get Setting Field
|
||||
*
|
||||
* @param mixed $criteria Value returned from the save() method
|
||||
* @see _BulkmailFilter_Group::save()
|
||||
* @return array Array of form elements
|
||||
*/
|
||||
public function getSettingField( $criteria )
|
||||
{
|
||||
return array(
|
||||
new \IPS\Helpers\Form\Select( 'bmf_members_groups', isset( $criteria['groups'] ) ? explode( ',', $criteria['groups'] ) : 'all', FALSE,
|
||||
array( 'options' => array_combine( array_keys( \IPS\Member\Group::groups( TRUE, FALSE ) ), array_map( function( $_group ) { return (string) $_group; }, \IPS\Member\Group::groups( TRUE, FALSE ) ) ), 'multiple' => true, 'unlimited' => 'all', 'unlimitedLang' => 'all_groups' ) ),
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Save the filter data
|
||||
*
|
||||
* @param array $post Form values
|
||||
* @return mixed False, or an array of data to use later when filtering the members
|
||||
* @throws \LogicException
|
||||
*/
|
||||
public function save( $post )
|
||||
{
|
||||
return ( empty( $post['bmf_members_groups'] ) OR $post['bmf_members_groups'] == 'all' ) ? FALSE : array( 'groups' => implode( ',', $post['bmf_members_groups'] ) );
|
||||
}
|
||||
|
||||
/**
|
||||
* Get where clause to add to the member retrieval database query
|
||||
*
|
||||
* @param mixed $data The array returned from the save() method
|
||||
* @return string|array|NULL Where clause
|
||||
*/
|
||||
public function getQueryWhereClause( $data )
|
||||
{
|
||||
if ( $data['groups'] )
|
||||
{
|
||||
$_groups = explode( ',', $data['groups'] );
|
||||
$_set = array();
|
||||
|
||||
foreach( $_groups as $_group )
|
||||
{
|
||||
$_set[] = "FIND_IN_SET(" . $_group . ",mgroup_others)";
|
||||
}
|
||||
|
||||
if( count($_set) )
|
||||
{
|
||||
return "( member_group_id IN(" . $data['groups'] . ") OR " . implode( ' OR ', $_set ) . ' )';
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,70 @@
|
||||
<?php
|
||||
/**
|
||||
* @brief Bulk mail filter extension: member join date
|
||||
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
|
||||
* @copyright (c) 2001 - SVN_YYYY Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/legal/standards/
|
||||
* @package IPS Social Suite
|
||||
* @since 20 June 2013
|
||||
* @version SVN_VERSION_NUMBER
|
||||
*/
|
||||
|
||||
namespace IPS\core\extensions\core\BulkMail;
|
||||
|
||||
/* 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;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Bulkmail filter: Member join date
|
||||
*/
|
||||
class _Joined
|
||||
{
|
||||
/**
|
||||
* Get Setting Field
|
||||
*
|
||||
* @param mixed $criteria Value returned from the save() method
|
||||
* @see _BulkmailFilter_Group::save()
|
||||
* @return array Array of form elements
|
||||
*/
|
||||
public function getSettingField( $criteria )
|
||||
{
|
||||
return array(
|
||||
new \IPS\Helpers\Form\DateRange( 'bmf_members_joined', isset( $criteria['range'] ) ? $criteria['range'] : '', FALSE ),
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Save the filter data
|
||||
*
|
||||
* @param array $post Form values
|
||||
* @return mixed False, or an array of data to use later when filtering the members
|
||||
* @throws \LogicException
|
||||
*/
|
||||
public function save( $post )
|
||||
{
|
||||
return ( empty($post['bmf_members_joined']) ) ? FALSE : array( 'range' => $post['bmf_members_joined'] );
|
||||
}
|
||||
|
||||
/**
|
||||
* Get where clause to add to the member retrieval database query
|
||||
*
|
||||
* @param mixed $data The array returned from the save() method
|
||||
* @return string|array|NULL Where clause
|
||||
*/
|
||||
public function getQueryWhereClause( $data )
|
||||
{
|
||||
if( !empty($data['range']) AND !empty($data['range']['end']) )
|
||||
{
|
||||
$start = ( $data['range']['start']['date'] ) ? strtotime( $data['range']['start']['date'] ) : 0;
|
||||
$end = strtotime( $data['range']['end']['date'] );
|
||||
|
||||
return "core_members.joined BETWEEN {$start} AND {$end}";
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,70 @@
|
||||
<?php
|
||||
/**
|
||||
* @brief Bulk mail filter extension: member last visit date
|
||||
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
|
||||
* @copyright (c) 2001 - SVN_YYYY Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/legal/standards/
|
||||
* @package IPS Social Suite
|
||||
* @since 20 June 2013
|
||||
* @version SVN_VERSION_NUMBER
|
||||
*/
|
||||
|
||||
namespace IPS\core\extensions\core\BulkMail;
|
||||
|
||||
/* 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;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Bulkmail filter: Member last visit date
|
||||
*/
|
||||
class _Lastvisit
|
||||
{
|
||||
/**
|
||||
* Get Setting Field
|
||||
*
|
||||
* @param mixed $criteria Value returned from the save() method
|
||||
* @see _BulkmailFilter_Group::save()
|
||||
* @return array Array of form elements
|
||||
*/
|
||||
public function getSettingField( $criteria )
|
||||
{
|
||||
return array(
|
||||
new \IPS\Helpers\Form\DateRange( 'bmf_members_last_visit', isset( $criteria['range'] ) ? $criteria['range'] : '', FALSE ),
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Save the filter data
|
||||
*
|
||||
* @param array $post Form values
|
||||
* @return mixed False, or an array of data to use later when filtering the members
|
||||
* @throws \LogicException
|
||||
*/
|
||||
public function save( $post )
|
||||
{
|
||||
return ( empty($post['bmf_members_last_visit']) ) ? FALSE : array( 'range' => $post['bmf_members_last_visit'] );
|
||||
}
|
||||
|
||||
/**
|
||||
* Get where clause to add to the member retrieval database query
|
||||
*
|
||||
* @param mixed $data The array returned from the save() method
|
||||
* @return string|array|NULL Where clause
|
||||
*/
|
||||
public function getQueryWhereClause( $data )
|
||||
{
|
||||
if( !empty($data['range']) AND !empty($data['range']['end']) )
|
||||
{
|
||||
$start = ( $data['range']['start']['date'] ) ? strtotime( $data['range']['start']['date'] ) : 0;
|
||||
$end = strtotime( $data['range']['end']['date'] );
|
||||
|
||||
return "core_members.last_visit BETWEEN {$start} AND {$end}";
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
Whitespace-only changes.
@@ -0,0 +1,86 @@
|
||||
<?php
|
||||
/**
|
||||
* @brief Community Enhancements: IPS GeoIP Service
|
||||
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
|
||||
* @copyright (c) 2001 - SVN_YYYY Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/legal/standards/
|
||||
* @package IPS Social Suite
|
||||
* @since 19 Apr 2013
|
||||
* @version SVN_VERSION_NUMBER
|
||||
*/
|
||||
|
||||
namespace IPS\core\extensions\core\CommunityEnhancements;
|
||||
|
||||
/* 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;
|
||||
}
|
||||
|
||||
/**
|
||||
* Community Enhancement
|
||||
*/
|
||||
class _GeoIP
|
||||
{
|
||||
/**
|
||||
* @brief IPS-provided enhancement?
|
||||
*/
|
||||
public $ips = TRUE;
|
||||
|
||||
/**
|
||||
* @brief Enhancement is enabled?
|
||||
*/
|
||||
public $enabled = FALSE;
|
||||
|
||||
/**
|
||||
* @brief Enhancement has configuration options?
|
||||
*/
|
||||
public $hasOptions = FALSE;
|
||||
|
||||
/**
|
||||
* @brief Icon data
|
||||
*/
|
||||
public $icon = "ips.png";
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
$this->enabled = \IPS\Settings::i()->ipsgeoip;
|
||||
}
|
||||
|
||||
/**
|
||||
* Edit
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function edit()
|
||||
{
|
||||
$form = new \IPS\Helpers\Form;
|
||||
$form->add( new \IPS\Helpers\Form\YesNo( 'ipsgeoip', \IPS\Settings::i()->ipsgeoip ) );
|
||||
if ( $form->values() )
|
||||
{
|
||||
$form->saveAsSettings();
|
||||
\IPS\Session::i()->log( 'acplog__enhancements_edited', array( 'enhancements__core_GeoIP' => TRUE ) );
|
||||
\IPS\Output::i()->inlineMessage = \IPS\Member::loggedIn()->language()->addToStack('saved');
|
||||
}
|
||||
|
||||
\IPS\Output::i()->output = \IPS\Theme::i()->getTemplate( 'global' )->block( 'enhancements__core_GeoIP', $form );
|
||||
}
|
||||
|
||||
/**
|
||||
* Enable/Disable
|
||||
*
|
||||
* @param $enabled bool Enable/Disable
|
||||
* @return void
|
||||
*/
|
||||
public function toggle( $enabled )
|
||||
{
|
||||
\IPS\Db::i()->update( 'core_sys_conf_settings', array( 'conf_value' => $enabled ), array( 'conf_key=?', 'ipsgeoip' ) );
|
||||
unset( \IPS\Data\Store::i()->settings );
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,113 @@
|
||||
<?php
|
||||
/**
|
||||
* @brief Google Analytics Community Enhancements
|
||||
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
|
||||
* @copyright (c) 2001 - SVN_YYYY Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/legal/standards/
|
||||
* @package IPS Social Suite
|
||||
* @since 22 Aug 2013
|
||||
* @version SVN_VERSION_NUMBER
|
||||
*/
|
||||
|
||||
namespace IPS\core\extensions\core\CommunityEnhancements;
|
||||
|
||||
/* 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;
|
||||
}
|
||||
|
||||
/**
|
||||
* Google Analytics Community Enhancement
|
||||
*/
|
||||
class _GoogleAnalytics
|
||||
{
|
||||
/**
|
||||
* @brief Enhancement is enabled?
|
||||
*/
|
||||
public $enabled = FALSE;
|
||||
|
||||
/**
|
||||
* @brief IPS-provided enhancement?
|
||||
*/
|
||||
public $ips = FALSE;
|
||||
|
||||
/**
|
||||
* @brief Enhancement has configuration options?
|
||||
*/
|
||||
public $hasOptions = TRUE;
|
||||
|
||||
/**
|
||||
* @brief Icon data
|
||||
*/
|
||||
public $icon = "google_analytics.png";
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
$this->enabled = \IPS\Settings::i()->ipbseo_ga_enabled;
|
||||
}
|
||||
|
||||
/**
|
||||
* Edit
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function edit()
|
||||
{
|
||||
$form = new \IPS\Helpers\Form;
|
||||
$form->add( new \IPS\Helpers\Form\YesNo( 'ipbseo_ga_enabled', \IPS\Settings::i()->ipbseo_ga_enabled, TRUE, array( 'togglesOn' => array( 'ipseo_ga' ) ) ) );
|
||||
$form->add( new \IPS\Helpers\Form\Codemirror( 'ipseo_ga', \IPS\Settings::i()->ipseo_ga, FALSE, array(), NULL, NULL, NULL, 'ipseo_ga' ) );
|
||||
|
||||
if ( $form->values() )
|
||||
{
|
||||
$this->testSettings();
|
||||
$form->saveAsSettings();
|
||||
|
||||
\IPS\Session::i()->log( 'acplog__enhancements_edited', array( 'enhancements__core_GoogleAnalytics' => TRUE ) );
|
||||
\IPS\Output::i()->inlineMessage = \IPS\Member::loggedIn()->language()->addToStack('saved');
|
||||
}
|
||||
|
||||
\IPS\Output::i()->sidebar['actions'] = array(
|
||||
'help' => array(
|
||||
'title' => 'signup_googleanalytics',
|
||||
'icon' => 'external-link-square',
|
||||
'link' => \IPS\Http\Url::ips( 'docs/googleanalytics' ),
|
||||
'target' => '_blank'
|
||||
),
|
||||
);
|
||||
|
||||
\IPS\Output::i()->output = \IPS\Theme::i()->getTemplate( 'global' )->block( 'enhancements__core_GoogleAnalytics', $form );
|
||||
}
|
||||
|
||||
/**
|
||||
* Enable/Disable
|
||||
*
|
||||
* @param $enabled bool Enable/Disable
|
||||
* @return void
|
||||
*/
|
||||
public function toggle( $enabled )
|
||||
{
|
||||
if ( $enabled )
|
||||
{
|
||||
$this->testSettings();
|
||||
}
|
||||
|
||||
\IPS\Db::i()->update( 'core_sys_conf_settings', array( 'conf_value' => $enabled ), array( 'conf_key=?', 'ipbseo_ga_enabled' ) );
|
||||
unset( \IPS\Data\Store::i()->settings );
|
||||
}
|
||||
|
||||
/**
|
||||
* Test Settings
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
protected function testSettings()
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,96 @@
|
||||
<?php
|
||||
/**
|
||||
* @brief Community Enhancement: Google Maps
|
||||
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
|
||||
* @copyright (c) 2001 - SVN_YYYY Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/legal/standards/
|
||||
* @package IPS Social Suite
|
||||
* @since 19 Apr 2013
|
||||
* @version SVN_VERSION_NUMBER
|
||||
*/
|
||||
|
||||
namespace IPS\core\extensions\core\CommunityEnhancements;
|
||||
|
||||
/* 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;
|
||||
}
|
||||
|
||||
/**
|
||||
* Community Enhancement: Google Maps
|
||||
*/
|
||||
class _GoogleMaps
|
||||
{
|
||||
/**
|
||||
* @brief IPS-provided enhancement?
|
||||
*/
|
||||
public $ips = FALSE;
|
||||
|
||||
/**
|
||||
* @brief Enhancement is enabled?
|
||||
*/
|
||||
public $enabled = FALSE;
|
||||
|
||||
/**
|
||||
* @brief Enhancement has configuration options?
|
||||
*/
|
||||
public $hasOptions = TRUE;
|
||||
|
||||
/**
|
||||
* @brief Icon data
|
||||
*/
|
||||
public $icon = "google_maps.png";
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
$this->enabled = \IPS\Settings::i()->googlemaps or \IPS\Settings::i()->googleplacesautocomplete;
|
||||
}
|
||||
|
||||
/**
|
||||
* Edit
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function edit()
|
||||
{
|
||||
$form = new \IPS\Helpers\Form;
|
||||
$form->add( new \IPS\Helpers\Form\YesNo( 'googlemaps', \IPS\Settings::i()->googlemaps ) );
|
||||
$form->add( new \IPS\Helpers\Form\YesNo( 'googleplacesautocomplete', \IPS\Settings::i()->googleplacesautocomplete ) );
|
||||
if ( $form->values() )
|
||||
{
|
||||
$form->saveAsSettings();
|
||||
\IPS\Session::i()->log( 'acplog__enhancements_edited', array( 'enhancements__core_GoogleMaps' => TRUE ) );
|
||||
\IPS\Output::i()->inlineMessage = \IPS\Member::loggedIn()->language()->addToStack('saved');
|
||||
}
|
||||
|
||||
\IPS\Output::i()->sidebar['actions'] = array(
|
||||
'help' => array(
|
||||
'title' => 'learn_more',
|
||||
'icon' => 'question-circle',
|
||||
'link' => \IPS\Http\Url::ips( 'docs/googlemaps' ),
|
||||
'target' => '_blank'
|
||||
),
|
||||
);
|
||||
|
||||
\IPS\Output::i()->output = \IPS\Theme::i()->getTemplate( 'global' )->block( 'enhancements__core_GoogleMaps', $form );
|
||||
}
|
||||
|
||||
/**
|
||||
* Enable/Disable
|
||||
*
|
||||
* @param $enabled bool Enable/Disable
|
||||
* @return void
|
||||
*/
|
||||
public function toggle( $enabled )
|
||||
{
|
||||
\IPS\Db::i()->update( 'core_sys_conf_settings', array( 'conf_value' => $enabled ), array( 'conf_key=?', 'googlemaps' ) );
|
||||
unset( \IPS\Data\Store::i()->settings );
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,216 @@
|
||||
<?php
|
||||
/**
|
||||
* @brief Community Enhancements: Mandrill integration
|
||||
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
|
||||
* @copyright (c) 2001 - SVN_YYYY Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/legal/standards/
|
||||
* @package IPS Social Suite
|
||||
* @since 20 June 2013
|
||||
* @version SVN_VERSION_NUMBER
|
||||
*/
|
||||
|
||||
namespace IPS\core\extensions\core\CommunityEnhancements;
|
||||
|
||||
/* 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;
|
||||
}
|
||||
|
||||
/**
|
||||
* Community Enhancements: Mandrill integration
|
||||
*/
|
||||
class _Mandrill
|
||||
{
|
||||
/**
|
||||
* @brief IPS-provided enhancement?
|
||||
*/
|
||||
public $ips = FALSE;
|
||||
|
||||
/**
|
||||
* @brief Enhancement is enabled?
|
||||
*/
|
||||
public $enabled = FALSE;
|
||||
|
||||
/**
|
||||
* @brief Enhancement has configuration options?
|
||||
*/
|
||||
public $hasOptions = TRUE;
|
||||
|
||||
/**
|
||||
* @brief Icon data
|
||||
*/
|
||||
public $icon = "mandrill.png";
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
$this->enabled = ( \IPS\Settings::i()->mandrill_api_key && \IPS\Settings::i()->mandrill_use_for );
|
||||
}
|
||||
|
||||
/**
|
||||
* Edit
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function edit()
|
||||
{
|
||||
$form = new \IPS\Helpers\Form;
|
||||
$form->add( new \IPS\Helpers\Form\Radio( 'mandrill_use_for', \IPS\Settings::i()->mandrill_use_for, TRUE, array(
|
||||
'options' => array(
|
||||
'0' => 'mandrill_donot_use',
|
||||
'1' => 'mandrill_bulkmail_use',
|
||||
'2' => 'mandrill_all_use'
|
||||
),
|
||||
'toggles' => array(
|
||||
'0' => array(),
|
||||
'1' => array('mandrill_api_key','mandrill_username'),
|
||||
'2' => array('mandrill_api_key','mandrill_username'),
|
||||
)
|
||||
) ) );
|
||||
$form->add( new \IPS\Helpers\Form\Text( 'mandrill_username', \IPS\Settings::i()->mandrill_username, FALSE, array(), NULL, NULL, NULL, 'mandrill_username' ) );
|
||||
$form->add( new \IPS\Helpers\Form\Text( 'mandrill_api_key', \IPS\Settings::i()->mandrill_api_key, FALSE, array(), NULL, NULL, NULL, 'mandrill_api_key' ) );
|
||||
|
||||
if ( $form->values() )
|
||||
{
|
||||
try
|
||||
{
|
||||
$this->testSettings( $form->values() );
|
||||
}
|
||||
catch ( \DomainException $e )
|
||||
{
|
||||
\IPS\Output::i()->error( $e->getMessage(), '4S123/1', 500 );
|
||||
}
|
||||
catch ( \InvalidArgumentException $e )
|
||||
{
|
||||
\IPS\Output::i()->error( $e->getMessage(), '', 500 ); //@todo check errorcode
|
||||
}
|
||||
|
||||
$form->saveAsSettings();
|
||||
\IPS\Session::i()->log( 'acplog__enhancements_edited', array( 'enhancements__core_Mandrill' => TRUE ) );
|
||||
\IPS\Output::i()->inlineMessage = \IPS\Member::loggedIn()->language()->addToStack('saved');
|
||||
}
|
||||
|
||||
\IPS\Output::i()->sidebar['actions'] = array(
|
||||
'help' => array(
|
||||
'title' => 'learn_more',
|
||||
'icon' => 'question-circle',
|
||||
'link' => \IPS\Http\Url::ips( 'docs/mandrill' ),
|
||||
'target' => '_blank'
|
||||
),
|
||||
'signup' => array(
|
||||
'title' => 'mandril_signup',
|
||||
'icon' => 'external-link-square',
|
||||
'link' => \IPS\Http\Url::ips( 'docs/mandrill_signup' ),
|
||||
'target' => '_blank'
|
||||
),
|
||||
);
|
||||
|
||||
\IPS\Output::i()->output = $form;
|
||||
}
|
||||
|
||||
/**
|
||||
* Enable/Disable
|
||||
*
|
||||
* @param $enabled bool Enable/Disable
|
||||
* @return void
|
||||
* @throws \DomainException
|
||||
*/
|
||||
public function toggle( $enabled )
|
||||
{
|
||||
/* If we're disabling, just disable */
|
||||
if( !$enabled )
|
||||
{
|
||||
\IPS\Db::i()->update( 'core_sys_conf_settings', array( 'conf_value' => 0 ), array( 'conf_key=?', 'mandrill_use_for' ) );
|
||||
unset( \IPS\Data\Store::i()->settings );
|
||||
}
|
||||
|
||||
/* Otherwise if we already have an API key, just toggle bulk mail on */
|
||||
if( $enabled && \IPS\Settings::i()->mandrill_api_key )
|
||||
{
|
||||
\IPS\Db::i()->update( 'core_sys_conf_settings', array( 'conf_value' => 1 ), array( 'conf_key=?', 'mandrill_use_for' ) );
|
||||
unset( \IPS\Data\Store::i()->settings );
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Otherwise we need to let them enter an API key before we can enable. Throwing an exception causes you to be redirected to the settings page. */
|
||||
throw new \DomainException;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Test Settings
|
||||
*
|
||||
* @param array $values Form values
|
||||
* @return void
|
||||
* @throws \LogicException
|
||||
*/
|
||||
protected function testSettings( $values )
|
||||
{
|
||||
/* If we've disabled, just shut off */
|
||||
if( (int) $values['mandrill_use_for'] === 0 )
|
||||
{
|
||||
if( \IPS\Settings::i()->smtp_host == 'smtp.mandrillapp.com' && \IPS\Settings::i()->mail_method == 'smtp' )
|
||||
{
|
||||
\IPS\Db::i()->update( 'core_sys_conf_settings', array( 'conf_value' => 'mail' ), array( 'conf_key=?', 'mail_method' ) );
|
||||
unset( \IPS\Data\Store::i()->settings );
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
/* If we enable Mandrill but do not supply an API key or username, this is a problem */
|
||||
if( !$values['mandrill_username'] OR !$values['mandrill_api_key'] )
|
||||
{
|
||||
throw new \InvalidArgumentException( "mandrill_enable_need_details" );
|
||||
}
|
||||
|
||||
/* Test Mandrill settings */
|
||||
try
|
||||
{
|
||||
$info = \IPS\Email::mandrill( 'users_info', $values['mandrill_api_key'] );
|
||||
if ( $info === NULL or $info->username != $values['mandrill_username'] )
|
||||
{
|
||||
throw new \DomainException('mandrill_bad_credentials');
|
||||
}
|
||||
}
|
||||
catch ( \IPS\Http\Request\Exception $e )
|
||||
{
|
||||
throw new \DomainException( 'mandrill_bad_credentials' );
|
||||
}
|
||||
|
||||
/* Tell IPS */
|
||||
$response = NULL;
|
||||
try
|
||||
{
|
||||
$response = \IPS\Http\Url::ips( 'mandrill' )->request()->post( array(
|
||||
'key' => $values['mandrill_api_key'],
|
||||
'username' => $values['mandrill_username'],
|
||||
'lkey' => \IPS\Settings::i()->ipb_reg_number,
|
||||
'version' => \IPS\Application::load('core')->long_version
|
||||
) )->decodeJson();
|
||||
}
|
||||
catch ( \IPS\Http\Request\Exception $e ) { }
|
||||
|
||||
/* If we want to use Mandrill for "everything", we need to update our local SMTP settings with the values returned from the API call */
|
||||
if( $values['mandrill_use_for'] == 2 )
|
||||
{
|
||||
foreach( $response as $settingKey => $settingValue )
|
||||
{
|
||||
\IPS\Db::i()->update( 'core_sys_conf_settings', array( 'conf_value' => $settingValue ), array( 'conf_key=?', $settingKey ) );
|
||||
unset( \IPS\Data\Store::i()->settings );
|
||||
}
|
||||
}
|
||||
/* Else if we don't want to use Mandrill for everything but we're currently configured to, update our email settings to fall back to standard PHP mail */
|
||||
else if( $values['mandrill_use_for'] == 1 && \IPS\Settings::i()->smtp_host == 'smtp.mandrillapp.com' && \IPS\Settings::i()->mail_method == 'smtp' )
|
||||
{
|
||||
\IPS\Db::i()->update( 'core_sys_conf_settings', array( 'conf_value' => 'mail' ), array( 'conf_key=?', 'mail_method' ) );
|
||||
unset( \IPS\Data\Store::i()->settings );
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,128 @@
|
||||
<?php
|
||||
/**
|
||||
* @brief Community Enhancements: Spam Monitoring Service
|
||||
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
|
||||
* @copyright (c) 2001 - SVN_YYYY Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/legal/standards/
|
||||
* @package IPS Social Suite
|
||||
* @since 17 Apr 2013
|
||||
* @version SVN_VERSION_NUMBER
|
||||
*/
|
||||
|
||||
namespace IPS\core\extensions\core\CommunityEnhancements;
|
||||
|
||||
/* 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;
|
||||
}
|
||||
|
||||
/**
|
||||
* Community Enhancements: Spam Monitoring Service
|
||||
*/
|
||||
class _SpamMonitoring
|
||||
{
|
||||
/**
|
||||
* @brief IPS-provided enhancement?
|
||||
*/
|
||||
public $ips = TRUE;
|
||||
|
||||
/**
|
||||
* @brief Enhancement is enabled?
|
||||
*/
|
||||
public $enabled = FALSE;
|
||||
|
||||
/**
|
||||
* @brief Enhancement has configuration options?
|
||||
*/
|
||||
public $hasOptions = TRUE;
|
||||
|
||||
/**
|
||||
* @brief Icon data
|
||||
*/
|
||||
public $icon = "ips.png";
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
$licenseData = \IPS\IPS::licenseKey();
|
||||
if( !$licenseData or !$licenseData['products']['spam'] or strtotime( $licenseData['expires'] ) < time() )
|
||||
{
|
||||
$this->enabled = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->enabled = \IPS\Settings::i()->spam_service_enabled;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Edit
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function edit()
|
||||
{
|
||||
try
|
||||
{
|
||||
$this->testSettings();
|
||||
}
|
||||
catch ( \RuntimeException $e )
|
||||
{
|
||||
\IPS\Output::i()->error( 'spam_service_error', '3C116/3', 500, '' );
|
||||
}
|
||||
catch ( \LogicException $e )
|
||||
{
|
||||
\IPS\Output::i()->error( $e->getMessage(), '2C116/2', 403, '' );
|
||||
}
|
||||
|
||||
\IPS\Output::i()->redirect( \IPS\Http\Url::internal( 'app=core&module=membersettings&controller=spam&tab=service' ) );
|
||||
}
|
||||
|
||||
/**
|
||||
* Enable/Disable
|
||||
*
|
||||
* @param $enabled bool Enable/Disable
|
||||
* @return void
|
||||
* @throws \Exception
|
||||
*/
|
||||
public function toggle( $enabled )
|
||||
{
|
||||
if ( $enabled )
|
||||
{
|
||||
$this->testSettings();
|
||||
}
|
||||
|
||||
\IPS\Db::i()->update( 'core_sys_conf_settings', array( 'conf_value' => $enabled ), array( 'conf_key=?', 'spam_service_enabled' ) );
|
||||
unset( \IPS\Data\Store::i()->settings );
|
||||
}
|
||||
|
||||
/**
|
||||
* Test Settings
|
||||
*
|
||||
* @return void
|
||||
* @throws \Exception
|
||||
*/
|
||||
protected function testSettings()
|
||||
{
|
||||
$licenseData = \IPS\IPS::licenseKey();
|
||||
|
||||
if ( !$licenseData )
|
||||
{
|
||||
throw new \DomainException( \IPS\Member::loggedIn()->language()->addToStack('spam_service_nokey', FALSE, array( 'sprintf' => array( \IPS\Http\Url::internal( 'app=core&module=settings&controller=licensekey', null ) ) ) ) );
|
||||
}
|
||||
if ( strtotime( $licenseData['expires'] ) < time() )
|
||||
{
|
||||
throw new \DomainException('licensekey_expired');
|
||||
}
|
||||
if ( !$licenseData['products']['spam'] )
|
||||
{
|
||||
throw new \DomainException('spam_service_noservice');
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,221 @@
|
||||
<?php
|
||||
/**
|
||||
* @brief Community Enhancements: Viglink integration
|
||||
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
|
||||
* @copyright (c) 2001 - SVN_YYYY Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/legal/standards/
|
||||
* @package IPS Social Suite
|
||||
* @since 20 June 2013
|
||||
* @version SVN_VERSION_NUMBER
|
||||
*/
|
||||
|
||||
namespace IPS\core\extensions\core\CommunityEnhancements;
|
||||
|
||||
/* 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;
|
||||
}
|
||||
|
||||
/**
|
||||
* Community Enhancements: Viglink
|
||||
*/
|
||||
class _Viglink
|
||||
{
|
||||
/**
|
||||
* @brief IPS-provided enhancement?
|
||||
*/
|
||||
public $ips = FALSE;
|
||||
|
||||
/**
|
||||
* @brief Enhancement is enabled?
|
||||
*/
|
||||
public $enabled = FALSE;
|
||||
|
||||
/**
|
||||
* @brief Enhancement has configuration options?
|
||||
*/
|
||||
public $hasOptions = TRUE;
|
||||
|
||||
/**
|
||||
* @brief Icon data
|
||||
*/
|
||||
public $icon = "viglink.png";
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
$this->enabled = ( \IPS\Settings::i()->viglink_enabled );
|
||||
}
|
||||
|
||||
/**
|
||||
* Edit
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function edit()
|
||||
{
|
||||
\IPS\Output::i()->sidebar['actions'] = array(
|
||||
'help' => array(
|
||||
'title' => 'learn_more',
|
||||
'icon' => 'question-circle',
|
||||
'link' => \IPS\Http\Url::ips( 'docs/viglink' ),
|
||||
'target' => '_blank'
|
||||
)
|
||||
);
|
||||
|
||||
if ( \IPS\Settings::i()->viglink_api_key )
|
||||
{
|
||||
$form = new \IPS\Helpers\Form;
|
||||
|
||||
$form->add( new \IPS\Helpers\Form\YesNo( 'viglink_enabled', \IPS\Settings::i()->viglink_enabled, FALSE, array( 'togglesOn' => array( 'viglink_api_key', 'viglink_subid', 'viglink_groups', 'viglink_norewrite' ) ) ) );
|
||||
|
||||
if ( !\IPS\Settings::i()->viglink_subid )
|
||||
{
|
||||
$form->add( new \IPS\Helpers\Form\Text( 'viglink_api_key', \IPS\Settings::i()->viglink_api_key, FALSE, array(), NULL, NULL, NULL, 'viglink_api_key' ) );
|
||||
}
|
||||
|
||||
$form->add( new \IPS\Helpers\Form\Select( 'viglink_groups', explode( ',', \IPS\Settings::i()->viglink_groups ), FALSE, array( 'options' => \IPS\Member\Group::groups(), 'parse' => 'normal', 'multiple' => true, 'unlimited' => 'all', 'unlimitedLang' => 'all_groups' ), NULL, NULL, NULL, 'viglink_groups' ) );
|
||||
$form->add( new \IPS\Helpers\Form\Select( 'viglink_norewrite', explode( ',', \IPS\Settings::i()->viglink_norewrite ), FALSE, array( 'options' => \IPS\Member\Group::groups(), 'parse' => 'normal', 'multiple' => true ), NULL, NULL, NULL, 'viglink_norewrite' ) );
|
||||
|
||||
if ( $values = $form->values( TRUE ) )
|
||||
{
|
||||
if ( !$values['viglink_enabled'] )
|
||||
{
|
||||
$values['viglink_api_key'] = '';
|
||||
}
|
||||
|
||||
$form->saveAsSettings( $values );
|
||||
\IPS\Session::i()->log( 'acplog__enhancements_edited', array( 'enhancements__core_Viglink' => TRUE ) );
|
||||
\IPS\Output::i()->inlineMessage = \IPS\Member::loggedIn()->language()->addToStack('saved');
|
||||
}
|
||||
|
||||
\IPS\Output::i()->sidebar['actions']['signup'] = array(
|
||||
'title' => 'viglink_account_type',
|
||||
'icon' => 'external-link-square',
|
||||
'link' => \IPS\Http\Url::ips('docs/viglink_account'),
|
||||
'target' => '_blank'
|
||||
);
|
||||
|
||||
\IPS\Output::i()->output = \IPS\Theme::i()->getTemplate( 'global' )->block( 'enhancements__core_Viglink', $form );
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
$json = $this->_makeApiCall();
|
||||
|
||||
$form = new \IPS\Helpers\Form;
|
||||
$form->attributes['data-controller'] = 'core.admin.core.viglink';
|
||||
$form->attributes['data-viglinkUrl'] = $json['URL'];
|
||||
$form->add( new \IPS\Helpers\Form\Radio( 'viglink_account_type', 'create', FALSE, array(
|
||||
'options' => array(
|
||||
'create' => 'viglink_account_type_create',
|
||||
'existing' => 'viglink_account_existing'
|
||||
),
|
||||
'toggles' => array(
|
||||
'existing' => array( 'viglink_api_key' ),
|
||||
),
|
||||
) ) );
|
||||
$form->add( new \IPS\Helpers\Form\Text( 'viglink_api_key', NULL, FALSE, array(), function( $val ){
|
||||
if( !$val && \IPS\Request::i()->viglink_account_type == 'existing' )
|
||||
{
|
||||
throw new \InvalidArgumentException("required");
|
||||
}
|
||||
}, NULL, NULL, 'viglink_api_key' ) );
|
||||
|
||||
if ( $values = $form->values() )
|
||||
{
|
||||
if ( $values['viglink_account_type'] == 'create' )
|
||||
{
|
||||
$values['viglink_api_key'] = $json['API_KEY'];
|
||||
$values['viglink_subid'] = $json['SUBID'];
|
||||
}
|
||||
else
|
||||
{
|
||||
$values['viglink_subid'] = '';
|
||||
}
|
||||
|
||||
$values['viglink_enabled'] = TRUE;
|
||||
unset( $values['viglink_account_type'] );
|
||||
$form->saveAsSettings( $values );
|
||||
\IPS\Session::i()->log( 'acplog__enhancements_edited', array( 'enhancements__core_Viglink' => TRUE ) );
|
||||
\IPS\Output::i()->inlineMessage = \IPS\Member::loggedIn()->language()->addToStack('saved');
|
||||
}
|
||||
}
|
||||
|
||||
\IPS\Output::i()->output = $form;
|
||||
}
|
||||
|
||||
/**
|
||||
* Make call to IPS to get API keys
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
protected function _makeApiCall()
|
||||
{
|
||||
$subId = NULL;
|
||||
if ( \IPS\Settings::i()->ipb_reg_number )
|
||||
{
|
||||
$exploded = explode( '-', \IPS\Settings::i()->ipb_reg_number );
|
||||
if ( isset( $exploded[3] ) )
|
||||
{
|
||||
$subId = $exploded[3];
|
||||
}
|
||||
}
|
||||
if ( $subId === NULL )
|
||||
{
|
||||
$subId = \IPS\Settings::i()->board_url;
|
||||
if ( \strlen( $subId ) > 32 )
|
||||
{
|
||||
$subId = str_replace( array( 'http://', 'https://' ), '', $subId );
|
||||
}
|
||||
if ( \strlen( $subId ) > 32 )
|
||||
{
|
||||
$subId = md5( $subId );
|
||||
}
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
return \IPS\Http\Url::ips( "viglink/{$subId}" )->request()->get()->decodeJson();
|
||||
}
|
||||
catch ( \IPS\Http\Url\Exception $e )
|
||||
{
|
||||
\IPS\Output::i()->error( 'viglink_error', '5S144/2', 500, '' );
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Enable/Disable
|
||||
*
|
||||
* @param $enabled bool Enable/Disable
|
||||
* @return void
|
||||
* @throws \DomainException
|
||||
*/
|
||||
public function toggle( $enabled )
|
||||
{
|
||||
/* If we're disabling, just disable */
|
||||
if( !$enabled )
|
||||
{
|
||||
\IPS\Db::i()->update( 'core_sys_conf_settings', array( 'conf_value' => 0 ), array( 'conf_key=?', 'viglink_enabled' ) );
|
||||
unset( \IPS\Data\Store::i()->settings );
|
||||
}
|
||||
|
||||
/* Otherwise if we already have an API key, just toggle on */
|
||||
if( $enabled && \IPS\Settings::i()->viglink_api_key )
|
||||
{
|
||||
\IPS\Db::i()->update( 'core_sys_conf_settings', array( 'conf_value' => 1 ), array( 'conf_key=?', 'viglink_enabled' ) );
|
||||
unset( \IPS\Data\Store::i()->settings );
|
||||
}
|
||||
/* Otherwise we need to let them enter an API key before we can enable. Throwing an exception causes you to be redirected to the settings page. */
|
||||
else
|
||||
{
|
||||
throw new \DomainException;
|
||||
}
|
||||
}
|
||||
}
|
||||
Whitespace-only changes.
@@ -0,0 +1,53 @@
|
||||
<?php
|
||||
/**
|
||||
* @brief Content Router extension: Status
|
||||
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
|
||||
* @copyright (c) 2001 - SVN_YYYY Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/legal/standards/
|
||||
* @package IPS Social Suite
|
||||
* @subpackage Core
|
||||
* @since 24 Feb 2014
|
||||
* @version SVN_VERSION_NUMBER
|
||||
*/
|
||||
|
||||
namespace IPS\core\extensions\core\ContentRouter;
|
||||
|
||||
/* 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;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Content Router extension: Statuses
|
||||
*/
|
||||
class _Status
|
||||
{
|
||||
/**
|
||||
* @brief Content Item Classes
|
||||
*/
|
||||
public $classes = array( 'IPS\core\Statuses\Status' );
|
||||
|
||||
/**
|
||||
* Use a custom table helper when building content item tables
|
||||
*
|
||||
* @param string $className The content item class
|
||||
* @param \IPS\Http\Url $url The URL to use for the table
|
||||
* @param array $where Custom where clause to pass to the table helper
|
||||
* @return \IPS\Helpers\Table|void Custom table helper class to use
|
||||
*/
|
||||
public function customTableHelper( $className, $url, $where=array() )
|
||||
{
|
||||
if( !in_array( $className, $this->classes ) AND $className != 'IPS\core\Statuses\Status' )
|
||||
{
|
||||
return new \IPS\Helpers\Table\Content( $className, $url, $where );
|
||||
}
|
||||
|
||||
$table = new \IPS\Helpers\Table\Content( $className, $url, $where );
|
||||
$table->classes[] = "ipsPad";
|
||||
$table->classes[] = "cStatusUpdates";
|
||||
|
||||
return $table;
|
||||
}
|
||||
}
|
||||
Whitespace-only changes.
@@ -0,0 +1,46 @@
|
||||
<?php
|
||||
/**
|
||||
* @brief Create Menu Extension : Announcement
|
||||
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
|
||||
* @copyright (c) 2001 - SVN_YYYY Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/legal/standards/
|
||||
* @package IPS Social Suite
|
||||
* @since 23 Jun 2015
|
||||
* @version SVN_VERSION_NUMBER
|
||||
*/
|
||||
|
||||
namespace IPS\core\extensions\core\CreateMenu;
|
||||
|
||||
/* 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;
|
||||
}
|
||||
|
||||
/**
|
||||
* Create Menu Extension: Announcement
|
||||
*/
|
||||
class _Announcement
|
||||
{
|
||||
/**
|
||||
* Get Items
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function getItems()
|
||||
{
|
||||
if ( \IPS\Member::loggedIn()->modPermission('can_manage_announcements') )
|
||||
{
|
||||
return array(
|
||||
'announcement' => array(
|
||||
'link' => \IPS\Http\Url::internal( 'app=core&module=modcp&controller=modcp&tab=announcements&action=create', 'front', 'modcp_announcements' ),
|
||||
'title' => 'add_announcement',
|
||||
'extraData' => array( 'data-ipsDialog' => true )
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
return array();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,46 @@
|
||||
<?php
|
||||
/**
|
||||
* @brief Create Menu Extension : Status
|
||||
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
|
||||
* @copyright (c) 2001 - SVN_YYYY Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/legal/standards/
|
||||
* @package IPS Social Suite
|
||||
* @since 21 Sep 2014
|
||||
* @version SVN_VERSION_NUMBER
|
||||
*/
|
||||
|
||||
namespace IPS\core\extensions\core\CreateMenu;
|
||||
|
||||
/* 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;
|
||||
}
|
||||
|
||||
/**
|
||||
* Create Menu Extension: Status
|
||||
*/
|
||||
class _Status
|
||||
{
|
||||
/**
|
||||
* Get Items
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function getItems()
|
||||
{
|
||||
if ( \IPS\Member::loggedIn()->canAccessModule( \IPS\Application\Module::get( 'core', 'status' ) ) and \IPS\core\Statuses\Status::canCreateFromCreateMenu() )
|
||||
{
|
||||
return array(
|
||||
'member_status' => array(
|
||||
'link' => \IPS\Http\Url::internal( 'app=core&module=status&controller=ajaxcreate', 'front' ),
|
||||
'title' => 'status_update',
|
||||
'flashMessage' => 'saved',
|
||||
'extraData' => array( 'data-ipsdialog-remotesubmit' => true, 'data-ipsDialog' => true, 'data-role' => 'updateStatus' )
|
||||
)
|
||||
);
|
||||
}
|
||||
return array();
|
||||
}
|
||||
}
|
||||
Whitespace-only changes.
@@ -0,0 +1,62 @@
|
||||
<?php
|
||||
/**
|
||||
* @brief Dashboard extension: Admin notes
|
||||
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
|
||||
* @copyright (c) 2001 - SVN_YYYY Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/legal/standards/
|
||||
* @package IPS Social Suite
|
||||
* @since 23 Jul 2013
|
||||
* @version SVN_VERSION_NUMBER
|
||||
*/
|
||||
|
||||
namespace IPS\core\extensions\core\Dashboard;
|
||||
|
||||
/* 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;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Dashboard extension: Admin notes
|
||||
*/
|
||||
class _AdminNotes
|
||||
{
|
||||
/**
|
||||
* Can the current user view this dashboard item?
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function canView()
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the block to show on the dashboard
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getBlock()
|
||||
{
|
||||
$form = new \IPS\Helpers\Form( 'form', 'save', \IPS\Http\Url::internal( "app=core&module=overview&controller=dashboard&do=getBlock&appKey=core&blockKey=core_AdminNotes" )->csrf() );
|
||||
$form->add( new \IPS\Helpers\Form\TextArea( 'admin_notes', ( isset( \IPS\Settings::i()->acp_notes ) ) ? htmlspecialchars( \IPS\Settings::i()->acp_notes, \IPS\HTMLENTITIES, 'UTF-8', FALSE ) : '' ) );
|
||||
|
||||
if( $values = $form->values() )
|
||||
{
|
||||
$updated = new \IPS\DateTime;
|
||||
|
||||
\IPS\Db::i()->update( 'core_sys_conf_settings', array( 'conf_value' => $values['admin_notes'] ), array( 'conf_key=?', 'acp_notes' ) );
|
||||
\IPS\Db::i()->update( 'core_sys_conf_settings', array( 'conf_value' => $updated->getTimestamp() ), array( 'conf_key=?', 'acp_notes_updated' ) );
|
||||
unset( \IPS\Data\Store::i()->settings );
|
||||
|
||||
if( \IPS\Request::i()->isAjax() )
|
||||
{
|
||||
return (string) $updated;
|
||||
}
|
||||
}
|
||||
|
||||
return $form->customTemplate( array( \IPS\Theme::i()->getTemplate( 'dashboard' ), 'adminnotes' ), ( isset( \IPS\Settings::i()->acp_notes_updated ) and \IPS\Settings::i()->acp_notes_updated ) ? (string) \IPS\DateTime::ts( intval( \IPS\Settings::i()->acp_notes_updated ) ) : '' );
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,63 @@
|
||||
<?php
|
||||
/**
|
||||
* @brief Dashboard extension: Users Awaiting Validation
|
||||
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
|
||||
* @copyright (c) 2001 - SVN_YYYY Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/legal/standards/
|
||||
* @package IPS Social Suite
|
||||
* @since 13 Aug 2013
|
||||
* @version SVN_VERSION_NUMBER
|
||||
*/
|
||||
|
||||
namespace IPS\core\extensions\core\Dashboard;
|
||||
|
||||
/* 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;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Dashboard extension: Failed Admin Logins
|
||||
*/
|
||||
class _AwaitingValidation
|
||||
{
|
||||
/**
|
||||
* Can the current user view this dashboard item?
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function canView()
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the block to show on the dashboard
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getBlock()
|
||||
{
|
||||
$users = array();
|
||||
|
||||
foreach (
|
||||
\IPS\Db::i()->select(
|
||||
"*",
|
||||
'core_validating',
|
||||
array( 'user_verified=?', TRUE ),
|
||||
NULL,
|
||||
NULL
|
||||
)->join(
|
||||
'core_members',
|
||||
'core_validating.member_id=core_members.member_id'
|
||||
) as $user
|
||||
)
|
||||
{
|
||||
$users[] = \IPS\Member::constructFromData( $user );
|
||||
}
|
||||
|
||||
return \IPS\Theme::i()->getTemplate( 'dashboard' )->awaitingValidation( $users );
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,65 @@
|
||||
<?php
|
||||
/**
|
||||
* @brief Dashboard extension: Background Queue Progress
|
||||
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
|
||||
* @copyright (c) 2001 - SVN_YYYY Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/legal/standards/
|
||||
* @package IPS Social Suite
|
||||
* @since 27 May 2014
|
||||
* @version SVN_VERSION_NUMBER
|
||||
*/
|
||||
|
||||
namespace IPS\core\extensions\core\Dashboard;
|
||||
|
||||
/* 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;
|
||||
}
|
||||
|
||||
/**
|
||||
* Dashboard extension: Background Queue Progress
|
||||
*/
|
||||
class _BackgroundQueue
|
||||
{
|
||||
/**
|
||||
* Can the current user view this dashboard item?
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function canView()
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the block to show on the dashboard
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getBlock()
|
||||
{
|
||||
$rows = array();
|
||||
|
||||
$select = \IPS\Db::i()->select( '*', 'core_queue', NULL, 'priority ASC, date ASC' );
|
||||
if ( count( $select ) )
|
||||
{
|
||||
foreach ( $select as $queueData )
|
||||
{
|
||||
$extensions = \IPS\Application::load( $queueData['app'] )->extensions( 'core', 'Queue', FALSE );
|
||||
if ( isset( $extensions[ $queueData['key'] ] ) )
|
||||
{
|
||||
try
|
||||
{
|
||||
$class = new $extensions[ $queueData['key'] ];
|
||||
$rows[] = $class->getProgress( json_decode( $queueData['data'], TRUE ), $queueData['offset'] );
|
||||
}
|
||||
catch ( \OutOfRangeException $e ) { }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return \IPS\Theme::i()->getTemplate( 'dashboard' )->backgroundQueue( $rows );
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,54 @@
|
||||
<?php
|
||||
/**
|
||||
* @brief Dashboard extension: Failed Admin Logins
|
||||
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
|
||||
* @copyright (c) 2001 - SVN_YYYY Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/legal/standards/
|
||||
* @package IPS Social Suite
|
||||
* @since 13 Aug 2013
|
||||
* @version SVN_VERSION_NUMBER
|
||||
*/
|
||||
|
||||
namespace IPS\core\extensions\core\Dashboard;
|
||||
|
||||
/* 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;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Dashboard extension: Failed Admin Logins
|
||||
*/
|
||||
class _FailedLogins
|
||||
{
|
||||
/**
|
||||
* Can the current user view this dashboard item?
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function canView()
|
||||
{
|
||||
return \IPS\Member::loggedIn()->hasAcpRestriction( 'core' , 'settings', 'login_manage' );
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the block to show on the dashboard
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getBlock()
|
||||
{
|
||||
$logins = \IPS\Db::i()->select(
|
||||
array( 'admin_id', 'admin_ip_address', 'admin_username', 'admin_time' ),
|
||||
'core_admin_login_logs',
|
||||
array( 'admin_success=?', FALSE ),
|
||||
'admin_time DESC',
|
||||
array( 0, 3 )
|
||||
);
|
||||
|
||||
return \IPS\Theme::i()->getTemplate( 'dashboard' )->failedLogins( $logins );
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,91 @@
|
||||
<?php
|
||||
/**
|
||||
* @brief Dashboard extension: Show a notice if there are failed IPS Connect communications
|
||||
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
|
||||
* @copyright (c) 2001 - SVN_YYYY Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/legal/standards/
|
||||
* @package IPS Social Suite
|
||||
* @since 03 Dec 2013
|
||||
* @version SVN_VERSION_NUMBER
|
||||
*/
|
||||
|
||||
namespace IPS\core\extensions\core\Dashboard;
|
||||
|
||||
/* 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;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Dashboard extension: Show a notice if there are failed IPS Connect communications
|
||||
*/
|
||||
class _IpsconnectMaster
|
||||
{
|
||||
/**
|
||||
* Can the current user view this dashboard item?
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function canView()
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the block HTML show on the dashboard
|
||||
*
|
||||
* @return string
|
||||
* @note We may want to consider doing something when there are failed queued requests but the slave record no longer exists. For now I don't want to automatically
|
||||
clear them because it may be indicative of a bug elsewhere, but down the road we may want to simply delete the requests from the queue table and not show the failure.
|
||||
*/
|
||||
public function getBlock()
|
||||
{
|
||||
/* Are we deleting the slave? */
|
||||
if( \IPS\Request::i()->deleteSlave )
|
||||
{
|
||||
\IPS\Session::i()->csrfCheck();
|
||||
|
||||
\IPS\Db::i()->delete( 'core_ipsconnect_queue', array( 'slave_id=?', intval( \IPS\Request::i()->deleteSlave ) ) );
|
||||
\IPS\Db::i()->delete( 'core_ipsconnect_slaves', array( 'slave_id=?', intval( \IPS\Request::i()->deleteSlave ) ) );
|
||||
\IPS\Db::i()->update( 'core_sys_conf_settings', array( 'conf_value' => \IPS\Db::i()->select( 'COUNT(*)', 'core_ipsconnect_slaves' )->first() ), array( 'conf_key=?', 'connect_slaves' ) );
|
||||
unset( \IPS\Data\Store::i()->settings );
|
||||
|
||||
\IPS\Output::i()->inlineMessage = \IPS\Member::loggedIn()->language()->addToStack('connect_slave_deleted');
|
||||
\IPS\Session::i()->log( 'acplog__slave_deleted' );
|
||||
}
|
||||
|
||||
/* Do we have any fails to show? */
|
||||
$fails = \IPS\Db::i()->select( 'DISTINCT(slave_id)', 'core_ipsconnect_queue' );
|
||||
|
||||
if( count($fails) )
|
||||
{
|
||||
$failures = array();
|
||||
|
||||
foreach( $fails as $slave )
|
||||
{
|
||||
try
|
||||
{
|
||||
$slave = \IPS\Db::i()->select( '*', 'core_ipsconnect_slaves', array( 'slave_id=?', $slave ) )->first();
|
||||
$fails = count( \IPS\Db::i()->select( 'id', 'core_ipsconnect_queue', array( 'slave_id=?', $slave['slave_id'] ) ) );
|
||||
|
||||
$failures[] = array(
|
||||
'slave' => $slave,
|
||||
'count' => $fails
|
||||
);
|
||||
}
|
||||
catch( \UnderflowException $e )
|
||||
{
|
||||
/* This means that the slave record doesn't actually exist which would only happen in theory if someone played with the URL */
|
||||
}
|
||||
}
|
||||
|
||||
return \IPS\Theme::i()->getTemplate( 'dashboard' )->connectFailures( $failures, count($failures) );
|
||||
}
|
||||
else
|
||||
{
|
||||
return \IPS\Theme::i()->getTemplate( 'dashboard' )->noConnectFailures();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,73 @@
|
||||
<?php
|
||||
/**
|
||||
* @brief Dashboard extension: Latest News
|
||||
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
|
||||
* @copyright (c) 2001 - SVN_YYYY Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/legal/standards/
|
||||
* @package IPS Social Suite
|
||||
* @since 13 Aug 2013
|
||||
* @version SVN_VERSION_NUMBER
|
||||
*/
|
||||
|
||||
namespace IPS\core\extensions\core\Dashboard;
|
||||
|
||||
/* 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;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Dashboard extension: Latest News
|
||||
*/
|
||||
class _LatestNews
|
||||
{
|
||||
/**
|
||||
* Can the current user view this dashboard item?
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function canView()
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the block to show on the dashboard
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getBlock()
|
||||
{
|
||||
$ipsNews = ( isset( \IPS\Data\Store::i()->ips_news ) ) ? json_decode( \IPS\Data\Store::i()->ips_news, TRUE ) : array();
|
||||
|
||||
if( empty( $ipsNews ) or $ipsNews['time'] < ( time() - 43200 ) )
|
||||
{
|
||||
try
|
||||
{
|
||||
$this->refreshNews();
|
||||
$ipsNews = ( isset( \IPS\Data\Store::i()->ips_news ) ) ? json_decode( \IPS\Data\Store::i()->ips_news, TRUE ) : array();
|
||||
}
|
||||
catch ( \IPS\Http\Exception $e ) {}
|
||||
catch( \IPS\Http\Request\Exception $e ) {}
|
||||
catch( \RuntimeException $e ) {}
|
||||
}
|
||||
|
||||
return \IPS\Theme::i()->getTemplate( 'dashboard' )->ipsNews( isset( $ipsNews['content'] ) ? $ipsNews['content'] : NULL );
|
||||
}
|
||||
|
||||
/**
|
||||
* Updates news store
|
||||
*
|
||||
* @return void
|
||||
* @throws \IPS\Http\Request\Exception
|
||||
*/
|
||||
protected function refreshNews()
|
||||
{
|
||||
\IPS\Data\Store::i()->ips_news = json_encode( array(
|
||||
'content' => \IPS\Http\Url::ips( 'news' )->request()->get()->decodeJson(),
|
||||
'time' => time()
|
||||
) );
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,58 @@
|
||||
<?php
|
||||
/**
|
||||
* @brief Dashboard extension: Current online admins
|
||||
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
|
||||
* @copyright (c) 2001 - SVN_YYYY Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/legal/standards/
|
||||
* @package IPS Social Suite
|
||||
* @since 14 Jul 2014
|
||||
* @version SVN_VERSION_NUMBER
|
||||
*/
|
||||
|
||||
namespace IPS\core\extensions\core\Dashboard;
|
||||
|
||||
/* 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;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Dashboard extension: Current online admins
|
||||
*/
|
||||
class _OnlineAdmins
|
||||
{
|
||||
/**
|
||||
* Can the current user view this dashboard item?
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function canView()
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the block to show on the dashboard
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getBlock()
|
||||
{
|
||||
$admins = array();
|
||||
|
||||
foreach( \IPS\Db::i()->select( '*', 'core_sys_cp_sessions', NULL, 'session_running_time DESC' ) as $admin )
|
||||
{
|
||||
$user = \IPS\Member::load( $admin['session_member_id'] );
|
||||
|
||||
if( $user->member_id )
|
||||
{
|
||||
$admins[ $user->member_id ] = array( 'session' => $admin, 'user' => $user );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return \IPS\Theme::i()->getTemplate( 'dashboard' )->onlineAdmins( $admins );
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,73 @@
|
||||
<?php
|
||||
/**
|
||||
* @brief Dashboard extension: Online Users
|
||||
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
|
||||
* @copyright (c) 2001 - SVN_YYYY Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/legal/standards/
|
||||
* @package IPS Social Suite
|
||||
* @since 23 Jul 2013
|
||||
* @version SVN_VERSION_NUMBER
|
||||
*/
|
||||
|
||||
namespace IPS\core\extensions\core\Dashboard;
|
||||
|
||||
/* 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;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Dashboard extension: Online Users
|
||||
*/
|
||||
class _OnlineUsers
|
||||
{
|
||||
/**
|
||||
* Can the current user view this dashboard item?
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function canView()
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the block to show on the dashboard
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getBlock()
|
||||
{
|
||||
/* Init Chart */
|
||||
$chart = new \IPS\Helpers\Chart;
|
||||
|
||||
/* Specify headers */
|
||||
$chart->addHeader( \IPS\Member::loggedIn()->language()->get('chart_app'), "string" );
|
||||
$chart->addHeader( \IPS\Member::loggedIn()->language()->get('chart_members'), "number" );
|
||||
|
||||
/* Add Rows */
|
||||
$online = \IPS\Db::i()->select( "COUNT(*) AS count, current_appcomponent",
|
||||
'core_sessions',
|
||||
array( 'running_time>?', \IPS\DateTime::create()->sub( new \DateInterval('PT15M') )->getTimestamp() ),
|
||||
NULL,
|
||||
NULL,
|
||||
'current_appcomponent'
|
||||
);
|
||||
|
||||
foreach ( $online as $row )
|
||||
{
|
||||
/* Only show if the application is still installed and enabled */
|
||||
if( !\IPS\Application::appIsEnabled( $row['current_appcomponent'] ) )
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
$chart->addRow( array( \IPS\Member::loggedIn()->language()->addToStack( "__app_" . $row['current_appcomponent']), $row['count'] ) );
|
||||
}
|
||||
|
||||
/* Output */
|
||||
return \IPS\Theme::i()->getTemplate( 'dashboard' )->onlineUsers( $online, $chart->render( 'PieChart', array( 'backgroundColor' => '#fafafa', 'chartArea' => array( 'width' =>"90%", 'height' => "90%" ) ) ) );
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,92 @@
|
||||
<?php
|
||||
/**
|
||||
* @brief Dashboard extension: Registrations
|
||||
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
|
||||
* @copyright (c) 2001 - SVN_YYYY Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/legal/standards/
|
||||
* @package IPS Social Suite
|
||||
* @since 23 Jul 2013
|
||||
* @version SVN_VERSION_NUMBER
|
||||
*/
|
||||
|
||||
namespace IPS\core\extensions\core\Dashboard;
|
||||
|
||||
/* 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;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Dashboard extension: Registrations
|
||||
*/
|
||||
class _Registrations
|
||||
{
|
||||
/**
|
||||
* Can the current user view this dashboard item?
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function canView()
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the block to show on the dashboard
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getBlock()
|
||||
{
|
||||
/* Init Chart */
|
||||
$chart = new \IPS\Helpers\Chart;
|
||||
|
||||
/* Specify headers */
|
||||
$chart->addHeader( \IPS\Member::loggedIn()->language()->addToStack('date'), 'string' ); // Since we're displaying a column chart, it makes more sense to use a string so they plotted as discreet columns rather than in the middle of dates
|
||||
$chart->addHeader( \IPS\Member::loggedIn()->language()->addToStack('members'), 'number' );
|
||||
|
||||
$data = array();
|
||||
$date = \IPS\DateTime::create()->sub( new \DateInterval( 'P7D' ) );
|
||||
|
||||
while ( $date->getTimestamp() < time() )
|
||||
{
|
||||
$data[ $date->format( 'j n Y' ) ] = 0;
|
||||
$date->add( new \DateInterval( 'P1D' ) );
|
||||
}
|
||||
|
||||
/* Add Rows */
|
||||
foreach ( \IPS\Db::i()->select( "COUNT(*) AS count, DATE_FORMAT( FROM_UNIXTIME( joined ), '%e %c %Y' ) as joined_date", 'core_members', array( 'joined>? AND name<>? AND email<>?', \IPS\DateTime::create()->sub( new \DateInterval( 'P7D' ) )->getTimestamp(), '', '' ), 'joined DESC', NULL, 'joined_date' ) as $row )
|
||||
{
|
||||
$data[$row['joined_date']] = $row['count'];
|
||||
}
|
||||
|
||||
/* Add to graph */
|
||||
foreach ( $data as $time => $d )
|
||||
{
|
||||
$datetime = new \IPS\DateTime;
|
||||
$exploded = explode( ' ', $time );
|
||||
$datetime->setDate( $exploded[2], $exploded[1], $exploded[0] );
|
||||
|
||||
$chart->addRow( array( $datetime->format( 'j M Y' ), $d ) );
|
||||
}
|
||||
|
||||
/* Work out the ticks */
|
||||
$ticks = array();
|
||||
$increment = ceil( max($data) / 5 );
|
||||
|
||||
for ($i = 1; $i <= 5; $i++)
|
||||
{
|
||||
$v = $increment * $i;
|
||||
$ticks[] = array( 'v' => $v, 'f' => (string) $v );
|
||||
}
|
||||
|
||||
/* Output */
|
||||
return \IPS\Theme::i()->getTemplate( 'dashboard' )->registrations( $chart->render( 'ColumnChart', array(
|
||||
'legend' => array( 'position' => 'none' ),
|
||||
'backgroundColor' => '#fafafa',
|
||||
'vAxis' => array( 'ticks' => $ticks ),
|
||||
) ) );
|
||||
}
|
||||
}
|
||||
Whitespace-only changes.
@@ -0,0 +1,317 @@
|
||||
<?php
|
||||
/**
|
||||
* @brief Editor Extension: Admin CP Settings, etc.
|
||||
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
|
||||
* @copyright (c) 2001 - SVN_YYYY Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/legal/standards/
|
||||
* @package IPS Social Suite
|
||||
* @since 2 Aug 2013
|
||||
* @version SVN_VERSION_NUMBER
|
||||
*/
|
||||
|
||||
namespace IPS\core\extensions\core\EditorLocations;
|
||||
|
||||
/* 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;
|
||||
}
|
||||
|
||||
/**
|
||||
* Editor Extension: Admin CP Settings, etc.
|
||||
*/
|
||||
class _Admin
|
||||
{
|
||||
/**
|
||||
* Can we use HTML in this editor?
|
||||
*
|
||||
* @param \IPS\Member $member The member
|
||||
* @param \IPS\Helpers\Form\Editor $field The editor field
|
||||
* @return bool|null NULL will cause the default value (based on the member's permissions) to be used, and is recommended in most cases. A boolean value will override that.
|
||||
*/
|
||||
public function canUseHtml( $member, $field )
|
||||
{
|
||||
if ( $field->options['autoSaveKey'] === 'acp-support-request' )
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/**
|
||||
* Can we use attachments in this editor?
|
||||
*
|
||||
* @param \IPS\Member $member The member
|
||||
* @param \IPS\Helpers\Form\Editor $field The editor field
|
||||
* @return bool|null NULL will cause the default value (based on the member's permissions) to be used, and is recommended in most cases. A boolean value will override that.
|
||||
*/
|
||||
public function canAttach( $member, $field )
|
||||
{
|
||||
if ( $field->options['autoSaveKey'] === 'acp-support-request' )
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/**
|
||||
* Permission check for attachments
|
||||
*
|
||||
* @param \IPS\Member $member The member
|
||||
* @param int|null $id1 Primary ID
|
||||
* @param int|null $id2 Secondary ID
|
||||
* @param string|null $id3 Arbitrary data
|
||||
* @return bool
|
||||
*/
|
||||
public function attachmentPermissionCheck( $member, $id1, $id2, $id3 )
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/**
|
||||
* Attachment lookup
|
||||
*
|
||||
* @param int|null $id1 Primary ID
|
||||
* @param int|null $id2 Secondary ID
|
||||
* @param string|null $id3 Arbitrary data
|
||||
* @return \IPS\Http\Url|\IPS\Content|\IPS\Node\Model
|
||||
* @throws \LogicException
|
||||
*/
|
||||
public function attachmentLookup( $id1, $id2, $id3 )
|
||||
{
|
||||
switch ( $id3 )
|
||||
{
|
||||
case 'appdisabled':
|
||||
return \IPS\Http\Url::internal( 'app=core&module=applications&controller=applications&id=' . \IPS\Application::load( $id1, 'app_id' )->directory . '&do=enableToggle', 'admin' );
|
||||
break;
|
||||
|
||||
case 'bulkmail':
|
||||
return \IPS\Http\Url::internal( 'app=core&module=bulkmail&controller=bulkmail&do=preview&id=' . $id1, 'admin' );
|
||||
break;
|
||||
|
||||
case 'site_offline_message':
|
||||
return \IPS\Http\Url::internal( 'app=core&module=settings&controller=general&searchResult=site_offline_message', 'admin' );
|
||||
break;
|
||||
|
||||
case 'gl_guidelines':
|
||||
return \IPS\Http\Url::internal( 'app=core&module=settings&controller=terms&searchResult=gl_guidelines', 'admin' );
|
||||
break;
|
||||
|
||||
case 'privacy_text':
|
||||
return \IPS\Http\Url::internal( 'app=core&module=settings&controller=terms&searchResult=privacy_text', 'admin' );
|
||||
break;
|
||||
|
||||
case 'reg_rules':
|
||||
return \IPS\Http\Url::internal( 'app=core&module=settings&controller=terms&searchResult=reg_rules', 'admin' );
|
||||
break;
|
||||
|
||||
case 'announcement':
|
||||
return \IPS\core\Announcements\Announcement::load( $id1 );
|
||||
break;
|
||||
|
||||
case 'forumsSavedAction':
|
||||
return \IPS\Http\Url::internal( 'app=forums&module=forums&controller=savedActions&do=form&id=' . $id1, 'admin' );
|
||||
break;
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/**
|
||||
* Rebuild attachment images in non-content item areas
|
||||
*
|
||||
* @param int|null $offset Offset to start from
|
||||
* @param int|null $max Maximum to parse
|
||||
* @return int Number completed
|
||||
* @note This method is optional and will only be called if it exists
|
||||
*/
|
||||
public function rebuildAttachmentImages( $offset, $max )
|
||||
{
|
||||
return $this->performRebuild( $offset, $max, array( 'IPS\Text\Parser', 'rebuildAttachmentUrls' ) );
|
||||
}
|
||||
|
||||
/**
|
||||
* Rebuild content post-upgrade
|
||||
*
|
||||
* @param int|null $offset Offset to start from
|
||||
* @param int|null $max Maximum to parse
|
||||
* @return int Number completed
|
||||
* @note This method is optional and will only be called if it exists
|
||||
*/
|
||||
public function rebuildContent( $offset, $max )
|
||||
{
|
||||
return $this->performRebuild( $offset, $max, array( 'IPS\Text\LegacyParser', 'parseStatic' ) );
|
||||
}
|
||||
|
||||
/**
|
||||
* Perform rebuild - abstracted as the call for rebuildContent() and rebuildAttachmentImages() is nearly identical
|
||||
*
|
||||
* @param int|null $offset Offset to start from
|
||||
* @param int|null $max Maximum to parse
|
||||
* @param callable $callback Method to call to rebuild content
|
||||
* @return int Number completed
|
||||
*/
|
||||
protected function performRebuild( $offset, $max, $callback )
|
||||
{
|
||||
/* We will do everything except bulk mails first */
|
||||
if( !$offset )
|
||||
{
|
||||
/* Language bits */
|
||||
foreach( \IPS\Db::i()->select( '*', 'core_sys_lang_words', "word_key IN('guidelines_value', 'reg_rules_value', 'privacy_text_value')" ) as $word )
|
||||
{
|
||||
try
|
||||
{
|
||||
$rebuilt = call_user_func( $callback, $word['word_custom'] );
|
||||
}
|
||||
catch( \InvalidArgumentException $e )
|
||||
{
|
||||
if( $callback[1] == 'parseStatic' AND $e->getcode() == 103014 )
|
||||
{
|
||||
$rebuilt = preg_replace( "#\[/?([^\]]+?)\]#", '', $word['word_custom'] );
|
||||
}
|
||||
else
|
||||
{
|
||||
throw $e;
|
||||
}
|
||||
}
|
||||
|
||||
if( $rebuilt !== FALSE )
|
||||
{
|
||||
\IPS\Db::i()->update( 'core_sys_lang_words', array( 'word_custom' => $rebuilt ), 'word_id=' . $word['word_id'] );
|
||||
}
|
||||
}
|
||||
|
||||
/* Site offline message setting */
|
||||
try
|
||||
{
|
||||
$newMessage = call_user_func( $callback, \IPS\Settings::i()->site_offline_message );
|
||||
}
|
||||
catch( \InvalidArgumentException $e )
|
||||
{
|
||||
if( $callback[1] == 'parseStatic' AND $e->getcode() == 103014 )
|
||||
{
|
||||
$newMessage = preg_replace( "#\[/?([^\]]+?)\]#", '', \IPS\Settings::i()->site_offline_message );
|
||||
}
|
||||
else
|
||||
{
|
||||
throw $e;
|
||||
}
|
||||
}
|
||||
|
||||
if( $newMessage !== FALSE )
|
||||
{
|
||||
\IPS\Db::i()->update( 'core_sys_conf_settings', array( 'conf_value' => $newMessage ), "conf_key='site_offline_message'" );
|
||||
unset( \IPS\Data\Store::i()->settings );
|
||||
}
|
||||
|
||||
/* Application disabled messages */
|
||||
foreach( \IPS\Db::i()->select( '*', 'core_applications' ) as $application )
|
||||
{
|
||||
try
|
||||
{
|
||||
$rebuilt = call_user_func( $callback, $application['app_disabled_message'] );
|
||||
}
|
||||
catch( \InvalidArgumentException $e )
|
||||
{
|
||||
if( $callback[1] == 'parseStatic' AND $e->getcode() == 103014 )
|
||||
{
|
||||
$rebuilt = preg_replace( "#\[/?([^\]]+?)\]#", '', $application['app_disabled_message'] );
|
||||
}
|
||||
else
|
||||
{
|
||||
throw $e;
|
||||
}
|
||||
}
|
||||
|
||||
if( $rebuilt !== FALSE )
|
||||
{
|
||||
\IPS\Db::i()->update( 'core_applications', array( 'app_disabled_message' => $rebuilt ), 'app_id=' . $application['app_id'] );
|
||||
}
|
||||
}
|
||||
|
||||
/* Forum multimod */
|
||||
if( \IPS\Db::i()->checkForTable( 'forums_topic_mmod' ) )
|
||||
{
|
||||
foreach( \IPS\Db::i()->select( '*', 'forums_topic_mmod' ) as $mmod )
|
||||
{
|
||||
try
|
||||
{
|
||||
$rebuilt = call_user_func( $callback, $mmod['topic_reply_content'] );
|
||||
}
|
||||
catch( \InvalidArgumentException $e )
|
||||
{
|
||||
if( $callback[1] == 'parseStatic' AND $e->getcode() == 103014 )
|
||||
{
|
||||
$rebuilt = preg_replace( "#\[/?([^\]]+?)\]#", '', $mmod['topic_reply_content'] );
|
||||
}
|
||||
else
|
||||
{
|
||||
throw $e;
|
||||
}
|
||||
}
|
||||
|
||||
if( $rebuilt !== FALSE )
|
||||
{
|
||||
\IPS\Db::i()->update( 'forums_topic_mmod', array( 'topic_reply_content' => $rebuilt ), 'mm_id=' . $mmod['mm_id'] );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Now do bulk mails */
|
||||
$did = 0;
|
||||
|
||||
foreach( \IPS\Db::i()->select( '*', 'core_bulk_mail', null, 'mail_id ASC', array( $offset, $max ) ) as $mail )
|
||||
{
|
||||
$did++;
|
||||
|
||||
/* Update */
|
||||
try
|
||||
{
|
||||
$rebuilt = call_user_func( $callback, $mail['mail_content'] );
|
||||
}
|
||||
catch( \InvalidArgumentException $e )
|
||||
{
|
||||
if( $callback[1] == 'parseStatic' AND $e->getcode() == 103014 )
|
||||
{
|
||||
$rebuilt = preg_replace( "#\[/?([^\]]+?)\]#", '', $mail['mail_content'] );
|
||||
}
|
||||
else
|
||||
{
|
||||
throw $e;
|
||||
}
|
||||
}
|
||||
|
||||
if( $rebuilt !== FALSE )
|
||||
{
|
||||
\IPS\Db::i()->update( 'core_bulk_mail', array( 'mail_content' => $rebuilt ), array( 'mail_id=?', $mail['mail_id'] ) );
|
||||
}
|
||||
}
|
||||
|
||||
return $did;
|
||||
}
|
||||
|
||||
/**
|
||||
* Total content count to be used in progress indicator
|
||||
*
|
||||
* @return int Total Count
|
||||
*/
|
||||
public function contentCount()
|
||||
{
|
||||
$count = 4;
|
||||
|
||||
$count += \IPS\Db::i()->select( 'COUNT(*) as count', 'core_applications' )->first();
|
||||
|
||||
if( \IPS\Db::i()->checkForTable( 'forums_topic_mmod' ) )
|
||||
{
|
||||
$count += \IPS\Db::i()->select( 'COUNT(*) as count', 'forums_topic_mmod' )->first();
|
||||
}
|
||||
|
||||
$count += \IPS\Db::i()->select( 'COUNT(*) as count', 'core_bulk_mail' )->first();
|
||||
|
||||
return $count;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,155 @@
|
||||
<?php
|
||||
/**
|
||||
* @brief Editor Extension: Announcements
|
||||
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
|
||||
* @copyright (c) 2001 - SVN_YYYY Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/legal/standards/
|
||||
* @package IPS Social Suite
|
||||
* @since 08 Dec 2014
|
||||
* @version SVN_VERSION_NUMBER
|
||||
*/
|
||||
|
||||
namespace IPS\core\extensions\core\EditorLocations;
|
||||
|
||||
/* 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;
|
||||
}
|
||||
|
||||
/**
|
||||
* Editor Extension: Announcements
|
||||
*/
|
||||
class _Announcement
|
||||
{
|
||||
/**
|
||||
* Can we use HTML in this editor?
|
||||
*
|
||||
* @param \IPS\Member $member The member
|
||||
* @param \IPS\Helpers\Form\Editor $field The editor field
|
||||
* @return bool|null NULL will cause the default value (based on the member's permissions) to be used, and is recommended in most cases. A boolean value will override that.
|
||||
*/
|
||||
public function canUseHtml( $member, $field )
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/**
|
||||
* Can we use attachments in this editor?
|
||||
*
|
||||
* @param \IPS\Member $member The member
|
||||
* @param \IPS\Helpers\Form\Editor $field The editor field
|
||||
* @return bool|null NULL will cause the default value (based on the member's permissions) to be used, and is recommended in most cases. A boolean value will override that.
|
||||
*/
|
||||
public function canAttach( $member, $field )
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/**
|
||||
* Permission check for attachments
|
||||
*
|
||||
* @param \IPS\Member $member The member
|
||||
* @param int|null $id1 Primary ID
|
||||
* @param int|null $id2 Secondary ID
|
||||
* @param string|null $id3 Arbitrary data
|
||||
* @return bool
|
||||
*/
|
||||
public function attachmentPermissionCheck( $member, $id1, $id2, $id3 )
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/**
|
||||
* Attachment lookup
|
||||
*
|
||||
* @param int|null $id1 Primary ID
|
||||
* @param int|null $id2 Secondary ID
|
||||
* @param string|null $id3 Arbitrary data
|
||||
* @return \IPS\Http\Url|\IPS\Content|\IPS\Node\Model
|
||||
* @throws \LogicException
|
||||
*/
|
||||
public function attachmentLookup( $id1, $id2, $id3 )
|
||||
{
|
||||
return \IPS\core\Announcements\Announcement::load( $id1 );
|
||||
}
|
||||
|
||||
/**
|
||||
* Rebuild attachment images in non-content item areas
|
||||
*
|
||||
* @param int|null $offset Offset to start from
|
||||
* @param int|null $max Maximum to parse
|
||||
* @return int Number completed
|
||||
* @note This method is optional and will only be called if it exists
|
||||
*/
|
||||
public function rebuildAttachmentImages( $offset, $max )
|
||||
{
|
||||
return $this->performRebuild( $offset, $max, array( 'IPS\Text\Parser', 'rebuildAttachmentUrls' ) );
|
||||
}
|
||||
|
||||
/**
|
||||
* Rebuild content post-upgrade
|
||||
*
|
||||
* @param int|null $offset Offset to start from
|
||||
* @param int|null $max Maximum to parse
|
||||
* @return int Number completed
|
||||
* @note This method is optional and will only be called if it exists
|
||||
*/
|
||||
public function rebuildContent( $offset, $max )
|
||||
{
|
||||
return $this->performRebuild( $offset, $max, array( 'IPS\Text\LegacyParser', 'parseStatic' ) );
|
||||
}
|
||||
|
||||
/**
|
||||
* Perform rebuild - abstracted as the call for rebuildContent() and rebuildAttachmentImages() is nearly identical
|
||||
*
|
||||
* @param int|null $offset Offset to start from
|
||||
* @param int|null $max Maximum to parse
|
||||
* @param callable $callback Method to call to rebuild content
|
||||
* @return int Number completed
|
||||
*/
|
||||
protected function performRebuild( $offset, $max, $callback )
|
||||
{
|
||||
$did = 0;
|
||||
|
||||
foreach( \IPS\Db::i()->select( '*', 'core_announcements', "announce_content IS NOT NULL", 'announce_id ASC', array( $offset, $max ) ) as $announcement )
|
||||
{
|
||||
$did++;
|
||||
|
||||
/* Update */
|
||||
try
|
||||
{
|
||||
$rebuilt = call_user_func( $callback, $announcement['announce_content'], \IPS\Member::load( $announcement['announce_member_id'] ), FALSE, 'core_Announcement' );
|
||||
}
|
||||
catch( \InvalidArgumentException $e )
|
||||
{
|
||||
if( $callback[1] == 'parseStatic' AND $e->getcode() == 103014 )
|
||||
{
|
||||
$rebuilt = preg_replace( "#\[/?([^\]]+?)\]#", '', $announcement['announce_content'] );
|
||||
}
|
||||
else
|
||||
{
|
||||
throw $e;
|
||||
}
|
||||
}
|
||||
|
||||
if( $rebuilt !== FALSE )
|
||||
{
|
||||
\IPS\Db::i()->update( 'core_announcements', array( 'announce_content' => $rebuilt ), array( 'announce_id=?', $announcement['announce_id'] ) );
|
||||
}
|
||||
}
|
||||
|
||||
return $did;
|
||||
}
|
||||
|
||||
/**
|
||||
* Total content count to be used in progress indicator
|
||||
*
|
||||
* @return int Total Count
|
||||
*/
|
||||
public function contentCount()
|
||||
{
|
||||
return \IPS\Db::i()->select( 'COUNT(*) as count', 'core_announcements', "announce_content IS NOT NULL" )->first();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
<?php
|
||||
/**
|
||||
* @brief Editor Extension: Contact Form
|
||||
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
|
||||
* @copyright (c) 2001 - SVN_YYYY Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/legal/standards/
|
||||
* @package IPS Social Suite
|
||||
* @since 12 Nov 2013
|
||||
* @version SVN_VERSION_NUMBER
|
||||
*/
|
||||
|
||||
namespace IPS\core\extensions\core\EditorLocations;
|
||||
|
||||
/* 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;
|
||||
}
|
||||
|
||||
/**
|
||||
* Editor Extension: Contact Form
|
||||
*/
|
||||
class _Contact
|
||||
{
|
||||
/**
|
||||
* Can we use HTML in this editor?
|
||||
*
|
||||
* @param \IPS\Member $member The member
|
||||
* @return bool|null NULL will cause the default value (based on the member's permissions) to be used, and is recommended in most cases. A boolean value will override that.
|
||||
*/
|
||||
public function canUseHtml( $member )
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/**
|
||||
* Can we use attachments in this editor?
|
||||
*
|
||||
* @param \IPS\Member $member The member
|
||||
* @param \IPS\Helpers\Form\Editor $field The editor field
|
||||
* @return bool|null NULL will cause the default value (based on the member's permissions) to be used, and is recommended in most cases. A boolean value will override that.
|
||||
*/
|
||||
public function canAttach( $member, $field )
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,199 @@
|
||||
<?php
|
||||
/**
|
||||
* @brief Editor Extension: CustomField
|
||||
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
|
||||
* @copyright (c) 2001 - SVN_YYYY Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/legal/standards/
|
||||
* @package IPS Social Suite
|
||||
* @since 25 Apr 2014
|
||||
* @version SVN_VERSION_NUMBER
|
||||
*/
|
||||
|
||||
namespace IPS\core\extensions\core\EditorLocations;
|
||||
|
||||
/* 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;
|
||||
}
|
||||
|
||||
/**
|
||||
* Editor Extension: CustomField
|
||||
*/
|
||||
class _CustomField
|
||||
{
|
||||
/**
|
||||
* Can we use HTML in this editor?
|
||||
*
|
||||
* @param \IPS\Member $member The member
|
||||
* @return bool|null NULL will cause the default value (based on the member's permissions) to be used, and is recommended in most cases. A boolean value will override that.
|
||||
*/
|
||||
public function canUseHtml( $member )
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/**
|
||||
* Can we use attachments in this editor?
|
||||
*
|
||||
* @param \IPS\Member $member The member
|
||||
* @param \IPS\Helpers\Form\Editor $field The editor field
|
||||
* @return bool|null NULL will cause the default value (based on the member's permissions) to be used, and is recommended in most cases. A boolean value will override that.
|
||||
*/
|
||||
public function canAttach( $member, $field )
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/**
|
||||
* Permission check for attachments
|
||||
*
|
||||
* @param \IPS\Member $member The member
|
||||
* @param int|null $id1 Primary ID
|
||||
* @param int|null $id2 Secondary ID
|
||||
* @param string|null $id3 Arbitrary data
|
||||
* @return bool
|
||||
*/
|
||||
public function attachmentPermissionCheck( $member, $id1, $id2, $id3 )
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/**
|
||||
* Attachment lookup
|
||||
*
|
||||
* @param int|null $id1 Primary ID
|
||||
* @param int|null $id2 Secondary ID
|
||||
* @param string|null $id3 Arbitrary data
|
||||
* @return \IPS\Http\Url|\IPS\Content|\IPS\Node\Model
|
||||
* @throws \LogicException
|
||||
*/
|
||||
public function attachmentLookup( $id1, $id2, $id3 )
|
||||
{
|
||||
return \IPS\Member::load( $id1 );
|
||||
}
|
||||
|
||||
/**
|
||||
* Rebuild attachment images in non-content item areas
|
||||
*
|
||||
* @param int|null $offset Offset to start from
|
||||
* @param int|null $max Maximum to parse
|
||||
* @return int Number completed
|
||||
*/
|
||||
public function rebuildAttachmentImages( $offset, $max )
|
||||
{
|
||||
return $this->performRebuild( $offset, $max, array( 'IPS\Text\Parser', 'rebuildAttachmentUrls' ) );
|
||||
}
|
||||
|
||||
/**
|
||||
* Rebuild content post-upgrade
|
||||
*
|
||||
* @param int|null $offset Offset to start from
|
||||
* @param int|null $max Maximum to parse
|
||||
* @return int Number completed
|
||||
* @note This method is optional and will only be called if it exists
|
||||
*/
|
||||
public function rebuildContent( $offset, $max )
|
||||
{
|
||||
return $this->performRebuild( $offset, $max, array( 'IPS\Text\LegacyParser', 'parseStatic' ) );
|
||||
}
|
||||
|
||||
/**
|
||||
* Perform rebuild - abstracted as the call for rebuildContent() and rebuildAttachmentImages() is nearly identical
|
||||
*
|
||||
* @param int|null $offset Offset to start from
|
||||
* @param int|null $max Maximum to parse
|
||||
* @param callable $callback Method to call to rebuild content
|
||||
* @return int Number completed
|
||||
*/
|
||||
protected function performRebuild( $offset, $max, $callback )
|
||||
{
|
||||
$did = 0;
|
||||
|
||||
/* Get editor fields */
|
||||
$editorFields = array();
|
||||
$whereClause = array();
|
||||
|
||||
foreach( \IPS\Db::i()->select( '*', 'core_pfields_data', "pf_type='Editor'" ) as $field )
|
||||
{
|
||||
$editorFields[] = 'field_' . $field['pf_id'];
|
||||
$whereClause[] = '(field_' . $field['pf_id'] . ' IS NOT NULL AND field_' . $field['pf_id'] . " != '')";
|
||||
}
|
||||
|
||||
if( !count( $editorFields ) )
|
||||
{
|
||||
return $did;
|
||||
}
|
||||
|
||||
/* Now update the content */
|
||||
foreach( \IPS\Db::i()->select( '*', 'core_pfields_content', implode( " OR ", $whereClause ), 'member_id ASC', array( $offset, $max ) ) as $member )
|
||||
{
|
||||
$did++;
|
||||
|
||||
/* Update */
|
||||
$toUpdate = array();
|
||||
|
||||
foreach( $editorFields as $fieldId )
|
||||
{
|
||||
try
|
||||
{
|
||||
if( $callback[1] == 'rebuildAttachmentUrls' )
|
||||
{
|
||||
$rebuilt = \IPS\Text\Parser::rebuildAttachmentUrls( $member[ $fieldId ], \IPS\Member::load( $member['member_id'] ) );
|
||||
}
|
||||
elseif( $callback[1] == 'parseStatic' )
|
||||
{
|
||||
$rebuilt = \IPS\Text\LegacyParser::parseStatic( $member[ $fieldId ], \IPS\Member::load( $member['member_id'] ), FALSE, 'core_ProfileField', $member['member_id'] );
|
||||
}
|
||||
}
|
||||
catch( \InvalidArgumentException $e )
|
||||
{
|
||||
if( $callback[1] == 'parseStatic' AND $e->getcode() == 103014 )
|
||||
{
|
||||
$rebuilt = preg_replace( "#\[/?([^\]]+?)\]#", '', $member[ $fieldId ] );
|
||||
}
|
||||
else
|
||||
{
|
||||
throw $e;
|
||||
}
|
||||
}
|
||||
|
||||
if( $rebuilt )
|
||||
{
|
||||
$toUpdate[ $fieldId ] = $rebuilt;
|
||||
}
|
||||
}
|
||||
|
||||
if( count( $toUpdate ) )
|
||||
{
|
||||
\IPS\Db::i()->update( 'core_pfields_content', $toUpdate, array( 'member_id=?', $member['member_id'] ) );
|
||||
}
|
||||
}
|
||||
|
||||
return $did;
|
||||
}
|
||||
|
||||
/**
|
||||
* Total content count to be used in progress indicator
|
||||
*
|
||||
* @return int Total Count
|
||||
*/
|
||||
public function contentCount()
|
||||
{
|
||||
/* Get editor fields */
|
||||
$editorFields = array();
|
||||
|
||||
foreach( \IPS\Db::i()->select( '*', 'core_pfields_data', "pf_type='Editor'" ) as $field )
|
||||
{
|
||||
$editorFields[] = 'field_' . $field['pf_id'];
|
||||
}
|
||||
|
||||
if( !count( $editorFields ) )
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
return \IPS\Db::i()->select( 'COUNT(*) as count', 'core_pfields_content', implode( " IS NOT NULL OR ", $editorFields ) . " IS NOT NULL" )->first();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,84 @@
|
||||
<?php
|
||||
/**
|
||||
* @brief Editor Extension: Status Reply
|
||||
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
|
||||
* @copyright (c) 2001 - SVN_YYYY Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/legal/standards/
|
||||
* @package IPS Social Suite
|
||||
* @since 10 Feb 2013
|
||||
* @version SVN_VERSION_NUMBER
|
||||
*/
|
||||
|
||||
namespace IPS\core\extensions\core\EditorLocations;
|
||||
|
||||
/* 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;
|
||||
}
|
||||
|
||||
/**
|
||||
* Editor Extension: Status Replies
|
||||
*/
|
||||
class _Members
|
||||
{
|
||||
/**
|
||||
* Can we use HTML in this editor?
|
||||
*
|
||||
* @param \IPS\Member $member The member
|
||||
* @return bool|null NULL will cause the default value (based on the member's permissions) to be used, and is recommended in most cases. A boolean value will override that.
|
||||
*/
|
||||
public function canUseHtml( $member )
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/**
|
||||
* Can we use attachments in this editor?
|
||||
*
|
||||
* @param \IPS\Member $member The member
|
||||
* @param \IPS\Helpers\Form\Editor $field The editor field
|
||||
* @return bool|null NULL will cause the default value (based on the member's permissions) to be used, and is recommended in most cases. A boolean value will override that.
|
||||
*/
|
||||
public function canAttach( $member, $field )
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/**
|
||||
* Permission check for attachments
|
||||
*
|
||||
* @param \IPS\Member $member The member
|
||||
* @param int|null $id1 Primary ID
|
||||
* @param int|null $id2 Secondary ID
|
||||
* @param string|null $id3 Arbitrary data
|
||||
* @return bool
|
||||
*/
|
||||
public function attachmentPermissionCheck( $member, $id1, $id2, $id3 )
|
||||
{
|
||||
try
|
||||
{
|
||||
\IPS\core\Statuses\Status::loadAndCheckPerms( $id1 );
|
||||
return TRUE;
|
||||
}
|
||||
catch ( \OutOfRangeException $e )
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Attachment lookup
|
||||
*
|
||||
* @param int|null $id1 Primary ID
|
||||
* @param int|null $id2 Secondary ID
|
||||
* @param string|null $id3 Arbitrary data
|
||||
* @return \IPS\Http\Url|\IPS\Content|\IPS\Node\Model
|
||||
* @throws \LogicException
|
||||
*/
|
||||
public function attachmentLookup( $id1, $id2, $id3 )
|
||||
{
|
||||
return \IPS\core\Statuses\Status::load( $id1 );
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,97 @@
|
||||
<?php
|
||||
/**
|
||||
* @brief Editor Extension: Messenger
|
||||
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
|
||||
* @copyright (c) 2001 - SVN_YYYY Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/legal/standards/
|
||||
* @package IPS Social Suite
|
||||
* @since 05 Jul 2013
|
||||
* @version SVN_VERSION_NUMBER
|
||||
*/
|
||||
|
||||
namespace IPS\core\extensions\core\EditorLocations;
|
||||
|
||||
/* 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;
|
||||
}
|
||||
|
||||
/**
|
||||
* Editor Extension: Messenger
|
||||
*/
|
||||
class _Messaging
|
||||
{
|
||||
/**
|
||||
* Can we use HTML in this editor?
|
||||
*
|
||||
* @param \IPS\Member $member The member
|
||||
* @return bool|null NULL will cause the default value (based on the member's permissions) to be used, and is recommended in most cases. A boolean value will override that.
|
||||
*/
|
||||
public function canUseHtml( $member )
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/**
|
||||
* Can we use attachments in this editor?
|
||||
*
|
||||
* @param \IPS\Member $member The member
|
||||
* @param \IPS\Helpers\Form\Editor $field The editor field
|
||||
* @return bool|null NULL will cause the default value (based on the member's permissions) to be used, and is recommended in most cases. A boolean value will override that.
|
||||
*/
|
||||
public function canAttach( $member, $field )
|
||||
{
|
||||
return (bool) \IPS\Member::loggedIn()->group['g_can_msg_attach'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Permission check for attachments
|
||||
*
|
||||
* @param int|null $id1 Primary ID
|
||||
* @param int|null $id2 Secondary ID
|
||||
* @param string|null $id3 Arbitrary data
|
||||
* @return bool
|
||||
*/
|
||||
public function attachmentPermissionCheck( $member, $id1, $id2, $id3 )
|
||||
{
|
||||
try
|
||||
{
|
||||
$conversation = \IPS\core\Messenger\Conversation::load( $id1 );
|
||||
return $conversation->canView( $member );
|
||||
}
|
||||
catch ( \OutOfRangeException $e )
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Attachment lookup
|
||||
*
|
||||
* @param int|null $id1 Primary ID
|
||||
* @param int|null $id2 Secondary ID
|
||||
* @param string|null $id3 Arbitrary data
|
||||
* @return \IPS\Http\Url|\IPS\Content|\IPS\Node\Model
|
||||
* @throws \LogicException
|
||||
*/
|
||||
public function attachmentLookup( $id1, $id2, $id3 )
|
||||
{
|
||||
return \IPS\core\Messenger\Message::load( $id2 );
|
||||
}
|
||||
|
||||
/**
|
||||
* Rebuild content post-upgrade
|
||||
*
|
||||
* @param int|null $offset Offset to start from
|
||||
* @param int|null $max Maximum to parse
|
||||
* @return int Number completed
|
||||
* @note This method is optional and will only be called if it exists
|
||||
*/
|
||||
public function rebuildContent( $offset, $max )
|
||||
{
|
||||
\IPS\Task::queue( 'core', 'RebuildPosts', array( 'class' => 'IPS\\core\\Messenger\\Message' ), 2 );
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,167 @@
|
||||
<?php
|
||||
/**
|
||||
* @brief Editor Extension: Mod CP
|
||||
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
|
||||
* @copyright (c) 2001 - SVN_YYYY Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/legal/standards/
|
||||
* @package IPS Social Suite
|
||||
* @since 17 Jul 2013
|
||||
* @version SVN_VERSION_NUMBER
|
||||
*/
|
||||
|
||||
namespace IPS\core\extensions\core\EditorLocations;
|
||||
|
||||
/* 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;
|
||||
}
|
||||
|
||||
/**
|
||||
* Editor Extension: Mod CP
|
||||
*/
|
||||
class _Modcp
|
||||
{
|
||||
/**
|
||||
* Can we use HTML in this editor?
|
||||
*
|
||||
* @param \IPS\Member $member The member
|
||||
* @return bool|null NULL will cause the default value (based on the member's permissions) to be used, and is recommended in most cases. A boolean value will override that.
|
||||
*/
|
||||
public function canUseHtml( $member )
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/**
|
||||
* Can we use attachments in this editor?
|
||||
*
|
||||
* @param \IPS\Member $member The member
|
||||
* @param \IPS\Helpers\Form\Editor $field The editor field
|
||||
* @return bool|null NULL will cause the default value (based on the member's permissions) to be used, and is recommended in most cases. A boolean value will override that.
|
||||
*/
|
||||
public function canAttach( $member, $field )
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/**
|
||||
* Permission check for attachments
|
||||
*
|
||||
* @param \IPS\Member $member The member
|
||||
* @param int|null $id1 Primary ID
|
||||
* @param int|null $id2 Secondary ID
|
||||
* @param string|null $id3 Arbitrary data
|
||||
* @return bool
|
||||
*/
|
||||
public function attachmentPermissionCheck( $member, $id1, $id2, $id3 )
|
||||
{
|
||||
if ( $member->modPermission( 'mod_see_warn' ) )
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
elseif ( $id3 === 'member' )
|
||||
{
|
||||
$warning = \IPS\core\Warnings\Warning::load( $id1 );
|
||||
return $member->member_id === $warning->member;
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/**
|
||||
* Attachment lookup
|
||||
*
|
||||
* @param int|null $id1 Primary ID
|
||||
* @param int|null $id2 Secondary ID
|
||||
* @param string|null $id3 Arbitrary data
|
||||
* @return \IPS\Http\Url|\IPS\Content|\IPS\Node\Model
|
||||
* @throws \LogicException
|
||||
*/
|
||||
public function attachmentLookup( $id1, $id2, $id3 )
|
||||
{
|
||||
return \IPS\core\Warnings\Warning::load( $id1 );
|
||||
}
|
||||
|
||||
/**
|
||||
* Rebuild content post-upgrade
|
||||
*
|
||||
* @param int|null $offset Offset to start from
|
||||
* @param int|null $max Maximum to parse
|
||||
* @return int Number completed
|
||||
* @note This method is optional and will only be called if it exists
|
||||
*/
|
||||
public function rebuildContent( $offset, $max )
|
||||
{
|
||||
return $this->performRebuild( $offset, $max, array( 'IPS\Text\LegacyParser', 'parseStatic' ) );
|
||||
}
|
||||
|
||||
/**
|
||||
* Rebuild attachment images in non-content item areas
|
||||
*
|
||||
* @param int|null $offset Offset to start from
|
||||
* @param int|null $max Maximum to parse
|
||||
* @return int Number completed
|
||||
*/
|
||||
public function rebuildAttachmentImages( $offset, $max )
|
||||
{
|
||||
return $this->performRebuild( $offset, $max, array( 'IPS\Text\Parser', 'rebuildAttachmentUrls' ) );
|
||||
}
|
||||
|
||||
/**
|
||||
* Perform rebuild - abstracted as the call for rebuildContent() and rebuildAttachmentImages() is nearly identical
|
||||
*
|
||||
* @param int|null $offset Offset to start from
|
||||
* @param int|null $max Maximum to parse
|
||||
* @param callable $callback Method to call to rebuild content
|
||||
* @return int Number completed
|
||||
*/
|
||||
protected function performRebuild( $offset, $max, $callback )
|
||||
{
|
||||
$did = 0;
|
||||
|
||||
foreach( \IPS\Db::i()->select( '*', 'core_members_warn_logs', NULL, 'wl_id ASC', array( $offset, $max ) ) as $log )
|
||||
{
|
||||
$did++;
|
||||
|
||||
$update = array();
|
||||
foreach ( array( 'wl_note_member', 'wl_note_mods' ) as $k )
|
||||
{
|
||||
if ( $log[ $k ] )
|
||||
{
|
||||
try
|
||||
{
|
||||
if( $callback[1] == 'rebuildAttachmentUrls' )
|
||||
{
|
||||
$update[ $k ] = \IPS\Text\Parser::rebuildAttachmentUrls( $log[ $k ], \IPS\Member::load( $log['wl_moderator'] ) );
|
||||
}
|
||||
elseif( $callback[1] == 'parseStatic' )
|
||||
{
|
||||
$update[ $k ] = call_user_func( $callback, $log[ $k ], \IPS\Member::load( $log['wl_moderator'] ), FALSE, 'core_Modcp', $log['wl_id'], NULL, ( $k == 'wl_note_member' ? 'member' : 'mod' ) );
|
||||
}
|
||||
}
|
||||
catch( \InvalidArgumentException $e )
|
||||
{
|
||||
if( $callback[1] == 'parseStatic' AND $e->getcode() == 103014 )
|
||||
{
|
||||
$update[ $k ] = preg_replace( "#\[/?([^\]]+?)\]#", '', $log[ $k ] );
|
||||
}
|
||||
else
|
||||
{
|
||||
throw $e;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if( count( $update ) )
|
||||
{
|
||||
\IPS\Db::i()->update( 'core_members_warn_logs', $update, array( 'wl_id=?', $log['wl_id'] ) );
|
||||
}
|
||||
}
|
||||
|
||||
return $did;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,151 @@
|
||||
<?php
|
||||
/**
|
||||
* @brief Editor Extension: Reports
|
||||
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
|
||||
* @copyright (c) 2001 - SVN_YYYY Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/legal/standards/
|
||||
* @package IPS Social Suite
|
||||
* @since 15 Jul 2013
|
||||
* @version SVN_VERSION_NUMBER
|
||||
*/
|
||||
|
||||
namespace IPS\core\extensions\core\EditorLocations;
|
||||
|
||||
/* 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;
|
||||
}
|
||||
|
||||
/**
|
||||
* Editor Extension: Reports
|
||||
*/
|
||||
class _Reports
|
||||
{
|
||||
/**
|
||||
* Can we use HTML in this editor?
|
||||
*
|
||||
* @param \IPS\Member $member The member
|
||||
* @return bool|null NULL will cause the default value (based on the member's permissions) to be used, and is recommended in most cases. A boolean value will override that.
|
||||
*/
|
||||
public function canUseHtml( $member )
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/**
|
||||
* Can we use attachments in this editor?
|
||||
*
|
||||
* @param \IPS\Member $member The member
|
||||
* @param \IPS\Helpers\Form\Editor $field The editor field
|
||||
* @return bool|null NULL will cause the default value (based on the member's permissions) to be used, and is recommended in most cases. A boolean value will override that.
|
||||
*/
|
||||
public function canAttach( $member, $field )
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/**
|
||||
* Permission check for attachments
|
||||
*
|
||||
* @param \IPS\Member $member The member
|
||||
* @param int|null $id1 Primary ID
|
||||
* @param int|null $id2 Secondary ID
|
||||
* @param string|null $id3 Arbitrary data
|
||||
* @return bool
|
||||
*/
|
||||
public function attachmentPermissionCheck( $member, $id1, $id2, $id3 )
|
||||
{
|
||||
return $member->modPermission( 'can_view_reports' );
|
||||
}
|
||||
|
||||
/**
|
||||
* Attachment lookup
|
||||
*
|
||||
* @param int|null $id1 Primary ID
|
||||
* @param int|null $id2 Secondary ID
|
||||
* @param string|null $id3 Arbitrary data
|
||||
* @return \IPS\Http\Url|\IPS\Content|\IPS\Node\Model
|
||||
* @throws \LogicException
|
||||
*/
|
||||
public function attachmentLookup( $id1, $id2, $id3 )
|
||||
{
|
||||
return \IPS\core\Reports\Report::load( $id1 );
|
||||
}
|
||||
|
||||
/**
|
||||
* Rebuild content post-upgrade
|
||||
*
|
||||
* @param int|null $offset Offset to start from
|
||||
* @param int|null $max Maximum to parse
|
||||
* @return int Number completed
|
||||
* @note This method is optional and will only be called if it exists
|
||||
*/
|
||||
public function rebuildContent( $offset, $max )
|
||||
{
|
||||
return $this->performRebuild( $offset, $max, array( 'IPS\Text\LegacyParser', 'parseStatic' ) );
|
||||
}
|
||||
|
||||
/**
|
||||
* Rebuild attachment images in non-content item areas
|
||||
*
|
||||
* @param int|null $offset Offset to start from
|
||||
* @param int|null $max Maximum to parse
|
||||
* @return int Number completed
|
||||
*/
|
||||
public function rebuildAttachmentImages( $offset, $max )
|
||||
{
|
||||
return $this->performRebuild( $offset, $max, array( 'IPS\Text\Parser', 'rebuildAttachmentUrls' ) );
|
||||
}
|
||||
|
||||
/**
|
||||
* Perform rebuild - abstracted as the call for rebuildContent() and rebuildAttachmentImages() is nearly identical
|
||||
*
|
||||
* @param int|null $offset Offset to start from
|
||||
* @param int|null $max Maximum to parse
|
||||
* @param callable $callback Method to call to rebuild content
|
||||
* @return int Number completed
|
||||
*/
|
||||
protected function performRebuild( $offset, $max, $callback )
|
||||
{
|
||||
$did = 0;
|
||||
|
||||
foreach( \IPS\Db::i()->select( '*', 'core_rc_reports', NULL, 'id ASC', array( $offset, $max ) ) as $report )
|
||||
{
|
||||
$did++;
|
||||
|
||||
$update = array();
|
||||
|
||||
try
|
||||
{
|
||||
if( $callback[1] == 'rebuildAttachmentUrls' )
|
||||
{
|
||||
$update['report'] = \IPS\Text\Parser::rebuildAttachmentUrls( $report['report'], \IPS\Member::load( $report['report_by'] ) );
|
||||
}
|
||||
elseif( $callback[1] == 'parseStatic' )
|
||||
{
|
||||
$update['report'] = call_user_func( $callback, $report['report'], \IPS\Member::load( $report['report_by'] ), FALSE, 'core_Reports', $report['id'], NULL, NULL );
|
||||
}
|
||||
}
|
||||
catch( \InvalidArgumentException $e )
|
||||
{
|
||||
if( $callback[1] == 'parseStatic' AND $e->getcode() == 103014 )
|
||||
{
|
||||
$update['report'] = preg_replace( "#\[/?([^\]]+?)\]#", '', $report['report'] );
|
||||
}
|
||||
else
|
||||
{
|
||||
throw $e;
|
||||
}
|
||||
}
|
||||
|
||||
if( count( $update ) )
|
||||
{
|
||||
\IPS\Db::i()->update( 'core_rc_reports', $update, array( 'id=?', $report['id'] ) );
|
||||
}
|
||||
}
|
||||
|
||||
return $did;
|
||||
}
|
||||
}
|
||||
Loaded 100 of 7517 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user