News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

Enhanced Calendar

Started by Daniel15, January 29, 2007, 11:54:55 PM

Previous topic - Next topic

SpelingMistakes

#60
My mistake – Sorry to all

Simply last event in March was ended yesterday - I didn't noticed that next was scheduled around 16 or 17 April, which left field for upcoming events empty :(

:( Sorry


Question

Can I solve my problem of events which repeat every year – I didn't notice that in this mod! – Am I push to install another one or?
There is a huge difference between living and being alive!

Zuma

#61
Hi, package was installed fine, but I'm getting this error trying to display Calendar:

QuoteParse error: syntax error, unexpected $end, expecting ',' or ')' in /home/mfclanc/public_html/forum2/Sources/Calendar.php on line 689

I went to check Calendar.php file, the code ends in line 689 like this:

// If you're not allowed to edit any events, you have to be the poster.
if ($_REQUEST['eventid'] > 0 && !allowedTo('calendar_edit_any'))
{
// Get the event's poster.
$request = db_query("
SELECT ID_MEMBER
FROM {$db_prefix}calendar
WHERE ID_EVENT = $_REQUEST[eventid]
LIMIT 1", __FILE__, __LINE__);
list ($pos

Zuma

#62
Could anybody help me?

All I need is the rest of the code... if anyone could copy and paste both calendar.php and calendar.template.php here that would help a lot. =p

ty


Zuma

No help then =/

alright I'll just uninstall the mod, anyway thanks for making it.

gdoermann

I love this mod.  I think it would be nice to have a few other features though... (I don't know php yet... so... I just have to request them here).  It would be nice to have:

- Print preview and calender printing
- Attendee's list
- Add times to entries
- Maybe a quick add at the bottom

RoarinRow

Quote from: The_Abhorred on April 08, 2007, 04:41:45 PM
i need to move the enchanced sidebar thing to the right, because my tinyportal panels are on the left, thanks

I wanted to keep this mod, but my Tiny Portal blocks kept pushing the page out making people scroll left to right.

Anyone have a fix for this?

SMF 2.0
TP 1.0 RC1.1
Wordpress 3.1.3

babjusi

Quote from: RoarinRow on May 08, 2007, 10:27:08 PM
Quote from: The_Abhorred on April 08, 2007, 04:41:45 PM
i need to move the enchanced sidebar thing to the right, because my tinyportal panels are on the left, thanks

I wanted to keep this mod, but my Tiny Portal blocks kept pushing the page out making people scroll left to right.

Anyone have a fix for this?

I have this mod and TinyPortal as well, and it hasn''t given me any kind of problem so far.

RoarinRow

Quote from: babjusi on May 11, 2007, 12:21:26 AM
Quote from: RoarinRow on May 08, 2007, 10:27:08 PM
Quote from: The_Abhorred on April 08, 2007, 04:41:45 PM
i need to move the enchanced sidebar thing to the right, because my tinyportal panels are on the left, thanks

I wanted to keep this mod, but my Tiny Portal blocks kept pushing the page out making people scroll left to right.

Anyone have a fix for this?

I have this mod and TinyPortal as well, and it hasn''t given me any kind of problem so far.

probably depends on what theme you're using.  i'm using Azure_TP.

SMF 2.0
TP 1.0 RC1.1
Wordpress 3.1.3

babjusi

Quote from: RoarinRow on May 11, 2007, 12:49:17 AM
Quote from: babjusi on May 11, 2007, 12:21:26 AM
Quote from: RoarinRow on May 08, 2007, 10:27:08 PM
Quote from: The_Abhorred on April 08, 2007, 04:41:45 PM
i need to move the enchanced sidebar thing to the right, because my tinyportal panels are on the left, thanks

I wanted to keep this mod, but my Tiny Portal blocks kept pushing the page out making people scroll left to right.

Anyone have a fix for this?

I have this mod and TinyPortal as well, and it hasn''t given me any kind of problem so far.

probably depends on what theme you're using.  i'm using Azure_TP.

That could be it then, I am using the default theme.
What language are u using as a default for your forum, by the way?

RoarinRow

Quote from: babjusi on May 11, 2007, 01:22:40 AM
Quote from: RoarinRow on May 11, 2007, 12:49:17 AM
Quote from: babjusi on May 11, 2007, 12:21:26 AM
Quote from: RoarinRow on May 08, 2007, 10:27:08 PM
Quote from: The_Abhorred on April 08, 2007, 04:41:45 PM
i need to move the enchanced sidebar thing to the right, because my tinyportal panels are on the left, thanks

I wanted to keep this mod, but my Tiny Portal blocks kept pushing the page out making people scroll left to right.

Anyone have a fix for this?

I have this mod and TinyPortal as well, and it hasn''t given me any kind of problem so far.

probably depends on what theme you're using.  i'm using Azure_TP.

That could be it then, I am using the default theme.
What language are u using as a default for your forum, by the way?

English 

SMF 2.0
TP 1.0 RC1.1
Wordpress 3.1.3

manudevil

It is a great mod, which works well on 1.1.2, in french, and with other themes. Thanks !

http://alter-tare.manudevil.info
http://forum.crazy-orc.org

Pierre29200

I am getting an error installing it on SMF 1.1.2

Installing this package will perform the following actions: 
Type Action Description
1. Execute Modification - Modification parse error

So after to try many thing among them unstall other mods, chmod to 777 Packages, create a new temp folder inside Packages with 777 chmod, i decide to install manually using SMF Package Parser

So i modify manually the two files supplied in this mod :
Sources/calendar.php
Themes/default/Calendar.template.php

I keep the original files with the names :
Sources/calendar.php~
Themes/default/Calendar.template.php~

I put in a zip files these 4 files - two original files and the two modified files - and the copy of SMF Package Parser who show every modification.

Hoping it helps,

Pierre
Pierre/Brest/Bretagne/France
PowerBook G4 1,5 Ghz/1 Go/160 Mo/Mac OS 10.4.8
NeoOffice 2.1
OpenOffice 2.1
Microsoft Word X Release 1
Seamonkey 1.1.1

nunomoc

I don't know if it's just me but I've tried to install it through the Package Manager and it gave me an error.

I decided to do it manually and I've detected the problem...

On the file install.xml where it says:

Quote<operation>
         <search position="before"><![CDATA[
            'birthdays' => !empty($bday[$date]) ? $bday[$date] : array()
         );
      }
   }
]]></search>

Should be :

Quote<operation>
         <search position="after"><![CDATA[
            'birthdays' => !empty($bday[$date]) ? $bday[$date] : array()
         );
      }
   }
]]></search>

