View Full Version : How to add up join date info into album_pictureview template
bartek24m
02-03-2009, 10:32 AM
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:
$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
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.
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.