vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   How to add up join date info into album_pictureview template (https://vborg.vbsupport.ru/showthread.php?t=204053)

bartek24m 02-03-2009 10:32 AM

How to add up join date info into album_pictureview template
 
hello i would like to add up a user join date info somewhere in album_pictureview template

i try to add up $userinfo[joindate] but insted date i can see some figures (1233566287)

i try in this way:
date('d-m-Y', $userinfo[joindate])

in the same template style but without any results :/

Lynne 02-03-2009 02:02 PM

You need to use a plugin or file edit to add some php to take that date and put it into a useable format:

PHP Code:

$userinfo['date'] = vbdate($this->registry->options['dateformat'],$userinfo['joindate']);            
$userinfo['time'] = vbdate($this->registry->options['timeformat'], $userinfo['joindate']);
$userdateline $userinfo['date'] .' '$userinfo['time']; 

Something like that. You may be able to just use $vbulletin->options instead of $this->registry->options . It depends on where the plugin is hooked in.

bartek24m 02-03-2009 09:02 PM

i try to paste it into album.php file and i get error

so meybe you could show me how to step by step add to plugin this code

and the code which show me the userfield[field1]

Lynne 02-03-2009 11:06 PM

I had a misspelling in my code. You need to place it after you have the joindate and before you spit out the template.

What does userfield[field1] have to do with this spitting out this code? You would just use $userdateline in the template.

bartek24m 02-04-2009 06:06 AM

sorry mate but i have still troubling so i have explane you what i just done ...

i copied your code and try to find something in /album.php like

Quote:

You need to place it after you have the joindate and before you spit out the template.
becouse i have no idea what else file can contain the "joindate" in their content

and i cant find out so i paste it

after 1924 line:

$albumbits = '';
while ($album = $db->fetch_array($albums))
{



like on the screen:
http://www.up.clubbers.pl/img/991.png

and in my template near the place where i want to get my information placed the:

$userdateline

like on the screen shout:
http://up.clubbers.pl/img/522.png

but it still have no result in my template:
like on the screen shout:
http://up.clubbers.pl/img/933.png

maybe i shoud use the hook but i cant figure out what location is the best to use

my settings on the screen:
http://up.clubbers.pl/img/514.png

I know that i close to solve this issue but i neet to more advices, please be PATIENT

THANKS !

Lynne 02-04-2009 03:24 PM

What php page are you trying to get this to show up on?

bartek24m 02-04-2009 05:25 PM

sorry i can't give it to public couse of seo optymalization mode until i finish the project i cant allow google to index my pages ... but i can send you on PM the adress of that page

Lynne 02-04-2009 08:16 PM

I don't want your website url, just the page name - ie showthread.php or member.php?do=whatever (be specific) so that I can look for a hook location.

bartek24m 02-04-2009 08:41 PM

album.php this is the location

/album.php?albumid=1

acually this is the url that i want to pase the

field1 and date registry

album.php?albumid=1&pictureid=4

Lynne 02-04-2009 09:00 PM

Just look in the album.php under the corresponding do heading and find a hook. You had said just album.php to me in a PM and if there is no do, it will normally default to do=overview and so I would use the hook location album_latest_complete. If there is an albumid or pictureid, then do defaults to album and picture, respectively, so that would be a different hook location. For those 'dos', you may want to try album_album_complete or album_picture_complete. Just look at the album.php page to find other hook locations to try for your plugin.


All times are GMT. The time now is 03:29 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.01013 seconds
  • Memory Usage 1,736KB
  • 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_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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