+
+
\ No newline at end of file
diff --git a/admin/plugins/civicrmicon/civicrmicon.php b/admin/plugins/civicrmicon/civicrmicon.php
new file mode 100644
index 000000000000..75541994b504
--- /dev/null
+++ b/admin/plugins/civicrmicon/civicrmicon.php
@@ -0,0 +1,51 @@
+loadLanguage();
+ }
+
+ /**
+ * This method is called when the Quick Icons module is constructing its set
+ * of icons. You can return an array which defines a single icon and it will
+ * be rendered right after the stock Quick Icons.
+ *
+ * @param $context The calling context
+ *
+ * @return array A list of icon definition associative arrays, consisting of the
+ * keys link, image, text and access.
+ *
+ * @since 2.5
+ */
+ public function onGetIcons($context) {
+ jimport('joomla.environment.uri');
+ return array(
+ array(
+ 'link' => 'index.php?option=com_civicrm',
+ 'image' => JURI::base() . 'components/com_civicrm/civicrm/i/smallLogo.png',
+ 'text' => 'CiviCRM',
+ 'id' => 'plg_quickicon_civicrmicon',
+ ));
+ }
+}
+
diff --git a/admin/plugins/civicrmicon/civicrmicon.xml b/admin/plugins/civicrmicon/civicrmicon.xml
new file mode 100644
index 000000000000..521b0e9d0a5e
--- /dev/null
+++ b/admin/plugins/civicrmicon/civicrmicon.xml
@@ -0,0 +1,16 @@
+
+
+ CiviCRM QuickIcon
+ CiviCRM, LLC
+ April 2012
+ Copyright (C) 2005 - 2012 CiviCRM. All rights reserved.
+ GNU Affero General Public License version 2 or later
+ info@civicrm.org
+ www.civicrm.org
+ 2.5.0
+ Displays link to CiviCRM in main icon Control Panel
+
+ civicrmicon.php
+ index.html
+
+
diff --git a/admin/plugins/civicrmicon/index.html b/admin/plugins/civicrmicon/index.html
new file mode 100644
index 000000000000..e69de29bb2d1
diff --git a/admin/plugins/civicrmsys/civicrmsys.php b/admin/plugins/civicrmsys/civicrmsys.php
new file mode 100644
index 000000000000..849859429481
--- /dev/null
+++ b/admin/plugins/civicrmsys/civicrmsys.php
@@ -0,0 +1,126 @@
+scheduleCivicrmRebuild();
+ }
+
+ /**
+ * After extension source code has been installed
+ *
+ * @param JInstaller Installer object
+ * @param int Extension Identifier
+ */
+ public function onExtensionAfterInstall($installer, $eid)
+ {
+ if ($installer->extension instanceof JTableExtension && $installer->extension->folder == 'civicrm') {
+ //x $args = func_get_args(); dump($args, 'onExtensionAfterInstall');
+ $this->scheduleCivicrmRebuild();
+ }
+ }
+
+ /**
+ * After extension source code has been updated(?)
+ *
+ * @param JInstaller Installer object
+ * @param int Extension identifier
+ */
+ public function onExtensionAfterUpdate($installer, $eid)
+ {
+ // TODO test //if ($installer->extension instanceof JTableExtension && $installer->extension->folder == 'civicrm') {
+ $this->scheduleCivicrmRebuild();
+ //}
+ }
+
+ /**
+ * After extension configuration has been saved
+ */
+ public function onExtensionAfterSave($type, $ext)
+ {
+ // Called by "Manage Plugins" use-case -- per-plugin forms
+ if ($type == 'com_plugins.plugin' && $ext->folder == 'civicrm') {
+ $this->scheduleCivicrmRebuild();
+ }
+ }
+
+ public function onContentCleanCache($defaultgroup, $cachebase) {
+ // Called by "Manage Plugins" use-case -- both bulk operations and per-plugin forms
+ if ($defaultgroup == 'com_plugins') {
+ $this->scheduleCivicrmRebuild();
+ }
+ }
+
+ /**
+ * After extension source code has been removed
+ *
+ * @param JInstaller Installer object
+ * @param int Extension identifier
+ */
+ public function onExtensionAfterUninstall($installer, $eid, $result)
+ {
+ $this->scheduleCivicrmRebuild();
+ }
+
+ /**
+ * Ensure that the rebuild will be done
+ */
+ public function scheduleCivicrmRebuild() {
+ if ($this->scheduled) {
+ return;
+ }
+ register_shutdown_function(array($this, 'doCivicrmRebuild'));
+ // dump(TRUE, 'scheduled');
+ $this->scheduled = TRUE;
+ }
+
+ /**
+ * Perform the actual rebuild
+ */
+ public function doCivicrmRebuild() {
+ // dump($this, 'doCivicrmRebuild');
+ $this->bootstrap();
+ CRM_Core_Invoke::rebuildMenuAndCaches(TRUE);
+ }
+
+ /**
+ * Make sure that CiviCRM is loaded
+ */
+ protected function bootstrap() {
+ if (defined('CIVICRM_UF')) {
+ // already loaded settings
+ return;
+ }
+
+ $app = JFactory::getApplication(); // copied from example -- but why?
+
+ define('CIVICRM_SETTINGS_PATH', JPATH_ROOT . '/' . 'administrator/components/com_civicrm/civicrm.settings.php');
+ require_once CIVICRM_SETTINGS_PATH;
+
+ require_once 'CRM/Core/ClassLoader.php';
+ CRM_Core_ClassLoader::singleton()->register();
+
+ require_once 'CRM/Core/Config.php';
+ $civiConfig = CRM_Core_Config::singleton();
+ }
+}
diff --git a/admin/plugins/civicrmsys/civicrmsys.xml b/admin/plugins/civicrmsys/civicrmsys.xml
new file mode 100644
index 000000000000..89bc747836a8
--- /dev/null
+++ b/admin/plugins/civicrmsys/civicrmsys.xml
@@ -0,0 +1,16 @@
+
+
+ CiviCRM System Listener
+ CiviCRM, LLC
+ January 2011
+ Copyright (C) 2005 - 2011 CiviCRM. All rights reserved.
+ GNU Affero General Public License version 2 or later
+ info@civicrm.org
+ www.civicrm.org
+ 1.0
+ Refresh CiviCRM configuration when related extensions are added or remove
+
+ civicrmsys.php
+ index.html
+
+
diff --git a/admin/plugins/civicrmsys/index.html b/admin/plugins/civicrmsys/index.html
new file mode 100644
index 000000000000..2efb97f319a3
--- /dev/null
+++ b/admin/plugins/civicrmsys/index.html
@@ -0,0 +1 @@
+
diff --git a/admin/plugins/example/example.php b/admin/plugins/example/example.php
new file mode 100644
index 000000000000..684ff9148c9d
--- /dev/null
+++ b/admin/plugins/example/example.php
@@ -0,0 +1,56 @@
+params->def('placement');
+ $content = "
+
+
Hook Data
+
Data 1
+
Data 2
+
+";
+ }
+
+ public function civicrm_tabs(&$tabs, $contactID) {
+ // unset the contribution tab, i.e. remove it from the page
+ unset($tabs[1]);
+
+ // let's add a new "contribution" tab with a different name and put it last
+ // this is just a demo, in the real world, you would create a url which would
+ // return an html snippet etc.
+ $url = CRM_Utils_System::url('civicrm/contact/view/contribution',
+ "reset=1&snippet=1&force=1&cid=$contactID"
+ );
+ $tabs[] = array(
+ 'id' => 'mySupercoolTab',
+ 'url' => $url,
+ 'title' => 'Contribution Tab Renamed',
+ 'weight' => 300,
+ );
+ }
+}
+
diff --git a/admin/plugins/example/example.xml b/admin/plugins/example/example.xml
new file mode 100644
index 000000000000..050178a2884e
--- /dev/null
+++ b/admin/plugins/example/example.xml
@@ -0,0 +1,32 @@
+
+
+ plgCiviCRMExample
+ CiviCRM LLC
+ January 2011
+ (C) CiviCRM LLC
+ CiviCRM LLC
+ info@civicrm.org
+ civicrm.org
+ GNU Affero General Public License version 3 or later
+ 1.6.0
+ Example CiviCRM Plugin
+
+ example.php
+ index.html
+
+
+
+
+
+
+
diff --git a/admin/plugins/example/index.html b/admin/plugins/example/index.html
new file mode 100644
index 000000000000..6bfc7988e127
--- /dev/null
+++ b/admin/plugins/example/index.html
@@ -0,0 +1,4 @@
+
+
+
+
\ No newline at end of file
diff --git a/admin/toolbar.civicrm.html.php b/admin/toolbar.civicrm.html.php
new file mode 100644
index 000000000000..8a0bc2148d02
--- /dev/null
+++ b/admin/toolbar.civicrm.html.php
@@ -0,0 +1,38 @@
+[ ' . $displayAction . ' ]', 'generic.png');
+ }
+
+ static function _DEFAULT() {
+
+ JToolBarHelper::title(JText::_('CiviCRM'), 'generic.png');
+ }
+}
+
diff --git a/admin/toolbar.civicrm.php b/admin/toolbar.civicrm.php
new file mode 100644
index 000000000000..5407ddb2f864
--- /dev/null
+++ b/admin/toolbar.civicrm.php
@@ -0,0 +1,34 @@
+
+
+
+
+ CiviCRM component files have been UPGRADED succesfully.
+
Also review the Upgrade Guide for any additional steps required to complete this upgrade.
+
+
+
+ ';
+ }
+ else {
+ $docLink = CRM_Utils_System::docURL2('Installation and Upgrades', FALSE, 'Installation Guide',NULL,NULL,"wiki");
+ $frontEnd = CRM_Utils_System::docURL2('Configuring Front-end Profile Listings and Forms in Joomla! Sites', FALSE, 'Create front-end forms and searchable directories using Profiles',NULL,NULL,"wiki");
+ $contri = CRM_Utils_System::docURL2('Displaying Online Contribution Pages in Joomla! Frontend Sites', FALSE, 'Create online contribution pages',NULL,NULL,"wiki");
+ $event = CRM_Utils_System::docURL2('Configuring Front-end Event Info and Registration in Joomla! Sites', FALSE, 'Create events with online event registration',NULL,NULL,"wiki");
+
+ // INSTALL successful status and links
+ $content = '
+
+
+
+
+ CiviCRM component files and database tables have been INSTALLED succesfully.
+
Please review the ' . $docLink . ' for any additional steps required to complete the installation.
+
Then use the Configuration Checklist to review and configure CiviCRM settings for your new site.
+
Additional Resources:
+
+
' . $frontEnd . '
+
' . $contri . '
+
' . $event . '
+
+
+
We have integrated KCFinder with CKEditor and TinyMCE, which enables user to upload images. Note that all the images uploaded using KCFinder will be public.
+
+
Have you registered this site at CiviCRM.org? If not, please help strengthen the CiviCRM ecosystem by taking a few minutes to fill out the site registration form. The information collected will help us prioritize improvements, target our communications and build the community. If you have a technical role for this site, be sure to check Keep in Touch to receive technical updates (a low volume mailing list).
+
+
+
+
';
+ }
+
+ //install and enable plugins
+ $manifest = $parent->get("manifest");
+ $parent = $parent->getParent();
+ $source = $parent->getPath("source");
+ $installer = new JInstaller();
+ $plgArray = array();
+
+ foreach ($manifest->plugins->plugin as $plugin) {
+ $attributes = $plugin->attributes();
+ $plg = $source . DS . $attributes['folder'] . DS . $attributes['plugin'];
+ $installer->install($plg);
+ $plgArray[] = "'" . $attributes['plugin'] . "'";
+ }
+
+ $db = JFactory::getDbo();
+ $tableExtensions = $db->nameQuote("#__extensions");
+ $columnElement = $db->nameQuote("element");
+ $columnType = $db->nameQuote("type");
+ $columnEnabled = $db->nameQuote("enabled");
+ $plgList = implode(',', $plgArray);
+
+ // Enable plugins
+ $db->setQuery("UPDATE $tableExtensions
+ SET $columnEnabled = 1
+ WHERE $columnElement IN ($plgList)
+ AND $columnType = 'plugin'"
+ );
+ $db->query();
+
+ echo $content;
+ }
+
+ function uninstall($parent) {
+ $uninstall = FALSE;
+ // makes it easier if folks want to really uninstall
+ if ($uninstall) {
+ define('CIVICRM_SETTINGS_PATH', dirname(__FILE__) . DIRECTORY_SEPARATOR . 'civicrm.settings.php');
+ require_once CIVICRM_SETTINGS_PATH;
+
+ require_once 'CRM/Core/Config.php';
+ $config = CRM_Core_Config::singleton();
+
+ require_once 'CRM/Core/DAO.php';
+ CRM_Core_DAO::dropAllTables();
+
+ echo "You have uninstalled CiviCRM. All CiviCRM related tables have been dropped from the database.";
+ }
+ else {
+ echo "You have uninstalled CiviCRM.";
+ }
+ }
+
+ function update($parent) {
+ $this->install($parent);
+ }
+
+ function preflight($type, $parent) {}
+
+ function postflight($type, $parent) {
+ // set the default permissions
+ // only on new install
+ // CRM-9418
+ global $civicrmUpgrade;
+
+ if (!$civicrmUpgrade) {
+ $this->setDefaultPermissions();
+ }
+ }
+
+ function setDefaultPermissions() {
+ // get the current perms from the assets table and
+ // only set if its empty
+ $db = JFactory::getDbo();
+ $db->setQuery('SELECT rules FROM #__assets WHERE name = ' . $db->quote('com_civicrm'));
+ $assetRules = json_decode((string ) $db->loadResult());
+
+
+ if (count($assetRules) > 1) {
+ return;
+ }
+
+ $rules = new stdClass;
+
+ $permissions = array(
+ 'Public' =>
+ array(
+ 'access CiviMail subscribe/unsubscribe pages',
+ 'access all custom data',
+ 'access uploaded files',
+ 'make online contributions',
+ 'profile listings and forms',
+ 'register for events',
+ 'view event info',
+ 'view event participants',
+ ),
+ 'Registered' =>
+ array(
+ 'access CiviMail subscribe/unsubscribe pages',
+ 'access all custom data',
+ 'access uploaded files',
+ 'make online contributions',
+ 'profile listings and forms',
+ 'register for events',
+ 'view event info',
+ 'view event participants',
+ ),
+ );
+
+ require_once 'CRM/Utils/String.php';
+
+ $newPerms = array();
+ foreach ($permissions as $group => $perms) {
+
+ // get user group ID
+ $userGroupID = $this->getJoomlaUserGroupID($group);
+ if (empty($userGroupID)) {
+ // since we cant resolve this, we move on
+ continue;
+ }
+
+
+ foreach ($perms as $perm) {
+ $permString = 'civicrm.' . CRM_Utils_String::munge(strtolower($perm));
+ if (!array_key_exists($permString, $newPerms)) {
+ $newPerms[$permString] = array();
+ }
+ $newPerms[$permString][] = $userGroupID;
+ }
+ }
+
+ if (empty($newPerms)) {
+ return;
+ }
+
+ // now merge the two newPerms and rules
+ foreach ($newPerms as $perm => $groups) {
+ if (empty($rules->$perm)) {
+ $rulesArray = array();
+ }
+ else {
+ $rulesArray = (array ) $rules->$perm;
+ }
+
+ foreach ($groups as $group) {
+ $present = FALSE;
+ foreach ($rulesArray as $key => $val) {
+ if ((int ) $key == $group) {
+ $present = TRUE;
+ break;
+ }
+ }
+ if (!$present) {
+ $rulesArray[(string ) $group] = 1;
+ }
+ }
+
+ $rules->$perm = (object ) $rulesArray;
+ }
+
+ $rulesString = json_encode($rules);
+ $db->setQuery('UPDATE #__assets SET rules = ' .
+ $db->quote($rulesString) .
+ ' WHERE name = ' .
+ $db->quote('com_civicrm')
+ );
+ if (!$db->query()) {
+ echo 'Seems like setting default actions failed
+
+ $event.event_start_date|crmDate ?>
+
+
+ JText::_('through')
+ /* Only show end time if end date = start date*/
+
+
+ $event.event_end_date|crmDate:0:1 ?>
+
+
+
+ $event.event_end_date|crmDate?>
+
+
+
+
/* loop on any phones and emails for this event */
+
+
+
+ {$phone.phone}
+
+
+
+
+
+
+ JText::_('Email:') {$email.email}
+
+
+
+
+
+
+
+
+
+
+ //need to do
+ {section name=loop start=1 loop=11}
+ {assign var=idx value=$smarty.section.loop.index}
+
{$feeBlock.label.$idx}
+
{$feeBlock.value.$idx|crmMoney}
+
+ {/section}
+
+
+
+
+
+
+ {include file="CRM/Contact/Page/View/InlineCustomData.tpl" mainEditForm=1}
+
+ /* Show link to Event Registration page if event if configured for online reg AND we are NOT coming from Contact Dashboard (CRM-2046) */
+
+
+
diff --git a/site/views/Events/tmpl/register.xml b/site/views/Events/tmpl/register.xml
new file mode 100644
index 000000000000..0b365c4c9272
--- /dev/null
+++ b/site/views/Events/tmpl/register.xml
@@ -0,0 +1,27 @@
+
+
+
+
+
+
+ CiviCRM
+ 07/26/2010
+ (C) CiviCRM LLC
+ CiviCRM LLC
+ info@civicrm.org
+ civicrm.org
+ 3.2
+ CiviCRM event registration. Only current/future, active, online events are available (next 25 upcoming events).
+ Standard Event Registration Layout
+
+
+
+
+
+
+
+
diff --git a/site/views/Events/view.html.php b/site/views/Events/view.html.php
new file mode 100644
index 000000000000..38a44cf0cc4f
--- /dev/null
+++ b/site/views/Events/view.html.php
@@ -0,0 +1,35 @@
+
+
+
+ Use this link to allow users to signup for mailing lists by being added to public access groups. Note that the addition of contacts to groups will respect your single or double opt-in settings in CiviCRM.
+
+
\ No newline at end of file
diff --git a/site/views/MailingList/tmpl/default.xml b/site/views/MailingList/tmpl/default.xml
new file mode 100644
index 000000000000..6811113a9b21
--- /dev/null
+++ b/site/views/MailingList/tmpl/default.xml
@@ -0,0 +1,25 @@
+
+
+
+
+
+
+
+ Mailing List Subscription
+ 11/11/2010
+ (C) CiviCRM LLC
+ CiviCRM LLC
+ info@civicrm.org
+ civicrm.org
+ 3.2
+ Use this link to allow users to signup for mailing lists by being added to public access groups. Note that the addition of contacts to groups will respect your single or double opt-in settings in CiviCRM.
+
+
+
+
+
+
+
diff --git a/site/views/MailingList/view.html.php b/site/views/MailingList/view.html.php
new file mode 100644
index 000000000000..1e4ff9d065a4
--- /dev/null
+++ b/site/views/MailingList/view.html.php
@@ -0,0 +1,33 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/site/views/Profiles/tmpl/default.php b/site/views/Profiles/tmpl/default.php
new file mode 100644
index 000000000000..7ff6c5c5c7b3
--- /dev/null
+++ b/site/views/Profiles/tmpl/default.php
@@ -0,0 +1,183 @@
+
+params->def( 'show_page_title', 1 ) ) : ?>
+
+ {* sort by fails for option per line. Added a variable to iterate through the element array*}
+ {assign var="index" value="1"}
+ {foreach name=outer key=key item=item from=$form.$n}
+ {if $index < 10}
+ {assign var="index" value=`$index+1`}
+ {else}
+
+ {* sort by fails for option per line. Added a variable to iterate through the element array*}
+ {assign var="index" value="1"}
+ {foreach name=outer key=key item=item from=$form.$n}
+ {if $index < 10}
+ {assign var="index" value=`$index+1`}
+ {else}
+