With this little modification the MOD works perfect on my system. Hope it helps!  :D

Pierre29200

Quote from: nunomoc on June 14, 2007, 10:37:12 AM
I don't know if it's just me but I've tried to install it through the Package Manager and it gave me an error.

I decided to do it manually and I've detected the problem...

On the file install.xml where it says:

Quote<operation>
         <search position="before"><![CDATA[
            'birthdays' => !empty($bday[$date]) ? $bday[$date] : array()
         );
      }
   }
]]></search>

Should be :

Quote<operation>
         <search position="after"><![CDATA[
            'birthdays' => !empty($bday[$date]) ? $bday[$date] : array()
         );
      }
   }
]]></search>

With this little modification the MOD works perfect on my system. Hope it helps!  :D

I was very interesting with your experience.
So i decide to verify for me.
So :
1) i try to replace the code :
'birthdays' => !empty($bday[$date]) ? $bday[$date] : array()

);

}

by copy and past from my Calendar.php file into install.xml file of the Calendar_1-1.zip mod.

I compress again the package and want install it :
It does not work but the install error was different. So i find it very strange it was not the same error than for original zip file.

2) I do your modification in the install.xml file
i replace before by after.
It seems  bad for me because when i read this topic :
http://docs.simplemachines.org/index.php?topic=402.0
i can read that :
after - Find the code and add the specified code before it (same as <add before>...</add before>)
before - Find the code and add the specified code after it (same as <add after>...</add after>)
So i can understand why your solution works but i want to try it.
So i compress the files of the mod with modified install.xml file as you tell.
And i can install the mod without error !
But, when i want display Calendar, it's impossible because parse error.
I think it's not the good solution but you help me to understand !
So i do a third thing :

