Sounds good. I just got it working. Thanks!
Cheers, Dan 2009/3/24 Linly <[email protected]>: > > Fair enough. If one want title, use [[{p}#anchor|{title}]]; others > use [[{p}#anchor|+]] to show the anchor. > > Cheers, linly > > On 3月25日, 上午12時20分, The Editor <[email protected]> wrote: >> Hmmm. I seem to not get the title on any of the anchors. Or even a >> capitalized letter. I'll have to look into it... >> >> Got it. I guess the question is what do we want it to show. To have >> the page title show up, we simply need to insert the following line >> between the other two, in markups.php around line ~501: >> >> if (strpos($link, '&') !== false) $label = >> BOLTvars(substr($link, >> 0, strpos($link, '&')) . ':title'); >> elseif (strpos($link, '#') !== false) $label >> = >> BOLTvars(substr($link, 0, strpos($link, '#')) . ':title'); >> else $label = BOLTvars("$link:title"); >> >> However it seems to me the better option might be to use code like this: >> >> if (strpos($link, '&') !== false) $label = >> BOLTvars(substr($link, >> 0, strpos($link, '&')) . ':title'); >> elseif (strpos($link, '#') !== false) $label >> = >> ucwords(substr($link, strpos($link, '#') + 1)); >> else $label = BOLTvars("$link:title"); >> >> One advantage for the latter is that we could fix boltwire to also do >> [[#anchor|+]] and get a link on Anchor. That makes more sense than a >> list of anchors on a page all having the same page title on them. (It >> would require an additional fix to the code). Anyway, I'm inclined >> this way. To get the behavior Linly desires, it's always possible to >> do [[{p}#anchor|{title}]]. >> >> Any feedback on which we want for the default behavior? >> >> Cheers >> Dan >> >> On Tue, Mar 24, 2009 at 10:47 AM, Linly <[email protected]> wrote: >> >> > If I have a page title "Anchor Test" and put a interwiki link >> > containing anchor like this: >> >> > [[test.link#anchor1|+]] >> >> > It would appear just what I want, a link on the text "Anchor Test". >> >> > But if there are two links, there is only one (the 2nd one) link would >> > appear as usual, the 1st one would show a link on the text >> > "link#anchor1", not the title of that page. The result equals to : >> >> > 1st one: [[test.link#anchor1|link#anchor1]] >> > 2nd one: [[test.link#anchor2|Anchor Test]] >> >> > Is this bug or? >> >> > Cheers, linly > > > --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
