collapse

* Simple Portal Archived Forum

This is an Archive Forum.

The content in this forum may be out-of-date or have been superseded by newer information, and links in forum pages to other sites may not work.
This forum contains archives for future reference.

Visit our thread at Simple Machines Forum for current support.

SMF 2.1 users: EhPortal is a ported version of Simple Portal specifically designed for the SMF 2.1 branch.
Please visit web-develop.ca to download EhPortal and for its support.

* User Info

 
 
Welcome, Guest. Please login or register.

* Who's Online

  • Dot Guests: 410
  • Dot Hidden: 0
  • Dot Users: 0

There aren't any users online.

* Shoutbox

Refresh History
  • Shoutbox is not for support!
  • {OCS}MasterSeal: Yup, Still adore SP
    April 21, 2019, 07:08:06 PM
  • {OCS}MasterSeal: STILL love SP :)
    November 24, 2018, 05:05:50 AM
  • ♦ Ninja ZX-10RR ♦: <3 aegersz
    September 13, 2018, 03:36:09 PM
  • aegersz: I STILL <3 LOVE SimplePortal
    September 13, 2018, 07:11:39 AM
  • aegersz: o LOVE you guys - Simple Portal rocks !
    May 09, 2018, 05:18:59 AM
  • Chen Zhen: our apologies for the site being down.. please read server issues topic
    March 22, 2018, 05:32:38 AM
  • {OCS}MasterSeal: LOL PLEASE forget I just posted that. I found the answer in my own dang post back in 2015. lol sorry!
    July 04, 2017, 10:47:55 PM
  • {OCS}MasterSeal: I know this SB isnt' for support, but I just have a general question. Who would I contact to find out where SP stores its block info? Is it DB driven or files? I searched the site but came up with nothing. probably my fault any insight is appreciated.
    July 04, 2017, 10:43:36 PM
  • ♦ Ninja ZX-10RR ♦: Excuse me but what does Simpleportal have to deal with that?
    February 05, 2017, 08:21:14 PM
  • WhiteEagle: of course IMHO that site appears to be dead :(
    February 04, 2017, 01:08:05 PM
  • WhiteEagle: If I can get that, then I'll use it for that site...
    February 04, 2017, 01:07:35 PM
  • WhiteEagle: decided to not use SMF for any projects, unless I can get a copy of the premium version of the fanfiction archive plugin
    February 04, 2017, 01:06:54 PM
  • expertdecisions: cloudflare
    January 28, 2017, 08:01:47 AM
  • aegersz: SM release 2.0.13 !
    January 12, 2017, 06:00:13 AM
  • raffo: Tks Emanuele, even if I didn't understand the fix :D
    November 07, 2016, 02:01:20 AM
  • emanuele: [link]
    November 01, 2016, 12:43:50 PM
  • emanuele: raffo: the English support board is a good place. ;)
    November 01, 2016, 12:43:38 PM
  • raffo: Where can I find the fix for the shoutbox?
    November 01, 2016, 05:06:09 AM
  • {OCS}MasterSeal: To the SP team, I make a point to come here and thank you as much as possible for your work.  so again, THANK YOU!
    October 28, 2016, 10:38:05 AM
  • emanuele: That's indeed funny, the limit is present only in the patch and not the full install.
    October 22, 2016, 06:14:58 PM

* Recent Posts

Adding Forums Button to Nav bar by jirapon
[August 01, 2019, 09:07:12 AM]


Re: Board Icons by ♦ Ninja ZX-10RR ♦
[July 30, 2019, 04:03:41 PM]


MOVED: Czech translation???? by ♦ Ninja ZX-10RR ♦
[July 30, 2019, 03:04:51 PM]


Board Icons by jirapon
[July 30, 2019, 07:28:44 AM]


Re: Thankyou Simpleportal, by ♦ Ninja ZX-10RR ♦
[July 29, 2019, 09:41:29 AM]

Welcome to SimplePortal.net! You can download SimplePortal from the Downloads Area!