3) After unzip the mod that i download, i compress it again and try to install my zipped file.
I install that without error and it works here :
http://psychostages.org/forum/index.php?action=calendar

So we can do the following conclusion :
the problem is only with some strange thing according to compression of this mod.

So i joined my zipped file mod for who wants try it !
When you unzip, it's exactly the original files !

Enjoy !

Pierre

Pierre/Brest/Bretagne/France
PowerBook G4 1,5 Ghz/1 Go/160 Mo/Mac OS 10.4.8
NeoOffice 2.1
OpenOffice 2.1
Microsoft Word X Release 1
Seamonkey 1.1.1

nunomoc

Pierre, my advice to you is to get the original files and do the manual install.
Do not try to install it through the Package Manager.
Do the manual install following all the steps with the modification I told above.

Another option you can do is try my altered files. Maybe they'll help you.


nunomoc

#75
For those of you getting the error after install I'll try to explain better:

On the installation file (install.xml) there is a step that orders the following:

Quote<operation>
         <search position="before"><![CDATA[
            'birthdays' => !empty($bday[$date]) ? $bday[$date] : array()
         );
      }
   }
]]></search>

This means that according to this step, the following code will be placed before 'birthdays'.

Quote// Iterate through each week.
   $context['prevMonthWeeks'] = array();
   for ($nRowPrev = 0; $nRowPrev < $nRowsPrev; $nRowPrev++)
   {
      // This is the week number assigned as a key to limit results to a certain week.
      $number = $firstDayOfPrevMonth['weekNum'] + $nRowPrev + $nWeekAdjust&nbsp; + ($curPage['month'] == 1 ? -1 : 0);;

      // Start off the week - and don't let it go above 52, since that's the number of weeks in a year.
      $context['prevMonthWeeks'][$number] = array(
         'days' => array(),
         'number' => $firstDayOfPrevMonth['weekNum'] + $nRowPrev + $nWeekAdjust,
         'week' => $scripturl . '?action=calendar;year=' . $curPagePrev['year'] . ';month=' . $curPagePrev['month'] . ';week=' . $number,
      );
      // Handle the dreaded "week 53", it can happen, but only once in a blue moon ;)
      if ($context['prevMonthWeeks'][$number]['number'] == 53 && $nShiftPrev != 4)
         $context['prevMonthWeeks'][$number]['number'] = 1;

      // And figure out all the days.
      for ($nCol = 0; $nCol < 7; $nCol++)
      {
         $nDay = ($nRowPrev * 7) + $nCol - $nShiftPrev + 1;

         if ($nDay < 1 || $nDay > $context['last_day_prev'])
            $nDay = 0;

         $date = sprintf('%04d-%02d-%02d', $curPagePrev['year'], $curPagePrev['month'], $nDay);

         $context['prevMonthWeeks'][$number]['days'][$nCol] = array(
            'day' => $nDay,
            'date' => $date,
            'is_today' => $date == $today['date'],
            'is_first_day' => !empty($modSettings['cal_showweeknum']) && (($firstDayOfPrevMonth['dayOfWeek'] + $nDay - 1) % 7 == $nStartDay),
         );
      }
   }

   $context['nextMonthWeeks'] = array();
   for ($nRowNext = 0; $nRowNext < $nRowsNext; $nRowNext++)
   {
      // This is the week number assigned as a key to limit results to a certain week.
      $number = $firstDayOfNextMonth['weekNum'] + $nRowNext + $nWeekAdjust + ($curPage['month'] == 12 ? 1 : 0);

      // Start off the week - and don't let it go above 52, since that's the number of weeks in a year.
      $context['nextMonthWeeks'][$number] = array(
         'days' => array(),
         'number' => $firstDayOfNextMonth['weekNum'] + $nRowNext + $nWeekAdjust,
         'week' => $scripturl . '?action=calendar;year=' . $curPageNext['year'] . ';month=' . $curPageNext['month'] . ';week=' . $number,

      );
      // Handle the dreaded "week 53", it can happen, but only once in a blue moon ;)
      if ($context['nextMonthWeeks'][$number]['number'] == 53 && $nShiftNext != 4)
         $context['nextMonthWeeks'][$number]['number'] = 1;

      // And figure out all the days.
      for ($nCol = 0; $nCol < 7; $nCol++)
      {
         $nDay = ($nRowNext * 7) + $nCol - $nShiftNext + 1;

         if ($nDay < 1 || $nDay > $context['last_day_prev'])
            $nDay = 0;

         $date = sprintf('%04d-%02d-%02d', $curPageNext['year'], $curPageNext['month'], $nDay);

         $context['nextMonthWeeks'][$number]['days'][$nCol] = array(
            'day' => $nDay,
            'date' => $date,
            'is_today' => $date == $today['date'],
            'is_first_day' => !empty($modSettings['cal_showweeknum']) && (($firstDayOfNextMonth['dayOfWeek'] + $nDay - 1) % 7 == $nStartDay),
            'week' => $scripturl . '?action=calendar;year=' . $curPageNext['year'] . ';month=' . $curPageNext['month'] . ';week=' . $number,
         );
      }
   }

