1 |
wakaba |
1.1 |
Name: |
2 |
|
|
WikiResource |
3 |
|
|
FullName: |
4 |
|
|
WikiResource interface |
5 |
|
|
URI: |
6 |
|
|
IW:SuikaWiki:"Wiki//Resource" |
7 |
wakaba |
1.2 |
Initialize: |
8 |
|
|
my $HAS_XML = SuikaWiki::Plugin->feature ('SuikaWiki::Markup::XML'); |
9 |
wakaba |
1.1 |
|
10 |
|
|
{ |
11 |
|
|
Name: |
12 |
|
|
wikiform_input/res |
13 |
|
|
FullName: |
14 |
|
|
Get text from resource |
15 |
|
|
Format: |
16 |
|
|
$r = $o->resource ($p->{name},escape=>1); |
17 |
|
|
} |
18 |
|
|
{ |
19 |
|
|
Name: |
20 |
|
|
wikiview/res |
21 |
|
|
wikiview-resource/res |
22 |
|
|
wikipage_list_item/res |
23 |
|
|
FullName: |
24 |
|
|
Get text from resource |
25 |
|
|
Format: |
26 |
wakaba |
1.2 |
if ($HAS_XML) { |
27 |
|
|
$r = $o->formatter('view-resource')->replace ($o->resource ($p->{name}), $o); |
28 |
|
|
unless (ref $r) { |
29 |
|
|
$r = SuikaWiki::Markup::XML->new (type => '#text', value => $r); |
30 |
|
|
} |
31 |
wakaba |
1.1 |
} else { |
32 |
|
|
$r = $o->formatter('view-resource')->replace ($o->resource ($p->{name}), $o); |
33 |
|
|
} |
34 |
|
|
} |
35 |
|
|
|
36 |
|
|
{ |
37 |
|
|
Name: |
38 |
|
|
wikiview-resource/-bare_text |
39 |
|
|
FullName: |
40 |
|
|
HTML escape for bare text |
41 |
|
|
Format: |
42 |
wakaba |
1.2 |
if ($HAS_XML) { |
43 |
|
|
$r = SuikaWiki::Markup::XML->new (type => '#text', value => $p->{-bare_text}); |
44 |
|
|
} else { |
45 |
|
|
$r = $o->escape ($p->{-bare_text}); |
46 |
|
|
} |
47 |
wakaba |
1.1 |
} |
48 |
|
|
{ |
49 |
|
|
Name: |
50 |
|
|
wikiview-resource/span |
51 |
|
|
FullName: |
52 |
|
|
Give class name |
53 |
|
|
Format: |
54 |
|
|
$r = qq(<span class="@{[$o->escape($p->{class})]}">) . $o->escape($p->{content}) . '</span>'; |
55 |
|
|
} |
56 |
|
|
|
57 |
|
|
POD:LICENSE: |
58 |
wakaba |
1.2 |
Copyright 2002-2003 Wakaba <w@suika.fam.cx> |
59 |
wakaba |
1.1 |
|
60 |
|
|
%%GNUGPL2%% |