Skip to content

Commit

Permalink
Merge branch '2.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
ercanozkaya committed Aug 18, 2015
2 parents 003f854 + 5e96c68 commit 4d0df9e
Show file tree
Hide file tree
Showing 26 changed files with 61 additions and 40 deletions.
31 changes: 23 additions & 8 deletions README.MD
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,15 @@

## What is Nooku Activities?

Nooku activities is a re-usable component for logging and exposing activity streams. This component is built on top of the [Nooku Framework](https://github.com/nooku/nooku-framework) and may be used standalone or as the backbone of a more advanced activities application.
Nooku activities is a re-usable component for logging and exposing activity streams. This component is built on top of
[Nooku Framework](https://github.com/nooku/nooku-framework) and may be used standalone or as the backbone of a more
advanced activities application.

## Activities API

The component includes an API for working with activities. This API fully adheres to and extends the [Activity Streams specification v1.0](http://activitystrea.ms/specs/json/1.0/). JSON activity streams provided by the component are also fully compliant with the standard.
The component includes an API for working with activities. This API fully adheres to and extends the [Activity Streams
specification v1.0](http://activitystrea.ms/specs/json/1.0/). JSON activity streams provided by the component are also
fully compliant with the standard.

## Requirements

Expand All @@ -16,17 +20,21 @@ The component includes an API for working with activities. This API fully adhere

## Installation

Nooku Activities can and should be installed by using [Composer](https://getcomposer.org/).
Nooku Activities can and should be installed by using [Composer](https://getcomposer.org/).

Go to the root directory of your Joomla installation in command line and execute this command:

```
composer require nooku/nooku-activities:2.*
```

The component will be installed in the `vendor` folder of the root directory of your Joomla site. Nooku will make sure that the component is bootstrapped from that location and made available to other components extending it or just making use of it.
The component will be installed in the `vendor` folder of the root directory of your Joomla site. Nooku will make sure
that the component is bootstrapped from that location and made available to other components extending it or just making
use of it.

Out of the box, Nooku Activities will attempt to store activities in a database table named activities_activities. An SQL dump file may be found under the `/resources/install` directory for creating this database table. This database needs to be manually created for the component to function properly. At the moment we only support MySQL.
Out of the box, Nooku Activities will attempt to store activities in a database table named `activities`. An
SQL dump file may be found under the `/resources/install` directory for creating this database table. This database
needs to be manually created for the component to function properly. At the moment we only support MySQL.

## Contributing

Expand All @@ -38,11 +46,18 @@ there are several guides and tutorials online to learn about it.

There are a few things you must know before submitting a pull request:

- All changes need to be made against the `develop` branch. However, it is very well appreciated and highly suggested to start a new feature branch from `develop` and make your changes in this new branch. This way we can just checkout your feature branch for testing before merging it into `develop`.
- All changes need to be made against the `develop` branch. However, it is very well appreciated and highly suggested to
start a new feature branch from `develop` and make your changes in this new branch. This way we can just checkout your
feature branch for testing before merging it into `develop`.
- We will not consider pull requests made directly to the `master` branch.

## License
## Authors

Nooku Activities is open-source software licensed under the [GPLv3 license](https://github.com/nooku/nooku-framework/blob/master/LICENSE.txt).
See the list of [contributors](https://github.com/nooku/nooku-activities/contributors).

## License

The `nooku-activities` component is free and open-source software licensed under the [GPLv3 license](gplv3-license).

[gitflow-model]: http://nvie.com/posts/a-successful-git-branching-model/
[gplv3-license]: https://github.com/nooku/nooku-framework/blob/master/LICENSE.txt
2 changes: 1 addition & 1 deletion activity/interface.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/**
* Nooku Framework - http://nooku.org/framework
*
* @copyright Copyright (C) 2011 - 2014 Johan Janssens and Timble CVBA. (http://www.timble.net)
* @copyright Copyright (C) 2011 - 2015 Johan Janssens and Timble CVBA. (http://www.timble.net)
* @license GNU GPLv3 <http://www.gnu.org/licenses/gpl.html>
* @link http://github.com/nooku/nooku-activities for the canonical source repository
*/
Expand Down
2 changes: 1 addition & 1 deletion activity/logger/interface.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/**
* Nooku Framework - http://nooku.org/framework
*
* @copyright Copyright (C) 2011 - 2014 Johan Janssens and Timble CVBA. (http://www.timble.net)
* @copyright Copyright (C) 2011 - 2015 Johan Janssens and Timble CVBA. (http://www.timble.net)
* @license GNU GPLv3 <http://www.gnu.org/licenses/gpl.html>
* @link http://github.com/nooku/nooku-activities for the canonical source repository
*/
Expand Down
2 changes: 1 addition & 1 deletion activity/logger/logger.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/**
* Nooku Framework - http://nooku.org/framework
*
* @copyright Copyright (C) 2011 - 2014 Johan Janssens and Timble CVBA. (http://www.timble.net)
* @copyright Copyright (C) 2011 - 2015 Johan Janssens and Timble CVBA. (http://www.timble.net)
* @license GNU GPLv3 <http://www.gnu.org/licenses/gpl.html>
* @link http://github.com/nooku/nooku-activities for the canonical source repository
*/
Expand Down
2 changes: 1 addition & 1 deletion activity/medialink/interface.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/**
* Nooku Framework - http://nooku.org/framework
*
* @copyright Copyright (C) 2011 - 2014 Johan Janssens and Timble CVBA. (http://www.timble.net)
* @copyright Copyright (C) 2011 - 2015 Johan Janssens and Timble CVBA. (http://www.timble.net)
* @license GNU GPLv3 <http://www.gnu.org/licenses/gpl.html>
* @link http://github.com/nooku/nooku-activities for the canonical source repository
*/
Expand Down
2 changes: 1 addition & 1 deletion activity/medialink/medialink.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/**
* Nooku Framework - http://nooku.org/framework
*
* @copyright Copyright (C) 2011 - 2014 Johan Janssens and Timble CVBA. (http://www.timble.net)
* @copyright Copyright (C) 2011 - 2015 Johan Janssens and Timble CVBA. (http://www.timble.net)
* @license GNU GPLv3 <http://www.gnu.org/licenses/gpl.html>
* @link http://github.com/nooku/nooku-activities for the canonical source repository
*/
Expand Down
2 changes: 1 addition & 1 deletion activity/object/interface.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/**
* Nooku Framework - http://nooku.org/framework
*
* @copyright Copyright (C) 2011 - 2014 Johan Janssens and Timble CVBA. (http://www.timble.net)
* @copyright Copyright (C) 2011 - 2015 Johan Janssens and Timble CVBA. (http://www.timble.net)
* @license GNU GPLv3 <http://www.gnu.org/licenses/gpl.html>
* @link http://github.com/nooku/nooku-activities for the canonical source repository
*/
Expand Down
2 changes: 1 addition & 1 deletion activity/object/object.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/**
* Nooku Framework - http://nooku.org/framework
*
* @copyright Copyright (C) 2011 - 2014 Johan Janssens and Timble CVBA. (http://www.timble.net)
* @copyright Copyright (C) 2011 - 2015 Johan Janssens and Timble CVBA. (http://www.timble.net)
* @license GNU GPLv3 <http://www.gnu.org/licenses/gpl.html>
* @link http://github.com/nooku/nooku-activities for the canonical source repository
*/
Expand Down
2 changes: 1 addition & 1 deletion activity/renderer/interface.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/**
* Nooku Framework - http://nooku.org/framework
*
* @copyright Copyright (C) 2011 - 2014 Johan Janssens and Timble CVBA. (http://www.timble.net)
* @copyright Copyright (C) 2011 - 2015 Johan Janssens and Timble CVBA. (http://www.timble.net)
* @license GNU GPLv3 <http://www.gnu.org/licenses/gpl.html>
* @link http://github.com/nooku/nooku-activities for the canonical source repository
*/
Expand Down
2 changes: 1 addition & 1 deletion activity/translator/interface.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/**
* Nooku Framework - http://nooku.org/framework
*
* @copyright Copyright (C) 2011 - 2014 Johan Janssens and Timble CVBA. (http://www.timble.net)
* @copyright Copyright (C) 2011 - 2015 Johan Janssens and Timble CVBA. (http://www.timble.net)
* @license GNU GPLv3 <http://www.gnu.org/licenses/gpl.html>
* @link http://github.com/nooku/nooku-activities for the canonical source repository
*/
Expand Down
2 changes: 1 addition & 1 deletion activity/translator/translator.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/**
* Nooku Framework - http://nooku.org/framework
*
* @copyright Copyright (C) 2011 - 2014 Johan Janssens and Timble CVBA. (http://www.timble.net)
* @copyright Copyright (C) 2011 - 2015 Johan Janssens and Timble CVBA. (http://www.timble.net)
* @license GNU GPLv3 <http://www.gnu.org/licenses/gpl.html>
* @link http://github.com/nooku/nooku-activities for the canonical source repository
*/
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
}
],
"require": {
"nooku/nooku-framework": "~2.0"
"nooku/nooku-framework": "~2.1"
},
"autoload": {
"files": ["autoload.php"]
Expand Down
2 changes: 1 addition & 1 deletion controller/activity.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/**
* Nooku Framework - http://nooku.org/framework
*
* @copyright Copyright (C) 2011 - 2014 Johan Janssens and Timble CVBA. (http://www.timble.net)
* @copyright Copyright (C) 2011 - 2015 Johan Janssens and Timble CVBA. (http://www.timble.net)
* @license GNU GPLv3 <http://www.gnu.org/licenses/gpl.html>
* @link http://github.com/nooku/nooku-activities for the canonical source repository
*/
Expand Down
2 changes: 1 addition & 1 deletion controller/behavior/loggable.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/**
* Nooku Framework - http://nooku.org/framework
*
* @copyright Copyright (C) 2011 - 2014 Johan Janssens and Timble CVBA. (http://www.timble.net)
* @copyright Copyright (C) 2011 - 2015 Johan Janssens and Timble CVBA. (http://www.timble.net)
* @license GNU GPLv3 <http://www.gnu.org/licenses/gpl.html>
* @link http://github.com/nooku/nooku-activities for the canonical source repository
*/
Expand Down
2 changes: 1 addition & 1 deletion controller/behavior/purgeable.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/**
* Nooku Framework - http://nooku.org/framework
*
* @copyright Copyright (C) 2011 - 2014 Johan Janssens and Timble CVBA. (http://www.timble.net)
* @copyright Copyright (C) 2011 - 2015 Johan Janssens and Timble CVBA. (http://www.timble.net)
* @license GNU GPLv3 <http://www.gnu.org/licenses/gpl.html>
* @link http://github.com/nooku/nooku-activities for the canonical source repository
*/
Expand Down
2 changes: 1 addition & 1 deletion controller/permission/activity.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/**
* Nooku Framework - http://nooku.org/framework
*
* @copyright Copyright (C) 2011 - 2014 Johan Janssens and Timble CVBA. (http://www.timble.net)
* @copyright Copyright (C) 2011 - 2015 Johan Janssens and Timble CVBA. (http://www.timble.net)
* @license GNU GPLv3 <http://www.gnu.org/licenses/gpl.html>
* @link http://github.com/nooku/nooku-activities for the canonical source repository
*/
Expand Down
2 changes: 1 addition & 1 deletion controller/toolbar/activity.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/**
* Nooku Framework - http://nooku.org/framework
*
* @copyright Copyright (C) 2011 - 2014 Johan Janssens and Timble CVBA. (http://www.timble.net)
* @copyright Copyright (C) 2011 - 2015 Johan Janssens and Timble CVBA. (http://www.timble.net)
* @license GNU GPLv3 <http://www.gnu.org/licenses/gpl.html>
* @link http://github.com/nooku/nooku-activities for the canonical source repository
*/
Expand Down
3 changes: 2 additions & 1 deletion database/table/activities.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/**
* Nooku Framework - http://nooku.org/framework
*
* @copyright Copyright (C) 2011 - 2014 Johan Janssens and Timble CVBA. (http://www.timble.net)
* @copyright Copyright (C) 2011 - 2015 Johan Janssens and Timble CVBA. (http://www.timble.net)
* @license GNU GPLv3 <http://www.gnu.org/licenses/gpl.html>
* @link http://github.com/nooku/nooku-activities for the canonical source repository
*/
Expand All @@ -25,6 +25,7 @@ class ComActivitiesDatabaseTableActivities extends KDatabaseTableAbstract
protected function _initialize(KObjectConfig $config)
{
$config->append(array(
'name' => 'activities',
'behaviors' => array(
'creatable', 'identifiable', 'parameterizable' => array('column' => 'metadata')
),
Expand Down
2 changes: 1 addition & 1 deletion koowa-component.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
<koowa-component>
<identifier>com:activities</identifier>
<name>activities</name>
<version>2.0.3</version>
<version>2.1.0</version>
</koowa-component>
4 changes: 2 additions & 2 deletions model/activities.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/**
* Nooku Framework - http://nooku.org/framework
*
* @copyright Copyright (C) 2011 - 2014 Johan Janssens and Timble CVBA. (http://www.timble.net)
* @copyright Copyright (C) 2011 - 2015 Johan Janssens and Timble CVBA. (http://www.timble.net)
* @license GNU GPLv3 <http://www.gnu.org/licenses/gpl.html>
* @link http://github.com/nooku/nooku-activities for the canonical source repository
*/
Expand Down Expand Up @@ -64,7 +64,7 @@ protected function _buildQueryWhere(KDatabaseQueryInterface $query)
}

if ($state->package) {
$query->where('tbl.package = :package')->bind(array('package' => $state->package));
$query->where('tbl.package IN :package')->bind(array('package' => (array) $state->package));
}

if ($state->name) {
Expand Down
2 changes: 1 addition & 1 deletion model/entity/activities.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/**
* Nooku Framework - http://nooku.org/framework
*
* @copyright Copyright (C) 2011 - 2014 Johan Janssens and Timble CVBA. (http://www.timble.net)
* @copyright Copyright (C) 2011 - 2015 Johan Janssens and Timble CVBA. (http://www.timble.net)
* @license GNU GPLv3 <http://www.gnu.org/licenses/gpl.html>
* @link http://github.com/nooku/nooku-activities for the canonical source repository
*/
Expand Down
13 changes: 9 additions & 4 deletions model/entity/activity.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/**
* Nooku Framework - http://nooku.org/framework
*
* @copyright Copyright (C) 2011 - 2014 Johan Janssens and Timble CVBA. (http://www.timble.net)
* @copyright Copyright (C) 2011 - 2015 Johan Janssens and Timble CVBA. (http://www.timble.net)
* @license GNU GPLv3 <http://www.gnu.org/licenses/gpl.html>
* @link http://github.com/nooku/nooku-activities for the canonical source repository
*/
Expand Down Expand Up @@ -604,10 +604,15 @@ protected function _actorConfig(KObjectConfig $config)
$objectName = $this->getAuthor()->getName();
$translate = array('displayType');

if (!$this->_findActivityActor())
if (!$this->created_by)
{
$objectName = 'Deleted user';
$translate[] = 'displayName';
$objectName = 'Guest user';
$translate[] = 'displayName';
}
elseif (!$this->_findActivityActor())
{
$objectName = 'Deleted user';
$translate[] = 'displayName';
}

$config->append(array(
Expand Down
2 changes: 1 addition & 1 deletion resources/language/en-GB/en-GB.com_activities.ini
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
; Copyright © 2014 Timble CVBA. (http://www.timble.net)
; Copyright © 2015 Timble CVBA. (http://www.timble.net)
; GNU GPLv3 <http://www.gnu.org/licenses/gpl.html>
; Note : All ini files need to be saved as UTF-8

Expand Down
6 changes: 3 additions & 3 deletions template/helper/activity.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/**
* Nooku Framework - http://nooku.org/framework
*
* @copyright Copyright (C) 2011 - 2014 Johan Janssens and Timble CVBA. (http://www.timble.net)
* @copyright Copyright (C) 2011 - 2015 Johan Janssens and Timble CVBA. (http://www.timble.net)
* @license GNU GPLv3 <http://www.gnu.org/licenses/gpl.html>
* @link http://github.com/nooku/nooku-activities for the canonical source repository
*/
Expand Down Expand Up @@ -87,7 +87,7 @@ public function render(ComActivitiesActivityInterface $activity, $config = array
*/
protected function _renderObject(ComActivitiesActivityObjectInterface $object, KObjectConfig $config)
{
$config->append(array('html' => true, 'escaped_urls' => true, 'fqr' => false));
$config->append(array('html' => true, 'escaped_urls' => true, 'fqr' => false, 'links' => true));

if ($output = $object->getDisplayName())
{
Expand All @@ -96,7 +96,7 @@ protected function _renderObject(ComActivitiesActivityObjectInterface $object, K
$output = $object->getDisplayName();
$attribs = $object->getAttributes() ? $this->buildAttributes($object->getAttributes()) : '';

if ($url = $object->getUrl())
if ($config->links && $url = $object->getUrl())
{
// Make sure we have a fully qualified route.
if ($config->fqr && !$url->getHost()) {
Expand Down
4 changes: 2 additions & 2 deletions version/version.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/**
* Nooku Framework - http://nooku.org/framework
*
* @copyright Copyright (C) 2011 - 2014 Johan Janssens and Timble CVBA. (http://www.timble.net)
* @copyright Copyright (C) 2011 - 2015 Johan Janssens and Timble CVBA. (http://www.timble.net)
* @license GNU GPLv3 <http://www.gnu.org/licenses/gpl.html>
* @link http://github.com/nooku/nooku-activities for the canonical source repository
*/
Expand All @@ -15,7 +15,7 @@
*/
class ComActivitiesVersion extends KObject
{
const VERSION = '2.0.3';
const VERSION = '3.0-beta1';

/**
* Get the version.
Expand Down
2 changes: 1 addition & 1 deletion view/activities/json.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/**
* Nooku Framework - http://nooku.org/framework
*
* @copyright Copyright (C) 2011 - 2014 Johan Janssens and Timble CVBA. (http://www.timble.net)
* @copyright Copyright (C) 2011 - 2015 Johan Janssens and Timble CVBA. (http://www.timble.net)
* @license GNU GPLv3 <http://www.gnu.org/licenses/gpl.html>
* @link http://github.com/nooku/nooku-activities for the canonical source repository
*/
Expand Down

0 comments on commit 4d0df9e

Please sign in to comment.