PDA

View Full Version : Change to forumhome_lastpostby


RustyDogma
05-20-2009, 01:04 PM
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.




<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/showthread.php?p=1659425#post1659425

.

EnIgMa1234
05-21-2009, 02:17 PM
Does
<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.