Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: ColdTrick/csv_exporter
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v3.1.1
Choose a base ref
...
head repository: ColdTrick/csv_exporter
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref

Commits on Nov 14, 2016

  1. Copy the full SHA
    2093766 View commit details

Commits on Jan 11, 2017

  1. Copy the full SHA
    b23444b View commit details
  2. Copy the full SHA
    0f343b4 View commit details

Commits on Jan 26, 2017

  1. chore: wrapping up v4.0

    jeabakker committed Jan 26, 2017
    Copy the full SHA
    0b8ff0c View commit details

Commits on Jan 31, 2017

  1. Copy the full SHA
    d19cce3 View commit details
  2. Copy the full SHA
    821427a View commit details
  3. Copy the full SHA
    f5d7b53 View commit details
  4. Copy the full SHA
    19130f8 View commit details

Commits on Feb 13, 2017

  1. Copy the full SHA
    069955c View commit details

Commits on Feb 27, 2017

  1. chore: wrapping up v4.1

    jeabakker committed Feb 27, 2017
    Copy the full SHA
    68859a8 View commit details

Commits on Aug 29, 2017

  1. chore: added cron logging

    jeabakker committed Aug 29, 2017
    Copy the full SHA
    9ab4218 View commit details

Commits on Sep 6, 2017

  1. chore: wrapping up v4.1.1

    jeabakker committed Sep 6, 2017
    Copy the full SHA
    c986108 View commit details

Commits on Nov 30, 2017

  1. added: option to export number of followers/following for users

    AKA friends and friends of
    jeabakker committed Nov 30, 2017
    Copy the full SHA
    9815d6b View commit details

Commits on Dec 14, 2017

  1. chore: wrapping up v4.2

    jeabakker committed Dec 14, 2017
    Copy the full SHA
    6a9d573 View commit details

Commits on Jan 16, 2018

  1. Copy the full SHA
    38cd778 View commit details
  2. Copy the full SHA
    688cf6a View commit details
  3. added: option to export group content statistics

    eg. number of (searchable) content items in the group
    jeabakker committed Jan 16, 2018
    Copy the full SHA
    5501262 View commit details
  4. Copy the full SHA
    1c58763 View commit details

Commits on Jan 25, 2018

  1. chore: wrapping up v4.3

    jeabakker committed Jan 25, 2018
    Copy the full SHA
    c4ab6ec View commit details
  2. Copy the full SHA
    aab1990 View commit details

Commits on Apr 13, 2018

  1. Copy the full SHA
    d8ced7b View commit details
  2. Copy the full SHA
    f38cf46 View commit details
  3. Copy the full SHA
    101c531 View commit details
  4. chore: code rewrite

    jeabakker committed Apr 13, 2018
    Copy the full SHA
    c1f3d3b View commit details
  5. chore: rewrite menu hooks

    jeabakker committed Apr 13, 2018
    Copy the full SHA
    68befdd View commit details
  6. Copy the full SHA
    3f638df View commit details
  7. Copy the full SHA
    0c62464 View commit details
  8. Copy the full SHA
    5abc986 View commit details

Commits on Apr 16, 2018

  1. chore: lib rework

    jeabakker committed Apr 16, 2018
    Copy the full SHA
    079202d View commit details

Commits on Aug 20, 2018

  1. Copy the full SHA
    3187f3e View commit details
  2. chore: code cleanup

    jeabakker committed Aug 20, 2018
    Copy the full SHA
    e952900 View commit details
  3. Copy the full SHA
    ccf5075 View commit details
  4. Copy the full SHA
    d6db76c View commit details
  5. Copy the full SHA
    cbf7762 View commit details
  6. added: admin filter for downloads

    Seperate my downloads/exports and group downloads
    jeabakker committed Aug 20, 2018
    Copy the full SHA
    f99db34 View commit details
  7. Copy the full SHA
    9b28119 View commit details
  8. Copy the full SHA
    73d9a41 View commit details

Commits on Sep 7, 2018

  1. chore: wrapping up v4.4

    jeabakker committed Sep 7, 2018
    Copy the full SHA
    d60bf9a View commit details

Commits on Dec 14, 2018

  1. Copy the full SHA
    598b8b1 View commit details
  2. chore: updated translations

    jeabakker committed Dec 14, 2018
    Copy the full SHA
    a546555 View commit details

