Add Join Date : to each members reply in topic view

Started by tinoest, January 15, 2011, 12:12:42 PM

Previous topic - Next topic

tinoest

Link to Mod

This Modification adds the date registered in the form 'Join Date' to each users reply in topic view.

It is displayed after the number of posts they have.



As of v 1.1 : It can now be controlled from the theme settings panel.

Added support for SMF 2.x


Licence

Quote
Copyright © 2012 tinoest.  All rights reserved.

Developed by: tinoest
              http://www.tinoest.no-ip.org

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
  1. Redistributions of source code must retain the above copyright notice,
     this list of conditions and the following disclaimers.
  2. Redistributions in binary form must reproduce the above copyright
     notice, this list of conditions and the following disclaimers in the
     documentation and/or other materials provided with the distribution.
  3. Neither the names of tinoest, nor the names of its contributors may be
     used to endorse or promote products derived from this Software without
     specific prior written permission.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
CONTRIBUTORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
WITH THE SOFTWARE.

This license may be viewed online at http://opensource.org/licenses/BSD-3-Clause

futeball

There was an error 'The package you are trying to download or install is either corrupt or not compatible with this version of SMF.'.
I'm using smf 1.1.13. Please check it out. TQ.

Arantor

Yeah the file wasn't updated to include instructions for 1.1.13 even though they're identical to 1.1.12.

Try installing http://custom.simplemachines.org/mods/index.php?mod=2113 and selecting 1.1.12 from the dropdown it gives you (that tells the package manager to look for instructions for 1.1.12 instead of 1.1.13)

tinoest

Apologies for that, thought I had copied the identical instructions across.

Its been done now.  :)

Danny S.

Just an FYI, got this to work in 2.0RC5 with the following code:


      // Show the member's registration date?
      if (!empty($message['member']['registered']) && (!empty($settings['show_registration_date']))
         echo '
                        <li class="registrationdate">', $txt['date_registered'], ': ', strftime(' %b, %Y',  strtotime($message['member']['registered'])), '</li>';

waruna

Hi. I'm using RC2. Install this and got this error:

Quote
1.    Execute Modification    ./Sources/Load.php    Test failed
      1.    Replace    ./Sources/Load.php    Test failed
      2.    Add Before    ./Sources/Load.php    Test successful
*    2.    Execute Modification    ./Themes/default/Display.template.php    Test successful
*    3.    Execute Modification    ./Sources/ManageSettings.php    Test failed
      1.    Add After    ./Sources/ManageSettings.php    Test failed
*    4.    Execute Modification    ./Themes/default/languages/Modifications.english.php    Test successful
   5.    Execute Modification    ./Themes/default/languages/Modifications.english-utf8.php    Skipping file

Can anyone advice me? Thanks in advance.
Trust of Lust

Danny S.

Quote from: Danny S. on March 06, 2011, 02:21:32 AM
Just an FYI, got this to work in 2.0RC5 with the following code:


      // Show the member's registration date?
      if (!empty($message['member']['registered']))
         echo '
                        <li class="registrationdate">', $txt['date_registered'], ': ', strftime(' %b, %Y',  strtotime($message['member']['registered'])), '</li>';



You can get it to show by adding the above code into your display.template.php file.

suljanic

Hello, I need one information. I installed the mod successfully. But use the Croatian language and are not showing the text 'Join Date', only the date is displayed. Where and what code must I entered?

suljanic



futeball

Im using smf 2.0.2 but I can't find where to enable this mod? Please advise.

Shambles

In my setup, it's

Admin > Configuration > Modification Settings > Miscellaneous

.. then tick the box entitled "Show join date in topic view:"

tinoest

Quote from: Shambles™ on September 29, 2012, 02:18:04 PM
In my setup, it's

Admin > Configuration > Modification Settings > Miscellaneous

.. then tick the box entitled "Show join date in topic view:"

Thanks, seems I was to slow to reply!

It should be where Shambles just said, if it's not then can you post your ManageSettings.php file

futeball


TheDel

anyway to turn around the date for the Americans?
It says Month Date Year and we use Day Month Year

Shambles

Quote
anyway to turn around the date for the Americans?
It says Month Date Year and we use Day Month Year
I thought America used Month Day Year  ???

tinoest

Find this line in Sources/Load.php

'joined' => empty($profile['date_registered']) ? '' : timeformat($profile['date_registered'], '%b %Y'),

And edit it to the format that you want.

timeformat is a function in Sources/Subs.php and uses http://php.net/manual/en/function.strftime.php to format the string.

AK49BWL

Can someone tell me why this particular action would need to take place for this mod? Enabling the mod toggles real_name vs member_name, and this is completely unrelated to the mod itself, I'm just really curious as to the reason.

Find: [Select]
'link' => '<a href="' . $scripturl . '?action=profile;u=' . $profile['id_member'] . '" title="' . $txt['profile_of'] . ' ' . $profile['real_name'] . '">' . $profile['real_name'] . '</a>',

Replace With: [Select]
'link' => '<a href="' . $scripturl . '?action=profile;u=' . $profile['id_member'] . '" title="' . $txt['profile_of'] . ' ' . (empty($modSettings['display_join_date']) ? $profile['real_name'] : $profile['member_name']) . '">' . $profile['real_name'] . '</a>',

Arantor

There's no good reason for it that I can think of.

In fact I'd probably go as far as calling it a bug because it is unintended - and unwanted - behaviour and in some cases could be a privacy issue (e.g. cases where a user signs up with one name and immediately changes the display name to cloak their real login name)

IMSassafras

#19
For whatever reason, this mod isn't working.  I did notice that the last version compatible is 2.0.5 and I have 2.0.7.  I didn't get any errors or failure notices though, so I went a head with the mod.  I checked the mod instructions and is didn't give an "this mod is not compatible with your version of SMF" so I felt installing it on my forum.

What's up? And can this be updated?

~Sass

:::::::::::::: OOPS!!!!!:::::::::::::

I didn't turn on the mod.  [egg on face]

Fixed the problem!!
It is not for him to pride himself who loveth his own country, but rather for him who loveth the whole world. The earth is but one country, and mankind its citizens. ~ Bahá'u'lláh
________________________
MisFiT City Forum - Where Attitudes are Nourished and Being a MisFiT is Just Part of the Day!
Say NO to MSG.com - Dedicated to creating public awareness of Monosodium Glutamate and other excitotoxins.

Advertisement: