TodaysBirthday

Started by Bulakbol, January 06, 2008, 09:28:48 PM

Previous topic - Next topic

Bulakbol

No worries Eliana. We all make mistakes. Maybe I had more than you.  ;)
Please do not PM me for support · My Mods and Theme · SMF Coding Guidelines · Modifications Approval Guidelines

alphascorpio

Hi JohnyB,

Thanks for the information. I got one step forward so far :) .
I'm a newbie I will say very very newbie :) . I'm trying to insert the mod in the forum and no luck. Can anyone suplly me the complete information step by step ? I really apreciate and I will thank you for it.
Cumpliments

Bulakbol

Hi alphascorpio. Have you tried installing the mod using the package manager? If you want to install the mod manually, you can use the in-built Package Parser. Go here, choose your version , click submit and the parser will show you what to look for and what to change.

Please do not PM me for support · My Mods and Theme · SMF Coding Guidelines · Modifications Approval Guidelines

Eliana Tamerin

Do NOT PM me for support.

SimplePortal 2.3.6 is OUT!
SimplePortal Project Manager
Download | Docs
SimplePortal: Power of Simplicity!

Bulakbol

That's in great detail Eliana.  That will help alphascorpio. Thanks a lot.
Please do not PM me for support · My Mods and Theme · SMF Coding Guidelines · Modifications Approval Guidelines

Eliana Tamerin

No problem, just discovered that features in the parser today. Wonderful for linking directly to parse instructions.
Do NOT PM me for support.

SimplePortal 2.3.6 is OUT!
SimplePortal Project Manager
Download | Docs
SimplePortal: Power of Simplicity!

Gendji

Hi there,

Just installed this mod and it's working great.
One thing i noticed though and that is that other Holidays besides Birthdays remain unchanged.

Is there a way to change that so that they also appear in a way like:

Upcoming Holidays: Independence Day

Life is not a journey to the grave with the intention of arriving safely in a pretty and well preserved body,
but rather to skid in broadside, thoroughly used up, totally worn out, and loudly proclaiming:
'WOW What a Ride!!!

Bulakbol

Hello Gendji. I thank you for your suggestion. I will look at how the holiday function works and see if I can do something similar.  I cannot promise anything though.
Please do not PM me for support · My Mods and Theme · SMF Coding Guidelines · Modifications Approval Guidelines

Gendji

I tried it myself but with the very limited coding skills i have, i didn't get any further than the text:
Todays Holidays and Upcoming Holidays on the front page :)

Thank you for looking into this.
Life is not a journey to the grave with the intention of arriving safely in a pretty and well preserved body,
but rather to skid in broadside, thoroughly used up, totally worn out, and loudly proclaiming:
'WOW What a Ride!!!

serpentonline

FOR 1.1.5 I get errors when use parser.

this is what i did and it works ...

OPEN Yourtheme/BoardIndex.template.php

FIND:
// Show information about events, birthdays, and holidays on the calendar.
if ($context['show_calendar'])
{
echo '
<tr>
<td class="titlebg" colspan="2">', $context['calendar_only_today'] ? $txt['calendar47b'] : $txt['calendar47'], '</td>
</tr><tr>
<td class="windowbg" width="20" valign="middle" align="center">
<a href="', $scripturl, '?action=calendar"><img src="', $settings['images_url'], '/icons/calendar.gif" alt="', $txt['calendar24'], '" /></a>
</td>
<td class="windowbg2" width="100%">
<span class="smalltext">';

// Holidays like "Christmas", "Chanukah", and "We Love [Unknown] Day" :P.
if (!empty($context['calendar_holidays']))
echo '
<span style="color: #', $modSettings['cal_holidaycolor'], ';">', $txt['calendar5'], ' ', implode(', ', $context['calendar_holidays']), '</span><br />';

// People's birthdays. Like mine. And yours, I guess. Kidding.
if (!empty($context['calendar_birthdays']))
{
echo '
<span style="color: #', $modSettings['cal_bdaycolor'], ';">', $context['calendar_only_today'] ? $txt['calendar3'] : $txt['calendar3b'], '</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'] ? '<b>' : '', $member['name'], $member['is_today'] ? '</b>' : '', isset($member['age']) ? ' (' . $member['age'] . ')' : '', '</a>', $member['is_last'] ? '<br />' : ', ';
}


// Events like community get-togethers.
if (!empty($context['calendar_events']))
{
echo '
<span style="color: #', $modSettings['cal_eventcolor'], ';">', $context['calendar_only_today'] ? $txt['calendar4'] : $txt['calendar4b'], '</span> ';
/* Each event in calendar_events should have:
title, href, is_last, can_edit (are they allowed?), modify_href, and is_today. */
foreach ($context['calendar_events'] as $event)
echo '
', $event['can_edit'] ? '<a href="' . $event['modify_href'] . '" style="color: #FF0000;">*</a> ' : '', $event['href'] == '' ? '' : '<a href="' . $event['href'] . '">', $event['is_today'] ? '<b>' . $event['title'] . '</b>' : $event['title'], $event['href'] == '' ? '' : '</a>', $event['is_last'] ? '<br />' : ', ';

// Show a little help text to help them along ;).
if ($context['calendar_can_edit'])
echo '
(<a href="', $scripturl, '?action=helpadmin;help=calendar_how_edit" onclick="return reqWin(this.href);">', $txt['calendar_how_edit'], '</a>)';
}
echo '
</span>
</td>
</tr>';
}


