1 (edited by Gizzmo 2005-02-17 06:48)

Topic: Calendar 2.0

##
##
##        Mod title:  Calendar
##
##      Mod version:  2.0
##   WOrks on PunBB:  1.2.*
##     Release date:  2005-01-16
##           Author:  Michael Lanman (justgiz@justgizzmo.com)
##
##      Description:  Adds a calendar that shows topics, posts, birthdays, and
##                    events for the month. Also adds birthday entry to the 
##                    profile.
##
##   Affected files:  profile.php
##                    lang/English/profile.php
##
##       Affects DB:  Yes
##
##       DISCLAIMER:  Please note that "mods" are not officially supported by
##                    PunBB. Installation of this modification is done at your
##                    own risk. Backup your forum database and any and all
##                    applicable files before proceeding.
##

Download Here

Screen Shots:

http://www.punres.org/files/projects/pr_24/rid_76/Main%20Page.jpg
http://www.punres.org/files/projects/pr_24/rid_76/Add%20Event.jpg
http://www.punres.org/files/projects/pr_24/rid_76/Edit%20Event.jpg

Re: Calendar 2.0

When i run install_mod.php i get this:

An error was encountered
File: /www/phetast.nu/domix/~jrc/install_mod.php
Line: 26

PunBB reported: Unable to add column "some_column" to table "some_table"

Database reported: Table 'jrc.some_table' doesn't exist (Errno: 1146)

Re: Calendar 2.0

Dont hide the table names, we might need to see those to understand where the problem is occuring wink

BTW, this looks fricken sweet, Im going to install it tonight.

Great job smile

Indocron
$theQuestion = (2*b) || !(2*b);

4 (edited by Widell 2005-02-17 16:35)

Re: Calendar 2.0

Hide the tables?

I have tryed to understand this noe and as i read it, i should have the table some_table from the start but i havent?? In that case.. how do i get it?

Re: Calendar 2.0

he didn't change it the install_mod.php is wrong

    $db->query("ALTER TABLE ".$db->prefix."some_table ADD some_column TINYINT(1) NOT NULL DEFAULT 1") or error('Unable to add column "some_column" to table "some_table"', __FILE__, __LINE__, $db->error());

Re: Calendar 2.0

LOL

Re: Calendar 2.0

So what should it be Connorhd?

Re: Calendar 2.0

lol don't look at me its Gizzmos mod

Re: Calendar 2.0

Lol, thats great...

Guess i wont be installing it tonight sad

Indocron
$theQuestion = (2*b) || !(2*b);

10

Re: Calendar 2.0

in the previous i forgot to add the table calendar, that is in there now. sorry for that problem, it was late and i guess i was just excited to get it out. i noticed that befor i reuploaded the zip file there were 13 download. im glad everyone likes my mod :-D

11 (edited by Gary13579 2005-02-18 00:39)

Re: Calendar 2.0

An error was encountered
File: /home/indocron/public_html/forums/install_mod.php
Line: 26

PunBB reported: Unable to add column "birthday" to table "users"

Database reported: 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 '-0-0' at line 1 (Errno: 1064)

NOOO!

Edit:

    $db->query("ALTER TABLE ".$db->prefix."users ADD birthday varchar(10) NOT NULL DEFAULT 0-0-0") or error('Unable to add column "birthday" to table "users"', __FILE__, __LINE__, $db->error());

Should be

    $db->query("ALTER TABLE ".$db->prefix."users ADD birthday varchar(10) NOT NULL DEFAULT '0-0-0'") or error('Unable to add column "birthday" to table "users"', __FILE__, __LINE__, $db->error());

Else it will parse it as 0 minus 0 minus 0, which just makes no sense smile


Edit:

    $db->query("CREATE TABLE punn_calendar (id int(100) NOT NULL auto_increment, date date NOT NULL default '0000-00-00', title varchar(255) NOT NULL default '', body text NOT NULL, user_id int(100) NOT NULL default '0', UNIQUE KEY id (id))") or error('Unable to add table "calendar"', __FILE__, __LINE__, $db->error());

