Skip to main content
Topic: Help with Today's birthdays on forum index (Read 5591 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Help with Today's birthdays on forum index

Greetings everyone, I commend the entire community for this wonderful and powerful script. The features are on point! I am currently using Elkarte to develop a forum for my Church. I need help regarding the birthday on the forum index.
All birthdays displays in the forum index as Upcoming Birthdays even those that are Today. I did suggest Today’s birthdays and Upcoming birthdays should be separated.
Thanks.

Re: Help with Today's birthdays on forum index

Reply #1

Welcome to elkarte and happy birthday!

Are you using simple portal? If so you can display a block of "today birthday" with just a few clicks ;)
sorry for my bad english

Re: Help with Today's birthdays on forum index

Reply #2

Quote from: radu81 – Welcome to ElkArte and happy birthday!

Are you using simple portal? If so you can display a block of "today birthday" with just a few clicks ;)
@Radu, thanks for your prompt response. I don't intend to use Simple Portal. I want to keep my forum simple :) Can "today birthday" block be implemented in the forum index without using the simple portal addon? Thanks

Re: Help with Today's birthdays on forum index

Reply #3

Hi and welcome. :)

At the moment, the only way to override that piece is modify the template.
A "quick&dirty" implementation could be to replace, in the file BoardIndex.template.php the code:
Code: [Select]
	// People's birthdays. Like mine. And yours, I guess. Kidding.
if (!empty($context['calendar_birthdays']))
{
echo '
<p class="inline">
<span class="birthday">', $context['calendar_only_today'] ? $txt['birthdays'] : $txt['birthdays_upcoming'], '</span>';

// Each member in calendar_birthdays has: id, name (person), age (if they have one set?), is_last. (last in list?), and is_today (birthday is today?)
foreach ($context['calendar_birthdays'] as $member)
echo '
<a href="', $scripturl, '?action=profile;u=', $member['id'], '">', $member['is_today'] ? '<strong class="fix_rtl_names">' : '', $member['name'], $member['is_today'] ? '</strong>' : '', isset($member['age']) ? ' (' . $member['age'] . ')' : '', '</a>', $member['is_last'] ? '' : ', ';

echo '
</p>';
}

with:
Code: [Select]
	// People's birthdays. Like mine. And yours, I guess. Kidding.
if (!empty($context['calendar_birthdays']))
{
echo '
<p class="inline">
<span class="birthday b-today">', $txt['birthdays'], '</span>';

// Each member in calendar_birthdays has: id, name (person), age (if they have one set?), is_last. (last in list?), and is_today (birthday is today?)
foreach ($context['calendar_birthdays'] as $member)
{
if ($member['is_today'])
{
echo '
<a href="', $scripturl, '?action=profile;u=', $member['id'], '">', $member['is_today'] ? '<strong>' : '', $member['name'], $member['is_today'] ? '</strong>' : '', isset($member['age']) ? ' (' . $member['age'] . ')' : '', '</a>', $member['is_last'] ? '' : ', ';
}
}

echo '
</p>
<p class="inline">
<span class="birthday b-not-today">', $context['calendar_only_today'] ? $txt['birthdays'] : $txt['birthdays_upcoming'], '</span>';

// Each member in calendar_birthdays has: id, name (person), age (if they have one set?), is_last. (last in list?), and is_today (birthday is today?)
foreach ($context['calendar_birthdays'] as $member)
{
if ($member['is_today'] === false)
{
echo '
<a href="', $scripturl, '?action=profile;u=', $member['id'], '">', $member['is_today'] ? '<strong>' : '', $member['name'], $member['is_today'] ? '</strong>' : '', isset($member['age']) ? ' (' . $member['age'] . ')' : '', '</a>', $member['is_last'] ? '' : ', ';
}
}

echo '
</p>';
}
Bugs creator.
Features destroyer.
Template killer.

 

Re: Help with Today's birthdays on forum index

Reply #4

@emanuele , thank you very much. Keep up the good work :)

Re: Help with Today's birthdays on forum index

Reply #5

You are welcome. :)
Bugs creator.
Features destroyer.
Template killer.


Re: Help with Today's birthdays on forum index

Reply #7

Hello!
How can I show birthdays for today and tomorrow in EA version 1.1.5 ?
And how can the cake graphic be displayed for the todays birthdays?
ElkArte version: 1.1.8 / Theme: BeSocial / PHP 8.0

Re: Help with Today's birthdays on forum index

Reply #8

I use SPortal to display "today birhdays".
SPBlock.png
sorry for my bad english

Re: Help with Today's birthdays on forum index

Reply #9

Thank you, but I don't use Simple Portal because I don't need a portal. And just because of the birthdays I don't want to install it.
ElkArte version: 1.1.8 / Theme: BeSocial / PHP 8.0

Re: Help with Today's birthdays on forum index

Reply #10

I agree with you, it doesn't make much sense to use a portal just to display birthdays. 
sorry for my bad english

Re: Help with Today's birthdays on forum index

Reply #11

Todays birthdays are displayed by default, but there seems to be no configuration possible in the admin section. I can't find any too.

Re: Help with Today's birthdays on forum index

Reply #12

Yes, I have set this simple birthday today variant. With "tomorrow" I would like it a little better...
And it would be nice if the cake could be displayed, which is still in the Images folder.

ElkArte version: 1.1.8 / Theme: BeSocial / PHP 8.0

Re: Help with Today's birthdays on forum index

Reply #13

You mean you want to see "tomorrow" instead of the date or that the "Max days in advance on board index" setting is not enforced?
Bugs creator.
Features destroyer.
Template killer.

Re: Help with Today's birthdays on forum index

Reply #14

I want to have something like this. And the cake shall than be centrally behind the name:


Todays Birthday:  emanuele 

Tomorrows Birthday:  Mrs. Chaos
ElkArte version: 1.1.8 / Theme: BeSocial / PHP 8.0