REPLACE WITH:
// Show information about events, birthdays, and holidays on the calendar.
if ($context['show_calendar'])
{
echo '
<tr>
<td class="titlebg" colspan="2">', $context['calendar_only_today'] ? $txt['calendar47b'] : $txt['calendar47'], '
</td>
</tr>
<tr>
<td class="windowbg" width="20" valign="middle" align="center">
<a href="', $scripturl, '?action=calendar"><img src="', $settings['images_url'], '/icons/calendar.gif" alt="', $txt['calendar24'], '" /></a>
</td>
<td class="windowbg2" width="100%">
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td>';
// Holidays like "Christmas", "Chanukah", and "We Love [Unknown] Day" :P.
if (!empty($context['calendar_holidays']))
echo ' <span class="smalltext" style="color: #', $modSettings['cal_holidaycolor'], ';">', $txt['calendar5'], ' ', implode(', ', $context['calendar_holidays']), '
</span><br />';
// People's birthdays. Like mine. And yours, I guess. Kidding.
if (!empty($context['calendar_birthdays']))
{
echo '<span class="smalltext" style="color: #', $modSettings['cal_bdaycolor'], ';">';
if (!empty($context['bdays']['today']))
echo count($context['bdays']['today']) > 1 ? $txt['calendar3d'] : $txt['calendar3a'], ' ', implode(', ', $context['bdays']['today']), '<br />';
// upcoming birthdays
if (!empty($context['bdays']['soon']))
echo count($context['bdays']['soon']) > 1 ? $txt['calendar3b'] : $txt['calendar3c'], ' ', implode(', ', $context['bdays']['soon']), '<br />';
echo '
</span>';
}
// Events like community get-togethers.
if (!empty($context['calendar_events']))
{
echo (!empty($context['calendar_birthdays']) ? '</td><td width="50%">' : ''), '<span class="smalltext" style="color: #', $modSettings['cal_eventcolor'], ';">';
if (!empty($context['events']['today']))
echo count($context['events']['today']) > 1 ? $txt['calendar4d'] : $txt['calendar4a'], ' ', '<b>', implode(', ', $context['events']['today']), '</b><br />';
// upcoming events
if (!empty($context['events']['soon']))
echo count($context['events']['soon']) > 1 ? $txt['calendar4b'] : $txt['calendar4c'], ' ', implode(', ', $context['events']['soon']), '<br />';
// Show a little help text to help them along ;).
if ($context['calendar_can_edit'])
echo '(<a href="', $scripturl, '?action=helpadmin;help=calendar_how_edit" onclick="return reqWin(this.href);">', $txt['calendar_how_edit'], '</a>)';
echo '</span>';

echo ' </td>  </tr>  </table>  </td>  </tr>';
}

tk2012

DING DING DING!!! 

Another instant install!!! You deserve a GOLD medal!

Bulakbol

 8) Thanks guys for the kind words.
Please do not PM me for support · My Mods and Theme · SMF Coding Guidelines · Modifications Approval Guidelines

tk2012

#152
I tested out the feature and I'm getting an odd error on my screen.  It is showing the Birthdays twice, but the events only once.  I've attached a pic of what I'm talking about.  I would think if the code was accidently put on twice, that both the events and the birthday would show twice.





It must be conflicting with another mod somewhere.  I'm going to go back over all the edits because I haven't uninstalled the mod, but it stopped showing it completely.  I'm getting errors in my log referring to this mod, but regarding to when people are using other functions that don't relate to this.  v2.0 b3.1 is what I'm using.  Will let you know what I find.

Bulakbol

Quote from: tk2012 on August 12, 2008, 08:20:17 AM
I tested out the feature and I'm getting an odd error on my screen.  It is showing the Birthdays twice, but the events only once.  I've attached a pic of what I'm talking about.  I would think if the code was accidently put on twice, that both the events and the birthday would show twice.





It must be conflicting with another mod somewhere.  I'm going to go back over all the edits because I haven't uninstalled the mod, but it stopped showing it completely.  I'm getting errors in my log referring to this mod, but regarding to when people are using other functions that don't relate to this.  v2.0 b3.1 is what I'm using.  Will let you know what I find.

Attach your BoardIndex.template.php and helpful people will help you if I am not around.
Please do not PM me for support · My Mods and Theme · SMF Coding Guidelines · Modifications Approval Guidelines

tk2012

Well, later the same day I posted this something happened with the database, so when/if I get it back up and running I'll do that!  LOL!  My host site is still getting back to me.  Luckily, I made a back up the day before this happened!

tk2012

#155
Ok, the site is back up after the host fixed what caused my database to go berserk.. some kind of upgrade they did to the server...

Anyway, I'm still getting the same error....

I've enclosed my files..sorry to have you look at it.  I've been doing well with going thru these manually!

Bulakbol

I'll look at them tk2012. I'll get back to you.
Please do not PM me for support · My Mods and Theme · SMF Coding Guidelines · Modifications Approval Guidelines

tk2012

Sorry to update this, but I made a change to the file for another mod and don't want to forget my changes in the Display.template file.   Please ignore the other one and use this one instead since it has the correct edits for that mod!


Thanks and no hurry!  You guys help so many people and I don't want to be a hog.

Bulakbol

This mod has nothing to do with Display.template.php though.  It modifies Sources/BoardIndex.php,  default/BoardIndex.template.php and the language files.
Please do not PM me for support · My Mods and Theme · SMF Coding Guidelines · Modifications Approval Guidelines

tk2012

I realized that after I posted it.  It's late here!! TK needs some sleep or some caffeine!

Advertisement: