TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

Members
  • Total Members: 3,963
  • Latest: BiZaJe
Stats
  • Total Posts: 195,913
  • Total Topics: 21,308
  • Online today: 884
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 1
  • Guests: 564
  • Total: 565
  • @rjen

Upcomming events block

Started by winrules, November 06, 2005, 08:20:05 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

winrules

I'm wondering how to make a block that will show upcoming events in the calendar. I'm running 1.1 rc1. COuld i do this with a ssi function or would i need some php code?

scotte44

Make a phpbox with:
ssi_todaysEvents();

If you want the font smaller like I did use:
echo '<span class="smalltext">';
ssi_todaysEvents();
echo '</span>';

I still havent figured out how to get the box to say none if there are no events, currently it will just be empty.

winrules

No, not just today's events but upcomming events (like all events in the next week)

iowamf

I just use the default SSI block for Today's calendar.  I'm not sure how far it looks out - but it appears it's at least two weeks.

winrules


scotte44

This block would be really nice if it had two things:
Each event listed on a seperate line &
The date of the event without putting it into the subject line

knat

Ok i know that this topic has been silent for over 120 days but i wanted to use this block so here goes:

When i enable this block it starts to show hollidays and Birthdays even thoug i have selected not to show this in the Calendar Admin section.. 

Can anybody help me fix it so it keeps not showing hollidays and birthdays when i use this block ?

foxfox

Quote from: scotte44 on November 07, 2005, 05:36:38 PM
This block would be really nice if it had two things:
Each event listed on a seperate line &


<?php
$result 
ssi_todaysEvents('array');
if (!empty(
$result))
{
   foreach (
$result as $event)
      echo 
'<a href="' $event['href'] . '">' $event['date'] . ' : ' $event['title'] . '</a><br >';
}
else
      echo 
'There are currently no events in the next XXX days.<br>';
?>


XXX is the timespan you set in the forums. The date might need some editing but i'm not that much of an expert.

manji

Can't seem to get this last code working on a php block :-\

akulion

Quote from: manji on November 01, 2006, 01:06:54 PM
Can't seem to get this last code working on a php block :-\

remove the <?php and ?> from the start and the end before putting ina  PHPbox

This website is proudly hosted on Crocweb Cloud Website Hosting.