Results 1 to 15 of 68
Page 1 of 5
FirstFirst 1 2 3 ... LastLast

Thread: Release 0.1 Mark Forum Read/Mark All Read from database hack

  1. #1
    Senior Member ethank has disabled reputation ethank's Avatar
    Join Date
    Apr 2001
    Location
    Santa Barbara, CA
    Age
    30
    Posts
    604

    Release 0.1 Mark Forum Read/Mark All Read from database hack

    Here's the hack I worked on this week, in rough and not too pretty form. I'll be beautifying it soon.

    You can download an rtf with all the code changes listed at http://murmurs.com/codechanges.rtf. Also in that file is the table creation statement.

    Attached is a zip of all the changed files. Comments are included, but not consistant yet.

    You can see this in action at http://tony.murmurs.com. Only two forums, but still.

    I'll pretty up the code this weekend and make better install instructions.

    This is way beta, so if there are any problems just post. Don't put this on a production board yet

    Ethan
    Last edited by Mike Sullivan; Fri 4th May '01 at 10:02pm.
     

  2. #2
    Former vBulletin Developer Mike Sullivan will become famous soon enough Mike Sullivan's Avatar
    Join Date
    Apr 2000
    Location
    Regexia
    Age
    25
    Posts
    13,374
    Blog Entries
    7
    ethank,

    I had to remove your codechanges.zip file because it is in violation of the licensing agreement -- you may not post full files. You have to release them as instructions (or if you come up with a better way).
    --Mike "Ed" Sullivan
    Former vBulletin Developer

    Twitter | Regexia (personal)
     

  3. #3
    Senior Member ethank has disabled reputation ethank's Avatar
    Join Date
    Apr 2001
    Location
    Santa Barbara, CA
    Age
    30
    Posts
    604
    Doh! OK. Well, the rtf has the changed code, not full source. I'll figure out a better way to indicate where the changed code should go.

    Anyhow, look at the rtf, as that will give you most of what you need, although its not as clear as it should be yet.

    EThan
     

  4. #4
    Senior Member ethank has disabled reputation ethank's Avatar
    Join Date
    Apr 2001
    Location
    Santa Barbara, CA
    Age
    30
    Posts
    604
    Two more additions. These two blocks assure that people get an initial Mark Read entry in the database if they don't have one. Its set to 0:00AM for the day they enter without one.

    This goes in the login method in member.php, before the URL portion:

    Code:
    // *** CODE ADDED BY ETHANK
    	
    $record_exists=$DB_site->query("select userid from markread where userid='$userid' AND forumid = '0'");
        $num_records=$DB_site->num_rows($record_exists);
        if($num_records<1)
    	{
    		$firsttime=mktime(0,0,0);
    		$DB_site->query("INSERT INTO markread (readtime, userid, forumid) VALUES ('$firsttime','$userid', '0')");
    	}
    // END ADD
    And this goes in register.php, after the initial databse insert after the Start Add Member comment. This goes right before the big insert method...:

    Code:
    // *** ADDED BY ETHANK
    		// Create Unix time for midnight...
    		$firsttime=mktime(0,0,0);
    
    		$DB_site->query("INSERT INTO markread (readtime, userid, forumid) VALUES ('$firsttime','$userid', '0')");
    
    
    // END ADD
     

  5. #5
    New Member Onslo is on a distinguished road
    Join Date
    Apr 2001
    Location
    Newbury, UK
    Posts
    14
    One general inprovement that would be usefull (in general) for VBulletin.

    If the link that marks read contained a timestamp of the time when you displayed the page, then anything posted after you read that page would still show as unread.

    For instance.....

    If you display the page at 12:00 ..
    then sit there for an hour ..
    then press Mark Read ..
    anything posted after 12:00 will still be shown as unread.

    The way that VB does it is it marks stuff as read from the moment that you hit the link, so there is a possiblity that you could miss postings made inbetween the period of actually displaying the page and hitting the read link.

    Onslo
     

  6. #6
    Senior Member ethank has disabled reputation ethank's Avatar
    Join Date
    Apr 2001
    Location
    Santa Barbara, CA
    Age
    30
    Posts
    604
    Originally posted by Onslo
    One general inprovement that would be usefull (in general) for VBulletin.

    If the link that marks read contained a timestamp of the time when you displayed the page, then anything posted after you read that page would still show as unread.

    For instance.....

    If you display the page at 12:00 ..
    then sit there for an hour ..
    then press Mark Read ..
    anything posted after 12:00 will still be shown as unread.

    The way that VB does it is it marks stuff as read from the moment that you hit the link, so there is a possiblity that you could miss postings made inbetween the period of actually displaying the page and hitting the read link.

    Onslo
    That happened with Webboard too.. I guess the way we could do it is set a timestamp in a cookie on page load, then when they mark read, use that instead of the time they click the Mark Read. Maybe have it as an option?

    The other bug I found was that if you mark a child forum read, the parent forums still are flagged "new" cause they just look at the "lastpost" from all their children. I need to have it make sure that that last post wasn't in a forum that was marked read, and if it was look at the second to the last post, etc. I'll work on that bug tonight.

    EThan
     

  7. #7
    New Member Onslo is on a distinguished road
    Join Date
    Apr 2001
    Location
    Newbury, UK
    Posts
    14
    Hows it coming Ethan?

    Onslo
     

  8. #8
    Senior Member ethank has disabled reputation ethank's Avatar
    Join Date
    Apr 2001
    Location
    Santa Barbara, CA
    Age
    30
    Posts
    604
    I wasn't home all weekend so didn't have a chance to compile it all. I'll be working on it today as well as doing one last bug fix. There's a weird thing with subconferences....

    Ethan
     

  9. #9
    Senior Member ethank has disabled reputation ethank's Avatar
    Join Date
    Apr 2001
    Location
    Santa Barbara, CA
    Age
    30
    Posts
    604
    I'm back from Georgia and seeing as how final is being released Monday, I'll post an updated instructions document and the current iteration of the hack here on Tuesday (hopefully)!

    Thanks for your patience.

    EThan
     

  10. #10
    New Member Onslo is on a distinguished road
    Join Date
    Apr 2001
    Location
    Newbury, UK
    Posts
    14
    Excellent!

    I await your masterpiece.

    Top sport Ethan

    Onslo
     

  11. #11
    New Member Onslo is on a distinguished road
    Join Date
    Apr 2001
    Location
    Newbury, UK
    Posts
    14
    In the process of setting up a test board so we can test this hack. Hope everything ok Ethan.

    Let me know when it's done.

    Can email me here :

    onslo@worldmailer.com

    Ta!

    Onslo
     

  12. #12
    Senior Member ethank has disabled reputation ethank's Avatar
    Join Date
    Apr 2001
    Location
    Santa Barbara, CA
    Age
    30
    Posts
    604
    Originally posted by Onslo
    In the process of setting up a test board so we can test this hack. Hope everything ok Ethan.

    Let me know when it's done.

    Can email me here :

    onslo@worldmailer.com

    Ta!

    Onslo
    I successfully implemented it on the release version, but I still have some bugs and things I need to fix that just popped up. The most challenging is that damn "new post" indicator when dealing with subconferences. I'm heading home tonight to work on it.

    Anyhow, I'll e-mail you later.

    EThan
     

  13. #13
    New Member Onslo is on a distinguished road
    Join Date
    Apr 2001
    Location
    Newbury, UK
    Posts
    14
    Hi Ethan,

    Have you tried emailing me? My inbox was full and so it may not have got through. It's clear again now

    Any news?

    Regards

    Onslo
     

  14. #14
    Senior Member ethank has disabled reputation ethank's Avatar
    Join Date
    Apr 2001
    Location
    Santa Barbara, CA
    Age
    30
    Posts
    604
    I just finished the first document of code changes based on my comparison between the 2.0 release and the modified code I'm running using a DIFF type tool.

    I'll do the same for 2.0.1 this week. Here's the preliminary change list. Don't use it yet, cause I haven't had a chance to test it using a fresh copy of 2.0.1 yet.

    But at least you get a preview. Please forgive any sloppy code, as I learned PHP while doing this.

    Also, template changes are coming, but they are pretty self explanatory when you dig into the code. You can also see them on my boards at http://tony.murmurs.com

    You can see the HTML documentation (since I can't upload it) at:

    http://tony.murmurs.com/attachment.php?postid=21438

    EThan
     

  15. #15
    Senior Member ethank has disabled reputation ethank's Avatar
    Join Date
    Apr 2001
    Location
    Santa Barbara, CA
    Age
    30
    Posts
    604
    Originally posted by ethank
    I just finished the first document of code changes based on my comparison between the 2.0 release and the modified code I'm running using a DIFF type tool.

    I'll do the same for 2.0.1 this week. Here's the preliminary change list. Don't use it yet, cause I haven't had a chance to test it using a fresh copy of 2.0.1 yet.

    But at least you get a preview. Please forgive any sloppy code, as I learned PHP while doing this.

    Also, template changes are coming, but they are pretty self explanatory when you dig into the code. You can also see them on my boards at http://tony.murmurs.com

    You can see the HTML documentation (since I can't upload it) at:

    http://tony.murmurs.com/attachment.php?postid=21438

    EThan
    I have the change list updated for 2.0.1, but I graduated college this weekend so I didn't get to it. Might get to it tommorow.

    Sorry for the delay everyone and thanks for your patience.

    EThan
     

Page 1 of 5
FirstFirst 1 2 3 ... LastLast

Similar Threads

  1. Mark Forum Read vs. Mark All Forums Read
    By VAN in forum vBulletin 2 'How Do I' and Troubleshooting
    Replies: 10
    Last Post: Mon 14th Apr '03, 6:58pm
  2. Mark Forum Read
    By PhoenixBB in forum vBulletin 2 'How Do I' and Troubleshooting
    Replies: 7
    Last Post: Wed 12th Jun '02, 4:10am
  3. mark as read hack
    By doom9 in forum Releases: Version 2.x
    Replies: 12
    Last Post: Fri 26th Oct '01, 3:36pm

Bookmarks

Posting Permissions

Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts