The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
Join Date Plugin
I have been snooping around in vb file trying to find a way to make a users join date information display on the showgroups page and I found a code in the member.php file and decided to try that in a plugin. It worked...well sort of, it does not display the correct date any ideas? I have even tried including the class_postbit.php in the showgroups.php file...which did not work. If it matters the hook location is in "showgroups_user"....
code used in meet_our_staff_joindate plugin Code:
// JOIN DATE $userinfo['datejoined'] = vbdate($vbulletin->options['dateformat'], $userinfo['joindate']); $jointime = (TIMENOW - $userinfo['joindate']) / 86400; // End Join Date |
#2
|
||||
|
||||
Bump^^
|
#3
|
|||
|
|||
You got code from member.php then included class_postbit.php?! lol
Have you looked in showgroups.php around the area where the showgroups_user hook is evaluated? You will notice that the variable $user is used instead of $userinfo...maybe that will solve your problem |
#4
|
||||
|
||||
Bangs head against wall! I will go try out your suggesstions now, brb. Thank you again!
Edit: Yeah I have everything in order, I even tried to include the class_postbit.php file again... --------------- Added [DATE]1202687749[/DATE] at [TIME]1202687749[/TIME] --------------- Okay now I am trying a different code in my plugin: Code:
$userinfo[parsed_stamp] = vbdate('l dS \of F Y h:i:s A', $userinfo['joindate']); |
#5
|
|||
|
|||
Re-read the last line of my previous post and don't PM me please, just be patient.
|
#6
|
||||
|
||||
Thus is all I use in the 2 hooks to get it for Admins and Mods:
Code:
$user['datejoined'] = vbdate($vbulletin->options['dateformat'], $user['joindate'], true); I've been using this same code since 3.5.4 and it still works fine in 3.7.0 beta 4. You had it right in the first post except for the missing true. I got the location code if you need that, too. |
#7
|
||||
|
||||
Quote:
Quote:
Sweet thanks guys now it works! Although I did have to make two plugins because vb won't let me use two hook locations for one plugin but whatever I got it working now. Code:
$user['datejoined'] = vbdate('l dS \of F Y h:i:s A', $user['joindate'], true); $jointime = (TIMENOW - $userinfo['joindate']) / 86400; |
#8
|
||||
|
||||
That one line is all you need. Put it in the admin and mod hooks for showgroups and you are all set. Now, if you want the user's location, that takes a little more code in 3.7.0. They chopped some stuff out of the showgroups file. I'm still trying to fiogure out a way to get the Usergroup descriptions in there. The code I used to use isn't in showgroups.php anymore.
Yes, they use $user all through there. I figured you would have caught that with all the stuff you have done with it, but it can get frustrating when something doesn't work. You get to the point you will try almost anything. Been there, still doing that. |
#9
|
||||
|
||||
Lol that one line gave me a headache for four hours yesterday, I even took a nap after a while to think it was something so simple it is funny and embarrassing all at the same time. I am dreading having to update my board to 3.7.x I just hope that jelsoft will not change too much more around.
|
#10
|
||||
|
||||
That line has been using since at least 3.5.4. I had to get used to the true back then and it drove me nuts at first. But it makes things a lot easier once you get used to it. I don't think it is just vb you need to worry about as much as PHP itself is changing. Actually, I like the code for 3.7 better in some ways and not so much in others. Its a giant leap forward from 3.5.4. A lot of things are easier if you can just find out where they hid the damned things.
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|