Skip to content

Commit

Permalink
Merge pull request #4 from BugHunter2k/BugHunter2k-patch-1
Browse files Browse the repository at this point in the history
Fix for #3
  • Loading branch information
BugHunter2k authored Jan 11, 2017
2 parents 214eb93 + 8f06ed1 commit 4389122
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 4 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# v0.5.3
## 01/11/2017

1. [](#bugfix)
* Fixed (again): Images not working in subdirectory (#3)

# v0.5.1
## 05/02/2016

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ Options in `cclinker.yaml`
If you want an cc-link, simply put `[CC-BY]` in your markdown.

Accepted Licences are :
| `CC0` | `CC BY-SA` | `CC BY-ND` | `CC BY-NC-SA` | `CC BY-SA` | `CC BY-NC` | `CC BY-NC-ND` | `publicdomain` |
| `CC0` | `CC BY-SA` | `CC BY-ND` | `CC BY-NC-SA` | `CC BY-SA` | `CC BY-NC` | `CC BY-NC-ND` |

Linking to a particular licence-version is possible by adding e.g `|3.0` to the code.

Expand Down
2 changes: 1 addition & 1 deletion blueprints.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: CC-Linker
version: 0.5.2
version: 0.5.3
description: "This plugin creates links/button/badge for cc-licences using shortcode syntax eg: ([CC by-sa])"
icon: creative-commons
author:
Expand Down
5 changes: 3 additions & 2 deletions cclinker.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,9 @@ protected function buildLink($type) {
$v = $type[2];
if (strlen($v) == 1) $v .= ".0";
}
$locator = GravTrait::getGrav()['locator'];
$path = "/".$locator->findResource('plugin://cclinker/images/', false)."/";
$grav = GravTrait::getGrav();
$locator = $grav['locator'];
$path = $grav['base_url']."/".$locator->findResource('plugin://cclinker/images/', false)."/";
switch($this->config->get('plugins.cclinker.outputformat')) {
case "text":
$linktext = $this->licenses[$l][1];
Expand Down

0 comments on commit 4389122

Please sign in to comment.