|
Joined: Oct 2003
Posts: 2,305
Old Hand
|
Old Hand
Joined: Oct 2003
Posts: 2,305 |
Ok I found the issue with the eventspal not only showing the next upcoming events but also grouping them by month so it shows all of January 2003-2007 and then all of february.. it exists in this lines
[] // Only continue if we still need more events to display - this will save the query // if you have lots of events in the current month if ($count < $totaldisplay) { // Formulate the Query for the way future $query = " SELECT C_Date,C_Month,C_Year,C_Brief,C_Notes FROM {$config['tbprefix']}Calendar WHERE C_Type = 'public' AND C_Year > $year ORDER BY C_Month, C_Date, C_Year ASC "; $sth = $dbh -> do_query($query); while(list($dy,$mn,$yr,$brief,$notes) = $dbh -> fetch_array($sth)) { // Only display if we still need events to display if ($count < $totaldisplay) { // Display the date if it's not a repeat of the date above if (($mn != $oldmn) || (($mn == $oldmn) && ($dy != $olddy)) ) { $output .= "<i>$mn/$dy/$yr</i><br />"; } // If we are doing the mouseover preview, figure it out here if ($mousepreview) { $notes = strip_tags($notes); $notes = htmlspecialchars($notes); if (strlen($notes) > 100) { $notes = substr($notes,0,100); $notes .= " ..."; } $title = "title="$notes" "; } // Output the name of the event here $output .= " ·<a href="{$config['phpurl']}/showday.php?Cat=$Cat&day=$dy&month=$mn&year=$yr" $title>$brief</a><br />"; // set the current date so we can compare on the next run through $olddy = $dy; $oldmn = $mn; $count++; } }
} // End of the query for the future [/]
Now I changed the sql query to
[] $query = " SELECT C_Date,C_Month,C_Year,C_Brief,C_Notes FROM {$config['tbprefix']}Calendar WHERE (C_Type = 'public' AND C_Year > $year) || (C_Type = 'public' AND C_Recurring = 'yearly') ORDER BY C_Year, C_Month, C_Date ASC "; [/]
but that now outputs it as all recurring for 2003 and then all the rest of the dates after 2003 as it should.. my issue is that since your recurring dates go in as the year you entered them so that say you put Xmas on Dec 25th and that starts on 2003, it puts it as Dec 25th 2003 and then ALL of 2004 except for xmas since its a rcurring.. now I was thinking.. I need to change the date on the recurring holidays to the year I am in so that if the getdate() function says 2009 as the year the recurring should be reflected as 2009..
so I hope you understand so far.. My quandry is should I update the recurring in the tables to reflect 2009 which will make it ok and I will then reflect all events correctly but that will require a table insert.. or should I do it yet another table for all things in the year which will mean another table.. which will need to be updated as things are inputted or should I do it all through an array that takes all 2003's and turns them into the proper year and then resort that array? Hmmm that sounds like the hardest but the easiest..
|
|
|
|
Joined: Oct 2003
Posts: 2,305
Old Hand
|
Old Hand
Joined: Oct 2003
Posts: 2,305 |
So after reading that in print.. I am going to write an array function..
|
|
|
|
Joined: Nov 2001
Posts: 10,369
I type Like navaho
|
I type Like navaho
Joined: Nov 2001
Posts: 10,369 |
yeah, the eventspal really needs work. The date format of calendar events isn't quite a standard date format, so I've had trouble working with it. I also havent had success in adding in events that are part of posts (with proper group access). If you make any improvements to this, it would be MUCH appreciated. As I've never quite been happy with it out of the gate.
|
|
|
|
Joined: Oct 2003
Posts: 2,305
Old Hand
|
Old Hand
Joined: Oct 2003
Posts: 2,305 |
well I have it working with dates added thru the calender now.. wish I could find where the 2003 is hard coded would really like to test back to 1759...
|
|
|
|
Joined: Oct 2003
Posts: 2,305
Old Hand
|
Old Hand
Joined: Oct 2003
Posts: 2,305 |
Looking into this post/add event thru calendar.. id there any advantage of adding an even thru the calendar versus adding it thru a post? I don't know but for at least myself I am thinking of disbabling adding an event thru a post.. I mean you can only see if it you look at the calendar anyways? and the add event button is right there?
|
|
|
|
Joined: Nov 2001
Posts: 10,369
I type Like navaho
|
I type Like navaho
Joined: Nov 2001
Posts: 10,369 |
Yeah, I agree. I wish no matter how you entered them, it put them in the same table.
|
|
|
|
Joined: Nov 2001
Posts: 10,369
I type Like navaho
|
I type Like navaho
Joined: Nov 2001
Posts: 10,369 |
Oh the only advantage of entering them in a post -
Is that if you enter an event with a post that only specific groups have access to, then only that group will see the event. So it's a way to have group access for events.
Anything entered into the calendar directly is public for all.
|
|
|
|
Joined: Oct 2003
Posts: 2,305
Old Hand
|
Old Hand
Joined: Oct 2003
Posts: 2,305 |
Yeah that sounds handy for a site that has different groups..
Hmm well the eventspal really only shows public events anyways and any group based event wouldn't normaly show up there anyways...
|
|
|
|
Joined: Oct 2003
Posts: 2,305
Old Hand
|
Old Hand
Joined: Oct 2003
Posts: 2,305 |
Just an Update.. I can now get all posts from the Posts under the Main Event Body by User.. Now to see how I can query the logger and see what group it belongs to and then query the posts table looking for people within that group... I am closer [] http://www.couch-tomatoe.cc/images/scroungr1.gif[/] btw your photopost is throwing an error [] "/usr/bin/X11/mogrify" -size 100x62 -quality 70 -geometry 100x62 '/home/threadsdev/ubbdev.com/html/photopost/data/500/11110scroungr1-thumb.jpg' [/]
Last edited by scroungr; 12/22/2003 7:43 PM.
|
|
|
|
Joined: Nov 2001
Posts: 10,369
I type Like navaho
|
I type Like navaho
Joined: Nov 2001
Posts: 10,369 |
Good work. You are a better man than I am. (Or I gave up too soon. )
|
|
|
|
Joined: Oct 2003
Posts: 2,305
Old Hand
|
Old Hand
Joined: Oct 2003
Posts: 2,305 |
Okay heres the new one.. it 1) Puts the Dates into Chronologicl Order of the events added into the Calendar Table and 2) Puts the Dates into Chronological Order for the events added by Threads by the User for the User only.. Still left is to allow more then the User see posts of the group he is in.. I know the Key is $user['U_Groups'] and also $U_Groups and $U_Number of the Users table and $B_Posterid of the Posts table.. since the Posts are assigned by $B_Posterid which if used to query the Users table on the $U_Number will provide you with $U_Groups which you can use to compare to $user['U_Groups'].. other alternative is to enter a new field called $B_Groups in the Posts table and then just compare $B_Groups to $user['U_Groups'] I don't know which will be easier.. I will work further after the Holidays..
|
|
|
|
Joined: Nov 2001
Posts: 10,369
I type Like navaho
|
I type Like navaho
Joined: Nov 2001
Posts: 10,369 |
Great - sounds great so far. I'll play with this when I get a chance.
|
|
|
|
Joined: Oct 2003
Posts: 2,305
Old Hand
|
Old Hand
Joined: Oct 2003
Posts: 2,305 |
Okay I updated this a bit.. I can get it broken down into correctly sorted yearly minus recurring monthly and also groups.. under the Upcoming Events I have Monthly Upcoming Events and then Under that I have Users Events. I am gonna tweak it a bit and try and get user converted to usergroup.. here is what it looks like so far.. [] http://www.couch-tomatoe.cc/images/events.gif[/]
|
|
|
|
Joined: Oct 2003
Posts: 2,305
Old Hand
|
Old Hand
Joined: Oct 2003
Posts: 2,305 |
so anyways should I join Recurring monthly INTo Upcoming Events or leave it seperate? and Group Events should they be left seperate or be up in Upcoming Events? What do ya all think?
|
|
|
|
Joined: Nov 2001
Posts: 10,369
I type Like navaho
|
I type Like navaho
Joined: Nov 2001
Posts: 10,369 |
wow looking good. Great job! So does this grab the calendar events as well as calendar events attached to posts?
|
|
|
|
Joined: Nov 2001
Posts: 10,369
I type Like navaho
|
I type Like navaho
Joined: Nov 2001
Posts: 10,369 |
Diregard my last post - I didn't read carefully enough the first time. Yes, in my opinion it would be nice if there were just one box, listed in order, so it didn't matter how the event was entered.... it just displayed the upcoming events in order. That would be WONDERFUL. You da man.
|
|
|
|
Joined: Oct 2003
Posts: 2,305
Old Hand
|
Old Hand
Joined: Oct 2003
Posts: 2,305 |
okay so then I will join it all in after I figure out how to convert user who is viewing into user who posted an event on a post to the post table.. its gotta be tied in with comparing the user and his groups with the poster and his groups.. gotta find that..
|
|
|
|
Joined: Feb 2002
Posts: 2,286
Veteran
|
Veteran
Joined: Feb 2002
Posts: 2,286 |
Looks Great Only comment - at the moment the dates are all US - I think this is hardcoded into Eventspal - so it would be good if they followed the forums default or even the style as seclected under My Home.
Fans Focus - Focusing on Fans of Sport (Okay - mainly football (the British variety at the moment - but expanding all the time....)
|
|
|
|
Joined: Oct 2003
Posts: 2,305
Old Hand
|
Old Hand
Joined: Oct 2003
Posts: 2,305 |
ahh haven't even thought about that but I can make em display anyway I want now.. I made them into a multidemnsional array so thats an easy step.. the hard step is the posts being viewable by the group not just the individual once I conquer that all else will be cake..
|
|
|
|
Joined: Oct 2003
Posts: 2,305
Old Hand
|
Old Hand
Joined: Oct 2003
Posts: 2,305 |
well made some strides in this tonite.. still fixing the monthly's.. found a way to get the usergroup from the viewer and filter out his groups and then compare to user who posted the event and compare to his groups.. geting closer.. its a long as heck script but closer to a good product.. I think I am making it more then I have to but it will be thorough heh
|
|
|
|
Joined: Nov 2001
Posts: 10,369
I type Like navaho
|
I type Like navaho
Joined: Nov 2001
Posts: 10,369 |
Excellent!!! When you get this set, it'll be great. We'll include it in IIP 5.4.5
|
|
|
|
Joined: Oct 2003
Posts: 2,305
Old Hand
|
Old Hand
Joined: Oct 2003
Posts: 2,305 |
Okay one last thing to do I can now... 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 according to usergroup. Last thing I need to do is get PRIVATE dates from the Calendar Database.. should I make them Private to user or Private to User Group.... Then it will be done .. well after I throw em all together at the end
|
|
|
|
Joined: Nov 2001
Posts: 10,369
I type Like navaho
|
I type Like navaho
Joined: Nov 2001
Posts: 10,369 |
Sounds great! To me, I woulnd't worry about the private individual events on the IIP, since there's already alot of load there. Unless you're most of the way done.... then what the heck. But it sounds like you've made great progress! Once this is set, we'll get this in IIP 5.4.5. Thanks for your work on this.
|
|
|
|
Joined: Mar 2000
Posts: 528
Junior Member
|
Junior Member
Joined: Mar 2000
Posts: 528 |
Wow, nice! Where did this end up?
|
|
|
|
Joined: Oct 2003
Posts: 2,305
Old Hand
|
Old Hand
Joined: Oct 2003
Posts: 2,305 |
|
|
|
|
Joined: Mar 2000
Posts: 528
Junior Member
|
Junior Member
Joined: Mar 2000
Posts: 528 |
Oooh, awesome. Fear my amazing search abilities (LOL I should have found this you would think...)
|
|
|
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.
|
|
Posts: 5,833
Joined: January 2000
|
|
Forums63
Topics37,574
Posts293,926
Members13,850
|
Most Online5,166 Sep 15th, 2019
|
|
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
|
|
|
|