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: permissions to shoutbox by EzPortal
December 15, 2018, 07:33:14 am

Re: permissions to shoutbox by zoltar
December 15, 2018, 05:26:48 am

Re: permissions to shoutbox by EzPortal
December 10, 2018, 11:22:34 pm

Re: permissions to shoutbox by zoltar
December 10, 2018, 02:48:47 pm

Re: permissions to shoutbox by EzPortal
December 09, 2018, 08:23:51 pm

Re: permissions to shoutbox by zoltar
December 09, 2018, 03:21:35 am

Re: permissions to shoutbox by EzPortal
December 08, 2018, 09:20:27 am

permissions to shoutbox by zoltar
December 08, 2018, 03:36:08 am

+- HTML Menu


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

Author Topic: help with block  (Read 4205 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: 1191
  • Karma: 65
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
3239 Views
Last post September 30, 2014, 10:24:54 pm
by EzPortal
1 Replies
74159 Views
Last post February 01, 2016, 06:54:50 am
by lscstu22
0 Replies
1933 Views
Last post May 22, 2016, 04:39:46 pm
by Miker1029
4 Replies
9335 Views
Last post July 03, 2016, 12:01:02 pm
by DenDen66
2 Replies
2978 Views
Last post February 07, 2017, 07:55:45 am
by landyvlad

+-SMF Gallery

Quick Menu








Members Online

11 Guests, 0 Users
Powered by EzPortal