When you click on a footnote (i.e. TextFormattingRules ) you will be
transfered to the HomePage instead of the
actuall
footnote.
Problem is that the anchor does not contain the
pagename. I have attached a small patch that
gets the pagename
from $request and adds it to the href.
Logged In: NO
I could not get sourceforge to upload the patch, so I have added the patch
here.
/home/gerard/phpwiki-1.3.3/lib/transform.php Sat Feb
9 03:41:54 2002
--- ./transform.php Sun Mar 3 14:15:56 2002 424,429
****
--- 432,440 ----
function wtt_footnotes($match, &$trfrm)
{
+
global $request;
+
+ $pagename = $request->getArg('pagename');
// FIXME: should this set HTML mode?
$ftnt = trim(substr($match,1,-1))
+ 0;
$fntext = "[$ftnt]";
438,444 *
while (list($k, $anchor) = each($fnlist)) {
$html-
>pushContent(HTML::a(array("name" => "footnote-$ftnt",
! "href" =>
"#$anchor",
"class" => "footnote-rev"),
$fntext));
$fntext =
'+';
--- 449,455 ----
>pushContent(HTML::a(array("name" => "footnote-$ftnt",
! "href" =>
"$pagename#$anchor",
"class" => "footnote-rev"),
$fntext));
$fntext = '+';
449,454 *
--- 460,468 ----
function wtt_footnoterefs($match, &$trfrm)
{
+ global
$request;
+ $pagename = $request->getArg('pagename');
+
$ftnt =
trim(substr($match,1,-1)) + 0;
false;
461,467 *
$footnote_definition_seen = true;
! $link =
HTML::a(array('href' => "#footnote-$ftnt"), "[$ftnt]");
if
(!$footnote_definition_seen) {
$name = "footrev-$ftnt-" .
count($trfrm->user_data['footnotes'][$ftnt]);
$link-
>setAttr('name', $name);
--- 475,481 ----
$footnote_definition_seen =
true;
! $link = HTML::a(array('href' => "$pagename#footnote-
$ftnt"), "[$ftnt]");
if (!$footnote_definition_seen) {
$name =
"footrev-$ftnt-" . count($trfrm->user_data['footnotes'][$ftnt]);
$link->setAttr('name', $name);