Commits on Mar 27, 2019

  1. chore: composer update

    jeabakker committed Mar 27, 2019
    Copy the full SHA
    0e63943 View commit details
  2. Copy the full SHA
    b716e0c View commit details
  3. Merge remote-tracking branch 'origin/elgg_23'

    Conflicts:
    	README.md
    	classes/CSVExport.php
    	languages/en.php
    	languages/nl.php
    	manifest.xml
    	start.php
    	views/default/admin/administer_utilities/csv_exporter/download.php
    	views/default/object/csv_export.php
    jeabakker committed Mar 27, 2019
    Copy the full SHA
    2ff7345 View commit details
  4. Copy the full SHA
    2548a2d View commit details
  5. chore: missing language key

    jeabakker committed Mar 27, 2019
    Copy the full SHA
    94b1317 View commit details
  6. Copy the full SHA
    bba2391 View commit details
  7. chore: wrapping up v5.0

    jeabakker committed Mar 27, 2019
    Copy the full SHA
    856776b View commit details

Commits on Apr 16, 2019

  1. fixed: conflicting styling

    jeabakker committed Apr 16, 2019
    Copy the full SHA
    b82af95 View commit details

Commits on Apr 17, 2019

  1. chore: wrapping up v5.0.1

    jeabakker committed Apr 17, 2019
    Copy the full SHA
    2903658 View commit details

Commits on Jun 14, 2019

  1. Copy the full SHA
    70007c2 View commit details
Showing with 1,979 additions and 1,193 deletions.
  1. +10 −0 .github/workflows/create-zip-release.yml
  2. +8 −0 .github/workflows/lint.yml
  3. +10 −0 .github/workflows/phpunit.yml
  4. +11 −0 .github/workflows/tweet-release.yml
  5. +0 −50 .travis.yml
  6. +146 −0 CHANGES.txt
  7. +31 −11 README.md
  8. +16 −0 actions/csv_exporter/admin/restart.php
  9. +29 −0 actions/csv_exporter/edit.php
  10. +47 −0 actions/csv_exporter/group.php
  11. +0 −33 actions/edit.php
  12. +0 −10 activate.php
  13. +114 −77 classes/CSVExport.php
  14. +0 −44 classes/ColdTrick/CSVExporter/CSVExporterMenu.php
  15. +60 −70 classes/ColdTrick/CSVExporter/Cron.php
  16. +0 −49 classes/ColdTrick/CSVExporter/EntityMenu.php
  17. +337 −158 classes/ColdTrick/CSVExporter/ExportableValues.php
  18. +45 −0 classes/ColdTrick/CSVExporter/Forms/PrepareFields.php
  19. +35 −0 classes/ColdTrick/CSVExporter/Menus/AdminHeader.php
  20. +100 −0 classes/ColdTrick/CSVExporter/Menus/CSVExporter.php
  21. +63 −0 classes/ColdTrick/CSVExporter/Menus/Entity.php
  22. +46 −0 classes/ColdTrick/CSVExporter/Menus/Page.php
  23. +0 −37 classes/ColdTrick/CSVExporter/PageMenu.php
  24. +29 −0 classes/ColdTrick/CSVExporter/Plugin.php
  25. +0 −24 classes/ColdTrick/CSVExporter/Upgrade.php
  26. +6 −9 composer.json
  27. +8 −245 composer.lock
  28. +0 −6 deactivate.php
  29. +103 −0 elgg-plugin.php
  30. +45 −7 languages/en.php
  31. +41 −11 languages/nl.php
  32. +176 −30 lib/functions.php
  33. +0 −20 manifest.xml
  34. +0 −40 start.php
  35. +16 −0 views/default/admin/administer_utilities/csv_exporter.mjs
  36. +24 −141 views/default/admin/administer_utilities/csv_exporter.php
  37. +12 −6 views/default/admin/administer_utilities/csv_exporter/download.php
  38. +28 −0 views/default/admin/administer_utilities/csv_exporter/downloads.php
  39. +6 −6 views/default/admin/administer_utilities/csv_exporter/scheduled.php
  40. +0 −4 views/default/css/csv_exporter/admin.css
  41. +19 −0 views/default/csv_exporter/group/download.php
  42. +19 −0 views/default/csv_exporter/group/scheduled.php
  43. +28 −39 views/default/csv_exporter/preview.php
  44. +146 −0 views/default/forms/csv_exporter/edit.php
  45. +61 −0 views/default/forms/csv_exporter/group.php
  46. +0 −34 views/default/js/csv_exporter/admin.js
  47. +19 −25 views/default/object/csv_export.php
  48. +46 −7 views/default/plugins/csv_exporter/settings.php
  49. +39 −0 views/default/resources/csv_exporter/group.php
10 changes: 10 additions & 0 deletions .github/workflows/create-zip-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
name: Create ZIP Release

on:
release:
types: [created, edited]

jobs:
build:
name: Build release
uses: ColdTrick/.github/.github/workflows/create-zip-release.yml@master
8 changes: 8 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
name: Lint checks

on: [push, pull_request]

jobs:
lint:
name: Lint checks
uses: ColdTrick/.github/.github/workflows/lint.yml@master
10 changes: 10 additions & 0 deletions .github/workflows/phpunit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
name: PHPUnit Plugin Tests

on: [push, pull_request]

jobs:
phpunit:
name: Run PHPUnit test suites
uses: ColdTrick/.github/.github/workflows/phpunit.yml@master
with:
elgg_major_version: 6
11 changes: 11 additions & 0 deletions .github/workflows/tweet-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
name: Tweet about a new release

on:
release:
types: [created]

jobs:
tweet:
name: Send a Tweet
uses: ColdTrick/.github/.github/workflows/tweet-release.yml@master
secrets: inherit
50 changes: 0 additions & 50 deletions .travis.yml

This file was deleted.

146 changes: 146 additions & 0 deletions CHANGES.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,152 @@
Version history
===============

13.0 (2025-01-23):

- changed: updated for Elgg 6.1

12.1.3 (2025-01-09):

- fixed: correctly clear metadata cache

12.1.2 (2024-12-11):

- fixed: correctly explode type_subtype during processing

12.1.1 (2024-11-21):

- fixed: admin preview pagination not working
- fixed: send export complete notification in recipient language

12.1 (2024-10-10):

- added: user first and last login time to export data

12.0 (2024-06-28):

- changed: updated for Elgg 6

11.0 (2023-11-30):

- changed: updated for Elgg 5.1

10.0.2 (2023-09-28):

- fixed: make sure preview does not crash on null value fields

10.0.1 (2023-07-26):

- fixed: buttons have a discernible text

10.0 (2023-06-02):

- changed: conflict with Elgg < 5.0
- changed: updated for Elgg 5.0

9.1.1 (2023-01-19):

- fixed: downloads tab should only show admin exports
- fixed: preview respects export period
- fixed: switching type/subtype now longer shows preview
- fixed: use correct function to fetch data

9.1 (2022-10-27):

- added: group members can be exported by a group admin

9.0 (2022-08-24):

- changed: updated for Elgg 4.3

8.0.1 (2022-03-11):

- changed: use entity capability for commentable

8.0 (2022-02-16):

- changed: updated code for new Elgg 4.1 capabilities system

7.0.1 (2021-10-12):

- fixed: updated notification body to not have double salutation

7.0 (2021-09-27):

- changed: update for Elgg 4

6.2 (2020-11-11):

- added: icon present exportable value
- added: option to restart crashed csv exports
- changed: clear memory during processing

6.1 (2020-10-13):

- added: plugin hook to register exportable entity types

6.0 (2020-05-26):

- changed: increased minimal Elgg version to 3.3

5.1 (2020-01-06):

- added: icontime and icon url to export

5.0.4 (2019-08-22):

- several small chores/fixes

5.0.3 (2019-07-24):

- fixed: incomplete link in csv export complete notification

5.0.2 (2019-07-11):

- fixed: deprecated usage of group_acl metadata

5.0.1 (2019-04-17):

- fixed: conflicting styling

5.0 (2019-03-27):

- changed: increased Elgg version requirement to 3.0
- changed: moved class and action registration to elgg-plugin.php
- changed: moved start.php to bootstrap class
- changed: reworked object view
- changed: rewrite for Elgg 3.0
- fixed: don't show summary content
- fixed: use correct language keys for access labels

4.4 (2018-09-07):

- added: admin filter for downloads
- added: option to allow group admins to export content

4.3 (2018-01-25):

- added: hook to change exported columns
- added: option to export group content statistics
- added: option to export group tools per group

4.2 (2017-12-14):

- added: option to export number of followers/following for users

4.1.1 (2017-09-06):

- several small chores/fixes

4.1 (2017-02-27):

- added: access can be exported
- added: banned attribute of user

4.0 (2017-01-26):

- changed: increased Elgg version requirement to 2.3
- fixed: incompatible function declaration

