vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   date/post problem in postbit (https://vborg.vbsupport.ru/showthread.php?t=89543)

apokphp 07-26-2004 08:17 AM

date/post problem in postbit
 
The problem is, the date/time of the post will not display in the postbit (which is customized) for some recent posts. It will show, if the poster gave a title name for the post. If they used quickreply, or they didn't enter a title, then no date/time. I don't know what I'm doing wrong here.

You can see what I mean here: http://www.onlinedebate.net/forums/s...ead.php?t=1260

Check out post 2 and 3.

Now, all posts being created now, after I selected "Automatically quote thread/post title in new posts" via the AdminCP, new posts are not being affected.

But what about all my old posts? I have the defaul skin installed too, and the time/date stamp does display for it, just fine. If I just default the postbit (revert), then all posts will show date/times.

So this is definitely a template issue. I'm not sure if I can post the code of my template here or not. If it is not ok, then can a mod delete it? Here is the postbit template:

PHP Code:

<!-- post #$post[postid] -->
<if condition="$show['spacer']">$spacer_open<if condition="!$post['islastshown']"><div style="padding:0px 0px $stylevar[cellpadding]px 0px"></if></if>

<
div style="padding:4px 0px 0px 0px;"></div>
<
table width="100%" border="0" cellpadding="0" cellspacing="0">
  <
tr
    <
td height="22" valign="top" width="22" $scrolltothis><img src="$stylevar[imgdir_misc]/postbit/top_l.gif" alt="" /></td>
    <
td valign="top" width="7"><img src="$stylevar[imgdir_misc]/postbit/alias_l.gif" alt="" /></td>
    <
td width="150" nowrap="nowrap" valign="middle" align="center" background="$stylevar[imgdir_misc]/postbit/alias_bg.gif" class="smallfont"><div id="postmenu_$post[postid]style="font-weight: bold;"><if condition="$show['profile']">
                <
a href="member.php?$session[sessionurl]u=$post[userid]">$post[username]</a>
                <
script type="text/javascript"vbmenu_register("postmenu_$post[postid]"true); </script>
                <else/>
                
$post[username]
                </if></
div></td>
    <
td width="7" valign="top"><img src="$stylevar[imgdir_misc]/postbit/alias_r.gif" alt="" /></td>
    <
td width="100%" background="$stylevar[imgdir_misc]/postbit/top_bg.gif"></td>
    <
td width="27" valign="top"><img src="$stylevar[imgdir_misc]/postbit/top_r.gif" alt="" /></td>
  </
tr>
</
table>
<
table class="tborder" cellpadding="$stylevar[cellpadding]cellspacing="0" border="0" width="100%" align="center">
<
tr>
    <
td class="thead" style="font-weight:normal">        
        &
nbsp;                
    </
td>
    <
td class="thead" style="font-weight:normal" align="$stylevar[right]">
        &
nbsp; <a name="post$post[postid]"><img class="inlineimg" src="$stylevar[imgdir_statusicon]/post_$post[statusicon].gif" alt="$post[statustitle]border="0" /></a> <if condition="$show['postcount']"><b>Post</b#<a href="showpost.php?$session[sessionurl]p=$post[postid]&amp;postcount=$post[postcount]" target="new"><strong>$post[postcount]</strong></a></if>
    
</td>
</
tr>
<
tr valign="top">
    <
td class="alt2" width="190" background="$stylevar[imgdir_misc]/postbit/userbg.gif">
                
            
            <if 
condition="$post['rank']"><div class="smallfont">$post[rank]</div></if>
        <
div class="smallfont" align="center">
            <if 
condition="$show['avatar']">
                
                    &
nbsp;<br /><a href="member.php?$session[sessionurl]u=$post[userid]"><img src="$avatarurlalt="<phrase 1="$post[username]">$vbphrase[xs_avatar]</phrase>" border="0" /></a>
                
            <else /><
a href="member.php?$session[sessionurl]u=$post[userid]"><img src="$stylevar[imgdir_misc]/noavatar.gif" border="0" alt="" /></a></if>
            </
div>
            <
div class="smallfont">
                &
nbsp;<br />
<if 
condition="$post['usertitle']"><div class="userbox">Title: <span class="userboxcolor">$post[usertitle]</span></div></if>
                <if 
condition="$post['joindate']"><div class="userbox">$vbphrase[join_date]: <span class="userboxcolor">$post[joindate]</span></div></if>
                <if 
condition="$post['field2']"><div class="userbox">$vbphrase[location_perm]: <span class="userboxcolor">$post[field2]</span></div></if>
                <if 
condition="$post['age']"><div class="userbox">$vbphrase[age]: <span class="userboxcolor">$post[age]</span></div></if>
                <
div class="userbox">
                    
$vbphrase[posts]: <span class="userboxcolor">$post[posts]</span></div>
                    <if 
condition="$show['reputation']">$post[reputationdisplay]</if>
                
                <
div>$post[icqicon$post[aimicon$post[msnicon$post[yahooicon]</div>
            </
div>    
<
img src="$stylevar[imgdir_misc]/div.gif" alt="" width="190" height="1" />                
        
    </
td>
    <
td class="alt1">
    
        <if 
condition="$show['messageicon'] OR $post['title']">
            <!-- 
icon and title -->
            <
div class="smallfont">
                <if 
condition="$show['messageicon']"><img class="inlineimg" src="$post[iconpath]alt="$post[icontitle]border="0" /></if>
                <if 
condition="$post['title']"><strong>$post[title]</strong></if> - <!-- status icon and date -->
            
            
Posted: <if condition="!$show['start_until_end']">
                
$post[postdate]<if condition="!$show['detailedtime']">, $post[posttime]</if>
            <else />
                <
phrase 1="$post[startdate]2="$post[enddate]">$vbphrase[x_until_y]</phrase>
            </if>
            
$post[firstnewinsert]
            <!-- / 
status icon and date -->    
            </
div>
            <
hr size="1" style="color:$stylevar[tborder_bgcolor]/>
            <!-- / 
icon and title -->
        </if>
        
        <!-- 
message -->
        <
div>$post[message]</div>
        <!-- / 
message -->
    
        <if 
condition="$show['attachments']">
        <!-- 
attachments -->
            <
div style="padding:$stylevar[cellpadding]px">
            
            <if 
condition="$show['thumbnailattachment']">
                <
fieldset class="fieldset">
                    <
legend>$vbphrase[attached_thumbnails]</legend>
                    <
div style="padding:$stylevar[formspacer]px">
                    
$post[thumbnailattachments]
                    </
div>
                </
fieldset>
            </if>
        
            <if 
condition="$show['imageattachment']">
                <
fieldset class="fieldset">
                    <
legend>$vbphrase[attached_images]</legend>
                    <
div style="padding:$stylevar[formspacer]px">
                    
$post[imageattachments]
                    </
div>
                </
fieldset>
            </if>
            
            <if 
condition="$show['imageattachmentlink']">
                <
fieldset class="fieldset">
                    <
legend>$vbphrase[attached_images]</legend>
                    <
table cellpadding="0" cellspacing="$stylevar[formspacer]border="0">
                    
$post[imageattachmentlinks]
                    </
table>
                    </
fieldset>
            </if>
            
            <if 
condition="$show['otherattachment']">
                <
fieldset class="fieldset">
                    <
legend>$vbphrase[attached_files]</legend>
                    <
table cellpadding="0" cellspacing="$stylevar[formspacer]border="0">
                    
$post[otherattachments]
                    </
table>
                </
fieldset>
            </if>
            
            <if 
condition="$show['moderatedattachment']">
                <
fieldset class="fieldset">
                    <
legend>$vbphrase[attachments_pending_approval]</legend>
                    <
table cellpadding="0" cellspacing="$stylevar[formspacer]border="0">
                    
$post[moderatedattachments]
                    </
table>
                </
fieldset>        
            </if>
            
            </
div>
        <!-- / 
attachments -->
        </if>
        
        <if 
condition="$post['signature']">
        <!-- 
sig -->
            <
div>
                
__________________<br />
                
$post[signature]
            </
div>
        <!-- / 
sig -->
        </if>
        
        <if 
condition="$show['postedited']">
        <!-- 
edit note -->
            <
div class="smallfont">            <hr size="1" style="color:$stylevar[tborder_bgcolor]/>
                <
em>
                <
phrase 1="$post[edit_username]2="$post[edit_date]3="$post[edit_time]">$vbphrase[last_edited_by_x_on_y_at_z]</phrase>.
                <if 
condition="$post['edit_reason']">$vbphrase[reason]: $post[edit_reason]</if>
                </
em>
            </
div>
        <!-- / 
edit note -->
        </if>
    
    </
td>
</
tr>
<
tr>
    <
td class="alt2" width="190" background="$stylevar[imgdir_misc]/postbit/userbg.gif">
        
$post[onlinestatus]
        <if 
condition="$show['reputationlink']"><a href="#" onclick="return reputation($post[postid])"><img class="inlineimg" src="$stylevar[imgdir_button]/reputation.gif" border="0" alt="<phrase 1="$post[username]">$vbphrase[add_to_xs_reputation]</phrase>" /></a></if>
    </
td>
    <
td class="alt1" align="$stylevar[right]">
        <!-- 
controls -->
            <if 
condition="$post['replylink']">
            <if 
condition="$post['forwardlink']"><a href="$post[replylink]"><img src="$stylevar[imgdir_button]/reply_small.gif" alt="$vbphrase[reply_with_quote]border="0" /></a>
        <else /></if></if>
        <if 
condition="$SHOWQUICKREPLY AND !$show['threadedmode']">
            <
a href="$post[replylink]onclick="return qr($post[postid]);"><img src="$stylevar[imgdir_button]/quickreply.gif" alt="$vbphrase[quick_reply_to_this_message]border="0" /></a>
        </if>
        <!-- / 
controls -->
    </
td>
</
tr>
</
table>
<
table width="100%" border="0" cellpadding="0" cellspacing="0">
  <
tr
    <
td height="39" valign="top" colspan="3"
      <
table width="100%" border="0" cellpadding="0" cellspacing="0">
        <
tr
          <
td width="100%" height="11" background="$stylevar[imgdir_misc]/postbit/footer_bg.gif"></td>
          <
td width="89" rowspan="2" valign="top"><a href="$post[replylink]"><img src="$stylevar[imgdir_misc]/postbit/quote.gif" alt="" border="0" /></a></td>
        </
tr>
        <
tr
          <
td valign="top" height="28"
            <
table width="100%" border="0" cellpadding="0" cellspacing="0" background="$stylevar[imgdir_misc]/postbit/footer_bg2.gif" style="font-size: 11px; font-weight: bold; font-family: tahoma;">
              <
tr
                  <
td width="41" height="28" valign="middle"><img src="$stylevar[imgdir_misc]/postbit/footer_edge.gif" alt="" /></td>
                <
td width="41" height="28" valign="middle" class="tfoot">&nbsp;&nbsp;&nbsp;<a href="$post[editlink]">Edit</a></td>
                <
td width="18" valign="top"><img src="$stylevar[imgdir_misc]/postbit/seperator.gif" alt="" border="0" /></td>
                <
td width="37" valign="middle" class="tfoot"><a href="postings.php?$session[sessionurl]do=getip&amp;p=$post[postid]">IP</a></td>
                <
td width="18" valign="top"><img src="$stylevar[imgdir_misc]/postbit/seperator.gif" alt="" border="0" /></td>
                <
td width="43" valign="middle" class="tfoot"><a href="report.php?$session[sessionurl]p=$post[postid]">Report</a></td>
                <
td width="100%" valign="top"></td>
                <
td width="89" valign="top"><a href="member.php?$session[sessionurl]userid=$post[userid]onmouseover="MM_swapImage('profile_$post[postid]','','$stylevar[imgdir_misc]/postbit/profile_on.gif',1);" onmouseout="MM_swapImgRestore();" alt="View this Users Profile"><img src="$stylevar[imgdir_misc]/postbit/profile.gif" alt="View this Users Profile" name="profile_$post[postid]width="89" height="28" border="0"></a></td>
                <if 
condition="$show['homepage']"><td width="89" valign="top"><a href="$post[homepage]onmouseover="MM_swapImage('website_$post[postid]','','$stylevar[imgdir_misc]/postbit/website_on.gif',1);" onmouseout="MM_swapImgRestore();" alt="View this Users Website"><img src="$stylevar[imgdir_misc]/postbit/website.gif" alt="View this Users Website" name="website_$post[postid]width="89" height="28" border="0"></a></td></if>
                <
td width="89" valign="top"><a href="search.php?$session[sessionurl]do=finduser&amp;userid=$post[userid]onmouseover="MM_swapImage('search_$post[postid]','','$stylevar[imgdir_misc]/postbit/search_on.gif',1);" onmouseout="MM_swapImgRestore();" alt="Search posts by this User"><img src="$stylevar[imgdir_misc]/postbit/search.gif" alt="Search Posts by this User" name="search_$post[postid]width="89" height="28" border="0"></a></td>
                <
td width="89" valign="top"><a href="private.php?$session[sessionurl]do=newpm&amp;userid=$post[userid]onmouseover="MM_swapImage('message_$post[postid]','','$stylevar[imgdir_misc]/postbit/message_on.gif',1);" onmouseout="MM_swapImgRestore();" alt="Message this User"><img src="$stylevar[imgdir_misc]/postbit/message.gif" alt="Message this User" name="message_$post[postid]width="89" height="28" border="0"></a></td>
              </
tr>
            </
table>
          </
td>
        </
tr>
      </
table>
    </
td>
  </
tr>
  <
tr
    <
td height="18" valign="top"><img src="$stylevar[imgdir_misc]/postbit/footer_l.gif" alt="" /></td>
    <
td width="100%" background="$stylevar[imgdir_misc]/postbit/footer_bg3.gif"></td>
    <
td height="18" valign="top"><img src="$stylevar[imgdir_misc]/postbit/footer_r.gif" alt="" /></td>
  </
tr>
</
table>

<!-- 
post $post[postidpopup menu -->
<
div class="vbmenu_popup" id="postmenu_$post[postid]_menu" style="display:none">
    <
table cellpadding="4" cellspacing="1" border="0">
    <
tr>
        <
td class="thead">$post[username]</td>
    </
tr>
    <if 
condition="$show['profile']">
        <
tr><td class="vbmenu_option"><a href="member.php?$session[sessionurl]userid=$post[userid]">$vbphrase[view_public_profile]</a></td></tr>
    </if>
    <if 
condition="$show['pmlink']">
        <
tr><td class="vbmenu_option"><a href="private.php?$session[sessionurl]do=newpm&amp;userid=$post[userid]"><phrase 1="$post[username]">$vbphrase[send_private_message_to_x]</phrase></a></td></tr>
    </if>
    <if 
condition="$show['emaillink']">
        <
tr><td class="vbmenu_option"><a href="sendmessage.php?$session[sessionurl]do=mailmember&amp;u=$post[userid]"><phrase 1="$post[username]">$vbphrase[send_email_to_x]</phrase></a></td></tr>
    </if>
    <if 
condition="$show['homepage']">
        <
tr><td class="vbmenu_option"><a href="$post[homepage]"><phrase 1="$post[username]">$vbphrase[visit_xs_homepage]</phrase></a></td></tr>
    </if>
    <if 
condition="$show['search']">
        <
tr><td class="vbmenu_option"><a href="search.php?$session[sessionurl]do=finduser&amp;userid=$post[userid]"><phrase 1="$post[username]">$vbphrase[find_more_posts_by_x]</phrase></a></td></tr>
    </if>
    <if 
condition="$post['userid']">
    <
tr><td class="vbmenu_option"><a href="profile.php?$session[sessionurl]do=addlist&amp;userlist=buddy&amp;u=$post[userid]"><phrase 1="$post[username]">$vbphrase[add_x_to_buddy_list]</phrase></a></td></tr>
    </if>
    </
table>
</
div>
<!-- / 
post $post[postidpopup menu -->

<if 
condition="$show['spacer']"><if condition="!$post['islastshown']"></div></if>$spacer_close</if>
<!-- / 
post #$post[postid] --> 

Any help would be greatly appreciated. This thing is kickin' my arse.

Brad 07-26-2004 10:03 AM

Try replacing this:

HTML Code:

        <if condition="$show['messageicon'] OR $post['title']">
            <!-- icon and title -->
            <div class="smallfont">
                <if condition="$show['messageicon']"><img class="inlineimg" src="$post[iconpath]" alt="$post[icontitle]" border="0" /></if>
                <if condition="$post['title']"><strong>$post[title]</strong></if> - <!-- status icon and date -->
           
            Posted: <if condition="!$show['start_until_end']">
                $post[postdate]<if condition="!$show['detailedtime']">, $post[posttime]</if>
            <else />
                <phrase 1="$post[startdate]" 2="$post[enddate]">$vbphrase[x_until_y]</phrase>
            </if>
            $post[firstnewinsert]
            <!-- / status icon and date -->   
            </div>
            <hr size="1" style="color:$stylevar[tborder_bgcolor]" />
            <!-- / icon and title -->
        </if>

with this:

HTML Code:

<if condition="$show['messageicon'] OR $post['title']">
            <!-- icon and title -->
            <div class="smallfont">
                <if condition="$show['messageicon']"><img class="inlineimg" src="$post[iconpath]" alt="$post[icontitle]" border="0" /></if>
                <if condition="$post['title']"><strong>$post[title]</strong></if>
                               
</if>
                               
                                <!-- status icon and date -->
            <if condition="!$show['start_until_end']">
              - Posted:  $post[postdate]<if condition="!$show['detailedtime']">, $post[posttime]</if>
            <else />
              - Posted:  <phrase 1="$post[startdate]" 2="$post[enddate]">$vbphrase[x_until_y]</phrase>
            </if>
            $post[firstnewinsert]
            <!-- / status icon and date -->   

            </div>
            <hr size="1" style="color:$stylevar[tborder_bgcolor]" />
            <!-- / icon and title -->


apokphp 07-26-2004 04:22 PM

That was it! Thanks so much man! :)

ehsanix 08-15-2006 03:26 PM

thank u so much
it solved my problem 2


All times are GMT. The time now is 10:01 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.01583 seconds
  • Memory Usage 2,010KB
  • 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_html_printable
  • (1)bbcode_php_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