Previous Thread
Next Thread
Print Thread
Rating: 14
Page 1 of 4 1 2 3 4
#213713 02/13/2002 10:57 PM
Joined: May 1999
Posts: 149
Enthusiast
Enthusiast
Offline
Joined: May 1999
Posts: 149
OK... This one made me see variables in my sleep. Thanks Gamejag for the great base.

Max


[Edit: For those looking for the current files:

For those experienced that can handle diff comparisons, I have the differences between stock 5.5.1 threads files and the calendar modification (v2.2).

diff.zip
(stock 5.5.1 on the left and modifications on the right)

For us mere mortals, here is a more understandable instruction set:
calendar_2_2.zip
Attachments
44342-calendar_v2.zip (0 Bytes, 31 downloads)

Last edited by AllenAyres; 03/30/2002 9:08 AM.
Sponsored Links
Joined: Mar 2000
Posts: 21,079
Likes: 3
I type Like navaho
I type Like navaho
Joined: Mar 2000
Posts: 21,079
Likes: 3
Somebody's been very busy []https://www.ubbdev.com/threads/php/images/icons/laugh.gif[/]

Thanks for this, I'll be adding it here and a few of yours and Dave's other stuff to assist with bug-testing []https://www.ubbdev.com/threads/php/images/icons/smile.gif[/]


- Allen wavey
- What Drives You?
Joined: May 1999
Posts: 149
Enthusiast
Enthusiast
Offline
Joined: May 1999
Posts: 149

Joined: Jun 2001
Posts: 3,273
That 70's Guy
That 70's Guy
Offline
Joined: Jun 2001
Posts: 3,273
I'll have the "Upcoming Events" pal box in with the next indexpal release []https://www.ubbdev.com/threads/php/images/icons/wink.gif[/]

I haven't had time to set the files up you sent but I'll try to get some time in tonight. Things got bizy around here... []https://www.ubbdev.com/threads/php/images/icons/crazy.gif[/]

Joined: Aug 1999
Posts: 184
Member
Member
Offline
Joined: Aug 1999
Posts: 184
I keep getting an error. Will do further investigation and post again.


Silly ricer.. Wings are for airplanes!
Sponsored Links
Joined: May 1999
Posts: 149
Enthusiast
Enthusiast
Offline
Joined: May 1999
Posts: 149
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

Franky #213719 02/14/2002 11:05 PM
Joined: May 1999
Posts: 149
Enthusiast
Enthusiast
Offline
Joined: May 1999
Posts: 149
On the calendar? What's the nature of the error?

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.

Regards,
Max

Joined: May 1999
Posts: 149
Enthusiast
Enthusiast
Offline
Joined: May 1999
Posts: 149
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

Joined: Aug 1999
Posts: 184
Member
Member
Offline
Joined: Aug 1999
Posts: 184
The error usually is in line 1281 (the end). I already caught the custom message. Beyond Compare rocks!


Silly ricer.. Wings are for airplanes!
Joined: Aug 1999
Posts: 184
Member
Member
Offline
Joined: Aug 1999
Posts: 184
Parse error: parse error in /home/stylus/public_html/forums/addpost.php on line 1288

Line 1288 for me is...

?>



Silly ricer.. Wings are for airplanes!
Sponsored Links
Joined: May 1999
Posts: 90
Member
Member
Offline
Joined: May 1999
Posts: 90
> because the prior mktime was giving me -1 for some reason.
It's because you can't have all three of them (month, day and year) equal to 0.

Joined: May 1999
Posts: 149
Enthusiast
Enthusiast
Offline
Joined: May 1999
Posts: 149
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

Joined: May 1999
Posts: 149
Enthusiast
Enthusiast
Offline
Joined: May 1999
Posts: 149
Hey Excel,

A couple of suggestions....

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.

Cheers,
Max

Joined: Jun 2001
Posts: 3,273
That 70's Guy
That 70's Guy
Offline
Joined: Jun 2001
Posts: 3,273
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)

Joined: May 1999
Posts: 149
Enthusiast
Enthusiast
Offline
Joined: May 1999
Posts: 149
Cool - looking forward to it.

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?

Max

Joined: Jan 2001
Posts: 374
Enthusiast
Enthusiast
Offline
Joined: Jan 2001
Posts: 374
Is there a aorking demo (has somebody got it up an (running) so that I can evaluate what is does and whether I want it on my boards?

Thanks!

Joined: Jun 2001
Posts: 3,273
That 70's Guy
That 70's Guy
Offline
Joined: Jun 2001
Posts: 3,273
You can mess with it on my test site.. http://www.chattersonline.com/test/ubbthreads.php

click on the "Chat Calendar" board and add events after you have registered... []https://www.ubbdev.com/threads/php/images/icons/wink.gif[/]

Joined: Jun 2001
Posts: 3,273
That 70's Guy
That 70's Guy
Offline
Joined: Jun 2001
Posts: 3,273
Do you mean have the calendar display the event with x number of replies under it?

Joined: May 1999
Posts: 149
Enthusiast
Enthusiast
Offline
Joined: May 1999
Posts: 149
No... I mean have the calendar displayed as is, and then display a few of the latest threads so that people can easily spot the latest additions.

I don't know if these show be on the side or at the bottom.

Regards,
Max

Joined: Jun 2001
Posts: 3,273
That 70's Guy
That 70's Guy
Offline
Joined: Jun 2001
Posts: 3,273
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

[]https://www.ubbdev.com/threads/php/images/icons/smile.gif[/]

Joined: Jun 2001
Posts: 3,273
That 70's Guy
That 70's Guy
Offline
Joined: Jun 2001
Posts: 3,273
I was just thinking that E_Date and E_Time could be one single unix time stamp... one less thing to convert for displays...

Joined: May 1999
Posts: 149
Enthusiast
Enthusiast
Offline
Joined: May 1999
Posts: 149
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

Joined: May 1999
Posts: 149
Enthusiast
Enthusiast
Offline
Joined: May 1999
Posts: 149
Hi Dave,

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?

Cheers,
Max

Joined: Jun 2001
Posts: 3,273
That 70's Guy
That 70's Guy
Offline
Joined: Jun 2001
Posts: 3,273
hmmmm I guess for myself I would want the calendar to always sort with the date/time and let the locations fall where they may... []https://www.ubbdev.com/threads/php/images/icons/smile.gif[/]

(just my personal prefs) []https://www.ubbdev.com/threads/php/images/icons/wink.gif[/]

Joined: May 1999
Posts: 149
Enthusiast
Enthusiast
Offline
Joined: May 1999
Posts: 149
So you can easily modify postlist.php ...

Just replace
ORDER BY E_Location

with

ORDER BY E_Time

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.

Max

Joined: Jun 2001
Posts: 3,273
That 70's Guy
That 70's Guy
Offline
Joined: Jun 2001
Posts: 3,273
Right []https://www.ubbdev.com/threads/php/images/icons/smile.gif[/]

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...

Take a look at the display in the bottom left corner of my test site.. []https://www.ubbdev.com/threads/php/images/icons/smile.gif[/]

Joined: Jun 2001
Posts: 3,273
That 70's Guy
That 70's Guy
Offline
Joined: Jun 2001
Posts: 3,273
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).