3.1.1 (2016-09-15):

- fixed: small dutch typo
42 changes: 31 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
CSV Exporter
============

[![Build Status](https://scrutinizer-ci.com/g/ColdTrick/csv_exporter/badges/build.png?b=master)](https://scrutinizer-ci.com/g/ColdTrick/csv_exporter/build-status/master)
[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/ColdTrick/csv_exporter/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/ColdTrick/csv_exporter/?branch=master)
![Elgg 6.1](https://img.shields.io/badge/Elgg-6.1-green.svg)
![Lint Checks](https://github.com/ColdTrick/csv_exporter/actions/workflows/lint.yml/badge.svg?event=push)
[![Latest Stable Version](https://poser.pugx.org/coldtrick/csv_exporter/v/stable.svg)](https://packagist.org/packages/coldtrick/csv_exporter)
[![License](https://poser.pugx.org/coldtrick/csv_exporter/license.svg)](https://packagist.org/packages/coldtrick/csv_exporter)

@@ -23,27 +23,47 @@ or you can click Download CSV to export all the content to a CSV file
Developers
----------

You can add your own values to the available list by registering a plugin hook like
By default all searchable entities are exportable, if however you wish to change this list use the event

`elgg_register_plugin_hook_handler("get_exportable_values", "csv_exporter", "your function");`

This hook get the following params:
`elgg_register_event_handler("allowed_type_subtypes", "csv_exporter", "your function");`

and change the result array.

You can add your own values to the available list by registering a event like

`elgg_register_event_handler("get_exportable_values", "csv_exporter", "your function");`

This event gets the following params:

- __type__: the type of the entity to supply the values for
- __subtype__: the subtype of the entity to supply the values for
- __readable__: true|false, if __true__ the result must be an associative array in the format array(label => value),
- __readable__: true|false, if __true__ the result must be an associative array in the format `array(label => value)`,
this is used to display the checkboxes to the user.
If __false__ just return the value as part of an array (eg array(value)).

In order to export the correct values you have to also register a plugin hook
In order to export the correct values you have to also register an event

`elgg_register_plugin_hook_handler("export_value", "csv_exporter", "your function");`
`elgg_register_event_handler("export_value", "csv_exporter", "your function");`

This hook get the following params:
This event gets the following params:

- __type__: the type of the entity to supply the values for
- __subtype__: the subtype of the entity to supply the values for
- __entity__: the entity for which to export the value
- __exportable_value__: the value to export

If you return anything other than __null__ this value will be used, otherwise the system will try to get the __exportable_value__ as a metadata field.
If you return anything other than __null__ this value will be used, otherwise the system will try to get the
__exportable_value__ as a metadata field.

In order to allow group admins to export basic information add the configuration with the following event:

`elgg_register_event_handler("get_exportable_values:group", "csv_exporter", "your function");`

This event gets the following params:

- __type__: the type of the entity to supply the values for
- __subtype__: the subtype of the entity to supply the values for

Return an array with `[value]` where:

- __value__: the same name as in the `get_exportable_values`, `csv_exporter` event
16 changes: 16 additions & 0 deletions actions/csv_exporter/admin/restart.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?php

$guid = (int) get_input('guid');

$entity = get_entity($guid);
if (!$entity instanceof \CSVExport) {
return elgg_error_response(elgg_echo('error:missing_data'));
}

if (!$entity->isProcessing()) {
return elgg_error_response(elgg_echo('csv_exporter:action:admin:restart:error:not_processing'));
}

$entity->unlockProcessing();

return elgg_ok_response('', elgg_echo('csv_exporter:action:admin:restart:success'));
29 changes: 29 additions & 0 deletions actions/csv_exporter/edit.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<?php
/**
* Create / edit an export to be scheduled
*/

$guid = (int) get_input('guid');
if (!empty($guid)) {
$entity = get_entity($guid);
if (!$entity instanceof \CSVExport || !$entity->canEdit()) {
return elgg_error_response(elgg_echo('actionunauthorized'));
}
} else {
$entity = new \CSVExport();
}

$form_fields = elgg_get_sticky_values('csv_exporter/edit');

// save all the form data
$entity->title = elgg_get_title_input();
$entity->description = json_encode($form_fields);

// schedule the export for processing
$entity->scheduled = time();

if (!$entity->save()) {
return elgg_error_response(elgg_echo('save:fail'));
}

return elgg_ok_response('', elgg_echo('csv_exporter:action:edit:success'));
Loading