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 02-03-2009, 10:32 AM
bartek24m bartek24m is offline
 
Join Date: Nov 2005
Posts: 174
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default 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 :/
Reply With Quote
  #2  
Old 02-03-2009, 02:02 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #3  
Old 02-03-2009, 09:02 PM
bartek24m bartek24m is offline
 
Join Date: Nov 2005
Posts: 174
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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]
Reply With Quote
  #4  
Old 02-03-2009, 11:06 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #5  
Old 02-04-2009, 06:06 AM
bartek24m bartek24m is offline
 
Join Date: Nov 2005
Posts: 174
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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 !
Reply With Quote
  #6  
Old 02-04-2009, 03:24 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

What php page are you trying to get this to show up on?
Reply With Quote
  #7  
Old 02-04-2009, 05:25 PM
bartek24m bartek24m is offline
 
Join Date: Nov 2005
Posts: 174
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #8  
Old 02-04-2009, 08:16 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #9  
Old 02-04-2009, 08:41 PM
bartek24m bartek24m is offline
 
Join Date: Nov 2005
Posts: 174
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #10  
Old 02-04-2009, 09:00 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
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 08:17 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.05088 seconds
  • Memory Usage 2,246KB
  • Queries Executed 11 (?)
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_php
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (10)postbit_onlinestatus
  • (10)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_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