Anyone else having problems?

Joined: Jun 2001
Posts: 3,273
That 70's Guy
That 70's Guy
Offline
Joined: Jun 2001
Posts: 3,273
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.

Joined: May 1999
Posts: 149
Enthusiast
Enthusiast
Offline
Joined: May 1999
Posts: 149
Hi Dave,

No, I don't see what you mean.

I registered on your site and couldn't post new threads, do you have permissions set up right?

I can delete all the events on my calendar, post new ones, and everything is fine.

Max

Joined: May 1999
Posts: 149
Enthusiast
Enthusiast
Offline
Joined: May 1999
Posts: 149
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.

Regards,
Max

Joined: Jun 2001
Posts: 3,273
That 70's Guy
That 70's Guy
Offline
Joined: Jun 2001
Posts: 3,273
Hi Max

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:

$EDate = mktime (0,0,0,$mon,$day,$year);

To this:

$EDate = mktime ($hour_convert,$min,0,$mon,$day,$year);

So that the "Upcoming Events" pal box could pull the events in the correct order that they are happening.


Joined: Jun 2001
Posts: 3,273
That 70's Guy
That 70's Guy
Offline
Joined: Jun 2001
Posts: 3,273
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);

}

Just above the file deletion.

It seems to be working in deleting related events. []https://www.ubbdev.com/threads/php/images/icons/smile.gif[/]

Joined: Jun 2001
Posts: 3,273
That 70's Guy
That 70's Guy
Offline
Joined: Jun 2001
Posts: 3,273
These changes seemed to have helped me. I haven't had any problems while testing and deleting posts. []https://www.ubbdev.com/threads/php/images/icons/smile.gif[/]

Oh and I corrected the permissions for the calendar postings so people can test it out. (thanks letting me know)

Joined: May 1999
Posts: 149
Enthusiast
Enthusiast
Offline
Joined: May 1999
Posts: 149
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.

Max

Joined: May 1999
Posts: 149
Enthusiast
Enthusiast
Offline
Joined: May 1999
Posts: 149
Ah... I thought you would do

$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.

Thoughts?

Max



Joined: May 1999
Posts: 149
Enthusiast
Enthusiast
Offline
Joined: May 1999
Posts: 149
Hi again Dave... I think we've uncovered a 5.5.1 bug which is causing your problem.

See https://www.ubbdev.com/threads/php/showthreaded.php?Cat=&Board=phpbugs&Number=44450

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.

My boards, on 5.5 , don't re-use post numbers.

Max

Joined: Aug 1999
Posts: 184
Member
Member
Offline
Joined: Aug 1999
Posts: 184
In reply to:


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.

Cheers,
Max




Silly ricer.. Wings are for airplanes!
Franky #213750 02/16/2002 11:21 AM
Joined: May 1999
Posts: 149
Enthusiast
Enthusiast
Offline
Joined: May 1999
Posts: 149
Hi Excelsior,

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.

Do you think this will be useful to you?

Max

Joined: Aug 1999
Posts: 184
Member
Member
Offline
Joined: Aug 1999
Posts: 184
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.


Silly ricer.. Wings are for airplanes!
Franky #213752 02/16/2002 3:11 PM
Joined: May 1999
Posts: 149
Enthusiast
Enthusiast
Offline
Joined: May 1999
Posts: 149
Hi Excelsior....

Here's a new version of postlist.php (attached) -

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.

Regards,
Max
Attachments
44460-postlist_v2.1.txt (0 Bytes, 35 downloads)

Last edited by Max Fisch; 02/16/2002 4:09 PM.
Joined: Jun 2001
Posts: 3,273
That 70's Guy
That 70's Guy
Offline
Joined: Jun 2001
Posts: 3,273
I can have the query select WHERE E_Date > $now AND E_Date < 604800 to bring up 7 days of events. []https://www.ubbdev.com/threads/php/images/icons/smile.gif[/]


Joined: May 1999
Posts: 149
Enthusiast
Enthusiast
Offline
Joined: May 1999
Posts: 149
Ah, OK. Well, I can't help but be disappointed because I put my calendar in production, and I can't change the fields anymore []https://www.ubbdev.com/threads/php/images/icons/frown.gif[/]

On another note, see my message entitled "Easier hack merges" at https://www.ubbdev.com/threads/php/showthreaded.php?Cat=&Board=phpcustomizing&Number=44460 for a version of the postlist.php which breaks out the calendar code from the original code... much easier to upgrade or add additional hacks this way.

Regards,
Max

Joined: Jun 2001
Posts: 3,273
That 70's Guy
That 70's Guy
Offline
Joined: Jun 2001
Posts: 3,273
That query wont work but I made one that does... lol along the same lines.

In the calendar addon they only need change one line in the addpost script so that E_Date also includes the time from E_Time.

This will allow for the events to be displayed as they happen. Otherwise the time display will not be in order. It will also be an option to show the location along with the subject in the dispaly []https://www.ubbdev.com/threads/php/images/icons/smile.gif[/]

Joined: Jun 2001
Posts: 3,273
That 70's Guy
That 70's Guy
Offline
Joined: Jun 2001
Posts: 3,273
My test site is 5.5 only... I am waiting for the 6.0 before upgrading my main site then I'll set the test site up with that. For the time being just kicking 5.5 around... lol []https://www.ubbdev.com/threads/php/images/icons/wink.gif[/]

Joined: May 1999
Posts: 149
Enthusiast
Enthusiast
Offline
Joined: May 1999
Posts: 149
That's incomprehensible then. Our boards are behaving differently regarding deleted/re-added posts.
Max

sjsaunders #213758 02/16/2002 11:21 PM
Joined: May 1999
Posts: 149
Enthusiast
Enthusiast
Offline
Joined: May 1999
Posts: 149
Looking at this again, I'm confused here...
why the complicated first part? Are you doing anything more than checking whether B_Calendar is equal to Y ?

How about simply

$query = "
DELETE FROM w3t_Events
WHERE E_Number = '$Number'
";
$dbh -> do_query($query);

no if conditions, no double queries, just delete if you find it... why the rest of the stuff - am I missing something?

Max

Joined: May 1999
Posts: 149
Enthusiast
Enthusiast
Offline
Joined: May 1999
Posts: 149
Here's an update to the calendar.

