Author and time of last posting on the same line on index?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • mito22
    Member
    • Dec 2006
    • 92
    • 3.6.x

    [Site Builder] Author and time of last posting on the same line on index?

    Hi guys.... to save vertical space....

    How can I put (on index expecially) the author and time of last posting on the same line? And not on TWO?

    Like this?

    Click image for larger version

Name:	vb-stessa-riga.jpg
Views:	46
Size:	257.0 KB
ID:	4385802

    http://www.daidegasforum.com/images2...tessa-riga.jpg
  • Wayne Luke
    vBulletin Technical Support Lead
    • Aug 2000
    • 73981

    #2
    You edit the HTML in vBulletin 5 the same was as you did in older versions of vBulletin. This template is the display_forums_item template. You would have to edit this code to fit your needs:

    Code:
                            <div class="lastpost-by">
                                <vb:if condition="$forum['lastcontent']['userid'] > 0">
                                    {vb:set profileUrl, {vb:url 'profile', {vb:raw forum.lastcontent}}}
                                    {vb:rawphrase by_x, {vb:var profileUrl}, {vb:raw forum.lastcontent.authorname}}
                                <vb:else />
                                    {vb:phrase by_guest}
                                </vb:if>
                            </div>
                            <div class="lastpost-date post-date">{vb:datetime {vb:raw forum.lastcontent.created}}</div>
    This could break display on mobile devices.
    Translations provided by Google.

    Wayne Luke
    The Rabid Badger - a vBulletin Cloud demonstration site.
    vBulletin 5 API

    Comment

    • glennrocksvb
      Former vBulletin Developer
      • Mar 2011
      • 4011
      • 5.7.X

      #3
      This may be possible via CSS. I'm on the phone and cannot provide the css at this time.

      Flag Icon Postbit Insert GIPHY Impersonate User BETTER INITIALS AVATAR Better Name Card Quote Selected Text Bookmark Posts Post Footer Translate Stop Links in Posts +MORE!

      Comment

      • Dead Eddie
        Member
        • Apr 2004
        • 43
        • 3.7.x

        #4
        Originally posted by Glenn Vergara
        This may be possible via CSS. I'm on the phone and cannot provide the css at this time.
        I gave him this solution on .org yesterday.

        Comment


        • In Omnibus
          In Omnibus commented
          Editing a comment
          The solution you gave him only works until the media queries breakpoint. Once the screen hits the breakpoint it pushes the information back to the second line. I'm still trying to figure out why anyone would want to do this in the first place.
      • glennrocksvb
        Former vBulletin Developer
        • Mar 2011
        • 4011
        • 5.7.X

        #5
        Try this:

        Code:
        .l-desktop .lastpost-info .lastpost-by {
            float: left;
            margin-right: 10px;
        }
        
        .l-desktop .lastpost-info .lastpost-date {
            position: relative;
            bottom: -1px; /* may need adjustment */
        }
        Mobile devices in landscape mode display the forum directory section the same as on desktop. But I purposely did not account for it in the CSS code above as putting the author and date in the same line doesn't look good due to space limitation. So the above code is only for desktop and tablets.

        Flag Icon Postbit Insert GIPHY Impersonate User BETTER INITIALS AVATAR Better Name Card Quote Selected Text Bookmark Posts Post Footer Translate Stop Links in Posts +MORE!

        Comment

        Related Topics

        Collapse

        Working...