Should be

    $db->query("CREATE TABLE ".$db->prefix."calendar (id int(100) NOT NULL auto_increment, date date NOT NULL default '0000-00-00', title varchar(255) NOT NULL default '', body text NOT NULL, user_id int(100) NOT NULL default '0', UNIQUE KEY id (id))") or error('Unable to add table "calendar"', __FILE__, __LINE__, $db->error());
Indocron
$theQuestion = (2*b) || !(2*b);

12

Re: Calendar 2.0

ever single mod i make i miss something. shess and i always feel bad,...reuploaded...

13 (edited by Gary13579 2005-02-18 00:53)

Re: Calendar 2.0

Editing a post anymore times is just wrong...

When Im adding an event, I think something is wrong with the HTML.
Event title i can type in fine. I move to the month. I select 'March'.
Then I move to date. I click to open the menu, and i release the button, and it closes the list (almost Mac > 9) and selects the Month list again.

I also cant type in the year for the same reason

Edit: odd, I get this error when trying to add an event for Febuaray 31st wink

Notice: Undefined index: 31 in /home/indocron/public_html/forums/calendar.php on line 49

It lists it as March 3rd big_smile

Edit: You need to allow us to delete events

Indocron
$theQuestion = (2*b) || !(2*b);

14

Re: Calendar 2.0

with the first thing not bein able to select the day or type a year, im haveing the same problem and im clueless on that.

the febuary 31 thing, ill set up a check to see if the day is in the month selected

15 (edited by Gary13579 2005-02-18 01:14)

Re: Calendar 2.0

Ohh, I didnt see your post after my first one.

Dont feel bad, I tear stuff apart just to see what happens smile
A normal user wouldnt want to make an event on a day that doesnt exist.

Edit: Oh no, whats this? It needs register_globals to be on?
Instead of using

if(empty($t)&& empty($action))

use

if (empty($_GET['t']) && empty($_GET['action']))

Do the same for all the other times you use $t and $action.

Indocron
$theQuestion = (2*b) || !(2*b);

16 (edited by Ulph 2005-02-18 01:21)

Re: Calendar 2.0

Hi,

This looks like a very nice mod! The birthday functionality requires changes to an already existing database table and it is also responsible for most of the changes to the main code. Not having a birthday feature would make installation easier!

17

Re: Calendar 2.0

Ulph, if you dont want birthdays,i beleave you can just dont edit prifile.php. you still need to do the sql change cuz the calendar feeds from that also. but if everyones birthdays are '0-0-0' they wont show on the calendar. but im not sure, havent tested it.

18 (edited by Azakur4 2005-02-18 07:17)

Re: Calendar 2.0

this mod have problem when you add a new event.

when you write the new event and select the month this don't select the day and don't write the year

when you edit a event it happens the same error

El Mejor Lugar de la Red - Corporación Azakur4

19

Re: Calendar 2.0

i know about this bug, it seems to work fine in IE tho. im clueless, any html buffs wana help? to my eye the html looks fine, but im stumped on whats goin on. ill look more in the morning.

20 (edited by Widell 2005-02-18 14:59)

Re: Calendar 2.0

When i add an event it says:

An error was encountered
Error: Unable to create new event.

edit: this is becouse i try to write moore than 1 row. how long can the body be? why now moore than 1 row?

21 (edited by Gary13579 2005-02-18 15:45)

Re: Calendar 2.0

Could you give us more info, like what error is occruing?
I think you might have to enable debug mode to see the SQL error, but im not possitive

Edit:
http://forums.indocron.net/calendar.php … &day=1

Notice: Undefined variable: avatar in /home/indocron/public_html/forums/calendar.php on line 471

sad

Indocron
$theQuestion = (2*b) || !(2*b);

22

Re: Calendar 2.0

It says (Single day event) on the ones i added, how do i add events that i more than one day?

23 (edited by Gary13579 2005-02-18 16:10)

Re: Calendar 2.0

Add them multiple times smile

LOL

Indocron
$theQuestion = (2*b) || !(2*b);

24

Re: Calendar 2.0

no, it still says (Single day event)

lol right back at ya tongue

25 (edited by Azakur4 2005-02-18 17:12)

Re: Calendar 2.0

i found one bug, when i add an event and i don't put the date, this event is added in the database but not appear  in the calendar and generate problems.

El Mejor Lugar de la Red - Corporación Azakur4