- The default view now has both the calendar as well as the posts.
- Changed terminology as a result (show/hide calendar, instead of change views)
- Several small bug fixes
- Reworked code in postlist.php to make it much easier to upgrade in the future
- Included small graphics to navigate from month to month
- Event seperator is no longer browser-specific (the small > were previously only working in Explorer)

Enjoy!
Max

Joined: Jun 2001
Posts: 3,273
That 70's Guy
That 70's Guy
Offline
Joined: Jun 2001
Posts: 3,273
Sounding great Max []https://www.ubbdev.com/threads/php/images/icons/smile.gif[/]

Were you going to make that change in the E_Date variable to include the time also? This doesn't seem to affect the display order for "days" and helps when sorting with time specific orders. []https://www.ubbdev.com/threads/php/images/icons/smile.gif[/]

Joined: May 1999
Posts: 149
Enthusiast
Enthusiast
Offline
Joined: May 1999
Posts: 149
Forgot to upload, sorry... here it is.
Max
Attachments
44541-calendar_V2.1.zip (0 Bytes, 10 downloads)

sjsaunders #213762 02/18/2002 6:43 AM
Joined: May 1999
Posts: 149
Enthusiast
Enthusiast
Offline
Joined: May 1999
Posts: 149
Hi Dave,

I'm not sure which change you mean... is it this one, which calculates the date differently, or this one, where I think you're talking about modifying the fields? Or did I misunderstand the latter, are these two one and the same?

Max

Joined: Jun 2001
Posts: 3,273
That 70's Guy
That 70's Guy
Offline
Joined: Jun 2001
Posts: 3,273
Max,

I sent an email explaining what to change in the addpost.php script. []https://www.ubbdev.com/threads/php/images/icons/smile.gif[/]

Let me know if it doens't clear things up. []https://www.ubbdev.com/threads/php/images/icons/smile.gif[/]

Joined: Feb 2002
Posts: 67
Power User
Power User
Offline
Joined: Feb 2002
Posts: 67
Suggestions for the next version:

  • variables for the weekdays & months for international users ... for configuring language-specific names
  • option to use & display the 24h- or am/pm-time-format

sjsaunders #213765 02/18/2002 10:55 AM
Joined: May 1999
Posts: 149
Enthusiast
Enthusiast
Offline
Joined: May 1999
Posts: 149
Thanks Dave...

Readers: The change in addpost.php described on https://www.ubbdev.com/threads/php/showthreaded.php?Cat=&Board=phpcustomizing&Number=44441 doesn't interfere with the normal operation of the calendar, and will be included in the next versino of the calendar in order to support Dave's indexpal hack - in the meantime, if you install indexpal, just make the change on your own []https://www.ubbdev.com/threads/php/images/icons/smile.gif[/]
Max

Maze_Brendan #213766 02/18/2002 11:09 AM
Joined: Mar 2000
Posts: 21,079
Likes: 3
I type Like navaho
I type Like navaho
Joined: Mar 2000
Posts: 21,079
Likes: 3
I had to remove the linked zip files from the thread as they violate copyright rules by including the full ubbthreads files modified to include the calendar modification. Sorry for any inconvenience.

I am available to assist with documenting the differences so we can post this the correct way and not get the site in trouble... []https://www.ubbdev.com/threads/php/images/icons/smile.gif[/] If we each take a file and doc the changes, I can put them together in one file or Max can while he is working on the new version []https://www.ubbdev.com/threads/php/images/icons/smile.gif[/]


- Allen wavey
- What Drives You?
Joined: May 1999
Posts: 149
Enthusiast
Enthusiast
Offline
Joined: May 1999
Posts: 149
Hi Allen,

As per my PM: would a possible solution entail "replacement" texts for each of the original scripts? Ie if an original script has a hundred lines, maybe the hack should say "replace lines 2 to 99 with the following" ... would that work for your copyright lawyer?

Regards,
Max

Joined: Mar 2000
Posts: 21,079
Likes: 3
I type Like navaho
I type Like navaho
Joined: Mar 2000
Posts: 21,079
Likes: 3
The only problem with using line numbers would be if they had already modified their files, then the numbers would be off. The same problem would occur if they just uploaded the files previously presented and had other modifications involved. Errors would most likely occur if there were conflicts []https://www.ubbdev.com/threads/php/images/icons/smile.gif[/]

We've been handling it like this at ubbdev for a couple years now, you can post a line or 2 above/below so the user can find the correct spot to make the changes in their files. We can also write mhk files so the user can auto-install them without error (as long as the mhk file was written correctly []https://www.ubbdev.com/threads/php/images/icons/wink.gif[/] ) - I've been using it for a year or so now and it works really well []https://www.ubbdev.com/threads/php/images/icons/smile.gif[/] - www.multihack.com - a threads skin is not available yet, but we can easily adapt it to the ubb or vb one until it is ready []https://www.ubbdev.com/threads/php/images/icons/smile.gif[/]


- Allen wavey
- What Drives You?
Joined: May 1999
Posts: 149
Enthusiast
Enthusiast
Offline
Joined: May 1999
Posts: 149
Hi Allen,

The way I'm proposing to do it, I don't think that there could be many errors. In concept, I'm proposing:

In addpost.php, find the section that starts with:

# Note: if you modify ANY code within UBBThreads, we at Infopop Corporation
# cannot offer you support-- thus modify at your own peril []https://www.ubbdev.com/threads/php/images/icons/smile.gif[/]
# ---------------------------------------------------------------------------
*/

and that ends with:

$html -> send_footer();
?>

And replace it with the attached file.

I'm not being facecious... would the above address your copyright lawyer's concerns?

Regards,
Max

Joined: Mar 2000
Posts: 21,079
Likes: 3
I type Like navaho
I type Like navaho
Joined: Mar 2000
Posts: 21,079
Likes: 3
I don't have a copyright Lawyer []https://www.ubbdev.com/threads/php/images/icons/smile.gif[/]

And your newer example is still basically the whole file, minus the copyright info.. heheh... we've always used just 1-2 lines above or below the code section needing to be replaced, it keeps us in copyright heaven and doesn't delete the 2 rows of post icons I see above this message box []https://www.ubbdev.com/threads/php/images/icons/smile.gif[/] (it makes modifications minimally conflict with other modifications).

I'll ask Rick to look at this and post his thoughts... thanks for being patient.


- Allen wavey
- What Drives You?
Joined: Mar 2000
Posts: 21,079
Likes: 3
I type Like navaho
I type Like navaho
Joined: Mar 2000
Posts: 21,079
Likes: 3
If it would help, I can write one based on the currently available modification and show all developers how it should be done... would help with questions in the future.


