Apache-MiniWiki
view release on metacpan or search on metacpan
MiniWiki.pm view on Meta::CPAN
}
$spanlinks++;
my $display = $href;
if (length($display) > 80) {
$display = substr($display, 0, 80) . "...";
}
$spanhtml .= qq|<li><a onClick="checkInLink(this)" href="$href">$display</a></li>\n|;
}
$spanhtml .= qq|</ul>|;
$linklist .= qq|, <a name="expand_link" href="javascript:void(0)" onClick="expand(this, '$ul_id')">view links ($spanlinks)</a><br/>\n|;
$linklist .= $spanhtml;
$parser->eof();
} else {
$linklist .= "<br/>\n";
}
}
if ($do_externals) {
$linklist .= "<br/><hr/>$total_in inside links, $total_out outside links, for a total of $total_bytes bytes of rendered body html.<br/>";
example/listlinks,v view on Meta::CPAN
@@
1.1
log
@adding listlinks page
@
text
@List all links
Here's every link in this Wiki, grouped by page. External links will take you directly to that external site. Links to other pages will scroll you up or down on this page. Click *View* behind the page title to open that page, click *Links* to view th...
---@
example/template,v view on Meta::CPAN
}
h3 {
font-size: 1.3em;
}
--></style>
<script language="javascript"><!--
function checkInLink(link) {
// checks if this link is a #link
// if so, expand that span
if (link.innerHTML.indexOf("#") >= 0) {
focusPage('links_' + link.innerHTML.replace(/#/, ""))
}
}
function showAllLinks() {
var expand_links = document.getElementsByName("expand_link");
for (i=0; i<expand_links.length; i++) {
html = expand_links[i].innerHTML;
if (html.indexOf("view links ") >= 0) {
expand_links[i].innerHTML = html.replace(/view/g, "hide");
}
}
var objects = document.getElementsByTagName("span");
for (i=0; i<objects.length; i++) {
if (objects[i].id.indexOf("links_") >= 0) {
objects[i].style.display='';
}
}
}
function hideAllLinks() {
var objects = document.getElementsByTagName("span");
for (i=0; i<objects.length; i++) {
if (objects[i].id.indexOf("links_") >= 0) {
objects[i].style.display = 'none';
}
}
var expand_links = document.getElementsByName("expand_link");
for (i=0; i<expand_links.length; i++) {
html = expand_links[i].innerHTML;
if (html.indexOf("hide links ") >= 0) {
expand_links[i].innerHTML = html.replace(/hide/g, "view");
}
}
}
function focusPage(thistag) {
styleObj = document.getElementById(thistag).style;
styleObj.display = '';
}
function expand(linktag, hidetag) {
// linktag is the <a> tag the user clicked
// hidetag is the span we want to expand/collapse
styleObj = document.getElementById(hidetag).style;
if (styleObj.display=='none') { //show
styleObj.display = '';
linktag.innerHTML = linktag.innerHTML.replace(/view/, "hide");
} else { //hide
styleObj.display = 'none';
linktag.innerHTML = linktag.innerHTML.replace(/hide/, "view");
}
}
( run in 1.058 second using v1.01-cache-2.11-cpan-5623c5533a1 )