Go Back   vb.org Archive > Community Discussions > Modification Requests/Questions (Unpaid)
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 10-05-2001, 06:57 PM
Vociferous Vociferous is offline
 
Join Date: Dec 2002
Posts: 11
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I have been browsing the various hacks available for VB 2.x and I do not see one which would do the following:

In a seperate table (preferably next to how many posts are in a thread) would be a count for how many new posts are in the thread since it was last visited.

This would require a thread to be marked as read after visiting it and not only after clicking the link that says "Mark all Forums Read".

Is there a hack out there that already does this that I missed?

If there isn't-- could we do it?

Thanks!
Reply With Quote
  #2  
Old 10-06-2001, 04:57 PM
Vociferous Vociferous is offline
 
Join Date: Dec 2002
Posts: 11
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

~bump~

updated my profile with my customer id #
maybe I'll get a response now.
Reply With Quote
  #3  
Old 10-06-2001, 07:11 PM
tubedogg's Avatar
tubedogg tubedogg is offline
 
Join Date: Oct 2001
Location: Medina, OH
Posts: 785
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Actually it'd be a lot easier and a lot more feasible than the way you suggested. Just count the number of posts in each thread that are new since the person's last visit in forumdisplay.php
Reply With Quote
  #4  
Old 10-06-2001, 09:05 PM
Vociferous Vociferous is offline
 
Join Date: Dec 2002
Posts: 11
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I hadn't thought about that and it seems like that would do the trick for a slower forum-- I'd like to see it.

The reason I descibed it the way I did is I'm looking at moving an extremely active (5,000+ new posts/replys every month) WebX community over to VB. They can see with each refresh of the thread-listing's page how many new posts are on each thread since they last openned them (even if it's only been 30 seconds).
I'd like to not alienate anyone from the boards simply because they don't like the change.
It'd be easier if people accepted change as easily as myself-- but most people don't and there-in lies my problem.

What I'm looking at doing is creating a carbon copy of the current WebX layout (at least on the surface) with VB in order to allow the members to make a smooth transfer over to the new boards with a minimum amount of problems.

Basically, if it looks the same, works the same, they'll think it is the same-- even though it isn't the same.

Am I making sense?

And if anyone wonders why I'm moving to VB over WebX-- it's because WebX is overpriced, underpowered, and is more of a bandwidth hog than UBB.
Reply With Quote
  #5  
Old 10-06-2001, 11:20 PM
tubedogg's Avatar
tubedogg tubedogg is offline
 
Join Date: Oct 2001
Location: Medina, OH
Posts: 785
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Either method would be OK for a smaller forum. However the method you suggest would be an absolute server-killer for a decent sized forum because of the amount of data involved in marking each thread read, as has been discussed here elsewhere before.

Anyway this sounded interesting so I whipped up something for my forums. Code changes are below - it's actually quite simple.

In forumdisplay.php find
PHP Code:
$threadids='thread.threadid IN (0'.$stickyids
Replace it with
PHP Code:
$threadids='threadid IN (0'.$stickyids
Find
PHP Code:
  // check to see if there are any threads to display. If there are, do so, otherwise, show message 
Right below it add
PHP Code:
$posts $DB_site->query("SELECT COUNT(*) AS posts,threadid FROM post WHERE $threadids AND dateline>$bbuserinfo[lastvisit] GROUP BY threadid");
while (
$post $DB_site->fetch_array($posts)) {
    
$newpost[$post[threadid]] = $post[posts];

Find
PHP Code:
      if (($bbuserinfo[maxposts] != -1) and ($bbuserinfo[maxposts] != 0)) 
Right above it add
PHP Code:
      if ($newpost[$thread[threadid]]) {
        
$newposts $newpost[$thread[threadid]];
        eval(
"\$numnew = \"".gettemplate('forumdisplaybit_newposts')."\";");
      } else {
        
$newposts " ";
        eval(
"\$numnew = \"".gettemplate('forumdisplaybit_newposts')."\";");
      } 
And then you need to add a template named forumdisplaybit_newposts with the following contents:
Code:
($newposts new post(s))
And then edit the forumdisplay_threadslist template...
Find
Code:
	<td bgcolor="{tableheadbgcolor}" nowrap><smallfont><a href="$sorturl&sortorder=desc&sortfield=replycount"><font color="{tableheadtextcolor}"><b>Replies</b></font></a> $sortarrow[replycount]</smallfont></td>
Right below it add
Code:
	<td bgcolor="{tableheadbgcolor}" nowrap><smallfont><font color="{tableheadtextcolor}"><b>New Posts</b></font></smallfont></td>
Then find
Code:
	<td bgcolor="{tableheadbgcolor}" width="100%" colspan="8" align="center"><smallfont color="{tableheadtextcolor}">
and change the "8" to "9".
Then in the forumdisplaybit template find
Code:
	<td bgcolor="$fbackcolor"><normalfont>$thread[views]</normalfont></td>
and right *above* it add
Code:
	<td bgcolor="$fbackcolor"><normalfont>$numnew</normalfont></td>
And that's it.
Reply With Quote
  #6  
Old 10-06-2001, 11:46 PM
Vociferous Vociferous is offline
 
Join Date: Dec 2002
Posts: 11
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Indeed.

The servers running WebX now are extremely over-taxed and we have to auto-prune old threads after only a few days of their becoming idle. I was hoping VB could prove more adept at helping the servers handle such stresses.

I appreciate your work so far though!
I'm adding your code modifications as we speak so I can test it out.

Any other ideas that might accomplish the same thing? Or should it even be considered? :\
Reply With Quote
  #7  
Old 10-06-2001, 11:50 PM
tubedogg's Avatar
tubedogg tubedogg is offline
 
Join Date: Oct 2001
Location: Medina, OH
Posts: 785
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by Vociferous
The servers running WebX now are extremely over-taxed and we have to auto-prune old threads after only a few days of their becoming idle. I was hoping VB could prove more adept at helping the servers handle such stresses.
Oh, we definitely can. However that kind of thing would kill any message board system with enough stress. I don't know the method WebX uses for it, nor do I have any idea what WebX even uses as far as software, but for vB's MySQL database it would be far too much data to handle.
Reply With Quote
  #8  
Old 10-07-2001, 12:01 AM
Vociferous Vociferous is offline
 
Join Date: Dec 2002
Posts: 11
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Well currently the entire system has roughly 108,000 posts on it.

I'm looking at a single forum at the moment which is a mere 10-20% of that with VB if possible just to do stress tests.
Reply With Quote
  #9  
Old 10-08-2001, 11:27 AM
soceris
Guest
 
Posts: n/a
Default

i can't finmd teh final bit in my forumdisplay template

any ideas why????
Reply With Quote
  #10  
Old 10-08-2001, 11:33 AM
amykhar's Avatar
amykhar amykhar is offline
 
Join Date: Oct 2001
Location: PA
Posts: 4,438
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

soceris,
I don't advise trying this hack. It was giving me errors both times I tried to install it. I haven't had time to try to debug it.

Amy
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:08 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04220 seconds
  • Memory Usage 2,296KB
  • Queries Executed 14 (?)
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
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (6)bbcode_code
  • (6)bbcode_php
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (9)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_postinfo_query
  • fetch_postinfo
  • 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