Get Yearly public dates and filter them correctly even recurring yearly
Get Monthly public dates and filter them correctly even recurring Monthly
Get Birthdates and filter them correctly
Lastly I can now get dates from the post table and calendar according to usergroup.
Added a check so that if you have no events, it will spit out so.
Working Under: UBB.Threads 6.4 and 6.4.1
Mod Status: Beta
Any pre-requisites: IIP because you will not authenicated without it unless you add a function for that.
Author(s): scroungr
Date: 01/13/04
Credits: David Lozier for original IIP, Joshpet for updating IIP
Files Altered: eventspal.php
New Files: eventspal.php
Database Altered: No
Info/Instructions: Just change extension from .txt to .php upload this into the pals directory and overwrite existing eventspal.php and set the variables
// Setable variables
// should admins/mods see all dates // 0 - yes // 1 - no $adminmodshow = '1';
// should all events for a given date show under one date // 0 - yes // 1 - no $showdatesunderone = '0';
// show Group Dates on events pal // 0 - Show Seperately Below the Events under a Group Heading // 1 - Show Mixed in with the Events // 2 or other means won't show at all $groupshow = '0'; // show all Group Dates or just the users in events pal // 0 - Show all dates for okay board's for all // 1 - Show all dates for okay board's just for user $showallgroupdates = '1';
// show Birth Dates on events pal // 0 - Show Seperately Below the Events under a Birthday Heading // 1 - Show Mixed in with the Events // 2 or other means won't show at all $birthdayshow = '2';
Disclaimer: Please backup every file that you intend to modify. If the modification modifies the database, it's a good idea to backup your database before doing so.
Note: If you modify your UBB.Threads code, you may be giving up your right for "official" support from Infopop.If you need official support, you'll need to restore unmodified files.
I can view the events for a private forum when I am not logged in (although when I click the event it does not show any details) is this by design or is it a bug?
okay this is fixed now.. had a logi problem.. now it shows all public dates whether they reccur yearly or monthly or never to anyone.. only show private dates to people within the same group as the user whether they reccur yearly or monthly or never and it also shows dates that are entered whether in calendar or events and also shows birthdays..
Someone with alot of events and alot of groups please try this..
I am betting you are part of those groups somewhere or they of yours.... make sure you are not in users just in admin and make sure you and they share no common groups. if say you have and users1 and a users2 group and a third group lets say users3 and a user from users1 is put into users3 he will see all events for all users in users1 and users3 even if there is a user in user2 and user3. Also MODS and ADMIN will see ALL events because they see ALL groups.. create a user and just put him in users2 group and he will only see events for people in users2.
I am not sure I follow that hehe. The problem I have with this is that I can see topics for groups that I am not a member of. This makes the event pal usecure for events that are private for say a particulkar group that holds group events. although I can click on the event and get a blank enough information is normally in the title to figureout what is happening.
I am admin but I have a lot of boards that I dont monitor, They are private forums for other gaming guilds that use our forums as a place to hang there hat and I only go there if it is absolutely necessary which is almost never. I am not a member of thsoe groups.
Indeed when you login as a regular user, you can see events for forums they don't have access to.
I didn't totally wrap my head around all that you did, but I don't see a query to the w3t_Boards table in there, so somewhere along the line, you've got to query the read permissions of the w3t_Baords table and see if whatever forum that event belongs to is seen by this group.
This is pretty complicated. So I'm not sure exactly how to go about it, but if you study how it's done in the the calendar script, that should give a bit of an idea.
One other suggestion, and I'm not sure if it's easily possible. But it would be great for the different event types to get 'grouped' under the date. So that the same date doesn't have to repeate if there are multiple things listed under a day.
Wonderful work on this.
As soon as this is set, we'll put out 5.4.5 with this inclluded. I'm finishing up some other IIP improvements.
thanx Josh I will take a look at the code and see what I can do.. and a regular user can only access events of people in his group bur yeah if that user is in another group he sees those also so yeah maybe I will have to look at using that from the w3t_Boards table first prior to figuring out what the user can actually see... I will work on this more this week
Well actually in my testing, if it helps, I posted an event in a forum only visible to the moderators group - and it was visible when I was logged in as a regular user, but not if I wasn't logged in.
ok I will have to change the function I am using a bit but yeah I can see where the w3t_Boards should be polled for the ones posted as an event in a post but there is not much can do with ones added to the calendar directly as an event.
Okay did some more work on this can someone with alot of groups check this. I made it so you can select whether an admin can see all dates or just his and also did a query at the board level.
I have aproximately 30 groups on my boards and I tested it with an unregistered user, a user member of all groups and my admin account. This works nicely, Thanks for fixing it
I will also bring up another point with my mod.. since I handle end of the month Events correctly and UBBthreads does not.. If the event is scheduled for the last day of the month say the 31st.. Threads will only show the date if there is 31 days in the month and will not show them if there is less... My mod takes into account there is a last day of the month and it may not be 31...
When I just installed this (With default settings), I recieved the following error: Warning: array_multisort(): Argument #1 is expected to be an array or a sort flag in .../forum/pals/eventspal.php(79) : eval()'d code on line 1
Excuse me for my late answer, but last night it was already pretty late. Ok, I tried it again and now it works! Indeed I had no events listed yet.
How could I change the dateformat to what we are using ? We use DD/MM/YY 10:19 AM
Also it would be good if an event could last for more day, but that's something for infopop (we would like to post exhibitions which have a start & end date).
you could alter the order it prints out. Look in the for loops at the end where it prints out and exchange the $outputyaddayadda[$i][0] and $outputyaddayadda[$i][1] variables but ONLY in the for loop.
Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.
Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.