vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Age in album picture (https://vborg.vbsupport.ru/showthread.php?t=244264)

bartek24m 06-09-2010 09:12 AM

Age in album picture
 
How do I display a users age on their albums ?
Template: album_pictureview

I've tried $userinfo[age] and $post[age] but i doesnt show.

It works only with custom profile field like:
$userinfo[field1]
$userinfo[field2]
etc.

mayby i should create a hook with specific location ?

BirdOPrey5 06-09-2010 11:11 PM

"age" isn't a value stored in the database, it is calculated based off "birthday" which is stored in the database, and the current date... I'm pretty sure you will need to do the calculation in php based on the 'birthday' field as opposed to 'age'

Note- I'm guessing here, it's a theory that fits the facts (fact 'age' is not in the db) but I don't know for sure this is the only way to do it.

bartek24m 06-10-2010 05:40 AM

but in postbit_legacy this value ($post[age]) works fine

Marco van Herwaarden 06-10-2010 08:50 AM

That is because the age is calculated for posts. For albums you will need to do this yourself in a plugin.

bartek24m 06-21-2010 05:36 AM

could you show me how to write a simple hook


All times are GMT. The time now is 09:47 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.00976 seconds
  • Memory Usage 1,714KB
  • 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)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (5)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