View Full Version : Calendar v1.0
Here is the Calendar (finally) v1.03
http://www.hedgehogwheels.com/hacks/calendar1.03.zip
[Features]
- Users can add Private events that only they can see
- Admin can set usergroups to allow those selected to post public events that everyone sees
- Behaves just like a message with smilies, bbcode, etc
- Months are options in Control Panel for easier language changes
- Can specify 0,1, or 2 images to display above each month
[demo]
http://www.hedgehogwheels.com/forums/calendar.php
I do need to update the birthday hack to support birthyear as it is on my forum. I am not sure if the calendar will work as is with the previous birthday hack. If not then just turn that option off in the control panel for now.
[Edited by freddie on 11-18-2000 at 07:48 PM]
Hello Freddie,
Your the man....I'll let you know how the install goes.
Thanks. :)
Freddie,
I've not tried the calendar hack myself, but am very very interested in it. Here are some things you might want to look into (I haven't tested it myself so some might not be issues at all):
- does it delete past events or does it keep it forever? This should be a configurable option in the admin
- flood protection? Limit to X events per day per user, with each event limited to Y characters
- email notification (user-configurable) of up-coming events (wait, I just saw that this will be in the up-coming v1.1 !!)
- repeating events (per week/day of the week/month/year). This would be great for students who can then set their class schedules through the calendar hack
- events not just based on date, but also on time of the day
The events should be archivable, set by the admin, say any events after 6 months...this way users can go back and see what happened last month.
Right now the events will just stay on the calender and you can see them by going back to the month.
Jim did you install it yet? I want to know if it works or not. I attempted to write instructions for with PMs or not but I didn't actually test it with PMs installed.
I do think you may have problems as the changes in global.php probably won't match what you have in v1.1.3
I will be installing it at Sitepoint tomorrow. So i'll let you know. Looks fabulous by the way.
Hello Freddie,
Your right....the instructions don't work for 1.13. Any chance I can get you to make them?
thanks.
Oh the mod doesnt work for 1.13?
shoooot
i was looking forward to trying it out too.
Looks awesome!
I'm gonna wait til 2.0 until I look too closely at it, but could it be altered so that it works like our current system at http://www.ten-tenths.com/calendar ? Would be very handy if it could.
With Just For You being made compatible with vB and the many hacks now available for vB, it really is gonna be possible to run the whole site from it soon! :)
Hello Freddie
Install instructions worked fine on my off-line test server. Just one small cosmetic issue seen - the new options in the Admin|Change options don't pick up the CSS defined text attributes. I think <p> </p> would need to be added to each table cell.
Mike
New Rider (http://www.newrider.com)
Works just fine with PM already installed on 1.1.4.
I hope we'll see this in 2.0 :)
Yes Mike I noticed that there seem to be <p> and </p> around everything in the options section. I developed this on my 1.1.3 and then wrote instructions for it as I applied it to v1.1.4 which seems to have the <p>'s. I just didn't feel like inserting them everywhere so it is like that because I was lazy :)
I will try to update the instructions for v1.1.3 today.
Craig how about I make a switch so you can view the calendar as it is now OR you can view it as your calendar appears.
That sounds superb! I am thinking of including it on the home page of the site, so it would be really great if this were possible :)
i would just LOVE TO SAY WOW. this is a great hack.
i am in love with this idea.
if you don't want to hear a request from me, don't read anymore. but a great request would be email notification. a day or so before the event happens.
BUT THIS IS GREAT ANYWAYS....
Everyone wants the calendar to send email notifications.
Great idea but how does one implement such a feature on a system that is not in running state to send out emails based on a timer ala a cron job.
One could place checks in global.php that check the current day and if there are events tomorrow then send out emails. After sending the emails than the check could be reset. I see no way to not have this check being run everytime someone loads a page on the board as global.php is always loaded. We could specify that the checks only be ran between the hours of 3am and 5 am for example (or 3pm to 5 pm) but what if no one logs onto your board in that time window? The checks would not be ran and the emails would not be sent out so the need for a system that is forced to always check the time. It is too kludgey for me so if anyone has suggestions on how to do this than shoot them out. How do we decide to send emails out regarding public events? Is everyone who has "allow forum admins send you email" going to recieve a notice about tomorrows events or do we add a check that asks them to "subscribe to calendar events" or even yet do we asked them to subscribe to individual events as they want.
Originally posted by freddie
Everyone wants the calendar to send email notifications.
Great idea but how does one implement such a feature on a system that is not in running state to send out emails based on a timer ala a cron job.
The only reasonable way (efficient, scalable, and cpu friendly) is via cron job. It would eat up tons of cpu cycles if the email functions were called with every hit to one's forum.
To do the cron job is relatively easy I think, but one would have to use Perl and query the database, say, once every hour?
Do you know Perl Freddie? I can help out in this area, but would need to know more specific details since I've not yet looked at the hack's database structure much.
How do we decide to send emails out regarding public events? Is everyone who has "allow forum admins send you email" going to recieve a notice about tomorrows events or do we add a check that asks them to "subscribe to calendar events" or even yet do we asked them to subscribe to individual events as they want.
I think by default sending emails out regarding public events should be OFF. Why? Because those usually are not important personal events for users, and some might hate it. Besides, imagine if you have 30,000 users. That would be pretty painful for your mail system.
Just have an option where users can choose to "subscribe" to public events. Start with the least and let users "opt in" for more. Same should go with private events. A check mark for "notify via email" should be there for them.
Sorry but I am not going to get into creating something that requires external sources. You are welcome to do that but I won't...Also one can run PHP scripts like PERL from the command line so it is not an issue of knowing PERL.
Okay, Installed it at SitePoint. Birthday's don't show up. I am pretty sure that it is because you added year to is. I don't really want the year so will look at the previous code and see if I can get it to work. Great Job though. Have already entered in a couple of legitimate events with a lot more to come.
Originally posted by freddie
Sorry but I am not going to get into creating something that requires external sources. You are welcome to do that but I won't...Also one can run PHP scripts like PERL from the command line so it is not an issue of knowing PERL.
Why is that? I'm just wondering....
Why not do this???
Put in reminders but do it this way:
Build a Reminder Table containing UserID, EventID, Reminder Date/Time
At that user's login check all reminders for that particular time.
Forward a Private Message to the user from the system about the Reminder.
Give the User the opportunity to reset the reminder in the Private message.
Delete all the reminders after they are sent (hence the reset).
This performs several purposes. One the member gets a visual que via private messaging about their events. Two there are no external resources involved. Three depending on settings the user will recieve an email. Four It only checks for reminders when they log in and only theirs so if one user has a lot of reminders set it won't slow down other users. Five it will work more like established PIM systems like Outlook.
Wluke : we can do that when v2.0 is released with the by default PM's.
I was actually thinking the same thing. :)
SitePoint won't be getting PM's and Poll's until that time as it is. Those introduce too many factors that can screw up an easy upgrade in my opinion. Great Features, I am just worried about my particular installation of vBulletin and the time I can devote to it.
*bump*
freddie, whats the ETA for the Calendar instructions for 1.13?
My vb is too heavily modified so I dont particularly want to go through the proces of upgrading to 1.14 seeing 2 is just around the corner.
I would however love to get this calendar addon running.
I suggest you just replace the bbcodeparse2 function you have with the equivalent function from v1.1.4. (it is in global.php).
The instructions will then work and you will gain from optimizations from the new function.
Freddie-
How would this work as a stand alone application, apart from vB? I need something exactly like this for one of the sites I'm developing for work. Is this script dependent on much vBulletin code? Maybe I'll download it and take a look at it at work tomorrow, and see what I can figure out myself. Otherwise, my company would probably be very willing to throw some cash your way to help us develop this as a stand alone script.
Let me know what you think.
-jim
It just reads info from the user table of vBulletin. Beyond that it is on its own. I could do what you ask but there are several "calendar" apps available though I don't know of any written in PHP. Give me more info via Email.
I installed the calendar hack on 1.1.3 and it works great! :D
However, I have one small request to add along with the others. Can you add an Email event to a friend" feature!
I would love to see that feature added! ;)
Freddie-
Just installed this on my vB - just wanted to give you a heads up that the date of an event is displayed as "F 31800, 2000" for November 13. I'm using 1.1.4, though I doubt that matters.
As for my other post, looking over the code, I think I'll be able to figure most of it out after playing around with it for a little while at work tomorrow. If it starts taking too much time, I'll shoot you an email.
-jim
Jim I'm thinking different versions of MySQL are returning inconsistent Dates as I used a MySQL function to apply the same dat format to the calendar dates that you set in your control panel for thread dates.
One small problem I am having is that it is showing my dates as:
F jS, Y
When I view an event. Any ideas?
Obviously the way I chose to apply the date format is not portable across all versions of PHP and Mysql as you can see it works on my forum. I will look into changing the way I do it.
I noticed that it worked on your forums. I am running version 4.0.2 of PHP and version 3.23.24 for MySQL.
I installed it and I love it. The only thing is birthdays past the year 2000 dont show because I dont have the year added in the birthday hack. Anyway to make this work without the birth year? Just display the birthdays every year?? I personally dont want the year and I think this would be sweet if I could get it working
Thanks
~Chris
freddie:
The date is screwed up on my server too. And the $postedby isn't working either. I get the F 31900, 2000
instead of the date and then nothing after this.
Thanks,
Parker
$postedby simply has to work - it only shows for public events. I will try to look at all these php/mysql issues today.
Freddie,
Your calendar hack rocks! I have one question though, and I feel dumb asking it- where do you add public events? I see a private events button on yours and mine, but I don't see any place, either on the calendar or in the control panel for public events. Am I missing something or do I need to add something to one of the templates?
Thanks, and great job!
TigerLily:)
If you don't see the button then you don't have access to add the event. By default only Admins and Super Mods will have access. You have to edit the usergroups of anyone else to grant them access.
Thanks for your quick reply, Freddie! It looks like when I imported my users from UBB (and myself) that somehow I am set as a moderator not an admin, although I have admin functions. That would explain the problem- just have to change a few things.
Thanks!
TigerLily:)
Update: fixed it! Thanks again!
[Edited by TigerLily on 11-14-2000 at 11:42 PM]
Ok v1.02 is now available.
- Fixes bug regarding date displays
- Adds names of months to Control Panel for easy language changes
- Adds ability to specify 0,1, or 2 images for display above each month (i.e. Santa.gif for December)
http://www.hedgehogwheels.com/hacks/calendar1.02.zip
Upgrade instructions are included. If you have already hacked calendar.php or the calendar template than you will have to rehack :)
So, is it safe to download the Calender hack 1.2 now? :)
(edited bit)
Heh, must have posted at the same time because right after I posted I closed the browser without looking above it :p
Good work freddie, I'll be working on putting this on my board as soon as I can. Btw, I liked the way you setup the favorites install hack so that it's just as easy to remove as it is to add it :)
Keep up the good work!
[Edited by RichC on 11-15-2000 at 09:20 AM]
Thanks Freddie! I uploaded the changes in less than 5 minutes. Thanks for making this such an easy hack to upgrade- I love the new pics feature!
TigerLily:)
Wow, got it up and running pretty easily (after I realized that I put the code in the global.php backwards :p )
Is there any way to set it so that only certain groups can view the calendar?
Originally posted by RichC
Is there any way to set it so that only certain groups can view the calendar?
Let me rephrase that.
Is there anyone to setup the calendar so that certain groups can see each others private events and that anyone can see public events?
I want to be able to make the calendar on my site a publically accessible while sharing private events amongst a group. Otherwise I'll probably have to setup htaccess and password protect the entire calendar.
I'm looking, but havn't found it yet. Thanks for any help in advance! :cool:
[Edited by RichC on 11-15-2000 at 04:20 PM]
The functionality to do that doesn't currently exist in the calendar.
Ok thanks. :)
.htaccess it is, heh
Good work though
I am getting an error in the calendar.php when I tried to upgrade to v1.02
Parse error: parse error, expecting `'['' or `PHP_CLASS_OPERATOR' or `'}'' in /home/cust2/usr2183/html/forums/calendar.php on line 129
Any ideas? The old calendar.php still works.
http://www.islandchat.net/forums/calendar.php
Others are using v1.02 fine - what version of php do you have, perhaps your version doesn't like me doing this:
$monthtext = "${month.$month.name} $year";
I have MySQL v.3.22.32
Is there another date format I can use?
[Edited by fmoise99 on 11-16-2000 at 11:23 AM]
I asked for your PHP version - not mysql. This has nothing to do with mysql or "dateformats"...
One quirk that I'm trying to work out is that I can no longer do the e-mail forms. It says "Sorry. The email function has been disabled by the administrator."
But when I consult the admin interface, under "General Options" it shows that it's enabled. This happened after the calendar update so I'm just trying to figure out what happened. Any input would be appreciated :)
Originally posted by freddie
I asked for your PHP version - not mysql. This has nothing to do with mysql or "dateformats"...
Oooops! I'm sorry!
Is there is a script that can tell me my PHP version?
If you go to http://www.mydomain.com/forums/admin/index.php?action=phpinfo you will find a page which has loads of information about your installation of PHP, the version number included :)
WOOOW! Is that command useful or what? I never knew I had it! :D
My PHP version is 3.0.15
I use php 3.0.16 on my test server and the program functions normally. Shall you try to download it again and make sure you didn't get a corrupted file?
I downloaded the zip again and uploaded calendar.php but still no luck. :(
Are there any new tables created in the upgrade? I was scared to run the install.php file, but the upgrade instructions did not mention.
Originally posted by fmoise99
I downloaded the zip again and uploaded calendar.php but still no luck. :(
Are there any new tables created in the upgrade? I was scared to run the install.php file, but the upgrade instructions did not mention.
Yes you have to run the Install.php file. It creates a table and several templates. You also need to make all the code changes mentioned in the readme file.
You do not run install.php if you are upgrading as no new template or tables are created. Just follow the instructions in the upgrade file. Also make sure to set the names of the months in the new options in the control panel.
Originally posted by freddie
You do not run install.php if you are upgrading as no new template or tables are created. Just follow the instructions in the upgrade file. Also make sure to set the names of the months in the new options in the control panel.
I wish I waited for your reply! The curiousity was killing me! :( I guess you can figure out what happend. Not mad though.
But I followed the upgrade instr. about 5 times and filled out the calendar month fields. I even added graphic links. Still no luck!
I don't know if this helps or if it is even relevant but on all my php files I have to add the #!/usr/local/bin/php line on the header of each file.
I'm receiving the same error message. Just wondered if you'd found out what the cause was yet. Thanks!
fmoise please tell me what you have on line 129 of calendar.php since you added that line at the top of it.
BabyU what version of PHP do you have?
I'm afraid this is going to be the problem. Version 3.0.12
I get the same error:
Parse error: parse error, expecting `'['' or `PHP_CLASS_OPERATOR' or `'}'' in /home/babyu/babyuniversity-www/forums/calendar.php on line 128
Version 1.0 worked like a charm, which is why I'm puzzled. Thanks for any suggestions!
The problem is that I seem to have used some functionality that works in 3.0.16 but not before that version. I will see what I can do to replace the code with something that will work for your old version of PHP.
Ok try this one:
http://www.hedgehogwheels.com/hacks/calendar1.03.zip
If you have v1.01 installed - open upgrade.txt and follow the instructions
If you have v1.02 installed - Just replace calendar.php with the file in this archive (v1.02 allows you to specify images for display above the calendar)
If you have no version installed, open readme_first and follow those instructions.
Unfortunately Freddie, I get the same error, except now it's moved to line 129.
Could I have possibly goofed something up? Thanks for your help.
Hey Freddie, it worked! :D
Sorry for not getting back to your question! I was not at my PC until today.
Thanks!
http://www.islandchat.net/forums/calendar.php
i have it installed here
http://64.177.89.7/boards/calendar.php
one question though
who can post to it?
anyone?
or just moderators & admins?
You decide by changing the User Group permissions. Anyone can, or it can be limited to just moderators & admin.
i don't see it under
Calendar Options in my control panel
where is it located?
Originally posted by Mental Stamina
i don't see it under
Calendar Options in my control panel
where is it located?
In the individual UserGroup permissions area.
Hi Rangersfan :)
Great hack, great job - thank you!
I do, however, have a few problems and I'll appreciate help here.
1. I added public events to the calendar. However only the 2000 events are showing. If you move to 2001, no event is showing up. (I checked the database - they are there).
2. I would like to add $forumjump to the bottom of the calendar and calendar_getinfo templates. Just sticking $forumjump there doesn't do anything. (right now I've just placed the actual html code for it, until I get help from you).
3. I would like to add the "add public event" and "add private event" buttons to the calendar_getinfo templates as well. just putting the $addpub/$addpriv for them (copied from the calendar template) does not work. Any suggestion, other than to put the html itself there?
4. Call me an idiot, but how does the calendar add the AGE of the BB members based on the birthday hack, when the birthday hack does not include a year??? Am I missing something here?
I would also like to add a couple wishes, perhaps for future release:
PLEASE add the option of reccuring event. Must I add holidays (Christmas, Thanksgiving, etc) EVERY year again? :)
Also, if I could add BIRTHDAYS -- not of BB members. This is a reccuring event, indeed, however in this case I will want it to tell the date (and therefore add a year for every year). In my case, I am referring to birthdates of racing drivers (this is what my forum's about).
It would be great if I could place "today's events" on the front page of the BB as well (i.e., those links that appear in the box of Today's date, could also be seen on the BB's front page)
Thanks for your time and efforts, and I look forward to your reply.
Cheers,
Bira
p.s.
Our calendar can be found at http://www.atlasf1.com/bb/calendar.php -- I've not made it public yet. I want to fix the first 'bug' I mentioned first.
[Edited by bira on 11-25-2000 at 06:20 PM]
I found the problem to the first 'bug' I mentioned (although I don't know the fix):
There is a discrepency between a month's value being with a leading zero (i.e. January is 01) and without a leading zero (1). So when I choose January 2001, it takes me to http://www.atlasf1.com/bb/calendar.php?month=1&year=2001 -- where nothing can be seen. But if I change that URL to http://www.atlasf1.com/bb/calendar.php?month=01&year=2001 all the events show up again...
Also, except for January, when I chage the URL to include a leading Zero, the month's name at the top (like "February 2001") doesn't show (shows only "2001").
How do I fix this please?
(1) Bug acknowledged - I will fix it when I get a chance
(2) If you want to use $forumjump in the template put makeforumjump(); at the top of calendar.php (but after any includes)
(3) If you want to add those buttons you will need to go to this line
eval("echo dovars(\"".gettemplate("calendar_getinfo")."\");");
Add this code before the above line
$perms=getperms($bbuserid);
if ($perms[canpublicevent]==1)
{
eval ("\$addpub = \"".gettemplate("calendar_publiceventbutton")."\";");
}
else
{
$addpub = " ";
}
eval ("\$addpriv = \"".gettemplate("calendar_privateeventbutton")."\";");
(4) The calendar hack won't put the age of anyone, just their birthday. On my board it shows the age except I haven't updated the birthday hack to handle the ages yet. The calendar as is works with my updated version of the birthdays with ages but I don't think it works with the version I released. I have meant to update the hack for ages so you can use the two together but I haven't the time lately. It will come soon, after my paying work is done.
reccurring events
I haven't done this because of the complex calculations it would take to figure out some days. Of course christmas is always on dec 25th but other days move about and I haven't bothered to find a source that details how to figure out where holidays go - give me a source and I may work on it.
If you want to place events from the calendar onto your front page then you just need to query the tables for the information. I am sure you can figure that out :)
Oh baby, you flatter me :)
Yeah, I guess I can figure how to query the db... I'll figure it out... sure... * bira fidgets nervously *
....
With regards to your bug: having looked at the calendar script, the problem is here, if that helps:
// Load the events for the month!
$events=$DB_site->query("SELECT eventid, subject, eventdate, public
FROM events
WHERE eventdate
LIKE '$year-$month-%' AND ((userid = $bbuserid AND public = 0) OR (public = 1))");
Since the date in the db is in the format of 0000-00-00 and it's looking for, say 2001-3-%, it won't find any events at all.
The solution is to switch ALL month's values to two digits. I tried it and it worked EXCEPT for the following:
$lm = $month - 1;
$ly = $year - 1;
if ($month == 1)
{
$premonth = "<font face='verdana' size=2><a href='calendar.php?month=12&year=$ly'>$prevmonth</a></font>";
}
else
{
$premonth = "<font face='verdana' size=2><a href='calendar.php?month=$lm&year=$year'>$prevmonth</a></font>";
}
$nm = $month + 1;
$ny = $year + 1;
if ($month == 12)
{
$nextmonth = "<font face='verdana' size=2><a href='calendar.php?month=1&year=$ny'>$nextmonth</a></font>";
}
else
{
$nextmonth = "<font face='verdana' size=2><a href='calendar.php?month=$nm&year=$year'>$nextmonth</a></font>";
}
Which affects the < $premonth | $nextmonth > links at the bottom of the calendar (and they're rather important).
For some reason, once the month's value is 0x, it doesn't seem to execute the +1/-1 math.
If you tell me how to solve that, then I've got this bug fixed and I can open the calendar for all.
As for the reccuring events: we can start off by offering the option of reccuring events
with the same date. Christmas is one; birthdays (public ones, like celebrities) is another.
In other word, all you need, really, is to add an option to add an event WITHOUT a year,
and thus selecting events to display WITHOUT a year.
I don't know enough to think up myself how to add this option, although I suspect
it should not be too hard. Any idea?
One last thing: I have your old birthday hack installed (no year) and it seems
to work fine with this calendar hack (albeit not saying, of course, the person's age). :)
Cheers,
Bira
[Edited by bira on 11-25-2000 at 08:43 PM]
[QUOTE]Originally posted by Mental Stamina
i have it installed here
http://64.177.89.7/boards/calendar.php
Ummmmm, Hello
When where you planning on asking if it is alright to use my design?
I am flattered that you you copied it, but it might have been nice for someone to let me know.
You could at least have changed a few more of the colours.
I know mine is not open yet, and it is taking me a very long time to fin it off.
But I have been busy, moving house... changing jobs etc.
OK, Rangersfan, I solved this bug - and even though I'm not sure my fix is the best possible,
it sure does work, and I've made the calendar public! :)
Here's the fix I did, heh:
I replaced:
// Load the events for the month!
$events=$DB_site->query("SELECT eventid, subject, eventdate, public
FROM events
WHERE eventdate
LIKE '$year-$month-%' AND ((userid = $bbuserid AND public = 0) OR (public = 1))");
With:
// Load the events for the month!
if (($month=="1") || ($month=="01")) {
$events=$DB_site->query("SELECT eventid, subject, eventdate, public FROM events WHERE eventdate LIKE '$year-01-%' AND ((userid = $bbuserid AND public = 0) OR (public = 1))");
} elseif (($month=="2") || ($month=="02")) {
$events=$DB_site->query("SELECT eventid, subject, eventdate, public FROM events WHERE eventdate LIKE '$year-02-%' AND ((userid = $bbuserid AND public = 0) OR (public = 1))");
} elseif (($month=="3") || ($month=="03")) {
$events=$DB_site->query("SELECT eventid, subject, eventdate, public FROM events WHERE eventdate LIKE '$year-03-%' AND ((userid = $bbuserid AND public = 0) OR (public = 1))");
} elseif (($month=="4") || ($month=="04")) {
$events=$DB_site->query("SELECT eventid, subject, eventdate, public FROM events WHERE eventdate LIKE '$year-04-%' AND ((userid = $bbuserid AND public = 0) OR (public = 1))");
} elseif (($month=="5") || ($month=="05")) {
$events=$DB_site->query("SELECT eventid, subject, eventdate, public FROM events WHERE eventdate LIKE '$year-05-%' AND ((userid = $bbuserid AND public = 0) OR (public = 1))");
} elseif (($month=="6") || ($month=="06")) {
$events=$DB_site->query("SELECT eventid, subject, eventdate, public FROM events WHERE eventdate LIKE '$year-06-%' AND ((userid = $bbuserid AND public = 0) OR (public = 1))");
} elseif (($month=="7") || ($month=="07")) {
$events=$DB_site->query("SELECT eventid, subject, eventdate, public FROM events WHERE eventdate LIKE '$year-07-%' AND ((userid = $bbuserid AND public = 0) OR (public = 1))");
} elseif (($month=="8") || ($month=="08")) {
$events=$DB_site->query("SELECT eventid, subject, eventdate, public FROM events WHERE eventdate LIKE '$year-08-%' AND ((userid = $bbuserid AND public = 0) OR (public = 1))");
} elseif (($month=="9") || ($month=="09")) {
$events=$DB_site->query("SELECT eventid, subject, eventdate, public FROM events WHERE eventdate LIKE '$year-09-%' AND ((userid = $bbuserid AND public = 0) OR (public = 1))");
} else {
$events=$DB_site->query("SELECT eventid, subject, eventdate, public FROM events WHERE eventdate LIKE '$year-$month-%' AND ((userid = $bbuserid AND public = 0) OR (public = 1))");
}
And I added
if ($month >= 1 && $month <= 9)
{
$month = "0" . (string)$month;
}
under
if ($day >= 1 && $day <= 9)
{
$day = "0" . (string)$day;
}
(around line 380)
Not very smooth, but it works and the calendar is beautiful.
You can visit it at http://www.atlasf1.com/bb/calendar.php
(and you can also see the members' birthdays, even though I have your old hack :))
Thanks for your great work!
[Edited by bira on 11-26-2000 at 08:41 PM]
When I get a chance I will fix it while using alot less code than you did :)
p.s.
For future release I would suggest allowing the BB admin who is installing this, to choose whether he wants the days to appear as Sunday -> Saturday, or Monday -> Sunday. Your hack comes with the first option hard coded in the script, however for many of us a week is actually Monday -> Sunday, and I myself simply changed the order in the script and in the template.
Just a suggestion :)
Originally posted by freddie
When I get a chance I will fix it while using alot less code than you did :)
Hey, cut me some slack! That I actually found a fix to it at all is a miracle in itself :)
When I know php scripting anywhere near your level, I'll write hacks with alot less bugs than you did :p
(joking, heh. You know I adore you)
Oh, and btw, I did try - instead of an elseif for each month - to just use the if ($month >= 1 && $month <= 9) 'trick' - but for some reason, it made the months' titles (March, April, etc) disappear.
Hey I'm American - you know us, everything is done our way. A week is Sunday - Saturday.
but seriously I will take that under advisement.
Originally posted by freddie
I do need to update the birthday hack to support birthyear as it is on my forum. I am not sure if the calendar will work as is with the previous birthday hack. If not then just turn that option off in the control panel for now.
any news on the updated birthday hack?
also on my machine here .... winnt/apache I don't get the months shown... I believe other people were also getting this, but I could not find a fix for it.... can anyone help?
Inow have apache/win2000 installed instead of IIS/win2000 so I will let you know. I won't be able to work on this or any of my hacks for a few more weeks.
I can't get the header to show on my top calendar page. I must be missing something?!
http://www.kos.net/chat/calendar.php
Anyone who knows, please help me out here...
I just installed it, awesome hacvk!
W/ 6 pages, I didn't notice till just now a bug fixc....has this been updated in the code or has to be done?
thx.
No the bug bira pointed out hasn't been fixed, I haven't the time nor the inclination to fix it lately.
WOW
cool cool hack
but CAN u do the working code in a new zip file inclusive the updatet readme.....
its very usefull
PLEASE
thx its a great hack thx....
This thread is dead so please make no more responses in it. All bugs and suggestions will be fixed and considered for the calendar that will be release with vBulletin v2.0.
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.