Support Forum

Advanced Search
Forum Scope


Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
general-topic
Header formatting
Avatar
Conrad_Farlow
Sheffield, UK
Member
Free Members
sp_UserOfflineSmall Offline
Jan 11, 2012 - 9:15 am

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:

Image Enlarger

 

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

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Jan 11, 2012 - 11:19 am

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.

andy-signature.png
YELLOW
SWORDFISH
Avatar
Conrad_Farlow
Sheffield, UK
Member
Free Members
sp_UserOfflineSmall Offline
Jan 11, 2012 - 4:41 pm

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

Conrad

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Jan 11, 2012 - 8:38 pm

we have done worse... wink

Forum Timezone: Europe/Stockholm
Most Users Ever Online: 1170
Currently Online:
Guest(s) 1
Currently Browsing this Page:
1 Guest(s)
Top Posters:
Mr Papa: 19448
Ike: 2086
Brandon: 864
kvr28: 804
jim: 650
FidoSysop: 577
Conrad_Farlow: 531
fiddlerman: 358
Stefano Prete: 325
Member Stats:
Guest Posters: 617
Members: 17359
Moderators: 0
Admins: 4
Forum Stats:
Groups: 7
Forums: 17
Topics: 10125
Posts: 79620