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)
-   -   Last post text should line up better (https://vborg.vbsupport.ru/showthread.php?t=194961)

Maxwell the Cat 10-29-2008 08:35 PM

Last post text should line up better
 
The Last Post text on my forums home page lines up a bit odd.

http://img100.imageshack.us/img100/9263/picture1iq3.png
http://img100.imageshack.us/img100/p...png/1/w380.png

The date of the last post is on its own line, below the author. Is there a way I can get these to be on the same line, so it takes up less room?

p@nDa 10-29-2008 09:43 PM

i want to edit that one too , cause using my style the last post title and the autor are the same exactly color , i wanna use different colors for that

Azhrialilu 10-30-2008 07:44 AM

Without seeing your site or the code you have set up currently, it's hard to be sure what you've done. My own site has the last post on the same line as the last poster.

p@nDa 10-30-2008 08:35 AM

1 Attachment(s)
should be this one ...

Code:

<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]"><img class="inlineimg" src="$stylevar[imgdir_button]/lastpost.gif" alt="$vbphrase[go_to_last_post]" border="0" /></a>
        </div>
</div>

and actually it looks like the img i attach ...

i would like the name of the poster would be parsed as usually in the rest of the forum , with the color and style of his respective usergroup ( like 'who's online box' )

Maxwell the Cat 10-30-2008 10:57 PM

If I can figure out what template is responsible for this, I can probably poke around it enough to figure out how to make the change I want.

p@nDa 10-31-2008 12:27 PM

i take that code form the template

forumhome_lastpostby

if u manage how to edit can u please help me too ?

thanks

Lynne 10-31-2008 02:14 PM

Whenever you want to find a template, do this - vboptions > General Settings > Add Template Name in HTML Comments > set to Yes . Then go back to your page and view the source code and you will see the name of the template called around your part of the code.

Maxwell the Cat 11-01-2008 11:17 AM

Quote:

Originally Posted by Lynne (Post 1656643)
Whenever you want to find a template, do this - vboptions > General Settings > Add Template Name in HTML Comments > set to Yes . Then go back to your page and view the source code and you will see the name of the template called around your part of the code.

Woah! That's pretty handy. The more you know...

Anyways, this is in my forumhome_lastpostby template. The code for it is this:

HTML 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]"><img class="inlineimg" src="$stylevar[imgdir_button]/lastpost.gif" alt="$vbphrase[go_to_last_post]" border="0" /></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]"><img class="inlineimg" src="$stylevar[imgdir_button]/lastpost.gif" alt="$vbphrase[go_to_last_post]" border="0" /></a>
</div>
</if>

I've played with it a little bit but haven't had much luck getting the text to line up. Anyone have any thoughts?

p@nDa 11-01-2008 01:03 PM

1 Attachment(s)
i have finally done ... i explain how to so if some noob like me need this kind of thing it can follow my experience :)

1) add a new class in Additional CSS with attributes i would like to use ...

Code:

.lastpostby, .lastpostbyActive
{
        color: #ffffff;
}
.lastpostby a:link, .lastpostby_alink, .lastpostbyActive a:link, .lastpostbyActive_alink
{
        color: #ff8c25;
        text-decoration: none;
}
.lastpostby a:visited, .lastpostby_avisited, .lastpostbyActive a:visited, .lastpostbyActive_avisited
{
        color: #ff8c25;
        text-decoration: none;
}
.lastpostby a:hover, .lastpostby a:active, .lastpostby_ahover, .alt1Active a:hover, .lastpostbyActive a:active, .lastpostbyActive_ahover
{
        color: #33FF33;
        text-decoration: none;
}

2) simply add definition class="lastpostby" in the <div definition in the code ( in the template ) ...

Code:

<div class="lastpostby" 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>

see the photo attached for the change ...

that's all , but it was so hard figuring out how to do this , i really take long time to search for the specific help and at the end i tried on my own ... :)

p@nDa 11-01-2008 01:08 PM

@ Maxweel ...

this is ur code ...

Code:

<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>

maybe u should add both part in one only <div> to have on the same line , no ?

like ...

Code:

<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>
                <phrase 1="member.php?$session[sessionurl]find=lastposter&amp;f=$lastpostinfo[forumid]" 2="$lastpostinfo[lastposter]">$vbphrase[by_x]</phrase>
        </div>

i haven't tested ...

i removed the

Quote:

</div>
<div style="white-space:nowrap<if condition="is_browser('ie', 6)">; float:$stylevar[left]</if>">
beetween the 2 phrases ...

Maxwell the Cat 11-01-2008 09:08 PM

Okay, I played with the code and I'm getting closer to what I want. Right now, this is my code:

HTML Code:

<if condition="$show['lastpostinfo']">
<div class="smallfont" align="$stylevar[left]">
        <div>
                <span style="white-space:nowrap <if condition="is_browser('ie', 6)">; float:$stylevar[left]</if>">
                <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>
                <phrase 1="member.php?$session[sessionurl]find=lastposter&amp;f=$lastpostinfo[forumid]" 2="$lastpostinfo[lastposter]">$vbphrase[by_x]</phrase>
        </div>

                $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]"><img class="inlineimg" src="$stylevar[imgdir_button]/lastpost.gif" alt="$vbphrase[go_to_last_post]" border="0" /></a>

</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]"><img class="inlineimg" src="$stylevar[imgdir_button]/lastpost.gif" alt="$vbphrase[go_to_last_post]" border="0" /></a>
</div>
</if>

And this is what its outputting:

http://img83.imageshack.us/img83/8812/picture1hd6.png
http://img83.imageshack.us/img83/pic...png/1/w416.png

So how can I get the time on the same line as the other text and be justified all the way to the right?

Seven Skins 11-04-2008 04:33 PM

.


Use table instead of divs ... if you wanna make sure they are in one line.
PS. If user name is too long it will stretch the last post column.


Tried and tested code below:



HTML 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>
      <table align="center" width="100%" cellpadding="2" cellspacing="0" border="0">
        <tr>
          <td align="left" style="white-space:nowrap" class="smallfont">
              <phrase 1="member.php?$session[sessionurl]find=lastposter&amp;f=$lastpostinfo[forumid]" 2="$lastpostinfo[lastposter]">$vbphrase[by_x]</phrase>
          </td>
          <td align="right" style="white-space:nowrap" class="smallfont">
              $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]">
              <img class="inlineimg" src="$stylevar[imgdir_button]/lastpost.gif" alt="$vbphrase[go_to_last_post]" border="0" /></a>
          </td>
        </tr>
      </table>
</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]"><img class="inlineimg" src="$stylevar[imgdir_button]/lastpost.gif" alt="$vbphrase[go_to_last_post]" border="0" /></a>
</div>
</if>


.

Maxwell the Cat 11-07-2008 05:54 PM

That works. Thank you!


All times are GMT. The time now is 03:59 PM.

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.01285 seconds
  • Memory Usage 1,826KB
  • 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
  • (5)bbcode_code_printable
  • (3)bbcode_html_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (13)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