- Allen wavey
- What Drives You?
Joined: Aug 1999
Posts: 184
Member
Member
Offline
Joined: Aug 1999
Posts: 184
What we are trying to do here is prevent those who have not paid for the rights to use the board to collect a majority of the files freely. If you send me your edited code, I can toss em in Beyond Compare and make an update text for all the differences and you can publish that.


Silly ricer.. Wings are for airplanes!
Franky #213773 02/18/2002 5:38 PM
Joined: May 1999
Posts: 149
Enthusiast
Enthusiast
Offline
Joined: May 1999
Posts: 149
Sorry, I thought the primary concern was a copyright concern, as opposed to the collection of the files by people who have not paid for the software.

I understand now.

I guess the best way would be to all agree on a utility to install hacks. I've never used Beyond Compare, but that might be an option - Allen mentions Multihack above. I hope we can find one which is open source, and that makes it easy to achieve the necessary pupose.

A much simpler way might be to restrict access to the hack board to those who have a current license. If you have a valid licence, you belong to a user group who has read/download privileges, otherwise you don't.

I guess I'll leave it to Allen at this point.

Regards,
Max

Joined: Mar 2000
Posts: 21,079
Likes: 3
I type Like navaho
I type Like navaho
Joined: Mar 2000
Posts: 21,079
Likes: 3
Sorry I wasn't making myself clear []https://www.ubbdev.com/threads/php/images/icons/smile.gif[/] I mentioned copyright because that's part of it, and making the files available to people who do not own the script is the other part []https://www.ubbdev.com/threads/php/images/icons/crazy.gif[/]

Someone mentioned diffs, as in deleting everything except the differences and 1-2 lines above and below. I had never thought of that before, but using Beyond Compare would make it extremely simple to copy those changes into the user's files. Should be fine with Rick as well and not violate any copyright concerns. I'll give it a shot with the calendar scripts you posted and see how well Beyond Compare handles it. []https://www.ubbdev.com/threads/php/images/icons/smile.gif[/]


- Allen wavey
- What Drives You?
Joined: Mar 2000
Posts: 21,079
Likes: 3
I type Like navaho
I type Like navaho
Joined: Mar 2000
Posts: 21,079
Likes: 3
hmmm.. the problem with that method is BC wants things to match up, so it will put pieces matching in the wrong place just so it does match. We may need 4-5 lines to get the differences to line up like they should, then we run into more possible conflicts. I'll look at it some more, any other ideas welcomed as well []https://www.ubbdev.com/threads/php/images/icons/smile.gif[/]


- Allen wavey
- What Drives You?
Joined: Jun 2001
Posts: 176
Member
Member
Offline
Joined: Jun 2001
Posts: 176
attachment for 2.1 is not working

interforos #213777 02/19/2002 11:29 AM
Joined: Sep 2001
Posts: 129
Member
Member
Offline
Joined: Sep 2001
Posts: 129
Ok I have tried and checked everything but this dosnt seem to work for me, I am on 5.5.1 I have checked all the changes have been made to the DB and they have I have created a new forum and checked a dump of the DB to check that the Calender flag is set and it is.
When you post in the forum the only change I see is the header for the main box is 'Detailed Event Description', if you reply I see no changes and when you view the post it displays as normal?
I have definetly changed the 5 files that come with the zip.
Can anyone suggest what I may be wrong.

Thanx
Clint


Regards
Clint

Running on WIN2003 Web Server.

Paranoid people get followed too!
Joined: May 1999
Posts: 149
Enthusiast
Enthusiast
Offline
Joined: May 1999
Posts: 149
Hi Allen,

I would respectfully suggest that you/Scream/Infopop have to figure out what it is you're protecting yourselves against.

If it's copyright issues that you're worrying about, then I do suggest you get a copyright lawyer to draft up a standard agreement which covers derivative works, otherwise people posting hacks may have a claim to their work, regardless of the mechanism used to communicate these hacks to others.

If it's access to the scripts that you're worried about, then I would argue that a restricted-access board for certain hacks may be the easiest & most expedient solution.

Perhaps you need a combination of both.

Regards,
Max

interforos #213779 02/19/2002 6:05 PM
Joined: May 1999
Posts: 149
Enthusiast
Enthusiast
Offline
Joined: May 1999
Posts: 149

Joined: May 1999
Posts: 149
Enthusiast
Enthusiast
Offline
Joined: May 1999
Posts: 149
Hi Clint,

What do you see when you fist click on the board? Do you see the calendar?
Max

Joined: Mar 2000
Posts: 21,079
Likes: 3
I type Like navaho
I type Like navaho
Joined: Mar 2000
Posts: 21,079
Likes: 3
Max, I really appreciate the work you put in and shared, but I don't understand what is difficult to understand about this. The files are copyrighted and as such cannot be redistributed to anyone:

# You may not distribute this program in any manner, modified or otherwise,
# without the express, written written consent from Infopop Corporation.

That is at the top of every file included with threads. You've been around a while now, Rick has stated he didn't allow posting of complete files any time recently.

Restricted access to forums where files can be posted is impossible anytime soon as well - we do not have access to members area data and will not be getting it. Anything short of that will be circumvented quite easily.

We have been posting text files of changes to be added for a while now, it does take some time - if you'd like for me to do the first one, no problem, then you can edit it to update it for any future changes.


- Allen wavey
- What Drives You?
Joined: Sep 2001
Posts: 129
Member
Member
Offline
Joined: Sep 2001
Posts: 129
No max I see it just like a normal post I have never seen a calendar view as yet.


Regards
Clint

Running on WIN2003 Web Server.

Paranoid people get followed too!
Joined: Sep 2001
Posts: 129
Member
Member
Offline
Joined: Sep 2001
Posts: 129
This copywrite arguement seems a bit silly to me, my point being that you can go to many serial/hack type site and download the whole version but you cant go to the official site and download a modified [no warrenty given] file !


Regards
Clint

Running on WIN2003 Web Server.

Paranoid people get followed too!
Joined: Sep 2001
Posts: 129
Member
Member
Offline
Joined: Sep 2001
Posts: 129
Max if you would like to take a look you can sign up at www.turbosport.co.uk and let me know your username.


Regards
Clint

Running on WIN2003 Web Server.

Paranoid people get followed too!
Joined: May 1999
Posts: 149
Enthusiast
Enthusiast
Offline
Joined: May 1999
Posts: 149
Hi Turbo,

> No max I see it just like a normal post

No... before you click on an individual post, when you click on a board name, ie when the URL shown is postlist.php . What do you see?

Regards,
Max

Joined: Aug 1999
Posts: 184
Member
Member
Offline
Joined: Aug 1999
Posts: 184
It could be that the MySQL statement to turn on the calendar was inputted wrong. I was confused on this at first and found that the script wanted the Displayed name of the board, not the hidden name.


