vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=252)
-   -   Show how many days registered for a user (https://vborg.vbsupport.ru/showthread.php?t=322465)

SilverBoy 04-26-2016 05:36 PM

Show how many days registered for a user
 
Hi

I'm trying to display how many days users have in postbit, but after trying a lot of thing I have failed, so any help will be appreciate.

Thanks

Scandal 04-28-2016 07:26 PM

A "fast" way to do it is the following (no plugins or addons etc):
Open template "postbit_legacy" and place the following code:
HTML Code:

<dt>Registration Days</dt> <dd><vb:if condition="$post[sc_joindays] =  floor(abs((TIMENOW - $post[joindateline])/60/60/24))"></vb:if>{vb:raw post.sc_joindays}</dd>
During the save of the template you will get an error, but ignore it and click Continue.

I have not test it much, just I wrote it fast for now. :)

SilverBoy 05-01-2016 10:14 PM

Thank you, I will test it and let you know the result :)

--------------- Added [DATE]1462149935[/DATE] at [TIME]1462149935[/TIME] ---------------

It works like a charm, thank you too much :)

twistedsoul 05-06-2016 05:00 PM

I'm new to all this and really don't know what I'm doing but do I delete the code that is there now or just add this code in somewhere? Thanks

MarkFL 05-06-2016 05:40 PM

Quote:

Originally Posted by twistedsoul (Post 2570265)
I'm new to all this and really don't know what I'm doing but do I delete the code that is there now or just add this code in somewhere? Thanks

You would add it to the location at which you want it to appear. You would likely want it somewhere in here:

HTML Code:

                                <dl class="userinfo_extra">
                                        <vb:if condition="$post['joindate']"><dt>{vb:rawphrase join_date}</dt> <dd>{vb:raw post.joindate}</dd></vb:if>
                                        <vb:if condition="$post['field2']"><dt>{vb:rawphrase location_perm}</dt> <dd>{vb:raw post.field2}</dd></vb:if>
                                        <vb:if condition="$post['age']"><dt>{vb:rawphrase age}</dt> <dd>{vb:raw post.age}</dd></vb:if>
                                        <dt>{vb:rawphrase posts}</dt> <dd>{vb:raw post.posts}</dd>       
                                        {vb:raw template_hook.postbit_userinfo_right_after_posts}
                                </dl>


twistedsoul 05-06-2016 05:58 PM

ok, wasn't sure and didn't want to accidentally delete it all lol Thanks!

--------------- Added [DATE]1462574693[/DATE] at [TIME]1462574693[/TIME] ---------------

lol yup damn new guys...I thought it was in wrong place so clicked back instead of just continue. looks good! ty


All times are GMT. The time now is 01: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.01762 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
  • (2)bbcode_html_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (6)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