• b2evo
  • Front Page
  • Contact
  • Login
  • reset page

Far Fields

  • Andromeda ¦ First Contact
  • Blush ¦ Private
  • Dad ¦ Private
  • Vyaj ¦ Immigration & Asylum Cases

Near Fields

  • My Bits
  • Behind the Sceanic
  • vOw ¦ Vegan Organic Wholefood

Old Fields

  • 1996 Site
  • Old Search Site

Blogs

  • b2Evo ¦ Blog techie stuff
  • eLf ¦ Updates on the land
  • blInk ¦ Some useless links
  • spAce ¦ Thoughts on being
  • j&j ¦ Prospectors of Kern
  • av0id ¦ How I Got Here

Enable <a name=" "> tagUpdated: February 23rd, 2014

Created: 13/05/08

Sat 22nd Feb 2014
Updated [/plugins/_quicktags.plugin.php], which I now call MyQuickTags.plugin.php so as not to get my mods overridden by any b2evo version update.

The idea is to have the ability to use [#example] in the URL prompt and add this to the calling page.

Changes are:
start at line 391
function b2evoInsertLink(myField, i, defaultValue)
{
var ref= '<?php echo $_SERVER[HTTP_REFERER] ?>';
if (!defaultValue)
{
defaultValue = '';
}
if (!b2evoCheckOpenTags(i))
{
var URL = prompt( '<?php echo T_('URL') ?>:', defaultValue);
var hash = URL.substring(0,1);
if (hash == '#')
{
URL = ref+URL;
}
if (URL)
......
......

Version 5.0.7 SORTED February 2014
NOTE: You will have to enter the full URL in the calling 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.

Feb 2014 Just updated @copyright (c)2003-2013 by Francois Planque by inserting at line 218
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

Feb 2014 Just updated @copyright (c)2003-2013 by Francois Planque by inserting at line 262

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 + '" />');
}

Feb 2014 Just updated @copyright (c)2003-2013 by Francois Planque by inserting at line 415

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' Oh Feb 2014 the prompt needed changing from URL to id and name

function b2evoInsertName(myField, i, defaultValue)
{
 if (!defaultValue)
  {
   defaultValue = '';
  }
 
 if (!b2evoCheckOpenTags(i))
  {
   var URL = prompt( '<?php echo T_('id and name') ?>:', defaultValue);
   if (URL)
    {
     b2evoButtons[i].tagStart = 
      '<a id="' + URL + '" name="' + URL + '">';
     b2evoInsertTag(myField, i);
    }
   }
    else
     {
      b2evoInsertTag( myField, i );
     }
}
  roger
print   Print     
 
  •  Paged Index of 133 Posts

  • Last nineteen

    • Add html figure tag
    • Validation 7.2.5
    • elfgifs_plugin
    • Add sub text button
    • [autocorrect] validation
    • Versions & Database
    • Math Terms & Plugin
    • My Search Hack
    • figure tag
    • evobar toolbar
    • Front Page Collections #
    • Move to a new line using CSS not <br />
    • Version 6.10.6 & php 7
    • Stuck on Version 6.10.5
    • Limit Login Attempts
    • 6.10.5
    • Add Number to Comment
    • 6.10.4
    • v 6.10.*
  • Search


Valid HTML 5.0    ubuntu link    duckduckgo link    b2evolution link    firefox link    Creative Commons Licence    Valid CSS!