Enable <a name=" "> tag
25th May 23:21 SORTED
It has taken me many hours to find the right file to hack, its inc/xhtml_validator/_xhtml_dtd.inc.php version v 1.3 2008/02/08 22:24:46
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 should contain both the id and name attributes having the same value
2. The href has to be an absolute url.
26th May 00:08 Updated post on forum
Is it possible to enable the [a name=""] option.
Have also hacked the quicktags plugin by adding a button to automate the id and name attributes.
To do this I added three bits of code.
1. First I added a new button. I copied the section for the href link, and replaced the words 'link and href' with 'name' in three places and provided a new Hot Key option of Alt-N.
b2evoButtons[b2evoButtons.length] = new b2evoButton(
'b2evo_name',
'name',
'text-decoration:underline;',
'',
'</a>',
'a',
'<?php echo T_('A name [Alt-N]') ?>'
); // special case
2. Then added another elseif statement, by copying the href elseif and changing two instances of the word 'link' to 'name'
else if( button.id == 'b2evo_name' )
{
document.write('<input type="button" id="' + button.id + '" accesskey="' + button.access + '" title="' + button.tit
+ '" style="' + button.style + '" class="quicktags" onclick="b2evoInsertName(b2evoCanvas, ' + i + ');" value="' + button.display + '" />');
}
3. Finally I copied the function b2evoInsertLink().
The name was altered to b2evoInsertName, the default value has been removed, although I haven't as yet removed the code for it, and lastly the start tag was altered to automate the addition of an id and name attribute rather than the 'href'
function b2evoInsertName(myField, i, defaultValue)
{
if (!defaultValue)
{
defaultValue = '';
}
if (!b2evoCheckOpenTags(i))
{
var URL = prompt( ':', defaultValue);
if (URL)
{
b2evoButtons[i].tagStart =
'<a id="' + URL + '" name="' + URL + '">';
b2evoInsertTag(myField, i);
}
}
else
{
b2evoInsertTag( myField, i );
}
}
Smilies
Have removed the more unpleasant and extravagant ones. Now there is just a single line in of option at common screen width of 1024 using Chicago or Legacy skin for the admin.
Sadly in Evo two of the extended GUI toolbar lines wrap and is a bit ugly.
Just removed some more to get the Evo to work
May have got a bit carried away but am removing more ![]()
User Tools Hack
I didn't like the way the Login plugin didn't give an alternative Log Out option.
It was inconvenient and messed with the symmetry of layout I wanted so I replaced the Menu Link [Log in form] with the User Tools widget but had to mess with User Tools to get approximately what I wanted.
I blanked out some of the links by using text. It took a while before I didn't like the way the spaces were aligned etc., then I noticed 6 XHTML errors so I thought I'd try a widget hack after my success with the More Tags one
I thought I may be able to remove most options just to leave a Log In, Log Out option.
Took a few hacks:
- I removed some options and changed some output text, which put me back as they all came back up on reinstalling. Still had the XHMTL errors
- Realised I had only altered the GUI admin options, not that displayed on the menu bar. Found the 'display' code and removed some of the parameters. This was better the output was fine but I still had 3 errors
On further investigation I removed the [Block] part, which was of course is the 'User Tools' tile which had the H2 tag the source of the errors, which doesn't fit in the position I placed the widget - the 'menu' as it puts the H2 outside a list item section.
Had to go back and remove the last [/Block] parameter and all is fine.

function display( $params )
{
$this->init_display( $params );
echo $this->disp_params['list_start'];
user_login_link( $this->disp_params['item_start'], $this->disp_params['item_end'], $this->disp_params[ 'user_login_link' ] );
user_logout_link( $this->disp_params['item_start'], $this->disp_params['item_end'], $this->disp_params[ 'user_logout_link' ] );
echo $this->disp_params['list_end'];
}
Text {background-color}
Have managed to hack EdB's MoreTags plugin to provide a couple of background colours to text.
Thanks EdB wonderwinds.com
