Exemple #1
0
 public static function initialize()
 {
     $cdnRoot = FD::getCdnUrl();
     if ($cdnRoot) {
         $config = FD::config();
         $passiveCdn = $config->get('general.cdn.passive', false);
         FD40_FoundryFramework::defineComponentCDNConstants('EASYSOCIAL', $cdnRoot, $passiveCdn);
     }
 }
Exemple #2
0
define('SOCIAL_EVENT_VIEW_DISPLAY', 'display');
define('SOCIAL_EVENT_TYPE_PUBLIC', 1);
define('SOCIAL_EVENT_TYPE_PRIVATE', 2);
define('SOCIAL_EVENT_TYPE_INVITE', 3);
// Event guests state
define('SOCIAL_EVENT_GUEST_INVITED', 0);
define('SOCIAL_EVENT_GUEST_GOING', 1);
define('SOCIAL_EVENT_GUEST_PENDING', 2);
define('SOCIAL_EVENT_GUEST_MAYBE', 3);
define('SOCIAL_EVENT_GUEST_NOT_GOING', 4);
define('SOCIAL_EVENT_GUEST_NOTGOING', 4);
define('SOCIAL_STREAM_STATE_TRASHED', '0');
define('SOCIAL_STREAM_STATE_PUBLISHED', '1');
define('SOCIAL_STREAM_STATE_RESTORED', '2');
define('SOCIAL_STREAM_STATE_ARCHIVED', '3');
define('SOCIAL_STREAM_STATE_MODERATE', '5');
define('SOCIAL_CLUSTER_CATEGORY_MEMBERS_LIMIT', 10);
define('SOCIAL_TASK_UNPUBLISHED', 0);
define('SOCIAL_TASK_UNRESOLVED', 1);
define('SOCIAL_TASK_OPEN', 1);
define('SOCIAL_TASK_RESOLVED', 2);
define('SOCIAL_TASK_CLOSED', 2);
// Source: http://www.phpro.org/tutorials/Geo-Targetting-With-PHP-And-MySQL.html
define('SOCIAL_LOCATION_UNIT_MILE', 69);
define('SOCIAL_LOCATION_UNIT_KM', 111);
define('SOCIAL_LOCATION_RADIUS_MILE', 3959);
define('SOCIAL_LOCATION_RADIUS_KM', 6371);
// Foundry
require_once JPATH_ROOT . '/media/foundry/4.0/joomla/framework.php';
FD40_FoundryFramework::defineComponentConstants('EasySocial');
Exemple #3
0
 public static function defineComponentCDNConstants($ns = '', $cdnRoot, $passiveCdn = false)
 {
     $NS = $ns . '_';
     // Also define framework constant
     FD40_FoundryFramework::defineFrameworkCDNConstants('FD40_FOUNDRY', $cdnRoot, $passiveCdn);
     // Joomla
     define($NS . 'JOOMLA_CDN', rtrim($cdnRoot, '/'));
     define($NS . 'JOOMLA_ADMIN_CDN', constant($NS . 'JOOMLA_CDN') . '/administrator');
     define($NS . 'JOOMLA_SITE_TEMPLATES_CDN', constant($NS . 'JOOMLA_CDN') . '/templates');
     define($NS . 'JOOMLA_ADMIN_TEMPLATES_CDN', constant($NS . 'JOOMLA_ADMIN_CDN') . '/templates');
     define($NS . 'JOOMLA_MODULES_CDN', constant($NS . 'JOOMLA_CDN') . '/modules');
     // Foundry
     define($NS . 'FOUNDRY_CDN', constant($NS . 'JOOMLA_CDN') . '/media/foundry/' . constant($NS . 'FOUNDRY_VERSION'));
     // Component
     define($NS . 'SITE_CDN', constant($NS . 'JOOMLA_CDN') . '/components/' . constant($NS . 'COMPONENT_NAME'));
     define($NS . 'ADMIN_CDN', constant($NS . 'JOOMLA_ADMIN_CDN') . '/components/' . constant($NS . 'COMPONENT_NAME'));
     define($NS . 'MEDIA_CDN', constant($NS . 'JOOMLA_CDN') . '/media/' . constant($NS . 'COMPONENT_NAME'));
     define($NS . 'SCRIPTS_CDN', constant($NS . 'MEDIA_CDN') . '/scripts');
     define($NS . 'RESOURCES_CDN', constant($NS . 'MEDIA_CDN') . '/resources');
     define($NS . 'CONFIG_CDN', constant($NS . 'MEDIA_CDN') . '/config');
     define($NS . 'PASSIVE_CDN', $passiveCdn);
     // Themes
     define($NS . 'SITE_THEMES_CDN', constant($NS . 'SITE_CDN') . '/themes');
     define($NS . 'ADMIN_THEMES_CDN', constant($NS . 'ADMIN_CDN') . '/themes');
     define($NS . 'USER_THEMES_CDN', constant($NS . 'MEDIA_CDN') . '/themes');
 }