Author Topic: about calendar in SimplePortal 2 / SMF 1.1.X  (Read 71700 times)

0 Members and 8 Guests are viewing this topic.

Offline ???1031

  • ... feel not as a dev at the moment ...
  • Comrade
  • *
  • Posts: 789
  • Gender: Male
  • Overworked <<
  • SMF Version: None
  • SP Version: None
Re: about calendar in SimplePortal 2 / SMF 1.1.X
« Reply #40 on: November 11, 2008, 12:50:04 AM »
Maybe move this one to blocks board.
Thanks for mention this... i really did not see that it was in english support *drop*.

Quote from: AW06
but only events need some notice days in advance
I don't understand this...
Again... I'm having time problems...Normal Monday to Friday I'm at office from 6:00-16:00 (On my local time ;P).

Offline Aw06

  • Full Member
  • ***
  • Posts: 238
  • Gender: Male
    • www.ShopinJA.com
  • SMF Version: 1.1.13
  • SP Version: 2.3.2
Re: about calendar in SimplePortal 2 / SMF 1.1.X
« Reply #41 on: November 11, 2008, 09:00:25 AM »
Thanks for mention this... i really did not see that it was in english support *drop*.
I don't understand this...

ok, as you have it now .. events/birthdays/holidays only show up on the day it happens ..

But for events it would be good to give a few days notice, like if im having an auto show, id want it to be showing a few days before so people can plan for it, if it shows up on the actual day of the event allot of people may miss it ..

Offline ???1031

  • ... feel not as a dev at the moment ...
  • Comrade
  • *
  • Posts: 789
  • Gender: Male
  • Overworked <<
  • SMF Version: None
  • SP Version: None
Re: about calendar in SimplePortal 2 / SMF 1.1.X
« Reply #42 on: November 11, 2008, 09:31:41 AM »
Yes i understand it now, i made allready a version where you can select how many day in the future the script should look for events :). (Not official at the moment).
Again... I'm having time problems...Normal Monday to Friday I'm at office from 6:00-16:00 (On my local time ;P).

Offline Aw06

  • Full Member
  • ***
  • Posts: 238
  • Gender: Male
    • www.ShopinJA.com
  • SMF Version: 1.1.13
  • SP Version: 2.3.2
Re: about calendar in SimplePortal 2 / SMF 1.1.X
« Reply #43 on: November 11, 2008, 09:59:18 AM »
Yes i understand it now, i made allready a version where you can select how many day in the future the script should look for events :). (Not official at the moment).

ok, awaiting that release  ;D

Also, today is veterans day, and in the calender it just shows as V

Offline ???1031

  • ... feel not as a dev at the moment ...
  • Comrade
  • *
  • Posts: 789
  • Gender: Male
  • Overworked <<
  • SMF Version: None
  • SP Version: None
Re: about calendar in SimplePortal 2 / SMF 1.1.X
« Reply #44 on: November 11, 2008, 01:03:41 PM »
So this is V3 the most advanced Version

Here are the changes
Code: [Select]
! Error on today detection fix (not easy to understand xD)
! Fixed the bug on holidays
+ Add Javascript Changer, click on the day and the events, birthdays and holidays will be shown for that day
+ Add future events to the today output (you can set how many day in future it should look ;D, 0 = only today)
+ Add Weeks to the calendar
+ You can disable each of the new option
* Removed the edit link, i think this is not needed on such calendar

I've a display bug that i don't understand... i hope someone can help me with that. It looks good now, but it's not the way i wished for <<. (Remove the <?php and ?> before you insert it as php block (not needed for Version 2.1.1 and higher)) ;)

The code is attached to the post, i extend the post limit with the code ;P.

Sorry that the day order is not correct on the pic, but that is fixed xD.
« Last Edit: January 08, 2009, 02:44:34 AM by ???1031 »
Again... I'm having time problems...Normal Monday to Friday I'm at office from 6:00-16:00 (On my local time ;P).