Silly ricer.. Wings are for airplanes!
Franky #213787 02/20/2002 9:55 PM
Joined: May 1999
Posts: 149
Enthusiast
Enthusiast
Offline
Joined: May 1999
Posts: 149
You can edit your board, make sure that everything is OK, then run the command again to make sure that the calendar field in is set to "Y".

Max

Franky #213788 02/21/2002 3:43 AM
Joined: Sep 2001
Posts: 129
Member
Member
Offline
Joined: Sep 2001
Posts: 129
The Displayed title for the board is 'Turbosport Calandar'
This is the postlist URL:
http://bbs.turbosport.co.uk/postlist.php?Cat=&Board=TSCalendar

Here is the SQL Statement I ran:
UPDATE w3t_Boards
SET Bo_Calendar = 'Y'
WHERE Bo_Title = 'TSCalendar' ;

The field is set to Y. if you look at the sql dump here:
INSERT INTO w3t_boards VALUES ('Turbosport Calendar','The Turbosport Calendar','TSCalendar',NULL,2,1014130982,'Off','Off',47,1014112870,0,'Off','yes',2,'-1-','-1-',1,NULL,'General Discussion',0,'Slim',',CossieClint,','-1-',NULL);

All you get is a normal view !


Regards
Clint

Running on WIN2003 Web Server.

Paranoid people get followed too!
Joined: May 1999
Posts: 149
Enthusiast
Enthusiast
Offline
Joined: May 1999
Posts: 149
Hi Turbo,

No, the field doesn't seem to have been successfully set to 'Y'. The last value is NULL, it should be Y.

In the mysql console, you might have to run
USE yourdatabasenamehere;
prior to the sql statement.

Regards,
Max


Joined: Jun 2001
Posts: 3,273
That 70's Guy
That 70's Guy
Offline
Joined: Jun 2001
Posts: 3,273
Wouldn't the correct query be this:

UPDATE w3t_Boards
SET Bo_Calendar = 'Y'
WHERE Bo_Keword = 'TSCalendar';


and not:

UPDATE w3t_Boards
SET Bo_Calendar = 'Y'
WHERE Bo_Title = 'TSCalendar';


TSCalendar doens't seem to be the title but hey it's late and I'm tired. []https://www.ubbdev.com/threads/php/images/icons/wink.gif[/]

sjsaunders #213791 02/22/2002 7:48 AM
Joined: Sep 2001
Posts: 129
Member
Member
Offline
Joined: Sep 2001
Posts: 129
Its working !

Thanx Guys I ran this statement:
UPDATE w3t_Boards
SET Bo_Calendar = 'Y'
WHERE Bo_Keyword = 'TSCalendar';

Does this mean the instructions are wrong ? has anyone else not had this issue?


Regards
Clint

Running on WIN2003 Web Server.

Paranoid people get followed too!
Joined: Jun 2001
Posts: 3,273
That 70's Guy
That 70's Guy
Offline
Joined: Jun 2001
Posts: 3,273
I don't know for sure. I never looked at the instructions that closely.. LoL

Joined: May 1999
Posts: 149
Enthusiast
Enthusiast
Offline
Joined: May 1999
Posts: 149
[]https://www.ubbdev.com/threads/php/images/icons/blush.gif[/]
Ouch... yes, sorry the instructions were incorrect. I entered the field manually using phpmydmin, so I just wrote out the query but didn't use it... sorry for the frustration I caused. I'm glad you got it working. It's looking good!
Regards,
Max

Joined: Sep 2001
Posts: 129
Member
Member
Offline
Joined: Sep 2001
Posts: 129


Regards
Clint

Running on WIN2003 Web Server.

Paranoid people get followed too!
Joined: Feb 2002
Posts: 2,286
Veteran
Veteran
Joined: Feb 2002
Posts: 2,286
The attachment seems to be invalid - it doesn't exist []https://www.ubbdev.com/threads/php/images/icons/frown.gif[/]


Fans Focus - Focusing on Fans of Sport

