Skip to content

Commit

Permalink
update to 0.91
Browse files Browse the repository at this point in the history
  • Loading branch information
dtygel committed Jan 26, 2014
1 parent 4db7776 commit 69a82eb
Show file tree
Hide file tree
Showing 43 changed files with 3,569 additions and 557 deletions.
68 changes: 54 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,41 +1,81 @@
Who Owns your Country
-------------------

Who Owns your Country. This codebase runs the website [proprietariosdobrasil.eita.org.br](http://proprietariosdobrasil.eita.org.br/).
What is the economic power structure of the private groups in your country? Who are the actors who accumulate the most power in this structure, and what is the relationship amongst them? What is the degree of influence of this invisible power structure, over government decisions in terms of development and economic policies? How does the State relate and feed this power structure and what are the counterparts of this relationship for the well being of society? It is with the objective to respond to these and other questions that we built the “Brazil's Owners” Project and corresponding methodology.

"Who Owns your Country" is a plugin for Wordpress which uses the methodology developped by EITA (http://eita.org.br) and IMD (http://maisdemocracia.org.br) for the project "WHO OWNS BRAZIL".
"Who Owns your Country" is a plugin for Wordpress which uses the methodology developped by EITA (http://eita.org.br) and IMD (http://maisdemocracia.org.br) for the project "WHO OWNS BRAZIL" (http://proprietariosdobrasil.eita.org.br).

It connects enterprises data to build Power Networks and a ranking of the most powerful actors in this constellation, allowing visitors to see the data in a variety of ways, including charts and interactive network maps (using the cytiscape.js library).
It connects enterprises, people and government's ownership and revenue information to build Power Networks and a ranking of the most powerful actors in this constellation, allowing visitors to see the data in a variety of ways, including charts, factsheets and interactive network maps.

For more information on the methodology, visit http://www.proprietariosdobrasil.org.br/index.php/en/ . We also have a paper about the methodology in English which will soon be available.

Installing
Contributions
-------------------

You must follow the common steps to install a plugin in Wordpress: download the files in a folder called "whoowns" inside the wp-content/plugins folder. Then, as administrator, click on "Activate" in the "Who Owns" plugin.
We will be glad to collaborate with other actors who wish to use the plugin in their country and make it better. Don't hesitate to join us in this common effort to contribute for a real democratic world, in which the economic powers are not directing the whole economy of the countries!

You can configure some of the settings in the menu on the left, called "Owners".
If you would like to send a question to us, send your message to [email protected] .

Installation
-------------------

1. Download the zip file and unzip it in the wp-content/plugins folder of your wordpress installation
1. Go to the plugins administration panel in your WP website and activate the plugin
1. You can change settings in the "Owners" configuration menu.

Using the plugin in your template
--------------------

In this 0.8 version, you need to understand the plugin's features to change your template and create factsheets and graphics of the owners.
When you activate the plugin, you'll see an "Owners" item in the left menu of the WP Admin Panel. You can easily insert new owners, with the shareholders, logo, revenue, type (state, enterprise, person) and other related information.

We recommend that you look at http://proprietariosdobrasil.eita.org.br for an idea, and contact us if you need to look at examples of template customizations to show the owner data and networks.
The plugin creates automatically a special "factsheet" page for each owner added (see screnshots). Besides that, it creates a search utility for listing owners with different filters and orderings.

We'll be happy to help you!
You can make changes in the "Owners" settings page. For example, you can decide what slug defines the owner's URLs. By default, it's *owners*. If your WordPress site is configured to have permalinks (post name), then the address of an owner will be: yourwebsite/owners/name-of-the-owner. And the place where the guests can look for owners will be: yourwebsite/owners.

In version 0.9 (coming soon!) the factsheets and custom search forms will be automatically available for your template. We will also add a "screenshots" section so that you can better understand the features available.
Please let us know if you have any doubts!

Translations
-----------------

Who Owns Your Country is a fully internationalized (i.e. fully translateable) plugin. If you would like to make a translation of the plugin to your language, please send a message to us at [email protected] .

Contributions
-------------------
### Available languages

We will be glad to collaborate with other actors who wish to use the plugin in their country and make it better. Don't hesitate to join us in this common effort to contribute for a real democratic world, in which the economic powers are not directing the whole economy of the countries!
* English
* Brazilian Portuguese, by daniel tygel

Screenshots
-----------------

*1. Factsheet page of an owner (Section: global vision). The factsheet comes out of the box with the following sections: __Global Vision__, __Power Network__ (graphic and list views), __Related articles__, __In the media__. This screenshot exemplifies the plugin's hooks: the hooks are used to add two more sections (__electoral donations__ and __public fundings__), and also to change the name of a section ("Related articles" was renamed to "Power analysis")*
![Screenshot 1](http://ps.w.org/who-owns-your-country/assets/screenshot-1.png?rev=845477)

*2. Factsheet page - section "Power network". At the left you have the list view, and in the center there is the graphic view. The map is fully interactive, and clicking on any element opens up a box on the top left with its details.*
![Screenshot 2](http://ps.w.org/who-owns-your-country/assets/screenshot-2.png?rev=845477)

*3. Factsheet page - section "In the media". In the configuration of the plugin, you can choose which news websites will be consulted regularly to show the last news related to the owner's power network.*
![Screenshot 3](http://ps.w.org/who-owns-your-country/assets/screenshot-3.png?rev=845477)

*4. Page for searching the owners. Hooks in the plugin also allow the template owner to add custom columns and orderings to this page. Besides the filters (by enterprises, persons, state institutions and "ranked" corporations) and ordering, the text search form has an autocomplete feature, leading the guest directly to the factsheet og the owner found.*
![Screenshot 4](http://ps.w.org/who-owns-your-country/assets/screenshot-4.png?rev=845477)

Changelog
-----------------

### 0.91
* Fix the tags for the wordpress repository to correctly point to the latest release.

### 0.9
* The plugin now offers a built-in "factsheet" page of each owner, so that the plugin works on any template out of the box without the need to change it.
* The plugin now offers a built-in "look for owners" page, so that the this feature works on any template out of the box without the need to change it.
* Added hooks for the factsheet for templates (or other plugins) customizations
* Added hooks for the owners search page for templates (or other plugins) customizations
* Updated the javascript and stylesheets files
* Updated the Brazilian Portuguese translation

If you would like to send a question to us, send your message to [email protected] .

### 0.8
* Added the plugin to wordpress repository, with all the basic infrastructure available.

Ownership
-------------------
Expand Down
53 changes: 43 additions & 10 deletions README.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,26 +2,26 @@
Contributors: dtygel
Tags: who owns your country, power networks, corporations, economy, politics, economic chain
Requires at least: 3.6
Tested up to: 3.8
Stable tag: trunk
Tested up to: 3.8.1
Stable tag: 0.91
License: AFFERO License
License URI: http://www.gnu.org/licenses/agpl-3.0-standalone.html

Calculate the Economic Power Networks in your country, showing enterprises, people and government networks through charts, maps and factsheets.

== Description ==

=About=
= About =

What is the economic power structure of the private groups in this country? Who are the actors who accumulate the most power in this structure, and what is the relationship amongst them? What is the degree of influence of this invisible power structure, over government decisions in terms of development and economic policies? How does the State relate and feed this power structure and what are the counterparts of this relationship for the well being of society? It is with the objective to respond to these and other questions that we built the “Brazil's Owners” Project and corresponding methodology.
What is the economic power structure of the private groups in your country? Who are the actors who accumulate the most power in this structure, and what is the relationship amongst them? What is the degree of influence of this invisible power structure, over government decisions in terms of development and economic policies? How does the State relate and feed this power structure and what are the counterparts of this relationship for the well being of society? It is with the objective to respond to these and other questions that we built the “Brazil's Owners” Project and corresponding methodology.

"Who Owns your Country" is a plugin for Wordpress which uses the methodology developped by EITA (http://eita.org.br) and IMD (http://maisdemocracia.org.br) for the project "WHO OWNS BRAZIL" (http://proprietariosdobrasil.eita.org.br).

It connects enterprises, people and government's ownership and revenue information to build Power Networks and a ranking of the most powerful actors in this constellation, allowing visitors to see the data in a variety of ways, including charts, factsheets and interactive network maps.

For more information on the methodology, visit http://www.proprietariosdobrasil.org.br/index.php/en/ . We also have a paper about the methodology in English which will soon be available.

=Contributions=
= Contributions =

We will be glad to collaborate with other actors who wish to use the plugin in their country and make it better. Don't hesitate to join us in this common effort to contribute for a real democratic world, in which the economic powers are not directing the whole economy of the countries!

Expand All @@ -33,13 +33,46 @@ If you would like to send a question to us, send your message to contato@proprie
1. Go to the plugins administration panel in your WP website and activate the plugin
1. You can change settings in the "Owners" configuration menu.

=Using the plugin in your template=
= Using the plugin in your template =

In this 0.8 version, you need to understand the plugin's features to change your template and create factsheets and graphics of the owners.
When you activate the plugin, you'll see an "Owners" item in the left menu of the WP Admin Panel. You can easily insert new owners, with the shareholders, logo, revenue, type (state, enterprise, person) and other related information.

We recommend that you look at http://proprietariosdobrasil.eita.org.br for an idea, and contact us if you need to look at examples of template customizations to show the owner data and networks.
The plugin creates automatically a special "factsheet" page for each owner added (see screnshots). Besides that, it creates a search utility for listing owners with different filters and orderings.

We'll be happy to help you!
You can make changes in the "Owners" settings page. For example, you can decide what slug defines the owner's URLs. By default, it's *owners*. If your WordPress site is configured to have permalinks (post name), then the address of an owner will be: yourwebsite/owners/name-of-the-owner. And the place where the guests can look for owners will be: yourwebsite/owners.

In version 0.9 (coming soon!) the factsheets and custom search forms will be automatically available for your template. We will also add a "screenshots" section so that you can better understand the features available.
Please let us know if you have any doubts!

== Translations ==

Who Owns Your Country is a fully internationalized (i.e. fully translateable) plugin. If you would like to make a translation of the plugin to your language, please send a message to us at [email protected] .

= Available languages =

* English
* Brazilian Portuguese, by daniel tygel

== Screenshots ==

1. Factsheet page of an owner (Section: global vision). The factsheet comes out of the box with the following sections: *Global Vision*, *Power Network* (graphic and list views), *Related articles*, *In the media*. This screenshot exemplifies the plugin's hooks: the hooks are used to add two more sections (*electoral donations* and *public fundings*), and also to change the name of a section ("Related articles" was renamed to "Power analysis")
1. Factsheet page - section "Power network". At the left you have the list view, and in the center there is the graphic view. The map is fully interactive, and clicking on any element opens up a box on the top left with its details.
1. Factsheet page - section "In the media". In the configuration of the plugin, you can choose which news websites will be consulted regularly to show the last news related to the owner's power network.
1. Page for searching the owners. Hooks in the plugin also allow the template owner to add custom columns and orderings to this page. Besides the filters (by enterprises, persons, state institutions and "ranked" corporations) and ordering, the text search form has an autocomplete feature, leading the guest directly to the factsheet og the owner found.

== Changelog ==

= 0.91 =
* Fix the tags for the wordpress repository to correctly point to the latest release.

= 0.9 =
* The plugin now offers a built-in "factsheet" page of each owner, so that the plugin works on any template out of the box without the need to change it.
* The plugin now offers a built-in "look for owners" page, so that the this feature works on any template out of the box without the need to change it.
* Added hooks for the factsheet for templates (or other plugins) customizations
* Added hooks for the owners search page for templates (or other plugins) customizations
* Updated the javascript and stylesheets files
* Updated the Brazilian Portuguese translation


= 0.8 =
* Added the plugin to wordpress repository, with all the basic infrastructure available.

2 changes: 1 addition & 1 deletion admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ function whoowns_meta_boxes_save( $post_id ) {
$shareholders[$shareholder_id]->$shareholder_attr = $value;
}
}
// now we can actually save the data
// Now we can actually save the data
$changed_shares = whoowns_update_shareholders($post_id, $shareholders);
#pR($changed_shares || $changed_revenue);exit;
// If the shares or the revenue changed, it's necessary to do recalculations: Erase the network cache of all related nodes, Schedule events to refill the cache and to calculate the new accumulated power values for the whole affected nodes and finally recalculate the IPA and ranking of the whole database:
Expand Down
Binary file added images/icon-all-checked.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/icon-all.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/icon-empresa-checked.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/icon-person.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/icon-person2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/icon-private-enterprise.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/icon-private-enterprise2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/icon-ranked.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/icon-state.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/icon-state2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/loading_autocomplete.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/nav_sprite.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/open_it.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/radio.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/search01.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
27 changes: 27 additions & 0 deletions init.php
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,13 @@ function add_whoowns_script($hook) {
add_action('wp_enqueue_scripts', 'add_whoowns_script');
add_action('admin_enqueue_scripts', 'add_whoowns_script');

function add_whoowns_styles() {
wp_enqueue_style( 'whoowns-css', plugins_url('/theme-files/whoowns.css', __FILE__ )
);
wp_enqueue_style( 'font-awesome-styles', plugins_url('/theme-files/fontello.css', __FILE__ ) );
}
add_action('wp_enqueue_scripts', 'add_whoowns_styles',0);

function whoowns_redirect_after_login( $redirect_to, $request, $user ) {
global $user;
if( isset( $user->roles ) && is_array( $user->roles ) ) {
Expand All @@ -233,4 +240,24 @@ function whoowns_redirect_after_login( $redirect_to, $request, $user ) {
}
}
add_filter("login_redirect", "whoowns_redirect_after_login",10,3);

function include_template_files($template) {
$plugin_dir = dirname( __FILE__ );
$theme_dir = get_template_directory();

if (is_post_type_archive( 'whoowns_owner' )) {
$template_filename = 'archive-whoowns_owner.php';

} elseif (get_post_type() == 'whoowns_owner' ){
$template_filename = 'single-whoowns_owner.php';
}

if ($template_filename && !file_exists($theme_dir.'/'.$template_filename)) {
$plugin_template = $plugin_dir . '/theme-files/' . $template_filename;
return $plugin_template;
}

return $template;
}
add_filter( 'template_include', 'include_template_files' );
?>
Binary file modified languages/whoowns-pt_BR.mo
Binary file not shown.
Loading

0 comments on commit 69a82eb

Please sign in to comment.