}, "text");
$p->parse($src);
$p->eof;
+ $s=~s/\[ href= \]//g; # handle self-links
$params{src}=$s;
}
else {
my $old=$params{oldpage};
my $new=$params{newpage};
- $params{content} =~ s{(?<!\\)$link_regexp}{
- if (! is_externallink($page, $2, $3)) {
- my $linktext=$2;
+ $params{content} =~ s{(?<!\\)($link_regexp)}{
+ if (! is_externallink($page, $3, $4)) {
+ my $linktext=$3;
my $link=$linktext;
if (bestlink($page, linkpage($linktext)) eq $old) {
$link=pagetitle($new, 1);
$link="/$link";
}
}
- defined $1
- ? ( "[[$1|$link".($3 ? "#$3" : "")."]]" )
- : ( "[[$link". ($3 ? "#$3" : "")."]]" )
+ defined $2
+ ? ( "[[$2|$link".($4 ? "#$4" : "")."]]" )
+ : ( "[[$link". ($4 ? "#$4" : "")."]]" )
+ }
+ else {
+ $1
}
}eg;
if (exists $pagestate{$member}{trail}{item} &&
! exists $member_to_trails{$member}) {
$rebuild_trail_members{$member} = 1;
- delete $pagestate{$member}{trailitem};
+ delete $pagestate{$member}{trail}{item};
}
}
pagenames, not relative wikilink type names. This is necessary to fix
a bug, and makes pagenames more consistent with the pagespec used
in the pages parameter. (smcv)
+ * link: Fix renaming wikilinks that contain embedded urls.
+ * graphviz: Handle self-links.
+ * trail: Improve CSS, also display trail links at bottom of page,
+ and a bug fix. (smcv)
-- Joey Hess <joeyh@debian.org> Wed, 21 Mar 2012 14:33:14 -0400
""""]]
It is the exact same thing that on the [[ikiwiki/directive/graph/]] directive documentation, from the [[plugins/graphviz]] plugin. This is ikiwiki 3.20120203 on Debian wheezy and graphviz is installed (2.26.3-10). Note that the first demo actually works. See <http://mesh.openisp.ca/sandbox> --[[anarcat]]
+
+> Looking at the example shows too many double quoted. [[fixed|done]]
+> --[[Joey]]
The renamed page was `configuration/bat-hosts` to `configuration/batman/bat-hosts` and the deleted links were ``\[[AUR | https://aur.archlinux.org/]]` and `\[[CHANGELOG|http://svn.dd-wrt.com:8000/browser/src/router/batman-adv/CHANGELOG]]`. --[[anarcat]]
> <del>Nevermind that, that commit was unrelated to the rename and probably an operator error.</del> - No, actually, I just reproduced this again - see [another example](http://mesh.openisp.ca/recentchanges/#diff-d67dc2f0fdc149b13122fd6cba887a01c693e949).
+
+>> Looks like these all involve the wacky wikilink form that includes an
+>> external url in the link. Fixed rename code to know about those.
+>> [[done]] --[[Joey]]
and a clickable imagemap will be created. As a special extension for
ikiwiki, [[WikiLinks|ikiwiki/wikilink]] can also be used. For example:
- \[[!graph src=""""
+ \[[!graph src="""
google [ href="http://google.com/" ]
sandbox [ href=\[[SandBox]] ]
help [ href=\[[ikiwiki/formatting]] ]
newpage [ href=\[[NewPage]] ]
google -> sandbox -> help -> newpage -> help -> google;
- """"]]
+ """]]
The `graph` directive supports the following parameters:
Things can get messy if you have enabled the global sidebar setting and you browse the `ikiwiki/directive/*` pages. You will get the content of `ikiwiki/directive/sidebar` as a sidebar to all the directives page... I have emptied the sidebar.mdwn page on our wiki to work around that, but isn't this a bug? --[[anarcat]]
+
+> Another reason to dislike the global sidebar option and wish it didn't
+> exist, as if I didn't have a dozen already. However, renaming this page
+> does not seem like an appropriate fix; adding cruft to every directive/
+> page to force the sidebar off does not seem like an appropriate fix;
+> this leaves only special casing the plugin to not treat this page as a
+> sidebar, but that's disgusting. --[[Joey]]
* Fix a possible bug regarding state deletion
--[[smcv]]
+
+> Applied --[[Joey]]
@media print {
.actions { display: none; }
.tags { display: none; }
+ .trails { display: none; }
.feedbutton { display: none; }
#searchform { display: none; }
.blogform, #blogform { display: none; }
background: url(ikiwiki/images/pbar-ani.gif);
}
+.trails {
+ margin-top: 1em;
+ margin-bottom: 1em;
+}
.trail {
display: block;
clear: both;
us to use TMPL_LOOPS in our [[ikiwiki/directive/template]] directives; all-be-it in a
rather limited way.
+> I'm willing to consider such a feature, but it needs to be presented in
+> the form of a patch that is reviewable, not a gratuitous rewrite.
+> --[[Joey]]
+
I would, personally, only use this feature for very basic loops
and, although nested loops *might* be possible (with a little
more tinkering) it think any attempt would be better served by
[[!tag patch todo wishlist]]
I several updates to the mediawiki plugin to improve compatibility, improving img and File: support. I'd love to get them upstream. Is there any interest? Patches are at [[http://www.isi.edu/~johnh/SOFTWARE/IKIWIKI/index.html]]
+
+> The mediawiki plugin has never been included in ikiwiki, it's
+> [provided by a third party](https://github.com/jmtd/mediawiki.pm) and
+> you should send your patches to them.
+> [[done]]
+> --[[Joey]]
<TMPL_UNLESS DYNAMIC>
<TMPL_IF HTML5><nav id="pageinfo"><TMPL_ELSE><div id="pageinfo"></TMPL_IF>
+<TMPL_VAR TRAILS>
+
<TMPL_IF TAGS>
<TMPL_IF HTML5><nav class="tags"><TMPL_ELSE><div class="tags"></TMPL_IF>
Tags:
border-color: #999;
}
-.trails {
+.pageheader .trails {
/* allow space for the action tabs */
margin-bottom: 2em;
}
font-weight: bold;
}
-.pageheader .header .title, .pageheader .header .parentlinks, .pageheader .actions ul li, .pageheader .header span, .pageheader #otherlanguages ul li, .trailprev, .trailnext, .trailup {
+.pageheader .header .title, .pageheader .header .parentlinks, .pageheader .actions ul li, .pageheader .header span, .pageheader #otherlanguages ul li, .pageheader .trailprev, .pageheader .trailnext, .pageheader .trailup {
padding: 0.25em 0.25em 0.25em 0.25em;
background-image: url('background_darkness.png');
background-repeat: repeat;
color: white;
}
-.pageheader .header span a, .pageheader .actions ul li a, .pageheader .header .parentlinks a, .pageheader #otherlanguages ul li a, .pageheader a {
+.pageheader .header span a, .pageheader .actions ul li a, .pageheader .header .parentlinks a, .pageheader #otherlanguages ul li a, .pageheader a, .pageheader .trail a {
font-weight: bold;
color: white;
text-decoration: none;
}
-.trailprev, .trailnext, .trailup {
- margin-top: 0.5em;
-}
-
.pageheader .actions {
text-align: right;
vertical-align: bottom;