How do I add join date to the postbit?
Thank you for any help.
This any good?
https://custom.simplemachines.org/mods/index.php?mod=2889
or this?
https://custom.simplemachines.org/mods/index.php?mod=2531
possibly even this?
https://custom.simplemachines.org/mods/index.php?mod=3975
Thank you, but I am not looking for a mod, I would like someone to teach me how to do it myself.
This way I can also make other edits to the postbit, such as controling the order in which information (such as postcount) is displayed.
Those mods you posted put join date under the avatar, I would like it after postcount.
Wouldn't scrutinising those mods not give you a head start on techniques?
You can probably tell from my postcount that I'm extremely new to SMF and I have no idea how to 'scrutinise' a mod.
Could someone at least tell me which template I need to edit and how to call the join date?
Thank you.
Download one or more of those mods, unzip it/them and look at the code changes proposed within.
The unzipped files are just text files - have a browse of them :)
It's in Display.template.php, look for 'poster'. But you have to add 'registered_date' to the correct array, that takes a bit of doing.
Which is why you look at the mods and the code in them to see how they do it.
This is how I started writing mods and I wrote a few...
What I did was install one of those mods and then look at display.template.php.
I found the following;
// Show the join date in post
if (!empty($modSettings['show_join_date_post']) && !empty($message['member']['joined']))
echo '
<li class="date_registered">', $txt['date_registered'], ': ', $message['member']['joined'], '</li>';
I copy/pasted it to to under the postcount part, and now it appears as I wanted it.
Good job there were existing compatible mods though, because without that code I'd literally have no idea what to do.
You're welcome.