vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Design and Graphics Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=168)
-   -   Change to forumhome_lastpostby (https://vborg.vbsupport.ru/showthread.php?t=214130)

RustyDogma 05-20-2009 01:04 PM

Change to forumhome_lastpostby
 
The code for forumhome_lastpostby displays like this:

left-aligned post title
left-aligned by: last poster
right aligned: date

I'd like to get the last poster and date on the same line so it's:

left-aligned post title
left-aligned by: poster right aligned: date

I'm not sure how to change the code to do that, I tried embedding the <div> for the date, and also changing the <div> to <span> both of which did put it on the same line like I wanted, but was left aligned up against the last poster name, rather than right.




Code:

<if condition="$show['lastpostinfo']">
<div class="smallfont" align="$stylevar[left]">
        <div>
                <span style="white-space:nowrap">
                <if condition="$show['icon']"><img class="inlineimg" src="$icon[iconpath]" alt="$icon[title]" border="0" /></if>
                <if condition="$lastpostinfo['prefix']">
                        $lastpostinfo[prefix]
                        </span><if condition="is_browser('safari')"><!--bug#24775-->&nbsp;</if>
                        <span style="white-space:nowrap">
                </if>
                <a href="showthread.php?$session[sessionurl]goto=newpost&amp;t=$lastpostinfo[lastthreadid]" style="white-space:nowrap" title="<phrase 1="$lastpostinfo[lastthread]">$vbphrase[go_first_unread_in_thread_x]</phrase>"><strong>$lastpostinfo[trimthread]</strong></a></span>
        </div>
        <div style="white-space:nowrap<if condition="is_browser('ie', 6)">; float:$stylevar[left]</if>">
                <phrase 1="member.php?$session[sessionurl]find=lastposter&amp;f=$lastpostinfo[forumid]" 2="$lastpostinfo[lastposter]">$vbphrase[by_x]</phrase>
        </div>
        <div align="$stylevar[right]" style="white-space:nowrap">
                $lastpostinfo[lastpostdate] <if condition="!$show['detailedtime']"><span class="time">$lastpostinfo[lastposttime]</span></if>
                <a href="showthread.php?$session[sessionurl]p=$lastpostinfo[lastpostid]#post$lastpostinfo[lastpostid]"></a>
        </div>
</div>
<else />
<div class="smallfont" align="$stylevar[right]">
        $lastpostinfo[lastpostdate] <if condition="!$show['detailedtime']"><span class="time">$lastpostinfo[lastposttime]</span></if>
        <a href="showthread.php?$session[sessionurl]p=$lastpostinfo[lastpostid]"></a>
</div>
</if>

Thanks in advance for any help :)

Seven Skins 05-21-2009 11:58 AM

This will help you. Need to use table instead of div or span.

https://vborg.vbsupport.ru/showthrea...25#post1659425

.

EnIgMa1234 05-21-2009 02:17 PM

Does
Code:

<span style="float: right"></span>
work?

Seven Skins 05-21-2009 10:20 PM

It works only if username is short if user name is too long then the date shifts one line down.
To fix this you have to use table.


All times are GMT. The time now is 05:26 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01015 seconds
  • Memory Usage 1,722KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (4)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete