Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 General Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 05-06-2009, 01:55 PM
darkie79 darkie79 is offline
 
Join Date: Sep 2006
Posts: 36
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Join Date in Postbit: UNIXTIME Error

Hello,

I am in the process of moving most of the fields in the postbit into a dropdown. The issue that I am seeing is this:

When I use $post[joindate] it prints the joindate in UNIXTIME.

I then tried wrapping FROM_UNIXTIME($post[joindate]) but got the error about using expressions in VB. Full code is below, thanks for your help

Code:
<if condition="$post[joindate]">
                <tr><td class="vbmenu_option">Join Date: $post[joindate]</td></tr>
        </if>
Reply With Quote
  #2  
Old 05-06-2009, 04:44 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I just added this exact line to my postbit and it works just fine:
HTML Code:
    <if condition="$post['joindate']"><tr><td class="vbmenu_option">$vbphrase[join_date]: $post[joindate]</td></tr></if>
Does the joindate print out just fine in the regular part of the postbit?
Reply With Quote
  #3  
Old 05-06-2009, 06:42 PM
darkie79 darkie79 is offline
 
Join Date: Sep 2006
Posts: 36
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Lynne,

Yes, if I leave the normal joindate intact, it prints just fine. But with this, it prints like it's reading it directly from the db.
Reply With Quote
  #4  
Old 05-06-2009, 06:46 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

What do you mean "leave the normal joindate intact"? You mean if you leave it where it is supposed to be and *also* add it to the dropdown, then it works? But it doesn't work if you remove it from the normal place in the postbit and only add it to the dropdown?
Reply With Quote
  #5  
Old 05-07-2009, 01:46 AM
darkie79 darkie79 is offline
 
Join Date: Sep 2006
Posts: 36
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Lynne,

The normal placement in the postbit of joindate works as it should; however, if I add the line above to the dropdown, it prints out in unixtime, regardless of whether the normal joindate line is there, or not.
Reply With Quote
  #6  
Old 05-07-2009, 03:22 AM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Did you try putting in exactly what I posted cuz I put that into my template and it worked just fine.

The only thing I can think of is you *can* change a variable via a template - it seems unlikely you are doing this, but.... So, I wonder if you are doing something in your template between where it prints out OK (near the beginning of the template) and where you put the code into your dropdown (near the end of the template). You could try adding the variable into several parts of your template between the two areas and see where it is that it changes from OK to unixtime.

And.... you are talking about the dropdown in the postbit, right? Suddenly I'm getting the feeling you are not. And if not, you need to say where this dropdown is. You may have to create a plugin to use vbdate to create the non-unixtime format for your joindate.
Reply With Quote
  #7  
Old 05-07-2009, 04:08 PM
darkie79 darkie79 is offline
 
Join Date: Sep 2006
Posts: 36
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Lynne,

I am indeed referring to the postbit. I will PM you a link to my website so that you can see for yourself, don't want to self-promote here.
Reply With Quote
  #8  
Old 05-07-2009, 04:25 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This seriously makes no sense. Can you post your postbit template?

Actually, can you try disabling your plugins and checking to see if that fixes it?
Note: To temporarily disable the plugin system, edit config.php and add this line right under <?php

PHP Code:
define('DISABLE_HOOKS'true); 
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 06:10 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.02203 seconds
  • Memory Usage 2,230KB
  • Queries Executed 13 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (1)bbcode_code
  • (1)bbcode_html
  • (1)bbcode_php
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (8)post_thanks_box
  • (8)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (8)post_thanks_postbit_info
  • (8)postbit
  • (8)postbit_onlinestatus
  • (8)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete