vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Join Date in Postbit: UNIXTIME Error (https://vborg.vbsupport.ru/showthread.php?t=213011)

darkie79 05-06-2009 01:55 PM

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>


Lynne 05-06-2009 04:44 PM

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?

darkie79 05-06-2009 06:42 PM

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.

Lynne 05-06-2009 06:46 PM

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?

darkie79 05-07-2009 01:46 AM

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.

Lynne 05-07-2009 03:22 AM

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.

darkie79 05-07-2009 04:08 PM

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.

Lynne 05-07-2009 04:25 PM

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



All times are GMT. The time now is 05:31 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.02221 seconds
  • Memory Usage 1,724KB
  • 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
  • (1)bbcode_code_printable
  • (1)bbcode_html_printable
  • (1)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (8)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