[pmwiki-users] Getting rid of "get code" links when useing SourceBlock

Dominique Faure dominique.faure at gmail.com
Sun Sep 9 04:50:56 CDT 2007


On 9/8/07, Chris Lott <chris.lott at gmail.com> wrote:
> I must be missing something obvious because the examples I am
> following for using the SourceBlock recipe
> (http://www.pmwiki.org/wiki/Cookbook/SourceBlock)  don't show the
> little "get code" link after each block like mine does... and I'd like
> to only show it for some source blocks. Thanks in advance for any
> advice...
>

In fact, http://www.pmwiki.org/wiki/Cookbook/SourceBlock uses an
outdated version of the recipe.

The only way to disable the "get code" link is to redefine the output
layout from your local configuration file (before recipe inclusion).
The original value is:

$SourceBlockFmt = "
<div class='sourceblock'>
  <div class='sourceblocktext'>\$txt</div>
  <div class='sourceblocklink'>\$url</div>
</div>";
include_once("FarmD/cookbook/sourceblock.php");

You then only have to remove the "<div
class='sourceblocklink'>\$url</div>" line.

-- 
Dominique



More information about the pmwiki-users mailing list