On Fri, Dec 19, 2008 at 5:15 AM, Daisuke <[email protected]> wrote:
>
> Thank you!
> Is there any way to have the topics in the contents to link to its own
> topics? Cureently there are just plain texts.
Currently the script is just looking for headers, like
!! header
To get it to link to the header, you have to put anchors in them:
!! [[#head1]]Header
In which case we would could change the sumbox function to only look
for anchors and then link to them. Try this:
function BOLTFsumbox($args) {
global $pageLink;
if (isset($args['page'])) $page = $args['page'];
else $page = $pageLink;
$content = BOLTloadpage($page);
preg_match_all('/\[\[\#(.*)\]\](.*)/m', $content, $matches);
foreach ($matches[1] as $i => $ii) {
$count = $count + 1;
$out .= "$count [[$page#$ii|" . $matches[2][$i] . "]]<br>";
}
return "<box>\n$out\n</box>";
}
Hey this is starting to look like a real plugin. Anyone care to post
it in the solutions area? Maybe someone with some time could even
consider tapping this into the template engine... That way we could
completely customize the output on the fly. Kind of getting cool, eh?
Cheers,
Dan
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"BoltWire" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/boltwire?hl=en
-~----------~----~----~----~------~----~------~--~---