Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 2.x > vBulletin 2.x Full Releases
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Details »»

Version: , by ethank ethank is offline
Developer Last Online: Jun 2010 Show Printable Version Email this Page

Version: Unknown Rating:
Released: 05-04-2001 Last Update: Never Installs: 0
 
No support by the author.

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

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #2  
Old 05-05-2001, 12:03 AM
Mike Sullivan Mike Sullivan is offline
 
Join Date: Feb 2002
Posts: 79
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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).
Reply With Quote
  #3  
Old 05-05-2001, 12:06 AM
ethank's Avatar
ethank ethank is offline
 
Join Date: Oct 2001
Location: Toluca Lake, CA
Posts: 196
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #4  
Old 05-05-2001, 04:43 AM
ethank's Avatar
ethank ethank is offline
 
Join Date: Oct 2001
Location: Toluca Lake, CA
Posts: 196
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #5  
Old 05-05-2001, 12:19 PM
Onslo
Guest
 
Posts: n/a
Default

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
Reply With Quote
  #6  
Old 05-05-2001, 03:39 PM
ethank's Avatar
ethank ethank is offline
 
Join Date: Oct 2001
Location: Toluca Lake, CA
Posts: 196
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
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
Reply With Quote
  #7  
Old 05-07-2001, 01:36 PM
Onslo
Guest
 
Posts: n/a
Default

Hows it coming Ethan?

Onslo
Reply With Quote
  #8  
Old 05-07-2001, 02:25 PM
ethank's Avatar
ethank ethank is offline
 
Join Date: Oct 2001
Location: Toluca Lake, CA
Posts: 196
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #9  
Old 05-19-2001, 08:29 PM
ethank's Avatar
ethank ethank is offline
 
Join Date: Oct 2001
Location: Toluca Lake, CA
Posts: 196
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #10  
Old 05-20-2001, 06:00 AM
Onslo
Guest
 
Posts: n/a
Default

Excellent!

I await your masterpiece.

Top sport Ethan

Onslo
Reply With Quote
Reply


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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 08:32 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.05034 seconds
  • Memory Usage 2,291KB
  • Queries Executed 23 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (2)bbcode_code
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (9)postbit
  • (7)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete