hide birthdays in calendar

Started by lebbra, February 10, 2011, 06:26:22 AM

Previous topic - Next topic

lebbra

I have a RC3 installaton and when I follow the below procedure to hide birthdays in calendar block, nothing happens and birthdays still remains visible.
some idea?
thanks..

Show birthdays - Select between showing birthdays nowhere, in calendar only, on the Board index only, or both the calendar and Board index.

EnvisionPortal Team

firstly you really should update to RC4 as there are many security fixes

to hide birthdays open Calendar.template located in your default folder and look for the following code

// Show any birthdays...
if (!empty($day['birthdays']))
{
echo '
<div class="smalltext">
<span class="birthday">', $txt['birthdays'], '</span>';

/* Each of the birthdays has:
id, name (person), age (if they have one set?), and is_last. (last in list?) */
$use_js_hide = empty($context['show_all_birthdays']) && count($day['birthdays']) > 15;
$count = 0;
foreach ($day['birthdays'] as $member)
{
echo '
<a href="', $scripturl, '?action=profile;u=', $member['id'], '">', $member['name'], isset($member['age']) ? ' (' . $member['age'] . ')' : '', '</a>', $member['is_last'] || ($count == 10 && $use_js_hide)? '' : ', ';

// Stop at ten?
if ($count == 10 && $use_js_hide)
echo '<span class="hidelink" id="bdhidelink_', $day['day'], '">...<br /><a href="', $scripturl, '?action=calendar;month=', $calendar_data['current_month'], ';year=', $calendar_data['current_year'], ';showbd" onclick="document.getElementById(\'bdhide_', $day['day'], '\').style.display = \'\'; document.getElementById(\'bdhidelink_', $day['day'], '\').style.display = \'none\'; return false;">(', sprintf($txt['calendar_click_all'], count($day['birthdays'])), ')</a></span><span id="bdhide_', $day['day'], '" style="display: none;">, ';

$count++;
}
if ($use_js_hide)
echo '
</span>';

echo '
</div>';
}


now simply change it to this

/*// Show any birthdays...
if (!empty($day['birthdays']))
{
echo '
<div class="smalltext">
<span class="birthday">', $txt['birthdays'], '</span>';

/* Each of the birthdays has:
id, name (person), age (if they have one set?), and is_last. (last in list?) *//*
$use_js_hide = empty($context['show_all_birthdays']) && count($day['birthdays']) > 15;
$count = 0;
foreach ($day['birthdays'] as $member)
{
echo '
<a href="', $scripturl, '?action=profile;u=', $member['id'], '">', $member['name'], isset($member['age']) ? ' (' . $member['age'] . ')' : '', '</a>', $member['is_last'] || ($count == 10 && $use_js_hide)? '' : ', ';

// Stop at ten?
if ($count == 10 && $use_js_hide)
echo '<span class="hidelink" id="bdhidelink_', $day['day'], '">...<br /><a href="', $scripturl, '?action=calendar;month=', $calendar_data['current_month'], ';year=', $calendar_data['current_year'], ';showbd" onclick="document.getElementById(\'bdhide_', $day['day'], '\').style.display = \'\'; document.getElementById(\'bdhidelink_', $day['day'], '\').style.display = \'none\'; return false;">(', sprintf($txt['calendar_click_all'], count($day['birthdays'])), ')</a></span><span id="bdhide_', $day['day'], '" style="display: none;">, ';

$count++;
}
if ($use_js_hide)
echo '
</span>';

echo '
</div>';
}*/

lebbra

It seems not works.
Even if I rename the whole file Calendar.template.php as Calendar.template.php.OLD, and I refresh the url and clean the browser cache nothing happens... :o  :o

Road Rash Jr.

If you are logged in as Admin you will see it even if it is set to not show for regular members.
Never argue with an Idiot like myself, they just drag you down to their level then beat you with experience.

lebbra

I see the same even when I logout.
I know it seems really weird, but true.
I also checked all the files inside Theme mod, in order to see if there is something related with this issue...

What I really do not understand is why, even if I renamed the Calendar.template.php as Calendar.template.php.OLD, I'm still able to see the calendar in my website.

When I used Xoops (another CMS) I had similar problems and I learned that a copy of each template is stored into the Database. Because of that no modification on the template has any effect unless you refresh the database.
Is this the case of SMF? How can I refresh the DB if necessary?


Advertisement: