need some help customizing the admin bar

This is a general question, actually a few of them, and not related to wpmudev so if nobody can help at least I tried here too :slight_smile:

first of all, here is the site I will be talking about: http://zice.ro

I am using a php file from inside mu-plugins to modify the wp admin bar to my likings and need some help.

a) the part on the far left of the bar where it says: zice.ro is generated by this snippet:

function addLinkHome( $wp_admin_bar) {
                        $wp_admin_bar->add_menu( array( 'title' => __( 'zice.ro' ), 'href' => 'http://zice.ro/' ) );
                                ?>
                <style type="text/css">
                #wp-admin-bar-zice-ro { background: #FA0502 url('http://zice.ro/favicon.ico') no-repeat left top;}
                </style>
                <?php
                                                                                                        }

                add_action( 'admin_bar_menu', 'addLinkHome', 0 ); //try add_action( 'admin_bar_menu', 'addLinkMenu', 999 );

I was trying to put the favicon of the site in front of it just like the avatar that appears when you are logged in, check this screen shot: http://screencast.com/t/HoIX3RYzvbK

b) The second part from the left, where it says "Blog aleator" should actually be on the far right hand side but I can't position it there. Here is the code that generates it:

function addLinkRandom( $wp_admin_bar) {
                                $wp_admin_bar->add_menu( array( 'title' => __( 'Blog aleator' ), 'href' => 'http://zice.ro/next.php' ) );}

                add_action( 'admin_bar_menu', 'addLinkRandom', 0 ); //try add_action( 'admin_bar_menu', 'addLinkMenu', 999 );

Unfortunately this code generates the menu into the .quicklinks part. How to get it to show on the far right hand side?

c) what is the difference between these two snippets as c1) works and c2) doesn't
c1)

function addNetworkComments() {
                                global $wp_admin_bar;

                               if ( is_user_logged_in() ){
                                $wp_admin_bar->add_menu( array( 'parent' => 'comments', 'title' => __( 'Discutiile mele'),
                                'href' => admin_url( 'index.php?page=my_network_comments' )
                                                                                                        ) );
                                                                                                }}
                                add_action('wp_before_admin_bar_render', 'addNetworkComments', 0);

c2)

function addNetworkComments( $wp_admin_bar) {
                                if ( is_user_logged_in() ){
                                $wp_admin_bar->add_menu( array( 'parent' => 'comments', 'title' => __( 'Discutiile mele'),
                                'href' => admin_url( 'index.php?page=my_network_comments' )
                                                                                                        ) );
                                                                                                }}
                                add_action('admin_bar_menu', 'addNetworkComments', 0);

here is the link to my original thread on the wp forums: http://wordpress.org/support/topic/some-wp-admin-bar-related-snippets?replies=12