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?
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.
No, not just today's events but upcomming events (like all events in the next week)
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.
ok thanks im really stupid :idiot2:
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
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 ?
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.
Can't seem to get this last code working on a php block :-\
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
thanks!
And is there a way I can get them to display with a space between events? So they display on a separate line, but with a space between lines :)
im making a guess since i dont use it myself but u could add another br at the end like so:
echo '<a href="' . $event['href'] . '">' . $event['date'] . ' : ' . $event['title'] . '</a><br >';
like this
echo '<a href="' . $event['href'] . '">' . $event['date'] . ' : ' . $event['title'] . '</a><br ><br >';
That worked pretty well! Thanks!
welcome :up:
I am trying to make two blocks.
1-people who has birthday TODAY block. (i made it using phpbox, smf's calendar settings)
2-but i didn't make the block "upcoming 5 events" or "upcoming events in 15 days".
if I set smf's calendar settings "15 days", birthday block shows me "birthdays in 15 days", but I want birthdays today and events today+ 15 days
Is it possible?
Quote from: ckale on November 04, 2006, 03:55:04 PM
I am trying to make two blocks.
1-people who has birthday TODAY block. (i made it using phpbox, smf's calendar settings)
2-but i didn't make the block "upcoming 5 events" or "upcoming events in 15 days".
if I set smf's calendar settings "15 days", birthday block shows me "birthdays in 15 days", but I want birthdays today and events today+ 15 days
Is it possible?
I think it is impossible :( with block codes
It is impossible if you use the built-in functions, but perfectly doable with php code.
ThatÃ,´s a great block, but I want the date like that: "18/02" (Day/Month)
You know how to do it?
Thanks.
Quote from: foxfox on September 11, 2006, 10:23:48 AM
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.
I am using this code in a block. What do I need to add to this to make it show holidays and birthdays. I dont know much about coding so if this is simple please excuse me
I tried a couple of different thing today with this but still cannot get it to display birthdays. I think I should be calling the calender instead of todays Events but am not sure how to do this. any input anybody?
Look here it gives you a list of all the SSI functions... It might help you out
http://www.tinyportal.net/index.php?topic=2323.0
I seem to be having an issue with one of my sites using this code. I have a block to show upcoming events:
www.usscalemasters.org/forums (http://www.usscalemasters.org/forums)
SMF 1.1.9
TP 1.0 B4
Modified Blueskies theme
$result = ssi_todaysEvents('array');
if (!empty($result))
{
foreach ($result as $event)
echo '<center><a href="' . $event['href'] . '">' . $event['date'] . ' : ' . $event['title'] . '</a></center>';
}
else
echo 'There are currently no events in the next 30 days.<br>';
After a period of time, not accessing the site, say over night... The front page will display there are not upcoming events in the next 30 days. Yet there are. If you go to the Calendar, click on the month of June, where the next events are, then go back to the front page, they are now displayed. I have had others test this and it has the same behavior. But one anyone checks the calendar directly, then everyone can see the upcoming events on the main page... FYI - both the upcoming events block and the Calendar block will not show anything....
No errors in the logs I can find.
Any help would be appreciated.
--Mitch
I guess I stumped the panel... :) Or should I start a new thread? I still have not found any answer to this. --Mitch
Since its using only SSI pulled from SMF. There doesn't seem to be any way for us to control your issue. The code posted doesn't do any alteration of the code. It just outputs what the SSI function does. You should probably ask someone at SMF why that function is behaving that way.
Ok, thanks.. it is really strange.. I am going to go through my SMF settings again just to see of maybe it's a server cache issue. It sure acts like it... --Mitch
Just checked and no caching is enabled on the server... Will query SMF help and report back what I find.. -- Mitch
Well I have posts in SMF forums and a ticket open, but still no luck. One interesting thing I noticed today, since we rolled into June, all the events for June are now showing up, but nothing after June... --Mitch
Seems it was a mod messing things up. Repeating Events for Calendar http://custom.simplemachines.org/mods/index.php?mod=655 was causing the problem. I removed that mod and all seems to be working. I kinda miss what it did, but you can still span events over multiple days. It's ability to have events repeat every month, or year or X number of days was nice...
--Mitch
im lost, I tried to use this code but it dont work.. Im I using the wrong one?
$result = ssi_todaysEvents('array');
if (!empty($result))
{
foreach ($result as $event)
echo '<center><a href="' . $event['href'] . '">' . $event['date'] . ' : ' . $event['title'] . '</a></center>';
}
else
echo 'There are currently no events in the next 30 days.<br>';
rjackson,
In what way does it not work?
I tried the code on my test site using SMF 1.1.10 and TP 1.0 beta 4 and it works fine. You need to make sure that you have events posted for the next 30 days or it won't show them. Even if there aren't any events, the block will state that. There isn't much more we can do to help you without having the information that is requested at the bottom of the posting guidelines. So, if you require additional help on this, Please Read and Follow the Posting Guidelines (http://www.tinyportal.net/index.php/topic,581).
ZarPrime
i got it working... gotta get use to that where to show function at the bottom..
Glad you got it working. :up:
ZarPrime