Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Any way to show users join date in posts?
![Nozumi](https://secure.gravatar.com/avatar/d26ef4182bfb9b5ad623c22dd3488336/?default=https%3A%2F%2Fvanillicon.com%2Fbbc51a539cd62ada1ffeaf768c185cca_100.png&rating=g&size=100)
hi, is there any way to make it show users join date beside the users info when they post? like "Joined: December 2014"
0
Comments
Yes, create
/plugins/JoinDate/class.joindate.plugin.php
My themes: pure | minusbaseline - My plugins: CSSedit | HTMLedit | InfiniteScroll | BirthdayModule | [all] - PM me about customizations
VanillaSkins.com - Plugins, Themes and Graphics for Vanillaforums OS
hi, i tried the above and when i tried to enable the addon it gave an error saying
"There was an error getting the class methods."
hmm interestingly enough it does display the "Join Date:" so it does work even though it gave me that error thanks for making this
it is because of the way you cut and pasted things.
make sure there is a blank line between
);
class JoinDatePlugin extends Gdn_Plugin {
also don't allow any leading spaces before <php
BAD - if your cut and pastw looks like this in your file.
<?php if (!defined('APPLICATION')) exit(); $PluginInfo['JoinDate'] = array( 'Name' => 'JoinDate', 'Version' => '1', 'Author' => 'Bleistivt' ); class JoinDatePlugin extends Gdn_Plugin { public function DiscussionController_CommentInfo_Handler($Sender) {$this->AddJoined($Sender);} public function DiscussionController_DiscussionInfo_Handler($Sender) {$this->AddJoined($Sender);} protected function AddJoined($Sender) { echo ''.T('Joined').': '. Gdn_Format::Date($Sender->EventArguments['Author']->DateFirstVisit).''; } }
you want it to look like this in your file.
if there is not a blank line between "class and closing ) of PluginInfo array it usually gives the error you experienced.
you want it to look like this in your file.
GOOD
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
Hello,
how can we also show dates like 01.01.1970
Thanks
Well I just found the solution,
just change
Gdn_Format::Date($Sender->EventArguments['Author']->DateFirstVisit) . '</span>';
toGdn_Format::ToDateTime($Sender->EventArguments['Author']->DateFirstVisit) . '</span>';
if you want with timeor just
Gdn_Format::ToDate($Sender->EventArguments['Author']->DateFirstVisit) . '</span>';
if only date like2016-08-01
. But still have one question,
How can I change the date format (like german format 01.08.2016)?
You would set that in your locale.php file via definitions I think...
❌ ✊ ♥. ¸. ••. ¸♥¸. ••. ¸♥ ✊ ❌
Well , Thanks.
I dont know know why but in my case , it didnt work.
So I found other solution,
I changed
Gdn_Format::ToDate($Sender->EventArguments['Author']->DateFirstVisit) ';
toGdn_Format::Date($Sender->EventArguments['Author']->DateFirstVisit, '%d.%m.%Y');
now you can get whatever format you need.