If you let do the install through the package manager you'll get errors because the code in pink is incorrect.
It shouldn't place the code above before 'birthdays' but after that code. So, if you do a manual install try searching the position after the following code and add the code above. If you're having problems with the file is because probably you already have the code inserted before birthdays. So please cut the code from the wrong place and paste it after...

Below you have what should be the correct order on the install file. It worked for me when I did the manual install. I did not install this package through the package manager.

Quote<operation>
         <search position="after"><![CDATA[
            'birthdays' => !empty($bday[$date]) ? $bday[$date] : array()
         );
      }
   }

]]></search>

So, looking at this post, please edit your calendar.php file, search for birthdays and retrieve the code in red that has been wrongly placed before birthdays and paste it after the code in blue.

tpruessner

Type Action Description
1. Execute Modification - Modification parse error

I am getting this error and I am having a hard time figuring out what exactly I need to do?  There are several fixes but which one is the one I need to do?

Thank you!

Reekie_Red

Nice mod. I got it to work, and it's especially handy for me as I'm running a soccer website and it's quite a handy feature to have to display fixtures.

Couple of queries ... what's the point in the small calendars to the left of the main one? They appear to do nothing! Is my calendar installed incorrectly? All I see is the two side calendars with no notification of whether there's something happening on a particular date.

Also, is there any way of getting, say, the next 3 or 4 days of the calendar that have entries in them to appear at the top of the index?

fyi my site is www.donstalk.co.uk and the calendar link has been changed, so now it's called "Fixtures"

Reekie_Red

Any ideas? Basically I am seeing "Upcoming Calendar" events at the foot of my index page.

But none of these calendar events have DATES! This is pretty useless when people viewing my site want to be able to see WHEN these events happen ... rather than just seeing that they're happening soon.

Perhaps if there's a way of extending the amount of text I can enter into each date ... does anyone know how I can alter the template so that I can type more into each event so that I can, for example, type in the date of the event?

Or perhaps have the actual date of the even appearing on my index page?

www.donstalk.co.uk

wjhdiz

Hi,

Is there a way to add additional fields to make the calendar like:

http://supercali.inforest.com/demo_calendar/

Any suggestions are greatly appreciated.

Jimmy
Freedom of speech? It is freer if not speaking out.
Believing in God? Yes, talk with God every day through God creations.
Coding is poem and a way of keeping away from the troubled world.

Advertisement: