My Tags Plugin
Details on my mod to Quick Tags plug-in.
I have added a fourth <div> as follows:
1. Open _mytags.plugin.php and edit
2. In function GetDefaultSettings() copy existing div code, that starts as follows and changing div numbers. Do not change ['rows' => 4]
'moretags_div1' => array(
3. In function SkinBeginHtmlHead() copy code for div starting as follows, and change numbers to suit step 2 above.
if ( $this->Settings->get('moretags_div1') != '' )
4. In function AnotherButton(id, display, tagClass, tagStart, tagEnd, tit, open)
copy code for new button, as follows and again change div number to suit above. The 'd1' is the button label(text) and can be anything. I have used 'Cl' on a button to {clear:both} and 'dL' for a <div> that has {float:left} in it's CSS class.
MoreButtons[MoreButtons.length] = new AnotherButton(
'mtb_div1','d1','divs leftgap','
5. Then edit the plug-in via management ~ pluin installed ~ MyTags to create the style wanted.
OK All the above was unnecessary. clearboth is already a class in rsc/css/basic.css and I made two more classes to replace the divs made above; post_fll and post_flr (post detail float left and ditto float right). So the divs can be used for something else. Well at least they are implimented and the css of each cna be easily changed.
Search Form Widget
Hard coded paragraph tag around submit button as validator didn't like any lines of code inside a <form> tag not to be in a block tag.
echo '<p>';
echo '<input type="submit" name="submit" value="'.T_('Search').'" class="search_submit" />';
echo '</p>';
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 );
}
}
Edit Post should be at top of page.
Once a page is edited it should be at the top of the page.
So one of the following:
a) It is at the top just the instance after editing
b) The last post whether new or edited is always at the top
c) After editing the post is shown in single post view.
This is a copy of an earlier gripe:
OnClick Return to Place in Page
I find it annoying to have to scroll back to an article after editing it if it is one of a list. This may require an implementation of the name ="" property of the HTML a tag or;
As a list is created and each post has an ID maybe that ID can be used as a marker.?
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
List Posts in Alphabetical Order
Get the Post List Widget to display in Aphabetical Order.
The archive does it by date, tags by association, categories so where's the alphabetical option Smile
Move Category Header
Move Category header to Post Title line, like breadcrumb.
Do on all post and make category a link.
