Support Forum

Header formatting

CF Conrad_Farlow
Conrad_Farlow
Member

Take a look at this forum, in particular the header ‘userInfo’ section. Here is the code from my spHead.php file, I believe that it is the same as this site.

 

   # Start the 'userInfo' section
    # ----------------------------------------------------------------------
    sp_SectionStart('tagClass=spPlainSection', 'userInfo');
            sp_UserAvatar('tagClass=spImg&size=50 spLeft');

        sp_SectionStart('tagClass=spPlainSection');
            sp_LoggedInOutLabel('tagClass=spLabelSmall spLeft', __sp('Logged in as<br /><b>%USERNAME%</b>'), __sp('Please consider registering<br /><b>guest</b>'), __sp('Welcome back <b>%USERNAME%</b><br />Please log in to post'));
            sp_LogInOutButton('tagClass=spButton spRight', __sp('Log In', '2011'), __sp('Log Out'), __sp('Log in and log out'));
            sp_RegisterButton('tagClass=spButton spRight', __sp('Register'), __sp('Register'));
            sp_ProfileEditButton('tagClass=spButton spRight', __sp('Profile'), __sp('Edit your profile'));
            if (function_exists('sp_PmInboxButton')) sp_PmInboxButton('tagClass=spButton spRight', __sp('Inbox:'), __sp('Go to PM inbox'));
            if (function_exists('sp_SubscriptionsReviewButton')) sp_SubscriptionsReviewButton('tagClass=spButton spRight', __sp('Subscribed:'), __sp('Review subscribed topics'));
            if (function_exists('sp_WatchesReviewButton')) sp_WatchesReviewButton('tagClass=spButton spRight', __sp('Watching:'), __sp('Review watched topics'));
            sp_MemberButton('tagClass=spButton spRight', __sp('Members'), __sp('View the members list'));

            sp_InsertBreak('direction=right');

            sp_LastVisitLabel('tagClass=spLabelSmall spRight', __sp('Last visited %LASTVISIT%'));

        sp_SectionEnd('tagClass=spClear');

Now look at the image from my test site:

 

The ‘LoggedInOutLabel’ appears below the user avatar presumably because the main container is not wide enough to accommodate everything on that line. However the main container is as wide as it is on this site. I cannot for the life of me figure out what is causing this, can anyone offer me a few pointers?

Conrad

3 Answers

New Answer

YS Yellow Swordfish
Yellow Swordfish
Member

The problem is in this:

sp_UserAvatar(‘tagClass=spImg&size=50 spLeft’);

You have split the tagClass in half with the size argument. The  &size=50 needs to be after the tagClass – i.e., after the spLeft.

CF Conrad_Farlow
Conrad_Farlow
Member

Ah, I wonder when I did that. At some point I hope to stop making these schoolboy errors! Thanks as ever.

Conrad