Recent Topics

1 Apr 25, 2008 02:15    

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:

1. 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
2. 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
3.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.:)

So this is the hacked function display now:


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'];
}

2 Nov 16, 2008 02:54

Thanks so very much amoun.

I really wanted to have a 'Logout' link on the blog I'm putting together and you provided just the information I was looking for!

After seeing how this widget's inner-workings worked per your edits, I expanded upon it to keep each of the features, just allowing picking and choosing which ones to include in a given blog regardless of the container it gets put into. This edited version also includes whether or not to show the title 'User Tools' on the blog pages. I used 'Common Navigation Links' as the model for this expansion.

See it here:
[url=http://www.blogsoundoff.com/software-edits/b2evolution/]User Tools widget revision for v.2.4.5[/url]

Thanks again!

ENJOY!

4 Feb 01, 2012 11:18


Form is loading...