Not logged in. · Lost password · Register
Forum: Customising UNB Modifications and plug-ins Plug-in gallery RSS
Calendar PlugIn
Adds an calendar to the board environment
Page:  1  2  3  4  5  next 
tkoneo #1
Member since Feb 2006 · 52 posts
Group memberships: Members
Show profile · Link to this post
Subject: Calendar PlugIn

Plug-in name:           Calendar
Plug-in version:        2.0 (13.05.2006)
Plug-in description:    Adds an calendar to the board environment
Author:                 Florian Fiedler
                        flofi_is at web.de
Compatiblity:           unb.stable.1.6.1
                        unb.dev.20060402
Download:               calendar_plugin_20060513.zip


This plug-in gives you a possibility to add a calendar to your board environment. The plug-in is designed to use posts for calendar entrys. Every post started in the calendar will be stored to a admin-defined forum.

In addition to the calendar plug-in I wrote a customaction so that you can define who is allowed to post to the calendar throu ACL's.
I added birthdays to the calender. Now if a user has entered it's birthday in his profil, the birthday will be shown with an icon and a link to the User's profile in the calendar.

New: I added the possibility to let the calendar plugin create announcements of the upcomming events. These announcements will be added & deleted automatically. I liked this becaus you offen fogett somthing that is stored anywhere in the calendar.

New: In addition to this I wrote a completly new calendar announcement section (You could see on the Screenshot). Where the post of the event of the actuall day is shown complete and for the next 3 days only the topics with date. ( I wrote that, because I get bored of the announcements, but I decided to let the announcement-creation in the source so that you can decide what you want to have on your Board). Both of these (announcement-creation & new announcement section) are confiurable in the config of the PlugIn. By default both are "off".

New: I added an calendar symbol in the thread view. So that you can easily see which threads are published in the calendar.

Feel free to give comments and make modifications ...
 
Screenshots:
[Image: ftp://ftp.tkozone.de/calendar_shot_small.jpg]
[Image: ftp://ftp.tkozone.de/calendar_new_entry_shot_small.jpg]
[Image: ftp://ftp.tkozone.de/calendar_conf_shot_small.jpg]
[Image: ftp://ftp.tkozone.de/calendar_announcement_shot_small.jpg]
[Image: ftp://ftp.tkozone.de/calendar_symbol_shot_small.jpg]

Installation instructions:

1. Unzip and copy files to your UNB folder as following:
  • calendar.en.php -> [UNB root]/unb_lib/plugins/
  • calendar.de.php -> [UNB root]/unb_lib/plugins/
  • calendar.inc.php -> [UNB root]/unb_lib/plugins/
  • calendar.lib.php -> [UNB root]/unb_lib/plugins/
  • calendar.php -> [UNB root]/unb_lib/plugins/
  • calendar.html -> [UNB root]/unb_lib/designs/modern/tpl/
  • calendar_next.png -> [UNB root]/unb_lib/designs/modern/img/
  • calendar_previous.png -> [UNB root]/unb_lib/designs/modern/img/
  • nav_calendar.png -> [UNB root]/unb_lib/designs/modern/img/
  • calendar_link.png -> [UNB root]/unb_lib/designs/modern/img/

2. Now to the hard part, patch the board files:
This is only needed, until Yves would implement my Hook's in his source.
I finished changing everything on my sourcecode to just call Hooks and make nomore changes in the original source code files. This is very important, because everytime a new verion of the board is coming out you have had to repatch the original files. If Yves implements my Hooks in his source there will be no patching anymore. I hope this happens in 1.6.2.

  • First of all you should make a backup of your original post.inc.php & main.inc.php placed under [UNB root]/unb_lib
  • And in the new version, also make a backup of forumlist.html in [UNB root]/unb_lib/designs/modern/tpl/ (this is nessessary for the new calendar announcement section)
  • Copy post.inc.php.diff & main.inc.php.diff to [UNB root]/unb_lib & forumlist.html.diff to [UNB root]/unb_lib/designs/modern/tpl/
  • Now patch the files by typing:
  • cat ./post.inc.php.diff | patch
  • cat ./main.inc.php.diff | patch
  • cat ./designs/modern/tpl/forumlist.html.diff | patch
  • I hope you'll get no rejects (If so, please let me know)

3. Well, you've done the hard work by now. At this place configure the plugin.
  • Create your forum that will be used as calendar (store).
  • Write the forum id down. 
  • Login with administrator priviledges and go to Settings -> Plug-ins.
  • Click on Settings for the plug-in named calendar.
  • Write in the forum id.
  • At this place you could also install the calendar table, just click "install calendar table automatic"
  • If the table was installed successfully the checkbox will disapear and another "calendar is installed" will be at this place
  • You could also delete the calendar table throu the configuration. (Attention: All data of the calender table will be lost)
  • New: You could chose if birthdays should be shown in calender
  • New: You could chose if you want the calender plugin to create announcements of the upcomming events.
  • New: You could chose if you want the new calendar announcement section should be shown on the mainpage.

5. (Optional) Use htaccess to get nice URLs
Add these rows at your htaccess file as last RewriteRule row:
# Add custom short URLs here:
RewriteRule ^calendar(;(.*))?$ forum.php?req=calendar&rewrite=$2 [L,QSA]

Features planned in next releases, the most important are first in list
  • Nothing planned at the moment.
  • More sugestions?

Version history:
  • 0.9 (07.03.2006)
    • Intial Version
  • 1.0 (09.03.2006)
    • Add table installation throu configuration
    • Minor bugfixes
  • 1.1 (19.03.2006)
    • Fixed table creation
    • Checkbox "calendar table is installed" disabled (much pretier)
  • 1.2 (21.03.2006)
    • Added birthday's to calenders
    • Minor bugfixes
    • post.inc.diff now only contains a hook that I need (Maybe Yves would implement it)
  • 2.0 (13.05.2006)
    • Really complet rewrite of the source
    • Fixed the change-date problem
    • calendar entrys could now be deleted :-)
    • Add possibility of announcement creation
    • Add new calendar announcement section on main page
    • Add calendar symbol for threads which are published in the calendar
    • Add devel branche support
    • A lot of minor and major bugfixes
The author has attached one file to this post:
calendar_plugin_20060513.zip 16.3 kBytes
You have no permission to open this file.
This post was edited 9 times, last on 2006-05-13, 17:07 by tkoneo.
Avatar
Einstein #2
Member since Dec 2005 · 68 posts · Location: Turku, Finland
Group memberships: Members
Show profile · Link to this post
Great plug-in ... I'll add it to my board "plans" :)
Info Page plug-in | My business | My forum
Avatar
Einstein #3
Member since Dec 2005 · 68 posts · Location: Turku, Finland
Group memberships: Members
Show profile · Link to this post
In reply to post #1
I'm waiting for downloading your plug-in ;)
Info Page plug-in | My business | My forum
tkoneo #4
Member since Feb 2006 · 52 posts
Group memberships: Members
Show profile · Link to this post
Hi Einstein,

sorry for being so late, but yesterday I've seen that I forgot to make the db-connect dynamic, this means if you installed my calender-plugin it would try to connect to my db on my server and not to yours.
I fixed this error!

Greets
TKONeo
Morty #5
Member since Sep 2005 · 52 posts
Group memberships: Members
Show profile · Link to this post
In reply to post #1
Quote by tkoneo on 2006-03-07, 01:49:
One problem was to add the calendar date to the post options. Therefore you must patch your current post.inc and your thread.lib. Sorry for this but I couldn't mention an other solution. If everyone could pleas let me know.
Do think that hooks would do the thing? I hate modifying source files becuase I always forgett them the next update. And AFAIK Yves is looking out for hooks. :-)
Unser forum: http://www.fsi-mechatronik.de/forum/
Avatar
Yves (Administrator) #6
User title: UNB developer & webmaster
Member since Jan 2004 · 3855 posts · Location: Erlangen, Germany
Group memberships: Administrators, Members
Show profile · Link to this post
Yes, if someone needs hooks, tell me please. I've still got some left to place in the code.
♪ ...nanananah, all in all we’re just brilliant thieves, nanananah... ♪♬
tkoneo #7
Member since Feb 2006 · 52 posts
Group memberships: Members
Show profile · Link to this post
I posted my hook request in the parent forum, because I would like to have this thread only discussion about the Plug-In itself.
Sorry I posted the request in German because it's my nativ language and I couldn't explain such complicated details in English (I think).

http://newsboard.unclassified.de/forum/post/6037

Greetings
TKONeo
bouton (Guest) #8
No profile available.
Link to this post
Subject: error in calendar creation sql
When I click on the calendar plugin under sadmin settings, with the 'install table' box checked I get

'create error: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near ')' at line 1'
Avatar
Yves (Administrator) #9
User title: UNB developer & webmaster
Member since Jan 2004 · 3855 posts · Location: Erlangen, Germany
Group memberships: Administrators, Members
Show profile · Link to this post
Could you please include the corresponding part of the UNB error log? The above error message is quite - well - useless... sorry
♪ ...nanananah, all in all we’re just brilliant thieves, nanananah... ♪♬
tkoneo #10
Member since Feb 2006 · 52 posts
Group memberships: Members
Show profile · Link to this post
does the UNB install right, by you? I do nothing else as Yves does in the install.php. Here is the code I use. Could anybody see a mistake?
  1. $UNB['Db']->CreateTable('Calendar',
  2.         '`ID` int(10) unsigned NOT NULL DEFAULT 0, ' .
  3.         '`Date` INT, ' .
  4.         'PRIMARY KEY (ID), '
  5.         ) or die('create error: ' . $UNB['Db']->LastError());
This post was edited on 2006-03-13, 23:05 by tkoneo.
bouton (Guest) #11
No profile available.
Link to this post
iam insytalling it inunb v 1.6.1

when I view plugins it lists calendar and calendaraction as installed

when I click on calendar/settings and tick install calendar table automatically and click save, I get the sql error message.
If I don't ckick install table, the calendar tab shows a the top, but when I click on the tab it says requested url not found
http://my.url.org/forums/calendar.


How do I get an error log?
bouton (Guest) #12
No profile available.
Link to this post
Never mind - found the error log

the SQL is CREATE TABLE `unb1_Calendar` (`ID` int(10) unsigned NOT NULL DEFAULT 0, `Date` INT, PRIMARY KEY (ID),)

there is an extra comma after primary key ID
bouton (Guest) #13
No profile available.
Link to this post
OK - got table created, calendar installed.

Now, when I click on the calendar tab at top of screen it comes up with the error 404 not found
my.website.org/forum/calendar
Avatar
Yves (Administrator) #14
User title: UNB developer & webmaster
Member since Jan 2004 · 3855 posts · Location: Erlangen, Germany
Group memberships: Administrators, Members
Show profile · Link to this post
To use the short URL, you likely need to modify your main .htaccess file. I see this isn't documented in the initial post. There should be an example line for "custompage" somewhere at the end of the rewrite rules.

Yes, the extra comma is the bug. Hard to find. But now as you said it... :)
♪ ...nanananah, all in all we’re just brilliant thieves, nanananah... ♪♬
Avatar
philipp #15
Member since Jul 2005 · 56 posts · Location: Sauerland (NRW)
Group memberships: Members
Show profile · Link to this post
Maybe this is a quite stupid question, but how do i have to patch the necessary files?
Where do i have to type "cat ./post.inc.php.diff | patch".

*edit*
oh, i see - it's an unix-only command.... :(
This post was edited on 2006-03-19, 16:20 by philipp.
Close Smaller – Larger + Reply to this post:
Verification code: VeriCode Please enter the word from the image into the text field below. (Type the letters only, lower case is okay.)
Smileys: :-) ;-) :-D :-p :blush: :cool: :rolleyes: :huh: :-/ <_< :-( :'( :#: :scared: 8-( :nuts: :-O
Special characters:
Page:  1  2  3  4  5  next 
Go to forum
This board is powered by the Unclassified NewsBoard software, 20120620-dev, © 2003-2011 by Yves Goergen
Page created in 219.4 ms (170.4 ms) · 132 database queries in 114 ms
Current time: 2013-05-20, 08:23:34 (UTC +02:00)