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: ezPortal 4.0 Released! by EzPortal
September 07, 2018, 02:44:21 pm

Re: ezPortal 4.0 Released! by JorgeAVM
September 07, 2018, 02:28:46 pm

Re: ezPortal 4.0 Released! by JorgeAVM
September 07, 2018, 02:04:13 pm

Re: ezPortal 4.0 Released! by EzPortal
September 07, 2018, 01:56:41 pm

Re: ezPortal 4.0 Released! by JorgeAVM
September 07, 2018, 01:48:49 pm

ezPortal 4.0 Released! by EzPortal
August 13, 2018, 02:27:14 pm

Re: How to add pictures on recent post ezportal front page by Botango23
June 30, 2018, 03:38:18 am

Re: How to add pictures on recent post ezportal front page by EzPortal
June 29, 2018, 06:21:42 pm

+- HTML Menu


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

Author Topic: help with block  (Read 4123 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: 1181
  • Karma: 64
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
3130 Views
Last post September 30, 2014, 10:24:54 pm
by EzPortal
1 Replies
73952 Views
Last post February 01, 2016, 06:54:50 am
by lscstu22
0 Replies
1894 Views
Last post May 22, 2016, 04:39:46 pm
by Miker1029
4 Replies
9199 Views
Last post July 03, 2016, 12:01:02 pm
by DenDen66
2 Replies
2851 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