Offline Aw06

  • Full Member
  • ***
  • Posts: 238
  • Gender: Male
    • www.ShopinJA.com
  • SMF Version: 1.1.13
  • SP Version: 2.3.2
Re: about calendar in SimplePortal 2 / SMF 1.1.X
« Reply #45 on: November 11, 2008, 02:55:14 PM »
Whats the display Bug ?

looks good for me
« Last Edit: November 11, 2008, 03:02:53 PM by Aw06 »

Offline Aw06

  • Full Member
  • ***
  • Posts: 238
  • Gender: Male
    • www.ShopinJA.com
  • SMF Version: 1.1.13
  • SP Version: 2.3.2
Re: about calendar in SimplePortal 2 / SMF 1.1.X
« Reply #46 on: November 11, 2008, 03:09:17 PM »
also .. we are asking much .. but when displaying event date .. could you make it show for example (Nov 11/08) instead of (11/11)

and i wish i could get the block just a little smaller .. its abit wide now, but i can live with it

 ;D
« Last Edit: November 11, 2008, 04:35:06 PM by Aw06 »

Offline Manu

  • Translator
  • *
  • Posts: 203
  • Gender: Female
  • Angel by Day, Devil by Night
    • Arsenie Official Forum
  • SMF Version: 2.0.2
  • SP Version: 2.3.5
Re: about calendar in SimplePortal 2 / SMF 1.1.X
« Reply #47 on: November 11, 2008, 07:14:00 PM »
@???1031

It works perfect and it looks perfect!!!  :applause:

Example of the calendar you can find here: http://forum.arseniums.com
Sometimes I'm an angel, sometimes I'm a devil, but I am always 100% woman and if you have a problem with me, learn to deal with it!

Offline ???1031

  • ... feel not as a dev at the moment ...
  • Comrade
  • *
  • Posts: 789
  • Gender: Male
  • Overworked <<
  • SMF Version: None
  • SP Version: None
Re: about calendar in SimplePortal 2 / SMF 1.1.X
« Reply #48 on: November 12, 2008, 02:01:11 AM »
also .. we are asking much .. but when displaying event date .. could you make it show for example (Nov 11/08) instead of (11/11)

and i wish i could get the block just a little smaller .. its abit wide now, but i can live with it

 ;D
You can disable the weeks ;). Than it will be smaller.
Hmmm i think i can insert the "Nov" item, it should be no problem :).
I will do that later if i have time.

Bye
DIN1031
Again... I'm having time problems...Normal Monday to Friday I'm at office from 6:00-16:00 (On my local time ;P).

Offline Aw06

  • Full Member
  • ***
  • Posts: 238
  • Gender: Male
    • www.ShopinJA.com
  • SMF Version: 1.1.13
  • SP Version: 2.3.2
Re: about calendar in SimplePortal 2 / SMF 1.1.X
« Reply #49 on: November 12, 2008, 09:53:46 AM »
maybe another bug .. i have no birthdays/holidays/events .. and the calender is showing 'no entries' would rather it be blank..  :in-love:
« Last Edit: November 12, 2008, 12:01:04 PM by Aw06 »

Offline amlucent

  • Jr. Member
  • **
  • Posts: 65
  • Gender: Male
    • The Good Old Days [Old] Guild
  • SMF Version: 2 RC3
  • SP Version: 2.3.2
Re: about calendar in SimplePortal 2 / SMF 1.1.X
« Reply #50 on: November 18, 2008, 04:00:26 PM »
I really love your calendar block! Great work! I am eagerly awaiting a release for SMF 2.0 

Offline hot rides

  • Semi Newbie
  • *
  • Posts: 42
    • Hot Rides Show & Cruise
Re: about calendar in SimplePortal 2 / SMF 1.1.X
« Reply #51 on: December 05, 2008, 11:24:28 AM »
@???1031

It works perfect and it looks perfect!!!  :applause:

Example of the calendar you can find here: http://forum.arseniums.com
Nice site Manu! I can't wait to put this calendar up on my site

