Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade mapbox to 3.2.1, add missing .map file. #89

Open
wants to merge 23 commits into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# This file is for unifying the coding style for different editors and IDEs
# editorconfig.org

# WordPress Coding Standards
# https://make.wordpress.org/core/handbook/coding-standards/

root = true

[*]
charset = utf-8
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
indent_style = tab

[*.yml]
indent_style = space
indent_size = 2

[*.md]
trim_trailing_whitespace = false

[{*.txt,wp-config-sample.php}]
end_of_line = crlf
41 changes: 26 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#JEO
# JEO

v1.0.8

JEO WordPress Theme acts as a geojournalism platform which allows news organizations, bloggers and NGOs to publish news stories as layers of information on digital maps. With JEO, creating the interaction between data layers and contextual information is much more intuitive and interactive. The theme is ready for multilingual content and facilitates the publishing tasks.
Expand All @@ -8,29 +9,36 @@ You can post geotagged stories and create richly designed pages for each one of
JEO wants to help journalists and NGOs to improve storytelling with maps. Creating a child theme with all its functionality is easy since it contains all the necessary hooks to customize layouts and data visualization.

## Mix and visualize your custom maps with WordPress

Download the file and upload to your `wp-content/themes/` directory, on your [self-hosted WordPress installation](http://codex.wordpress.org/WordPress_Quick_Start_Guide).

Or you can use git:

```
$ cd wp-content/themes
```shell
cd wp-content/themes
$ git clone git://github.com/cardume/jeo.git
Cloning into 'jeo'...
remote: Enumerating objects: 2606, done.
remote: Total 2606 (delta 0), reused 0 (delta 0), pack-reused 2606
Receiving objects: 100% (2606/2606), 3.30 MiB | 1.47 MiB/s, done.
Resolving deltas: 100% (1484/1484), done.
```

After setting the files, go to **Appearance > Themes** and activate **JEO**.

## Features
- Leaflet map library
- Custom tile layers
- [MapBox](http://mapbox.com) maps
- [CartoDB](http://cartodb.com) maps
- Layer filtering options, allowing you to mix tile layer, MapBox and CartoDB.
- Geocoding WordPress posts using OpenStreetMaps or Google Maps supporting custom post types.
- Google Street View support for Google Maps geocoding.
- Customizable marker icons that can be associated to categories, custom taxonomies or posts directly.
- Map markers query integrated to posts query.
- GeoJSON API (any content `/?geojson` gives the geojson output). *E.g.: yourwebsite.com/category/one/?geojson*
- Support [qTranslate](http://wordpress.org/extend/plugins/qtranslate/) multilanguage plugin

- Leaflet map library
- Custom tile layers
- [MapBox](http://mapbox.com) maps
- [CartoDB](http://cartodb.com) maps
- Layer filtering options, allowing you to mix tile layer, MapBox and CartoDB.
- Geocoding WordPress posts using OpenStreetMaps or Google Maps supporting custom post types.
- Google Street View support for Google Maps geocoding.
- Customizable marker icons that can be associated to categories, custom taxonomies or posts directly.
- Map markers query integrated to posts query.
- GeoJSON API (any content `/?geojson` gives the geojson output). *E.g.: yourwebsite.com/category/one/?geojson*
- Support [qTranslate](http://wordpress.org/extend/plugins/qtranslate/) multilanguage plugin

## Wiki

Expand All @@ -39,16 +47,19 @@ Checkout our [wiki](https://github.com/oeco/jeo/wiki) for tutorials and detailed
## Using JEO

### First map

After activating your theme, you'll see a big message on your homepage to create your first map. Do it! You can start by selecting one of our presetted open layers, or already add custom layers if you have any.

### Settings and contents

After setting your first map, go to the bottom of your dashboard's menu and click on JEO Settings to change website styles, map behaviours and basic settings to set it up the way you need it.

Now you can go manage your posts, geolocate them and add custom marker icons!

### Authors and Contributors

JEO is a collaboration between [@oeco](https://github.com/oeco/), [@cardume](https://github.com/cardume/), [@memelab](https://github.com/memelab/) and [@icfjknight](https://github.com/icfjknight/). Developed after the theme was built for [InfoAmazonia](http://infoamazonia.org/) and supported by [Internew´s Earth Journalism Network ](http://www.earthjournalism.net/).
JEO is a collaboration between [@oeco](https://github.com/oeco/), [@cardume](https://github.com/cardume/), [@memelab](https://github.com/memelab/) and [@icfjknight](https://github.com/icfjknight/). Developed after the theme was built for [InfoAmazonia](http://infoamazonia.org/) and supported by [Internew´s Earth Journalism Network](http://www.earthjournalism.net/).

### Support or Contact

Having trouble with JEO? Go to our [issues page](https://github.com/oeco/jeo/issues) and we'll help you there!
5 changes: 3 additions & 2 deletions content-embed.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@
<link rel="profile" href="http://gmpg.org/xfn/11" />
<link rel="stylesheet" type="text/css" media="all" href="<?php bloginfo('stylesheet_url'); ?>" />
<link rel="pingback" href="<?php bloginfo('pingback_url'); ?>" />
<link rel="shortcut icon" href="<?php echo get_template_directory_uri(); ?>/img/favicon.ico" type="image/x-icon" />
<?php // by mohjak: fixed openearth#215 ico files in themes ?>

<?php wp_head(); ?>
</head>
<body <?php body_class(get_bloginfo('language')); ?>>
Expand Down Expand Up @@ -58,4 +59,4 @@

<?php wp_footer(); ?>
</body>
</html>
</html>
126 changes: 121 additions & 5 deletions content-share.php
Original file line number Diff line number Diff line change
@@ -1,9 +1,125 @@
<?php get_header(); ?>
<?php
$page_title = __('Share a map', 'jeo');
?>
<!DOCTYPE html>
<html <?php language_attributes(); ?>>
<head>
<meta charset="<?php bloginfo('charset'); ?>" />
<?php // by mohjak 2020-07-24: fixed comment https://tech.openinfo.cc/earth/infoamazonia/-/issues/8#note_8471 ?>
<title><?php echo "$page_title | "; bloginfo('name'); ?></title>
<link rel="profile" href="http://gmpg.org/xfn/11" />
<link rel="stylesheet" type="text/css" media="all" href="<?php bloginfo('stylesheet_url'); ?>" />
<link rel="pingback" href="<?php bloginfo('pingback_url'); ?>" />
<?php // by mohjak: fixed openearth#215 ico files in themes ?>

<?php wp_head(); ?>
</head>
<body <?php body_class(get_bloginfo('language')); ?>>
<div id="fb-root"></div>
<script>(function(d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) return;
js = d.createElement(s); js.id = id;
js.src = "//connect.facebook.net/pt_BR/all.js#xfbml=1&appId=459964104075857";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>
<header id="masthead">
<div class="regular-header">
<div class="container">
<div class="three columns">
<?php
$lang = '';
if(function_exists('qtranxf_getLanguage'))
$lang = qtranxf_getLanguage();
?>
<h1>
<a href="<?php echo home_url('/' . $lang); ?>" title="<?php echo bloginfo('name'); ?>"><span><?php bloginfo('name'); ?></span> <img src="<?php echo get_stylesheet_directory_uri(); ?>/img/logo.png" class="logo" /></a>
</h1>
</div>
<?php /*
<div class="four columns">
<?php get_search_form(); ?>
</div>
*/ ?>
<div class="nine columns">
<section id="mastnav" class="clearfix">
<nav>
<ul>
<?php wp_nav_menu(array(
'items_wrap' => '<ul id="%1$s" class="%2$s">%3$s<!--<li><a href="#submit" class="submit-story">' . __('Submit a story', 'infoamazonia') . '</a></li>--></ul>'
)); ?>
</ul>
</nav>
</section>
</div>
</div>
</div>
<?php if(is_singular('post')) : ?>
<div class="single-post-header scrolled-header">
<div class="container">
<div class="two columns">
<span class="site-logo">
<a href="<?php echo home_url('/' . $lang); ?>" title="<?php echo bloginfo('name'); ?>"><img src="<?php echo get_stylesheet_directory_uri(); ?>/img/logo.png" class="logo" /></a>
</span>
</div>
<div class="seven columns">
<span class="post-title"><span class="publisher"><?php echo get_the_term_list($post->ID, 'publisher', '', ', ', ': '); ?></span><?php the_title(); ?></span>
</div>
<div class="three columns">
<span class="post-actions">
<a href="javascript:void(0);" class="toggle-top-map"><span class="lsf">&#xE08b;</span> <?php _e('View map', 'infoamazonia'); ?></a>
</span>
</div>
</div>
</div>
<div id="top-map">
<?php jeo_map(); ?>
</div>
<?php endif; ?>
</header>
<section id="subnav">
<div class="container">
<div class="twelve columns">
<div class="subnav-container">
<div class="subnav-content">
<?php if(function_exists('qtranxf_getLanguage')) : ?>
<nav id="langnav">
<ul>
<?php
global $q_config;
if(is_404()) $url = get_option('home'); else $url = '';
$current = qtranxf_getLanguage();
foreach($q_config['enabled_languages'] as $language) {
$attrs = '';
if($language == $current)
$attrs = 'class="active"';
echo '<li><a href="' . qtranxf_convertURL($url, $language) . '" ' . $attrs . '>' . $language . '</a></li>';
}
?>
</ul>
</nav>
<?php endif; ?>
<nav id="social">
<ul>
<li class="twitter">
<a href="https://twitter.com/infoamazonia" rel="external" target="_blank" title="Twitter"></a>
</li>
<li class="fb">
<a href="https://www.facebook.com/infoamazonia" rel="external" target="_blank" title="Facebook"></a>
</li>
</ul>
</nav>
</div>
</div>
</div>
</div>
</section>
<section id="main-content">

<?php
$page_title = __('Share a map', 'jeo');
$map = false;
if($_GET['map_id']) {
if(isset($_GET['map_id']) && $_GET['map_id']) {
$map = get_post($_GET['map_id']);
if($map && get_post_type($map->ID) == 'map')
$page_title = __('Share', 'jeo') . ' ' . get_the_title($map->ID);
Expand Down Expand Up @@ -212,7 +328,7 @@
</a>
</h4>
<textarea id="output"></textarea>
<div class="sub-inner">
<div class="sub-inner">
<h5>
<div class='popup arrow-right'>
</div>
Expand Down Expand Up @@ -267,9 +383,9 @@
</section>

<script type="text/javascript">
jQuery(document).ready(function($) {
jQuery(document).ready(function($) {
jeo_share_widget.controls();
});
</script>

<?php get_footer(); ?>
<?php get_footer(); ?>
2 changes: 1 addition & 1 deletion css/main.css

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions error_log
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[16-Sep-2014 00:26:00 America/New_York] PHP Fatal error: Call to undefined function get_header() in /home/k0007911/public_html/wp-content/themes/jeo/index.php on line 1
[16-Sep-2014 01:33:37 America/New_York] PHP Fatal error: Call to undefined function get_header() in /home/k0007911/public_html/wp-content/themes/jeo/index.php on line 1
[16-Sep-2014 02:29:50 America/New_York] PHP Fatal error: Call to undefined function get_header() in /home/k0007911/public_html/wp-content/themes/jeo/index.php on line 1
[16-Sep-2014 04:02:42 America/New_York] PHP Fatal error: Call to undefined function get_header() in /home/k0007911/public_html/wp-content/themes/jeo/index.php on line 1
2 changes: 1 addition & 1 deletion footer.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
</div>
<div class="five columns">
<div class="credits">
<p><?php printf(__('This website is built on <a href="%s" target="_blank" rel="external">WordPress</a> using the <a href="%s" target="_blank" rel="external">JEO Beta</a> theme', 'jeo'), 'http://wordpress.org', 'http://jeo.cardume.art.br/'); ?></p>
<p><?php printf(__('This website is built on <a href="%1$s" target="_blank" rel="external">WordPress</a> using the <a href="%2$s" target="_blank" rel="external">JEO Beta</a> theme', 'jeo'), 'http://wordpress.org', 'http://jeo.cardume.art.br/'); ?></p>
</div>
</div>
</div>
Expand Down
16 changes: 11 additions & 5 deletions functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,7 @@ function jeo_setup() {
'id' => 'front_page',
'before_title' => '<h2 class="widget-title">',
'after_title' => '</h2>'
));

));
}
add_action('after_setup_theme', 'jeo_setup');

Expand All @@ -57,6 +56,10 @@ function jeo_theme_scripts() {
wp_register_script('jquery-isotope', get_template_directory_uri() . '/lib/jquery.isotope.min.js', array('jquery'), '1.5.25');

wp_register_script('jeo-site', get_template_directory_uri() . '/js/site.js', array('jquery', 'jquery-isotope'));

// by mohjak
wp_register_script('d3.v4.min.js', 'https://ajax.googleapis.com/ajax/libs/d3js/4.13.0/d3.min.js', array(), '4.13.0', true);

}
add_action('wp_enqueue_scripts', 'jeo_theme_scripts', 5);

Expand All @@ -68,14 +71,17 @@ function jeo_enqueue_theme_scripts() {
wp_enqueue_script('jeo-site');

if (is_singular())
wp_enqueue_script( "comment-reply" );
wp_enqueue_script( "comment-reply" );

// by mohjak
wp_enqueue_script('d3.v4.min.js');
}
add_action('wp_enqueue_scripts', 'jeo_enqueue_theme_scripts', 12);

function jeo_flush_rewrite() {
global $pagenow;
if(is_admin() && $_REQUEST['activated'] && $pagenow == 'themes.php') {
global $pagenow;
# by mohjak: 2019-11-21 issue#115
if(is_admin() && isset($_REQUEST['activated']) && $_REQUEST['activated'] && $pagenow == 'themes.php') {
global $wp_rewrite;
$wp_rewrite->init();
$wp_rewrite->flush_rules();
Expand Down
5 changes: 3 additions & 2 deletions header.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@
<link rel="profile" href="http://gmpg.org/xfn/11" />
<link rel="stylesheet" type="text/css" media="all" href="<?php bloginfo('stylesheet_url'); ?>" />
<link rel="pingback" href="<?php bloginfo('pingback_url'); ?>" />
<link rel="shortcut icon" href="<?php echo get_template_directory_uri(); ?>/img/favicon.ico" type="image/x-icon" />
<?php // by mohjak: fixed openearth#215 ico files in themes ?>

<?php wp_head(); ?>
</head>
<body <?php body_class(get_bloginfo('language')); ?>>
Expand All @@ -47,4 +48,4 @@
</div>
</div>
</div>
</header>
</header>
10 changes: 5 additions & 5 deletions inc/admin/admin-page-framework.php
Original file line number Diff line number Diff line change
Expand Up @@ -883,7 +883,7 @@ protected function RenderPage( $strPageSlug, $strTabSlug=null ) {
<div class="wrap">
<?php
// Screen icon
$strHeader .= $this->arrIcons[$strPageSlug] ? '<div class="icon32" style="background-image: url(' . $this->arrIcons[$strPageSlug] . ');"><br /></div>' : get_screen_icon();
$strHeader .= $this->arrIcons[$strPageSlug] ? '<div class="icon32" style="background-image: url(' . $this->arrIcons[$strPageSlug] . ');"><br /></div>' : '';

// Page heading tabs
$strHeader .= ( $this->bShowPageHeadingTabs ) ? $this->AddPageHeadingTabs( $strPageSlug ) : '<h2>' . $this->arrPageTitles[$strPageSlug] . '</h2>';
Expand Down Expand Up @@ -2341,7 +2341,7 @@ protected function GetHiddenField() {
protected function GetSelectField() {

// The label key must be an array for the select type.
if ( ! is_array( $this->arrField['label'] ) ) exit;
if ( ! is_array( $this->arrField['label'] ) ) exit;

$strOutput = "<select id='{$this->strTagID}' class='{$this->arrField['class']}' name='{$this->strFieldName}' {$this->vDisable}>";
foreach ( $this->arrField['label'] as $strKey => $strLabel ) {
Expand Down Expand Up @@ -2373,8 +2373,8 @@ protected function GetCheckBoxField() {
$arrValues = ( array ) $this->vValue;
$strOutput = "<div id='{$this->strTagID}'>";
foreach ( $this->arrField['label'] as $strKey => $strLabel ) {

$strChecked = ( $arrValues[ $strKey ] == 1 ) ? 'Checked' : '';
// by mohjak 2019-11-26 Fix Undefined index: map-layer Undefined index: page jeo_settings_issues
$strChecked = ( isset($arrValues[$strKey]) && $arrValues[ $strKey ] == 1 ) ? 'Checked' : '';
$strDisabled = $this->oUtil->GetCorrespondingArrayValue( $strKey, $this->vDisable ) ? 'disabled="Disabled"' : '' ;
$strOutput .= "<input type='hidden' name='{$this->strFieldName}[{$strKey}]' value='0' />";
$strOutput .= $this->oUtil->GetCorrespondingArrayValue( $strKey, $this->arrField['pre_field'] )
Expand Down Expand Up @@ -2604,7 +2604,7 @@ class Admin_Page_Framework_Walker_Category_Checklist extends Walker_Category { /
Walker_Category : wp-includes/category-template.php
* */

function start_el( &$strOutput, $oCategory, $intDepth, $arrArgs ) {
function start_el( &$strOutput, $oCategory, $intDepth = 0, $arrArgs = array(), $id = 0 ) {

/*
$arrArgs keys:
Expand Down
Loading