EzPortal - Portal Software for Forums

EzPortal - Made to Fit Your SMF Forum - Glad You Found Us!
+- +-

UserBox

Welcome, Guest.
Please login or register.
 
 
 
Forgot your password?

+- Recent Posts

Re: e-arcade by hrroach
May 03, 2019, 07:59:34 am

Re: e-arcade by EzPortal
May 02, 2019, 04:25:59 pm

e-arcade by hrroach
May 02, 2019, 03:18:38 pm

ezPortal 4.5 Released! by EzPortal
March 30, 2019, 09:10:23 pm

Re: ezPortal 4.1 Released by EzPortal
February 11, 2019, 10:07:05 pm

Re: ezPortal 4.1 Released by EzPortal
February 10, 2019, 09:24:08 pm

Re: ezPortal 4.1 Released by arslun
February 10, 2019, 09:21:20 pm

Re: ezBlock listed as installed by EzPortal
January 30, 2019, 09:49:33 am

+- HTML Menu


Sample HTML Block Usage - You May Custom Code it, as needed!

Author Topic: help with block  (Read 4349 times)

0 Members and 1 Guest are viewing this topic.

Offline ke4obt

  • Posts: 4
  • Karma: 0
  • Gender: Male
  • CQ CQ CQ From KE4OBT Located At Grid Square EM90ck
help with block
« on: December 16, 2008, 11:54:48 pm »

Hey All,

Would like to get some help with the develipment of a block that shows the same stuff that's shown in the stats area
for the calender.
Found this code in the "boardindex.templit.php", and need to noe what needs to be done to make it work.
Heck i'd like to even have it made into a uploadable block


Code: [Select]
// 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="95" 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>';
}

Can this even be done?

Thanks for any and all help.

     Flip - The blind Ham
Philip "Flip" Halley IV - KE4OBT
The Blind Ham
Helping Other Blind Hams
At Ham Radio Advisors

Offline EzPortal

  • Administrator
  • *****
  • Posts: 1198
  • Karma: 66
Re: help with block
« Reply #1 on: December 17, 2008, 07:10:57 pm »
A calender ezBlock is in the works.

In your above example needs to calender data to be loaded which does not occur currently on every page in SMF.
Like ezPortal? Support me at https://www.patreon.com/vbgamer45/

 

Related Topics

  Subject / Started by Replies Last post
2 Replies
3422 Views
Last post September 30, 2014, 10:24:54 pm
by EzPortal
1 Replies
74441 Views
Last post February 01, 2016, 06:54:50 am
by lscstu22
0 Replies
2038 Views
Last post May 22, 2016, 04:39:46 pm
by Miker1029
4 Replies
9545 Views
Last post July 03, 2016, 12:01:02 pm
by DenDen66
2 Replies
3186 Views
Last post February 07, 2017, 07:55:45 am
by landyvlad

+-SMF Gallery

Quick Menu








Members Online

15 Guests, 0 Users
Powered by EzPortal