Offline b-machinery

  • Semi Newbie
  • *
  • Posts: 8
  • Gender: Male
    • forum500.de
Re: about calendar in SimplePortal 2 / SMF 1.1.X
« Reply #52 on: January 01, 2009, 08:17:46 AM »
Hi there!

Happy new year to all!

I use this calendar block in my forum too, but since today I miss something. First, the monthname does not appear anymore in the headline, just "2009" is displayed. This could be corrected by changing the line 229
Code: [Select]
$title = $txt['months_titles'][$month].' '.$year;  //This is the SMF Text string, so it should be corrected for ut8 or iso
to
Code: [Select]
$title = $txt['months_titles'][(int)$month].' '.$year;  //This is the SMF Text string, so it should be corrected for ut8 or iso

But, birthdays are not shown too. I did not have the time to investigate why this is happening, but maybe someone of you has an idea on this.

BTW, checked this on some other sites using this great calendar block, they all have these problems!

@DIN1031: Pretty good work, thanks a lot!

Offline b-machinery

  • Semi Newbie
  • *
  • Posts: 8
  • Gender: Male
    • forum500.de
Re: about calendar in SimplePortal 2 / SMF 1.1.X
« Reply #53 on: January 04, 2009, 05:30:45 AM »
I checked for myself and found what causes the problem:

Search for
Code: [Select]
//Built Month low and high date :)
$low_date = $year.'-'.$month.'-01';
$high_date = $year.'-'.$month.'-'.$days_in_month;

and replace with
Code: [Select]
//Built Month low and high date :)
$low_date = $year.'-'.sprintf('%02d', $month).'-01';
$high_date = $year.'-'.sprintf('%02d', $month).'-'.$days_in_month;

Problem was that the month is needed in 2 digits.

Offline hot rides

  • Semi Newbie
  • *
  • Posts: 42
    • Hot Rides Show & Cruise
Re: about calendar in SimplePortal 2 / SMF 1.1.X
« Reply #54 on: January 06, 2009, 08:19:33 AM »
thanks for the fix b-m, I noticed the month not showing the other day but it didnt even click, lol

Offline ???1031

  • ... feel not as a dev at the moment ...
  • Comrade
  • *
  • Posts: 789
  • Gender: Male
  • Overworked <<
  • SMF Version: None
  • SP Version: None
Re: about calendar in SimplePortal 2 / SMF 1.1.X
« Reply #55 on: January 08, 2009, 02:33:06 AM »
Drop i allready fixed it, but forget to update my version... sorry for the problems :).

Thanks for the help b-machinery.
« Last Edit: January 08, 2009, 02:46:35 AM by ディン1031 »
Again... I'm having time problems...Normal Monday to Friday I'm at office from 6:00-16:00 (On my local time ;P).

Offline gyrene2083

  • Just Registered
  • Posts: 1
Re: about calendar in SimplePortal 2 / SMF 1.1.X
« Reply #56 on: February 06, 2009, 11:18:22 PM »
*Solved

I copied an older code. I updated with the new code, and it looks sweet!!!!

Quick question though, I copied both of the files in post, where do I, if I need it, paste the Calendar3block.php?

-Semper Fi
gyrene2083
« Last Edit: February 06, 2009, 11:40:20 PM by gyrene2083 »

Offline yield

  • Semi Newbie
  • *
  • Posts: 8
Re: about calendar in SimplePortal 2 / SMF 1.1.X
« Reply #57 on: February 22, 2009, 11:58:26 AM »
Hi! Thanks DIN1031 for your great work!

I would like to make a simple question: what I have to change to sort the upcoming events starting from with the "lower date"?

Example: There are two events, dated 23/Fev and 28/Fev. They show up like this:
Upcoming Events
28/02 event2
23/02 event1

and I would like this way:
Upcoming Events
23/02 event1
28/02 event2

Thank you!

Offline Smirnoff

  • Semi Newbie
  • *
  • Posts: 5
Re: about calendar in SimplePortal 2 / SMF 1.1.X
« Reply #58 on: March 02, 2009, 04:49:08 PM »
The calendar in my site is align to the left... how can i align the calendar to the center of the block?

Using Simple Portal 2.1.1 SMF 1.1.8
« Last Edit: March 02, 2009, 04:53:38 PM by Smirnoff »

Offline Neith

  • Semi Newbie
  • *
  • Posts: 12
Re: about calendar in SimplePortal 1.1.5
« Reply #59 on: March 13, 2009, 01:35:26 PM »
I finished step 3, but could not find the path on step 4....

Code: [Select]
<?php

require(dirname(__FILE__) . '/SSI.php');

?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title> << :: SMF SSI.php 1.1 :: >> </title><?php

echo 
'
<meta http-equiv="Content-Type" content="text/html; charset='
$context['character_set'], '" />
<link rel="stylesheet" type="text/css" href="'
$settings['default_theme_url'], '/style.css" />
<script language="JavaScript" type="text/javascript" src="'
$settings['default_theme_url'], '/script.js"></script>
<style type="text/css">
body
{
margin: 1ex;
}'
;

if ($context['browser']['needs_size_fix'])
echo '
@import('
$settings['default_theme_url'], '/fonts-compat.css);';

echo '
</style>'
;

?>

</head>
<body>
<h1>SMF SSI.php Functions</h1>
Current Version: 1.1<br />
<br />
This file is used to demonstrate the capabilities of SSI.php using PHP include functions.<br />
The examples show the include tag, then the results of it. Examples are separated by horizontal rules.<br />

<hr />

<br />
To use SSI.php in your page add at the very top of your page before the &lt;html&gt; tag on line 1:<br />
<div style="font-family: monospace;">
&lt;?php require(&quot;<?php echo addslashes($user_info['is_admin'] ? realpath($boarddir '/SSI.php') : 'SSI.php'); ?>&quot;); ?&gt;
</div>
<br />

<hr />

<h3>Recent Topics Function: &lt;?php ssi_recentTopics(); ?&gt;</h3>
<?php ssi_recentTopics(); flush(); ?>

<hr />

<h3>Recent Posts Function: &lt;?php ssi_recentPosts(); ?&gt;</h3>
<?php ssi_recentPosts(); flush(); ?>

<hr />

<h3>Recent Poll Function: &lt;?php ssi_recentPoll(); ?&gt;</h3>
<?php ssi_recentPoll(); flush(); ?>

<hr />

<h3>Top Boards Function: &lt;?php ssi_topBoards(); ?&gt;</h3>
<?php ssi_topBoards(); flush(); ?>

<hr />

<h3>Top Topics by View Function: &lt;?php ssi_topTopicsViews(); ?&gt;</h3>
<?php ssi_topTopicsViews(); flush(); ?>

<hr />

<h3>Top Topics by Replies Function: &lt;?php ssi_topTopicsReplies(); ?&gt;</h3>
<?php ssi_topTopicsReplies(); flush(); ?>

<hr />

<h3>Top Poll Function: &lt;?php ssi_topPoll(); ?&gt;</h3>
<?php ssi_topPoll(); flush(); ?>

<hr />

<h3>Top Poster Function: &lt;?php ssi_topPoster(); ?&gt;</h3>
<?php ssi_topPoster(); flush(); ?>

<hr />

<h3>Topic's Poll Function: &lt;?php ssi_showPoll($topic); ?&gt;</h3>
<?php ssi_showPoll(); flush(); ?>

<hr />

<h3>Latest Member Function: &lt;?php ssi_latestMember(); ?&gt;</h3>
<?php ssi_latestMember(); flush(); ?>

<hr />

<h3>Board Stats: &lt;?php ssi_boardStats(); ?&gt;</h3>
<?php ssi_boardStats(); flush(); ?>

<hr />

<h3>Who's Online Function: &lt;?php ssi_whosOnline(); ?&gt;</h3>
<?php ssi_whosOnline(); flush(); ?>

<hr />

<h3>Log Online Presence + Who's Online Function: &lt;?php ssi_logOnline(); ?&gt;</h3>
<?php ssi_logOnline(); flush(); ?>

<hr />

<h3>Welcome Function: &lt;?php ssi_welcome(); ?&gt;</h3>
<?php ssi_welcome(); flush(); ?>

<hr />

<h3>News Function: &lt;?php ssi_news(); ?&gt;</h3>
<?php ssi_news(); flush(); ?>

<hr />

<h3>Board News Function: &lt;?php ssi_boardNews(); ?&gt;</h3>
<?php ssi_boardNews(); flush(); ?>

<hr />

<h3>Menubar Function: &lt;?php ssi_menubar(); ?&gt;</h3>
<?php ssi_menubar(); flush(); ?>

<hr />

<h3>Quick Search Function: &lt;?php ssi_quickSearch(); ?&gt;</h3>
<?php ssi_quickSearch(); flush(); ?>

<hr />

<h3>Login Function: &lt;?php ssi_login(); ?&gt;</h3>
<?php ssi_login(); flush(); ?>

<hr />

<h3>Log Out Function: &lt;?php ssi_logout(); ?&gt;</h3>
<?php ssi_logout(); flush(); ?>

<hr />

<h3>Today's Birthdays Function: &lt;?php ssi_todaysBirthdays(); ?&gt;</h3>
<?php ssi_todaysBirthdays(); flush(); ?>

<hr />

<h3>Today's Holidays Function: &lt;?php ssi_todaysHolidays(); ?&gt;</h3>
<?php ssi_todaysHolidays(); flush(); ?>

<hr />

<h3>Today's Events Function: &lt;?php ssi_todaysEvents(); ?&gt;</h3>
<?php ssi_todaysEvents(); flush(); ?>

<hr />

<h3>Today's Calendar Function: &lt;?php ssi_todaysCalendar(); ?&gt;</h3>
<?php ssi_todaysCalendar(); flush(); ?>

<hr />

<h3>Recent Calendar Events Function: &lt;?php ssi_recentEvents(); ?&gt;</h3>
<?php ssi_recentEvents(); flush(); ?>

<hr />

<h3>Some notes on usage</h3>
All the functions have an output method parameter.  This can either be &quot;echo&quot; (the default) or &quot;array&quot;.<br />
If it is &quot;echo&quot;, the function will act normally - otherwise, it will return an array containing information about the requested task.<br />
For example, it might return a list of topics for ssi_recentTopics.<br />
<br />
<span onclick="if (getInnerHTML(this).indexOf('Bird') == -1) setInnerHTML(this, getInnerHTML(this) + '<br /><img src=&quot;http://www.simplemachines.org/images/chocobo.jpg&quot; title=&quot;Bird-san&quot; alt=&quot;Chocobo!&quot; />'); return false;">This functionality can be used to allow you to present the information in any way you wish.</span>

<hr />

<br />
<br />
<span style="color: #CCCCCC; font-size: smaller;">
<?php
echo 'This page took 'round(array_sum(explode(' 'microtime())) - array_sum(explode(' '$time_start)), 4), ' seconds to load.<br />';
?>

*ssi_examples.php last modified on <?php echo date('m/j/y'filemtime(__FILE__)); ?>
</span>
</body>
</html>

Should add it to Simple Portal on the next update. ;)

Am I looking in the wrong place? I changed this:
Code: [Select]
?php

require(dirname(__FILE__) . '/SSI.php');

?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>


to this:

Code: [Select]
?php

require(dirname(Calendar) . '/SSI.php');

?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>


I assume that's what I should be doing. I went back to my forum and nothing was there though. Im either wrong on this part or wrong on where I loaded it onto my server. Am I supposed to load it in a special place?

I just loaded it on there by it's lonesome as is.

I did not rename it and so it was named DIN1031 Calendar in my server. Do I need to rename it to Calendar?

I refuse to give up. Dont give up on me :p


« Last Edit: March 13, 2009, 06:32:36 PM by Neith »