(Okay - mainly football (the British variety wink at the moment - but expanding all the time....)
Gorlum #213796 02/23/2002 10:02 AM
Joined: May 1999
Posts: 149
Enthusiast
Enthusiast
Offline
Joined: May 1999
Posts: 149

Joined: May 1999
Posts: 149
Enthusiast
Enthusiast
Offline
Joined: May 1999
Posts: 149
No problem Allen, I understand.

Cheers,
Max

Joined: Feb 2002
Posts: 2,286
Veteran
Veteran
Joined: Feb 2002
Posts: 2,286
Thanks.

Guess this is one modification that I will not be installing.

Ian


Fans Focus - Focusing on Fans of Sport

(Okay - mainly football (the British variety wink at the moment - but expanding all the time....)
Joined: Jan 2002
Posts: 218
Enthusiast
Enthusiast
Offline
Joined: Jan 2002
Posts: 218
Max,

Any chance you'll be re-writing the instructions? I'd like to install this for my board to provide a calendar of upcomming episodes, etc.

If you need some help with the instructions, I can help out.

SDS #213800 02/23/2002 5:24 PM
Joined: May 1999
Posts: 149
Enthusiast
Enthusiast
Offline
Joined: May 1999
Posts: 149
Hi Wraith,

Frankly, it's a lot of work, and I don't think that I'm interested in re-writing the instructions for something that's working fine... but if you, Allen or others want to do it then that's perfectly cool .

Perhaps it would be best if Allen orchestrates the effort as he initially suggested. Allen?

FYI - I'm going on vactation in a few hours, I will be away for a week. I'll send Allen a PM and email him the latest scripts again.

Regards,
Max

Joined: Mar 2000
Posts: 21,079
Likes: 3
I type Like navaho
I type Like navaho
Joined: Mar 2000
Posts: 21,079
Likes: 3
Thank You Max, sure, I'll write one, please send a zip to [][email protected][/] or pm me a link to them and I'll get them written up.

Have a great vacation, hopefully my instructions won't break it too much []https://www.ubbdev.com/threads/php/images/icons/smile.gif[/]


- Allen wavey
- What Drives You?
Joined: May 1999
Posts: 149
Enthusiast
Enthusiast
Offline
Joined: May 1999
Posts: 149
Hi Allen,

I just PMed you...

FYI, the latest version that I sent you modifies the display: by default, it includes the calendar view as well as the threaded view, and it allows you to navigate to "hide" the calendar, as opposed to "switch views".

I did this in reaction to my readers, who felt with the prior version that although you could switch to a standard view, doing so was a little bit awkward.

It would be a relatively easy matter to change this back to the original way.

I would suggest that the best way to play around with this would be to install it here, decide on whether you like this approach or not, see if want to change some things (eg I hestated whether to include the original navbar in the calendar view), and then make the translations from a working final version.

Regards,
Max

Joined: Mar 2000
Posts: 21,079
Likes: 3
I type Like navaho
I type Like navaho
Joined: Mar 2000
Posts: 21,079
Likes: 3


- Allen wavey
- What Drives You?
Joined: Sep 2001
Posts: 129
Member
Member
Offline
Joined: Sep 2001
Posts: 129
Getting this error:
Warning: unexpected error in date() in addpost.php on line 276

I did a fix that seems ok here:

I don’t think you can post a new topic in a calendar forum without the dates so changed this in addpost.php to clear the error with replies

Where: $date_string = date(".........);

I changed it to this: {$date_string} { $date_string = date(".........); }

Hope this helps


Regards
Clint

Running on WIN2003 Web Server.

Paranoid people get followed too!
Joined: Mar 2000
Posts: 21,079
Likes: 3
I type Like navaho
I type Like navaho
Joined: Mar 2000
Posts: 21,079
Likes: 3
For those experienced that can handle diff comparisons, I have the differences between stock 5.5.1 threads files and the calendar modification (v2.2).

diff.zip
(stock 5.5.1 on the left and modifications on the right)

For us mere mortals, here is a more understandable instruction set:
calendar_2_2.zip


- Allen wavey
- What Drives You?
Joined: Aug 1999
Posts: 184
Member
Member
Offline
Joined: Aug 1999
Posts: 184
Line number 558 of install.txt is marked to edit newpost.php when I think you meant postlist.php instead.


Silly ricer.. Wings are for airplanes!
Joined: Mar 2000
Posts: 21,079
Likes: 3
I type Like navaho
I type Like navaho
Joined: Mar 2000
Posts: 21,079
Likes: 3
Thanks... my eyes were crossing about that time []https://www.ubbdev.com/threads/php/images/icons/smile.gif[/]

Zip file updated...


- Allen wavey
- What Drives You?
Joined: Feb 2002
Posts: 1,759
Addict
Addict
Offline
Joined: Feb 2002
Posts: 1,759
After looking at the 100+K installation file... I got sick to my stomach (haha not quite) But how long does installing this take? I want to make sure I set enough time aside to do this and not end up somewhere in the middle and have to stop, and forget where I started, and blah.. no fun! []https://www.ubbdev.com/threads/php/images/icons/laugh.gif[/]

Joined: Feb 2001
Posts: 104
Journeyman
Journeyman
Offline
Joined: Feb 2001
Posts: 104
Well the good news is that it took me about 30 mins. and the majority of the file is one big chunk.

The bad news is that it's giveing me a bit of a problem working.

Looks like everything is going good, databases seem to have been inserted correctly and such. the calendar shows up in the forum I created for it. but the messages don't show up in the squares ???

Any ideas?


Joined: Aug 1999
Posts: 184
Member
Member
Offline
Joined: Aug 1999
Posts: 184
It took me about 20-30 minutes to update from an untouched set of 5.5 files. As for the messages not showing up, I would suggest doing it again with a fresh set of those files.

I recommend using editplus 2 www.editplus.com

Or use Editplus 2 on a fresh set and then use Beyond Compare to extract your own already added stuff into the fresh calendar ones that you just edited.


Silly ricer.. Wings are for airplanes!
Joined: Aug 2000
Posts: 262
Enthusiast
Enthusiast
Offline
Joined: Aug 2000
Posts: 262
i have one request for this. make it its own file. not included with postlist and such. much easier solution for everyone. and no hacking invloved.

vent #213812 02/26/2002 11:35 AM
Joined: Mar 2000
Posts: 21,079
Likes: 3
I type Like navaho
I type Like navaho
Joined: Mar 2000
Posts: 21,079
Likes: 3
excellent point poil... would make it much easier to implement and not conflict with other modifications so easily... []https://www.ubbdev.com/threads/php/images/icons/smile.gif[/]


- Allen wavey
- What Drives You?
Joined: Feb 2001
Posts: 104
Journeyman
Journeyman
Offline
Joined: Feb 2001
Posts: 104
Fixed it.

Was starting to re-start with a fresh set, and wouldn't you know it? The VERY First thing in the Find / Replace, (add Bo_Calendar) wasn't saved the first go around. Added that variable and everything runs great. []https://www.ubbdev.com/threads/php/images/icons/blush.gif[/]

I took a quick look at edit plus, looks pretty clean, but I'm into editpad pro and got used to it. Thanks anyway....

BTW, again, to those that made this one, Good Job! Just adding it you can see a LOT of coding went into it.


Joined: Feb 2002
Posts: 1,759
Addict
Addict
Offline
Joined: Feb 2002
Posts: 1,759
Hrmm... ok, so it takes about a half hour to install. So.. would you advise against installing this while intoxicated? As I'd like to do it right now since my users are bitching at me about it.. but I don't wanna mess it up if ya know what I mean []https://www.ubbdev.com/threads/php/images/icons/laugh.gif[/]

Joined: Nov 2001
Posts: 54
Junior Member
Junior Member
Offline
Joined: Nov 2001
Posts: 54
[]https://www.ubbdev.com/threads/php/images/icons/smile.gif[/] []https://www.ubbdev.com/threads/php/images/icons/smile.gif[/] thank you to all who put the effort in on this[]https://www.ubbdev.com/threads/php/images/icons/smile.gif[/] []https://www.ubbdev.com/threads/php/images/icons/smile.gif[/]

I am extemely new to this and it fired first time with no problems..........

Now I have caught the hacking bug could someone give me a clue as to where you change the "city" tag when posting and aslo where do you change the text limit in the "city" box.
Or would it be easier to change the order of how the calender displays the texts, maybe subject first?

sorry to pester but you are all to blame.....lol

Joined: Nov 2001
Posts: 54
Junior Member
Junior Member
Offline
Joined: Nov 2001
Posts: 54
sorry!!!!!!

newpost.php of course

vent #213817 02/27/2002 2:42 PM
Joined: Jan 2002
Posts: 218
Enthusiast
Enthusiast
Offline
Joined: Jan 2002
Posts: 218
In reply to:

poil said:
i have one request for this. make it its own file. not included with postlist and such. much easier solution for everyone. and no hacking invloved.




That's a really good idea, and something that should probably be considered more for the future of hacks in general. Making it a separate file eliminates the sometimes lenghty process of modifying existing code and then comparing that code to future releases. (yeah, I use Beyond Compare, but still...:)).

For the record, I use EditPad Pro as well and it's the best text-based editor I've ever seen. Clean, simple to use, able to support multiple files, spell check capability, templates for different file-types, etc.

No, they aren't paying me to say that. []https://www.ubbdev.com/threads/php/images/icons/laugh.gif[/]

SDS #213818 02/27/2002 3:55 PM
Joined: Aug 2000
Posts: 262
Enthusiast
Enthusiast
Offline
Joined: Aug 2000
Posts: 262
and if you are on a macintosh, you should use BBedit. it is the best text editing software for the macintosh. simple search and replce functions, multiple file search end replace functions. and yes they are paying me to tell you this, or i wish they would. []https://www.ubbdev.com/threads/php/images/icons/frown.gif[/]

vent #213819 03/07/2002 9:59 PM
Joined: Apr 2001
Posts: 3,266
Member
Member
Offline
Joined: Apr 2001
Posts: 3,266
There is not a working link for this hack on the thread!

Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
This is a great Hack Max! Thanks!

Question. Is there an easy way to disable/not require the "city"?

Another question. I've got these funny characters "õõõ" before each event instaead of arrows like I see on other peoples installs. Maybe it's just my browser.
You can see at: http://www.AtlantaSinglesChoir.com/calendar

Thanks again!

Joined: Mar 2000
Posts: 21,079
Likes: 3
I type Like navaho
I type Like navaho
Joined: Mar 2000
Posts: 21,079
Likes: 3
In reply to:

There is not a working link for this hack on the thread!




I'll post the stuff as soon as I get back to work, maybe this afternoon.


- Allen wavey
- What Drives You?
vent #213822 03/09/2002 2:19 PM
Joined: May 1999
Posts: 149
Enthusiast
Enthusiast
Offline
Joined: May 1999
Posts: 149
good idea poil

Joined: May 1999
Posts: 149
Enthusiast
Enthusiast
Offline
Joined: May 1999
Posts: 149
Hi dRiver,
in the "newpost.php", look for "City" and replace it, and look for "maxlength = 15" and replace it.
Regards,
Max

Joined: May 1999
Posts: 149
Enthusiast
Enthusiast
Offline
Joined: May 1999
Posts: 149
On the funny characters front: in postlist.php, look for

$events .= "<font color=red><b>

and immediately following that, check out what you've got... I'm using ››› , you might want to start with copying/pasting these characters right there, and if that doesn't work out you can change them to something else that works.

On the City front, the field name is "Location"... it's not supereasy, you need to tinker with it a bit. You would have to:

in newpost.php, find

<table border="0"><tr>
<td>City</td>
<td>  </td>
<td>Date</td>
<td>  </td>
<td>Time</td></tr><tr><td>
<input type=text name = Location maxlength = 15 class="formboxes" size=15></td>
<td>  </td><td>
<SELECT NAME="day" class="formboxes">

And tinker around that section to remove the City/Location and reformat the table.

Also, in postlist.php, remove these three lines:
if (!$Location) {
$Location = "--no location--";
}


Regards,
Max


Joined: May 1999
Posts: 149
Enthusiast
Enthusiast
Offline
Joined: May 1999
Posts: 149
On non-calendar boards, the message box is incorrectly entitled "Detailed Event Description" instead of the standard "Post".


In newpost.php , find

if ($Calendar = 'Y') {
echo "Detailed Event Description<br>";

and replace with

if ($Calendar == 'Y') {
echo "Detailed Event Description<br>";

Max

Joined: Nov 2001
Posts: 54
Junior Member
Junior Member
Offline
Joined: Nov 2001
Posts: 54
thanx for the reply Max

lanet #213827 03/12/2002 9:01 AM
Joined: Apr 2001
Posts: 3,266
Member
Member
Offline
Joined: Apr 2001
Posts: 3,266
Just a little insight here as I saw earlier someone brought this up.

In your instructions you create the calendar to display on the top of all forums through the add table function. I followed your instructions to a tee and I did not like what I saw. Great work on the hack but I think most people would like to see threads not a calendar staring them in their face when they enter a forum. So here is what I did and I hope I did it correct. I made another forum called calendar and made sure the BO_Calender field had Y in it for that particular forum. I then edited all other forums to blank ( no Y ) so that there is nothing on that table and optimized my tables. I end up with forums all normal and a calendar forum which displays the calendar.

My only question is the table field Bo_Calendar for all the forums that are set to nothing is this fine?

Everything is working right.

Maze_Brendan #213828 03/12/2002 11:30 AM
Joined: Mar 2002
Posts: 15
Newbie
Newbie
Offline
Joined: Mar 2002
Posts: 15
I just want to say first I think what you are doing here is great. I was also with you guys over at wwwthreads and just renewed my subscription to UBB mainly because of the hacks I saw you guys come up with, so hats off! I would love to get my hands on the Calendar hack if you could give me some sort of location for it? (I did get the intergrated index pal thingy going on my site and I love it,Thanks Dave!) Just gotta twist my users arms to go with the PHP version of threads versus the Perl version! thanks in advance!.

Pappy
My site is over at www.greatlakesalliance.com
it is an online gaming site for ultima online and the calendar hack would work great on our Event forums.

Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
Thanks Max. I decided not to take the field out, but to use the instructions you gave in another post to change the name and field length of it. Thanks! Excellent work!

Joined: May 1999
Posts: 149
Enthusiast
Enthusiast
Offline
Joined: May 1999
Posts: 149
omega,

in postlist.php, look for
if ( !$cs ) { $cs = 2 ; }

If you change that to

if ( !$cs ) { $cs = 2 ; }

The result will be that by default, you will see calendar boards in their "hide calendar" mode, and you would have to click on "show calendar" on top to see the calendar. So it wouldn't "stare you in the face".

As for blank fields for Bo_Calendar for non-calendar boards, yes, that's OK.

Regards,
Max

Joined: Nov 2001
Posts: 54
Junior Member
Junior Member
Offline
Joined: Nov 2001
Posts: 54
Hi Max,

Just noticed something in that the calendar doesn't seem to be operating on the same time offset as the rest of the board.......?

Is this just me and the way I have installed it? I use a 16 hr time offset and the main index page shows the correct time and date but the calendar is a day behind.

I have tried looking in postlist.php to see where the calendar gets the time from with no luck,

lanet #213832 03/13/2002 10:52 PM
Joined: May 1999
Posts: 149
Enthusiast
Enthusiast
Offline
Joined: May 1999
Posts: 149
Hmmm...

You're right: the offset is not being considered in deciding which box to highlight.

The relevant line is:

$thisDay = date('d');

Perhaps someone could assist with a suggested new syntax for that line?

Max

PS - any other symptoms?

Joined: Nov 2001
Posts: 54
Junior Member
Junior Member
Offline
Joined: Nov 2001
Posts: 54
phew!! I thought I had buggered it!!

ouch, I would love to know where to start.......lol

config inc is set from contol panel==>writes to ubbt inc? which is by editdisplay????????

my brain hurts.........am I on the right track to anything?


cheers,

dRiver

Joined: Nov 2001
Posts: 54
Junior Member
Junior Member
Offline
Joined: Nov 2001
Posts: 54
found this piece of code and was wondering if it will fis the time offset and the best way/place to insert it into the hack

$hourdiff = "16";
// hours difference between server time
// and local time in this case, we're *ahead*
// of our server by 16 hours
$timeadjust = ($hourdiff * 60 * 60);
$melbdate = date("l, d F Y h:i a",time() + $timeadjust);
print ("$melbdate");


dRiver

lanet #213835 03/30/2002 9:11 AM
Joined: Mar 2000
Posts: 21,079
Likes: 3
I type Like navaho
I type Like navaho
Joined: Mar 2000
Posts: 21,079
Likes: 3
I added links to the current files in the first post, you can also find them on the 7th page and here:

For those experienced that can handle diff comparisons, I have the differences between stock 5.5.1 threads files and the calendar modification (v2.2).

diff.zip
(stock 5.5.1 on the left and modifications on the right)

For us mere mortals, here is a more understandable instruction set:
calendar_2_2.zip


- Allen wavey
- What Drives You?
SurfMinister #213836 03/30/2002 11:39 AM
Joined: Mar 2002
Posts: 15
Newbie
Newbie
Offline
Joined: Mar 2002
Posts: 15
I love you Guys ****Cries*****
this is awesome really thank you so much Allen and Max and everyone who made this Possible!!!!!!:)

Maze_Brendan #213837 03/30/2002 11:40 AM
Joined: May 1999
Posts: 149
Enthusiast
Enthusiast
Offline
Joined: May 1999
Posts: 149
A second little bugfix...

In addpost.php, find the following:

************************************************************

// -------------------------------------------------------
// Make sure there's a location or it's a reply
if($Calendar == 'Y') {
if ( !$Location && !$replyto ) {
$html -> not_right($ubbt_lang['ALL_FIELDS'],$Cat);
}
}

************************************************************

And replace with:

************************************************************

// -------------------------------------------------------
// If this is a reply, don't treat this as a calendar
if ( $replyto ) { $Calendar = 'N' ; }

// -------------------------------------------------------
// Make sure there's a location or it's a reply
if($Calendar == 'Y' && !$Location) {
$html -> not_right($ubbt_lang['ALL_FIELDS'],$Cat);
}

************************************************************

As a result of the bug, addpost was making unneeded entries into the Events table for replies. If desired, you can delete entries in the w3t_Events table which don't have a location listed.

Also, an old/incorrect date was being shown in the preview of replies on the calendar board.

Regards,
Max

Maze_Brendan #213838 03/30/2002 11:54 AM
Joined: Mar 2002
Posts: 15
Newbie
Newbie
Offline
Joined: Mar 2002
Posts: 15
Hi Max I could not find this code in the Files that Allen posted above?

lsmyourlover #213839 03/30/2002 4:13 PM
Joined: Jun 2001
Posts: 3,273
That 70's Guy
That 70's Guy
Offline
Joined: Jun 2001
Posts: 3,273
This link https://www.ubbdev.com/mods/5.5/calendar_2_2.zip seemed to be working for me. Maybe Allen didn't have the files uploaded at the time you tried to access them. []/forum/images/icons/smile.gif[/]

lsmyourlover #213840 03/31/2002 10:33 AM
Joined: May 1999
Posts: 149
Enthusiast
Enthusiast
Offline
Joined: May 1999
Posts: 149
Hmmm... not sure... You need to apply the change to the end-result.

If you implemented the changes using Allan's "differential" approach, and care to send me the resulting addpost.php, I can take a look and post the necessary change.

But you should be able to find the following string
!$Location && !$replyto
in your addpost.php to locate the section in question.

Regards,
Max

Maze_Brendan #213841 03/31/2002 12:30 PM
Joined: Mar 2002
Posts: 15
Newbie
Newbie
Offline
Joined: Mar 2002
Posts: 15
thanks got it working []/forum/images/icons/smile.gif[/]
I tried to find the whole thing and I guess the spaces were off hehe

Joined: Jan 2001
Posts: 62
Journeyman
Journeyman
Offline
Joined: Jan 2001
Posts: 62
I've just played with it and I must say its quite nice as v1.0 add-on.

it would be nice to see thei ability to view quarterly and/or yearly view as well but this isn't as critical.

monthly is the most important initially.

KurtC

Joined: Jan 2001
Posts: 62
Journeyman
Journeyman
Offline
Joined: Jan 2001
Posts: 62
I've just played with it and I must say its quite nice as v1.0 add-on.

it would be nice to see the ability to view quarterly and/or yearly view as well but this isn't as critical.

monthly is the most important initially.

KurtC

Joined: Nov 2000
Posts: 210
Member
Member
Offline
Joined: Nov 2000
Posts: 210
Small bug or maybe an improvement needed?
when you have a board using dark colors such as what is created with nettomos Dark Style sheet you can not see the numbers for the dates. is ther a way to make the border change color and the dates depending on the stylesheet?

Joined: Aug 1999
Posts: 184
Member
Member
Offline
Joined: Aug 1999
Posts: 184
Look at the caledars I have in http://forums.theddz.com

I use a dark CSS and I don't see that problem.


Silly ricer.. Wings are for airplanes!
Franky #213846 04/16/2002 11:53 PM
Joined: Nov 2000
Posts: 210
Member
Member
Offline
Joined: Nov 2000
Posts: 210
ok.... is that the same hack?
the Netomo stylesheet has an image on a orange background. the image is black bricks. I wonder if it is only due to the back ground then? the other forums using that stylesheet come out normally sao maybe it is a problem with the stylesheet?

Joined: Apr 2002
Posts: 30
User
User
Offline
Joined: Apr 2002
Posts: 30
[]/forum/images/icons/smile.gif[/] Any idea if/when this hack will be modified to work with v6?


Paul Fries
Systems Administrator
CWIE LLC
Page 1 of 4 1 2 3 4

Link Copied to Clipboard
Donate Today!
Donate via PayPal

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.
Recommended Hosts
We have personally worked with and recommend the following Web Hosts:
Stable Host
bluehost
InterServer
Visit us on Facebook
Member Spotlight
isaac
isaac
California
Posts: 1,157
Joined: July 2001
Forum Statistics
Forums63
Topics37,573
Posts293,925
Members13,849
Most Online5,166
Sep 15th, 2019
Today's Statistics
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
Top Posters
AllenAyres 21,079
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,833
Greg Hard 4,625
Top Posters(30 Days)
Top Likes Received
isaac 82
Gizmo 20
Brett 7
WebGuy 2
Top Likes Received (30 Days)
None yet
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2024 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20221218)