-
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'esope_1.11' of github.com:Facyla/esope into esope_1.11
- Loading branch information
Showing
22 changed files
with
225 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
<?php | ||
/** | ||
* View categories on an entity | ||
* | ||
* @uses $vars['entity'] | ||
*/ | ||
|
||
$linkstr = ''; | ||
if (isset($vars['entity']) && $vars['entity'] instanceof ElggEntity) { | ||
|
||
$categories = $vars['entity']->universal_categories; | ||
if (!empty($categories)) { | ||
if (!is_array($categories)) { | ||
$categories = array($categories); | ||
} | ||
//sort($categories); | ||
|
||
foreach($categories as $category) { | ||
$link = elgg_get_site_url() . 'categories/list?category=' . urlencode($category); | ||
if (!empty($linkstr)) { | ||
$linkstr .= ', '; | ||
} | ||
$linkstr .= '<a href="'.$link.'">' . $category . '</a>'; | ||
} | ||
} | ||
|
||
} | ||
|
||
if ($linkstr) { | ||
echo '<p class="elgg-output-categories">' . elgg_echo('categories') . ": $linkstr</p>"; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<?php | ||
/** | ||
* Administrator sets the categories for the site | ||
* | ||
* @package ElggCategories | ||
*/ | ||
|
||
// Get site categories | ||
$site = elgg_get_site_entity(); | ||
$categories = $site->categories; | ||
|
||
//if (empty($categories)) { $categories = array(); } | ||
if (empty($categories)) { $categories = array(); } | ||
sort($categories); | ||
$categories = implode(",\n", $categories); | ||
|
||
// @TODO : automatically add parent categories if missing | ||
|
||
?> | ||
<div> | ||
<p><?php echo elgg_echo('categories:explanation'); ?></p> | ||
<p><?php echo elgg_echo('esope:categories:tree:explanation'); ?></p> | ||
<?php | ||
//echo elgg_view('input/tags', array('value' => $categories, 'name' => 'categories')); | ||
echo elgg_view('input/plaintext', array('value' => $categories, 'name' => 'categories')); | ||
// @TODO : automatically add commas before newlines, smthg like : yourString.split(",").join("\n") | ||
?> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.