Skip to content

Commit

Permalink
50 If Linkback Plugin is installed, automatically add ~~LINKBACK~~ to…
Browse files Browse the repository at this point in the history
… new blog entries.

darcs-hash:20070426194203-09e44-e2d2688c9ebf13e6a1763213df6a907c4a3e442d.gz
  • Loading branch information
raymond.scholz committed Apr 26, 2007
1 parent 0be1c78 commit c6a8150
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
3 changes: 2 additions & 1 deletion _template.txt
Expand Up @@ -2,4 +2,5 @@

@TAG@

@DISCUSSION@
@LINKBACK@
@DISCUSSION@
8 changes: 8 additions & 0 deletions action.php
Expand Up @@ -154,6 +154,14 @@ function _pageTemplate($data){
} else {
$replace['@DISCUSSION@'] = '';
}

// linkbacks if linkback plugin is available
if ((@file_exists(DOKU_PLUGIN.'linkback/syntax.php'))
&& (!plugin_isdisabled('linkback'))){
$replace['@LINKBACK@'] = "~~LINKBACK~~";
} else {
$replace['@LINKBACK@'] = '';
}

// do the replace
$tpl = str_replace(array_keys($replace), array_values($replace), $tpl);
Expand Down

0 comments on commit c6a8150

Please sign in to comment.