Sorry... I forgot to back out my customized outoing message for reply notifications. Look for the words "from The Hang" and modify either to the original or to the text of your choice. Max
If your error is during addpost... I did ran into some unexpected difficulties with Gamejag's prior script, where he had
$ETime = mktime ($hour_convert,$min,0,0,0,0);
which I replaced with
$ETime = mktime ($hour_convert,$min,0,0,0,$year);
because the prior mktime was giving me -1 for some reason. I believe that older versions of PHP handle the mktime variables slightly differently. You may want to try to change it back to 0,0,0); to see if that helps.
Looking forward to it! FYI, the files I sent you are slightly older than this posted version, use this one instead. I added the navigation to be able to go to the next month without having to use the dropdown, and might have corrected a couple of minor bugs. Max
Makes sense... but Gamejag's prior version worked for him. So maybe prior version of php had different error handling, eg would assume year to be equal to current year in case of error... wild guess. Max
1) in the production version of ubbthreads 5.5, addpost.php doesn't have a ?> at the end. I initially had the calendar working without this, but added it in as a result of a suggestion. Try to just remove it and see if that solves your problem.
2) My version is 1320 lines... did you really delete that many lines?! That sounds weird, you my want to doublecheck.
If the above doesn't solve it, try to figure out whether the problem is specific to your setup: try installing the calendar, as is, and see if it works for you. If it doesn't, let me know the problem. If it does work, then it means that your further changes are causing the problem, and it might help you zero in on what's going on.
I just set the calendar up to play with... went smooth! I'll be working on the upcoming events pal box this weekend... (tonight, maybe tomorrow, maybe tomorrow night... lol)
The majority of readers seemed to miss the threaded view - so what I'm planning next is to have a "combined" view, where the calendar will be shown along with a few of the latest threads. Maybe I'll use the "latest threads" script, if I could get my hands on it... a number of people seem to be asking for it, no replies so far. Do you have it?
Oh so show the recent posts according to B_Posted and not B_Last_Post on the same page as the calendar is being displayed?
lol otherwise I was just going to say that there is a "Current Threads" pal box that is in with the next release.. any posts made to the calendar show up there also according to B_Posted
Yep, maybe... but if someone doesn't want to use Location as a primary sort field, ie someone who is running a particular venue so that Location is always the same, then it's useful to sort by time... so it's handy to have it in a separate field. This minimizes the necessary modifications. Regards, Max
Yes... recent posts shown on the same page as the calendar. That way, you wouldn't need to switch views to find recent additions.
I'll wait for your "Current Threads" box... it sounds like this will serve the purpose, with minor modifications, since what I'm talking about is a board-specific "Current Threads".
Any ideas about whether to display these threads below the calendar, or to the side?
You don't need to sort by date, because you're showing one date at a time anyway.
After the above, you may also play around with the next 4 lines which contain $Evnt in order to modify the events display, and not to show the location as the first thing in the string. Or whatever your preference.
I was just thinking that the "Upcoming Events" pal box doesn't quite reflect the true chronalogical display when the time and the date are in two different fields...
Hey Max I was wondering if you have had any problems with the calendar? I created about 15 events then deleted them and now when I post a single event it gets placed in other dates and in some cases the display format is wrong (location,time,subject).
I think I see the problem... well not sure if it is but I'll find out. When deleting the calendar post the related event entry in w3t_Events is not deleted also. I'm going to set it up so it does check to see if the post is being deleted from the calendar board and then delete the corrosponding event entry.
Correct, I wanted to keep the changes confined, and didn't want to modify the deletion scripts as well.
If you delete an event, its date remains in the w3t_evenst board, but that shoudn't be a problem.
It was initially causing a problem if you moved threads, but in postlist:
SELECT E_ID,B_Username,E_Date,E_Time,E_Location,B_Subject, B_Number, B_Replies,B_Board FROM w3t_Events, w3t_Posts WHERE E_Date >= '$lowdate' AND E_Date < '$highdate' AND B_Number = E_Number AND B_Board = '$Board_q' ORDER BY E_Location
I added the B_Board check to make sure that an event didn't displayed if it was moved out of the calendar board.
You need to have B_Number = E_Number for an event to be displayed... if you delete a post, B_Number disappears, and the event never gets displayed.
Did you modify the scripts from their originals?
I think that the first thing to do to debug on your end would be to take a look at B_Number and E_Number for the event that is giving you a problem.
It seemd that when I deleted posts from the calendar and added new ones that the new ones had the same B_Number as some of the old ones and that in turn matched E_Number or something like that.
The only thing I modified was in the addpost script I changed this:
I added/changed this in the deletepost.php script:
// ----------------------------------- // Get the post info from the database $Board_q = addslashes($Board); $query = " SELECT w3t_Boards.Bo_Calendar,w3t_Posts.B_Username,w3t_Posts.B_Subject,w3t_Posts.B_Body,w3t_Posts.B_Approved,w3t_Posts.B_File,w3t_Posts.B_Poll,w3t_Posts.B_Main FROM w3t_Posts,w3t_Boards WHERE w3t_Posts.B_Number = '$Number' AND w3t_Posts.B_Board = '$Board_q' AND w3t_Boards.Bo_Keyword = '$Board_q' "; $sth = $dbh -> do_query($query);
// ------------------------- // Assign the retrieved data list($Calendar,$Postedby,$Subject,$Body,$Approved,$File,$Poll,$Main) = $dbh -> fetch_array($sth); $dbh -> finish_sth($sth);
And this:
if ($Calendar == "Y") {
$query = " DELETE FROM w3t_Events WHERE E_Number = '$Number' "; $dbh -> do_query($query);
I understand what you did Dave, but I still don't understand why you had a problem in the first place. Normally, unless you've changed something on your end, if you delete a post the B_Number doesn't get used again.
On my board, I can add an event, say number 123, delete it, then post a new event, and the new post number is 124 - there is no 123 any more.
This makes sense - otherwise, if you had a link to a post from somewhere, that link could pull up a different post altogether (if there was a delete/add in the meantime).
So there's something else happening on your boards, that's causing B_Number to get re-used. That's not good I think, I can't think of the exact scenarios that would result in bugs but I know that they must be there.
$date = find today's date i=0 do while (i <= xxx){ show $date show events in user-selected order, eg by time or by location/time i = i+1 date = date + 1 }
This would let you select the number of days to display. I believe that with the method you're talking about, you're going to have to select the total number of events to display, so if you have a day with a lot of events, your time-horizon will be smaller - I personally don't like that. I would like to see "this week's events" by setting xxx to 7 days, for instance.
I checked your board, confirmed that post numbers are getting "re-used" after getting deleted... then I tested over here, and noticed that the same thing was happening.
1) in the production version of ubbthreads 5.5, addpost.php doesn't have a ?> at the end. I initially had the calendar working without this, but added it in as a result of a suggestion. Try to just remove it and see if that solves your problem.
Tried that with no success, then the error would just be the last line.
In reply to:
2) My version is 1320 lines... did you really delete that many lines?! That sounds weird, you my want to doublecheck.
Your version has a LOT of blank lines in it for some reason. In addition to me using the checkbox Post Icon hack and the message boc clickable icons that I am writing up.
If the above doesn't solve it, try to figure out whether the problem is specific to your setup: try installing the calendar, as is, and see if it works for you. If it doesn't, let me know the problem. If it does work, then it means that your further changes are causing the problem, and it might help you zero in on what's going on.
Ah, yes, I think I added the blank lines in the process of lining things up with the unhacked version in a side-by-side view.
Could you try to implement the calendar as is, to see if it's working for you w/out your own hacks added in?
The next thing I'm thinking of doing, is instead of weaving the calendar everywhere in the script, to create a clean if calendar { bla bla } elseif calendarinstandardview { bla bla } elseif notcalendar { unhacked version }
this will make future upgrades much easier, and will allow better/easier interaction with other hacks.
OK I threw out the two out of the three hacks I have in. The Mark All Posts read does not effect this.
It works fine, but since I do have Netscape users AND its still my choice, I changed line 897 and 900 to ¦ instead of what you had because Netscape does not know what to do with Entities over 255.
Now I go back and add those two hacks in and find the problem.
I broke it out into 3 separate cases. To find the beginning and end of each section, look for the word "Hack".
This way, it should be *much* easier to merge your old hacks - just include the old hacks into the appropriate section. Also, this should make future upgrades much easier.
I'll package this up with the updated deletepost.php which is needed if you're running 5.51 , and I'll repost the package later on.
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.