SimplePortal

Customization => Blocks and Modifications => Block Requests => Topic started by: inf2211 on March 14, 2011, 11:49:36 AM

Title: Events from calendar to block
Post by: inf2211 on March 14, 2011, 11:49:36 AM
Hi!
i'm using 2.0 RC5 but there is no that option in drop menu while reg.

Ok what i wonder is it possible to make that events from calendar show on one small block and how? Similar to news block. So what i would like is that calendar events show in another block, in size similar to news block. So generally i would like to display just events from calendar on top of SP.
I mean without date, just event.  Or maybe to make that an option so anybody can choose for itself.
Title: Re: Events from calendar to block
Post by: inf2211 on April 01, 2011, 11:07:38 AM
I know that there is a loads of requests but it's passed 16 days so maybe someone would try to help me, please?
Title: Re: Events from calendar to block
Post by: inf2211 on April 18, 2011, 11:06:26 AM
It's been a month since i posted this, well i can't belive there is no one who knows how to do this? have i missed a subject or it's wrong place to post? if i have pls direct me to right so i can get an answer please.
tnx!
Title: Re: Events from calendar to block
Post by: AngelinaBelle on April 19, 2011, 09:00:28 AM
I think maybe nobody is interested in this custom coding project.
Perhaps, over a period of three months, you could read a little about php and do this customization for yourself.
It might not be such a bad one to get used to php coding.
Remember to do all your testing in a test copy of your forum, so you don't mess up the "real thing".
Have fun!
Title: Re: Events from calendar to block
Post by: inf2211 on April 21, 2011, 01:15:49 PM
haha great support. :) go and do it yourself lol if i had any idea of php maybe i would try doing it but to start learning it would, at this moment in my life, be complete waste of time. You see i wasn't even sure that i placed this at right part of the forum, meaning i don't understand anything and i mean apsolutely nothing about all this, I manage to install SP and to use it, at least some parts. That's why i asked if somebody could HELP me with what i have imagined. And maybe somebody would find that usefull too. I thought support is for that, i guess i was wrong. Srry for wasting Your time making You to read this.
And srry i'm not in php or in any kind of coding and i'm also sorry that i don't have 3 months for learning and trying.
Hvala.
go to translator to see what is this at the end, you don't need do learn for 3 months. Language is Croatian (Croatia)..naaah i'll tell ya..it means
Thank You.
Title: Re: Events from calendar to block
Post by: AngelinaBelle on April 21, 2011, 04:47:29 PM
I can tell you are very frustrated that nobody is available here to do this one small favor for you.
I am very sorry that your post  has not attracted the attention you want.


It is possible that you might find the help you want over at the appropriate forum at simplemachines.org.


And please remember -- you'll catch more flies with honey than with vinegar.


Hvala
Title: Re: Events from calendar to block
Post by: [SiNaN] on April 22, 2011, 10:15:50 AM
Firstly, I would ask you not to expect much from a group of volunteers. They spend the most precious thing they have, their time, to make people happy and that's not always possible. It's even more difficult when people come with more specific requests. Honestly speaking, if I used the time I spent customizing others' portal to actually develop it, most of those requests could have been possible by default.

Anyway, for your request; did you try the Calender Information block? It will list Events, Birthdays and Holidays. You can make it display the Events only, as well as listing events from future. Saying to make it look like the news block doesn't help me visualize it much, but how about this one:

Code: [Select]
global $settings;

$future_days = 7;
$fade_delay = 5000;

$current_time = forum_time();
$today_date = date("Y-m-d", $current_time);

if (!empty($future_days))
$future_date = date("Y-m-d", ($current_time + $future_days * 86400));
else
$future_date = $today_date;

$events = sp_loadCalendarData('getEvents', $today_date, $future_date);

$displayed = array();
foreach ($events as $day => $day_events)
foreach ($day_events as $event_key => $event)
if (in_array($event['id'], $displayed))
unset($events[$day][$event_key]);
else
$displayed[] = $event['id'];

echo '
<div id="eventsfader" style="text-align: center;">
<ul class="reset" id="eventsFadeScroller">';

foreach ($events as $set)
foreach ($set as $event)
echo '
<li>', $event['link'], '</li>';

echo '
</ul>
</div>
<script type="text/javascript" src="', $settings['default_theme_url'], '/scripts/fader.js"></script>
<script type="text/javascript"><!-- // --><![CDATA[
var oEventsFader = new smf_NewsFader({
sSelf: \'oEventsFader\',
sFaderControlId: \'eventsFadeScroller\',
sItemTemplate: ', JavaScriptEscape('%1$s'), ',
iFadeDelay: ', $fade_delay, '
});
// ]]></script>';

You can the code with a Custom PHP block and it should look the same as news block when you have the title disabled through the No Title style option. It has a fader as well. You can set the number of days to include events from future and also the fade delay by changing the variables at the beginning of the code.
Title: Re: Events from calendar to block
Post by: inf2211 on April 22, 2011, 04:00:10 PM
I can tell you are very frustrated that nobody is available here to do this one small favor for you.
I am very sorry that your post  has not attracted the attention you want.


It is possible that you might find the help you want over at the appropriate forum at simplemachines.org.


And please remember -- you'll catch more flies with honey than with vinegar.


Hvala

Wrong. I was frustrated with your answer. If you answered like first part of Sinan's answer i would understand and probably ask where could i get more of help and wouldn't expect much. Lol u told me to go learn for php 3 months and do it myself..imagine how would u feel if you get answer like that after month of waiting..
jesus and somebody told me ur nice..for somebody who knows php maybe u are..

And by the way u can catch flies with shit too..i do understand what u wanted to say but in real life that's not quite so..

name of this board is Block Request..but i guess my english is so bad that i misunderstood something.
Will look what Sinan posted and AngelinaBelle don't worry, will not come here for help. I'll just go to 3 month course and will do it myself.
Also that will be my advice for all non php ppl..will tell em not to look for help in SP forum for SP blocks, will advise them to go take a course or to go to simplemachines or anywhere else but here cause there is NO logic in looking for support in Block Request for SP in SP support forum.
:)



Tnx Sinan i will look into that.

Title: Re: Events from calendar to block
Post by: [SiNaN] on April 24, 2011, 08:34:14 AM
Ouch! Don't say that, please. I'm sure there was a misunderstanding because of "language barrier". Customization requests are primarily my responsibility. Seeing you waiting for a month without any replies, I'm sure she just wanted to offer his best, not to leave you without any response at all. I'm the one to blame here, if there is any, and I apologize.
Title: Re: Events from calendar to block
Post by: inf2211 on April 27, 2011, 03:00:57 PM
Ok, You are right. Peace is always best solution. Thank You.
Greetings!
Title: Re: Events from calendar to block
Post by: AngelinaBelle on April 27, 2011, 09:09:00 PM
I am sorry for any misunderstanding I might have contributed here.
Regards!
SimplePortal 2.3.8 © 2008-2024, SimplePortal