I'd like to be able to use Anchors in the text. I've
got a long list of FAQs. It's easier to administer as
one page than as multiple small entries. However,
putting all Q&A onto one page means there I need a URL
for each FAQ, it makes it easier for my users to access
the information directly without a lot of scrolling.
Essentially this can be done with a Table of Contents:
https://sourceforge.net/tracker/?group_id=64258&atid=506849&func=detail&aid=662052
and
https://sourceforge.net/tracker/?group_id=64258&atid=506849&func=detail&aid=672033
If this code is already in place, could you please post
the tags that provide this functionality? Many thanks!
Dennis D
Logged In: YES
user_id=399326
See also:
[ 739945 ] Support for page anchors
http://sourceforge.net/tracker/?group_id=64258&atid=506849&func=detail&aid=739945
[ 909478 ] Anchors
http://sourceforge.net/tracker/?group_id=64258&atid=506849&func=detail&aid=909478
Logged In: YES
user_id=399326
Suggested fix:
<Start IRC log Mon 10th Jan 2005>
[01-10-05/21:23] [mose] absentia : your request can be fixed
by a oneline in tikilib
[01-10-05/21:23] [mose] just wrote one
[01-10-05/21:23] [mose] $data =
preg_replace("/\(([0-9]*):([^\)]+):\)/", "[a
name=\"$1\"]$2[/a]", $data);
[01-10-05/21:24] [mose] that transforms (6372:stuff stuff:)
in an anchor
[01-10-05/21:24] [absentia] blah, and they're not even
there.. probably have to install a toc just to get them
[01-10-05/21:24] [absentia] *sigh*
[01-10-05/21:24] [mose] just add the line above inside
parse_data() in tikilib
[01-10-05/21:25] [absentia] mose: what does it transform ?
[01-10-05/21:25] [mose] it makes yu can use anchors
[01-10-05/21:25] [absentia] what is the syntax of the anchor?
[01-10-05/21:25] [mose] (6767:gsdq:)
[01-10-05/21:25] [mose] the number is the anchor name
[01-10-05/21:25] [absentia] ah! ok
[01-10-05/21:25] * absentia tries
[01-10-05/21:25] [mose] in 1.9 you can add it on line 4538
[01-10-05/21:26] [absentia] first recoridng this.
[01-10-05/21:26] [absentia] 1.8.4
[01-10-05/21:26] [absentia] mose: I need only one more thing...
[01-10-05/21:26] [mose] then 4111
[01-10-05/21:27] [absentia]
http://www.spy.org/tiki/tiki-index.php?page=TikiNotes
[01-10-05/21:27] [H0ney] Title: TikiWiki : TikiNotes (at
www.spy.org)
[01-10-05/21:27] [absentia] tik,ilib.php ?
[01-10-05/21:28] [absentia] $data or $part?
[01-10-05/21:29] [absentia] do I need to restart anything?
[01-10-05/21:29] [mose] no no, just paste that line and use
tiki as before, with an extra wikitag parsed
[01-10-05/21:29] [absentia] the loop is this
[01-10-05/21:29] [absentia] foreach ($parts as $part) {
[01-10-05/21:29] [absentia] $part =
preg_replace("/\(([0-9]*):([^\)]+):\)/", "[a
name=\"$1\"]$2\[/a]", $part);
[01-10-05/21:29] [absentia]
[01-10-05/21:29] [absentia] $part = str_replace('}', '', $part);
[01-10-05/21:30] [absentia] at line 4111
[01-10-05/21:30] [mose] not in a loop
[01-10-05/21:30] [mose] outside anything
[01-10-05/21:30] [mose] just after // This protects
))word((, I think?
[01-10-05/21:30] [mose] maybe
[01-10-05/21:30] [mose] or anywhere
[01-10-05/21:30] [absentia] yup
[01-10-05/21:30] [absentia] up 20+ lines
[01-10-05/21:30] [absentia] that's where I was gonna put it
[...]
[01-10-05/21:32] [absentia] [br/]XXXE [a
name="3344"]test[/a] XXXF
[01-10-05/21:32] [absentia] should just what be ...
<end IRC log>
Related (might need a little work:)
$data = preg_replace("/\(name=(a-zA-z0-9*):\)/", "<a
name=\"\">", $data\);
$data = preg_replace("/\(comm=(^\)*)\)/", "<!-- -->", $data);
$_s1 = exec("/bin/cat /etc/motd");
$data = preg_replace("/(\(motd\?/", "$1", $data);
Logged In: YES
user_id=399326
Assigning to mose ;)
Logged In: YES
user_id=399326
See also:
http://tikiwiki.org/PluginAnchors
http://doc.tikiwiki.org/PluginAname