1 amoun Apr 22, 2008 10:32
3 amoun Apr 22, 2008 17:01
Thanks Edb
4 amoun May 26, 2008 01:05
Hi Ed
Have sorted this. I hacked the file inc/xhtml_validator/_xhtml_dtd.inc.php.
Added id and name attributes to the ‘a’ tag
Line 341 'a' => $A_attrs.' charset type href hreflang rel rev shape coords target id name',
NOTES
1. The internal link/bookmark contains both the id and name attributes having the same value
2. The href has to be an absolute url.
I also hacked the quicktags.plugin.php so I have a button to automate the addition of both attributes after entering a value. It's a mod of the href button.
I'll clarify the code for it later.
EDIT 1: For more details and code for the button see http://eu.rogerlovejoy.eu/b2evo.php/enable-alt-a-name-agt
All the best
5 amoun Feb 18, 2014 13:33
Feb 18th 2104
Updated URL to my hack http://rogerlovejoy.net/blog/b2evo.php/enable-alt-a-name-agt
The id attributte is still not incorporated in version $Id: _xhtml_dtd.inc.php 3328 2013-03-26 11:44:11Z yura $
I thought about a plugin for this. The place I get stopped cold is how to make the link to a specific bit inside the post knowing that it has to be an absolute URL else the base href tag will take over and the link will be relative to your skins/yourskin/ folder.
I'm sure it can be done with something like a "regenerate_url_even_though_it_hasnt_been_created_yet()" function but wow that stuff scares me so I go off and do something mindlessly simple ;)
Hey wait a minute adding ONLY the <a name="whatever"> bit shouldn't be hard at all. Possibly just turn off one of the security checker features? Alternatively it could be to hack ... whatever file it is that says what attribute is allowed for which tags (sorry but I don't know where all that stuff moved to lately). The hardship in my mind is having a toolbar that would both make the anchor AND a hyperlink to the anchor. So like you could have an index at the top of the post that skipped to each section within a post.
I shall have to test this and see if I'm even close.