News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

Birthday on Profile Summary

Started by ccbtimewiz, October 23, 2008, 10:06:59 PM

Previous topic - Next topic

ccbtimewiz

Link to Mod

Package Information
Latest Version: 1.0
Created by: ccbtimewiz
Built for: SMF 2.0 BETA and SMF 1.1.6
Package: Birthday on Profile Summary


What is this?

The following hack will put a birthday field on your profile summary. SMF by default does not do this, so this is how you do it.

Example:



Alteration Log

[!] Released on October 10, 2008.


Need Help?

If you need help with this modification, please don't hesitate to post in the support thread.

Costa

#1
Simple transation to brazilian :P

$txt['my_birthday'] = 'Aniversário';

Italian
$txt['my_birthday'] = 'Compleanno';

Spannish
$txt['my_birthday'] = 'Cumpleaños';

French
$txt['my_birthday'] = 'Anniversaire';

Congrats
Farewell
~[Costa]
Hugo "Costa" Fernandes - PT SMF
Todas as MP's a pedir ajuda são sujeitas a radioactividade, microondas, queimadas e atiradas borda fora.

"At least someone appreciates the fact that I am doing and not thinking..."
"Laziness is counter-revolutionary."

Marcus Forsberg

Nice mod.

Swedish translation:
$txt['my_birthday'] = 'Födelsedag';

GJSchaller

Works like a charm for me - thank you VERY much!
Geoffrey J. Schaller
Knight Realms - Technical Officer
http://www.knightrealms.com/

Manu.G

Great Mod!! :D

One little question is there a way to show the date 1 January 2009 instead of January 1, 2009?
Version SMF 2.0.8
SimplePortal 2.3.5

Basie


Özgür

Thanks for the mod.

Turkish translation:
$txt['my_birthday'] = 'Doğum Günü';
So Long

LinK187

It sort of works, but on people's profiles it just shows a ':' and then their birthdate but the word "Birthdate" doesn't appear.

I also have this error in the forum error log:

Quote
****   Today at 11:04:10 AM 
*.*.*.*     4a8b468c25a74ee90cf8f94dcc45b991 
http://****/forum/index.php?action=profile;u=1 
8: Undefined index: my_birthday
File: /home/****/public_html/****/forum/Themes/default/languages/Who.english-utf8.php (eval?)
Line: 272

magarto

Is it anyway to force to users to put their birtday on registration with this mod????
I wrote this post but i do not know how to implement on 2.0 beta 4 and with this mod: http://www.simplemachines.org/community/index.php?topic=286961.0
Thanks in advance

Apllicmz

when Update dont forget portuguese_pt

<file name="$languagedir/Modifications.portuguese_pt.php" error="skip">
        <operation>
            <search position="end" />
            <add><![CDATA[
$txt['my_birthday'] = 'Aniversário';
]]></add>
        </operation>
    </file>
    <file name="$languagedir/Modifications.portuguese_pt-utf8.php" error="skip">
        <operation>
            <search position="end" />
            <add><![CDATA[
$txt['my_birthday'] = 'Anivers&aacute;rio';
]]></add>
        </operation>
    </file>



She work fine in 1.1.10 but 2.0rc1-2
i see that error



Bugo

#10
Changes for SMF 2 RC2-RC3:
// Birthday's date
list ($year, $month, $day) = explode('-', $context['member']['birth_date']);
$bday = $day == '00' ? '' : $day . ' ' . ($txt['months'][(int) $month] . ' ' . ($year != '0000' ? ' ' . $year : ''));

// Let's show it!
if (!empty($bday))
{
echo '
<dt>', $txt['my_birthday'] ,': </dt>
<dd>', $bday, '</dd>';
}


Russian translation:
$txt['my_birthday'] = 'День рождения';

And how not to bring your date of birth and date when the user will be celebrated next birthday — on the main page of forum?

Raffoz

nothing for SMF 2.0 RC3? :)

thanks...
MacOsX (last)
SMF 2.0.15 and 2.1.2 (different forums)
Chrome (last) or Safari (last)

Arantor

The same should work for 2.0 RC3.
Holder of controversial views, all of which my own.


Raffoz

it doesn't... :(

the code in rc3 is different from the one in the package
MacOsX (last)
SMF 2.0.15 and 2.1.2 (different forums)
Chrome (last) or Safari (last)

Arantor

I meant in reference to the changes for RC2 as a few posts above.
Holder of controversial views, all of which my own.


shrmn

There were significant changes in Profile.template.php from 2.0 RC2 to RC3 and subsequently, which broke this mod.

I'm uploading a new package, "Birthday on Profile Summary v2" which supports 2.0 RC3 and up (:

ILUXA

#16
This mod is outdated and doesn't work fine with new SMF versions 2.0.1*

To show "Birthday on Profile Summary" with 2.0.1*,
you need to edit  ./Themes/default/Profile.template.php.

Find
echo '
<dt>', $txt['age'], ':</dt>
<dd>', $context['member']['age'] . ($context['member']['today_is_birthday'] ? ' &nbsp; <img src="' . $settings['images_url'] . '/cake.png" alt="" />' : ''), '</dd>';


And add below

// Show birthday date
list ($year, $month, $day) = explode('-', $context['member']['birth_date']);
$bday = $day == '00' ? '' : ($txt['months_titles'][(int) $month] . ' ' . $day . ($year != '0000' ? ', ' . $year : ''));

if (!empty($bday))
echo '
<dt>', $txt['my_birthday'], ': </dt>
<dd>', $bday, '</dd>';






If you want to disable age, you need to comment

/* echo '
<dt>', $txt['age'], ':</dt>
<dd>', $context['member']['age'] . ($context['member']['today_is_birthday'] ? ' &nbsp; <img src="' . $settings['images_url'] . '/cake.png" alt="" />' : ''), '</dd>';*/


So it should look like this




Also you need to add
$txt['my_birthday'] = 'Birthday';
to ./Themes/default/languages/Modifications.english.php

Advertisement: