vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   Persistent Mark Forum Read (https://vborg.vbsupport.ru/showthread.php?t=32091)

ethank 12-12-2001 11:39 PM

Quote:

Originally posted by Gimp
this hack just wracked everything! :mad:
More specifics needed, its running fine here.

EThan

ethank 12-12-2001 11:42 PM

Your missing the new indicators by the post in the thread. THe changes in funcitons.php were to makepostbit.

EThan

VirtueTech 12-18-2001 07:40 AM

How many queries does this add per process.

And when and what scripts are they added to please.

I'm very interested in using this along with Bira's Shrink old posts hack.

Also...what if the users do not mark the forum as read...does the system keep the threads as read forever...or does it kick into the cookies then.

Is there anyway to have it setup so that once the user reads the thread it then marks the thread as read immediately?

ethank 12-18-2001 04:14 PM

Quote:

Originally posted by VirtueTech
How many queries does this add per process.



And when and what scripts are they added to please.

I'm very interested in using this along with Bira's Shrink old posts hack.

Also...what if the users do not mark the forum as read...does the system keep the threads as read forever...or does it kick into the cookies then.

Is there anyway to have it setup so that once the user reads the thread it then marks the thread as read immediately?

1. Depends how deep your hierarchy is.

2. The instructions are in that document, although I need to revise it when I get some time to.

3. This replaces cookies used for forums as read, but not for threads read in the current session, that works the same.

Ethan

Arathorn 01-17-2002 04:35 PM

This was one HUGE hack to install, but it works beautifully. In fact, I could never use Bira's Contract Old Posts hack to it's full effect (stupid cookie timeout...) until I added this hack.

THANKS! :)

Erwin 02-26-2002 09:27 AM

Nice hack. I love it! :)

Erwin 02-26-2002 06:20 PM

By the way, the server load increase is there, but marginal. My users love it - we recently merged with an ezboard forum and the migrated members had requested this. They are now ecstatic!

Infernus 02-28-2002 10:58 PM

When I installed this, After trying to mark a forum read I would just get a white screen. Not sure what the problem was, but im guessing its one of the places where I had to guess on the code because the directions didnt match.

Tommy Boy 03-16-2002 12:55 AM

This is a wonderful hack, I've said it before, and I'll say it again!

I just wanted to mention that in my forum, in order to display the forum home page, more than 260 sql queries are being performed! The situation is not much better with the forumdisplay.php script as well.

The good news are that after hours of intense optimization, the forum home page is now done with only 21 queries, and the forumdisplay.php with 23.

I know ethank is too busy to work on this hack anymore, but maybe these scary numbers will encourage him to come back to us. ;)

Erwin 03-17-2002 04:56 AM

Tommy Boy - do you mind sharing your optimizations? :)

Tommy Boy 03-17-2002 02:19 PM

It will be a bit difficult, since for starter, I didn't install the complete hack on my board, but only the parts I needed, and also I don't have the original hacked version to compare the differences with...

If you really want me to do it, and ethank approves, I guess I could work on something though... (you'll have to send me the originally hacked versions of some files).

JulianD 03-21-2002 08:47 PM

Hi tommy, My members are requesting this hack all the time, but I don't want to install it due to the increase load to the server.. But after hearing you, you are my last hope!

I would really like to see such optimizations to the hack... If there's something I can do, just tell me :)

Erwin 03-21-2002 09:13 PM

Well, it's all working like a charm for me - I also have not put in everything, only the relevant bits. :)

nafae 03-21-2002 11:16 PM

tommy, you must help us, you are our only hope! </leia-like voice>

SHalliday 03-30-2002 05:12 PM

What would those "relevant bits" be. I really want to use this hack but am not sure what parts to install. Would really appreciate the help.

TWTCommish 03-30-2002 09:28 PM

Has anyone else had any problems with this? The "Mark Forum Read" link on the board I installed it on doesn't seem to work anymore...

ethank 04-20-2002 10:36 PM

Well, I spent some time today optimizing this hack and got it so the forum index page is done using only 2 additional queries. That is a good thing :) I cut the total queries down to virtually nothing. You can eliminate one of the queries most of the time if you use PHP-Cache.

I also added PHP-Cache to handle sub-forum display, but thats another hack entirely.

So..I'll redo the instructions and repost them. With the new code it doesn't add much load at all to the forums. I still have to optimize forumdisplay the same way, but that one isn't as bad because usually there aren't as many forums on that page.

Ethan

JulianD 04-21-2002 01:00 AM

Thanks Ethank! I'm going to try it right now!

ethank 04-21-2002 06:47 AM

I haven't updated the instructions, so don't :) This week I will.

Erwin 04-21-2002 07:21 AM

Your beautiful hack works like a miracle on 2.2.5 anyway at the moment... just so you know... :)

ethank 04-21-2002 07:25 AM

Quote:

Originally posted by Erwin
Your beautiful hack works like a miracle on 2.2.5 anyway at the moment... just so you know... :)
Hmm...well I'll post new instructions for index.php tomorrow.

Erwin 04-23-2002 11:32 AM

Is it possible to post an upgrade text file from the previous version for those with the previous version already installed?

ethank 04-23-2002 01:34 PM

Basically just do the changes in that file for /index.php only. It helps to start on a fresh copy of it. I can see about doing an upgrade, but my code base for index.php is probably way different than yours.

JulianD 04-23-2002 09:05 PM

Quote:

Originally posted by ethank
I haven't updated the instructions, so don't :) This week I will.
Just keep us informed ;)

ethank 04-23-2002 09:33 PM

Instructions were updated for index.php in the first message. I have some more speed tweaks I can do as well, which I'll do when I get back from Seattle next week.

Once fully optimized this hack won't add much load at all and should hold people over that want this feature until V3

JulianD 04-24-2002 03:33 AM

Thanks ethank, going to check them right now.

Erwin 04-26-2002 08:34 AM

Your new index.php reduced my homepage queries by a LOT. Thanks! :)

ethank 04-26-2002 02:10 PM

I'm going to also re-release the subforums hack for those that use
PHP-Cache. It will further reduce query load. I've got my main index
page to 32 queries minus the queries to do all my navigation.

ethank 04-26-2002 02:10 PM

I'm going to also re-release the subforums hack for those that use
PHP-Cache. It will further reduce query load. I've got my main index
page to 32 queries minus the queries to do all my navigation.

SWFans.net 04-29-2002 04:40 PM

I absolutely love this hack and have been using a version or another of it since vB version 2.0.3. :)

I was curious though if there was a way to modify the behaviors of the two different markread functions just a little.

What I am requesting may not be possible, but I sure think its logical. At least to me.

When a user goes to mark a forum read using this feature, it normally implies that they are done with that particular forum, but by default, when this action is performed they are returned to the same forum.

I have found a way to have it so that using either of the markread functions will return a user to the main forum index, but what I would like to see and perhaps a few others who use this, is that the user is returned to the Parent forum after the link to mark is clicked.

I?m really not very good with PHP, or else I probably would have come up with some kind of routine to achieve this for the users of my forum and added it here for others who may be interested.

For those interested in how I managed to get users to be redirected to the forum index when using this feature, have a look at this topic and apply what information it contains to the markforumread functions here within ethank?s hack to get that behavior.

https://vborg.vbsupport.ru/showthrea...threadid=32384

If its not feasibly possible to do this I understand, but logistically it just seems to me to make more sense when a user marks a forum read that they be returned to the parent forum without having to make any extra click to either leave the forum they just marked or as the case is at my board, to go from the forum index back into the subforums they were browsing.

Great hack ethank! :) Now I just need to figure out what changes you made to optimize index.php, since my version of this is more or less from your original release of this hack with the mark forum and children forums function added in just recently.

dslteam 05-18-2002 03:46 PM

Question: What about an automatic Mark as Read?

The difference being, not only does it utilize database tracking instead of the default use of a cookie, but it doesn’t require a user to physically click the “Mark as Read” button.

This is similar to what would occur if a member reads a new thread. If they read the thread, they are not required to mark it as read in order to make it reset; it just occurs.

With an automatic mark as read for forums, they would not be required to mark the forum as read; it just resets itself as read once all new posts within the forum have been read.

pirotess 05-18-2002 05:44 PM

When I go to modify this portion of my index.php:

PHP Code:

        // do light bulb
        
if ($bbuserinfo['lastvisitdate']=='Never') {
          
$forum['onoff']='on';
        } else {
                    if (isset(
$bbforumview[$forum['forumid']]) and $bbforumview[$forum['forumid']]>$bbuserinfo['lastvisit']) {
                        
$userlastvisit=$bbforumview[$forum['forumid']];
                    } else {
                        
$userlastvisit=$bbuserinfo['lastvisit'];
                    }
          if (
$userlastvisit<$forum['lastpost']) {
            
$forum['onoff']='on';
          } else {
            
$forum['onoff']='off';
          }
        } 

with the appropriate code as posted in the install document my boards white screen when you load them and in my error logs I get a PHP parse error of:

unexpected $ in index.php on line 420

Any ideas? I'm running 2.2.5 and all the other updates for this hack in index.php seem to work fine.

Also I get an undefined function updatelocation{} in search.php when I add the 3rd search type into the file.

SWFans.net 05-19-2002 02:50 PM

I know how to fix the index.php error, but the other, saddly, no. Add another } after that code, so it looks like this:
PHP Code:

// do light bulb
        
if ($bbuserinfo['lastvisitdate']=='Never') {
          
$forum['onoff']='on';
        } else {
                    if (isset(
$bbforumview[$forum['forumid']]) and $bbforumview[$forum['forumid']]>$bbuserinfo['lastvisit']) {
                        
$userlastvisit=$bbforumview[$forum['forumid']];
                    } else {
                        
$userlastvisit=$bbuserinfo['lastvisit'];
                    }
          if (
$userlastvisit<$forum['lastpost']) {
            
$forum['onoff']='on';
          } else {
            
$forum['onoff']='off';
          }
        }
        } 


dslteam 05-19-2002 03:03 PM

You developed a such big hack but the most important feature that is not so hard - is not in it !?

I talk about this automatic Mark as Read. Is it hard to add this feature??

Please !!!

Thanks !

Erwin 05-20-2002 02:13 AM

The reason why Automatic Mark as Read was not included is because some of use go and preview a post, but don't actually read it, and don't want it to be marked as read. Better to click on the Mark All Read link once you feel you have read all posts.

dslteam 05-20-2002 05:30 AM

@Erwin - Thanks for your answer, but there are many users (https://vborg.vbsupport.ru/showthrea...threadid=38214) that need such automatic tool too.

All good other board has got this feature ?!

Because a new user simply visit a thread and want that the visited thread is marked as read.

Please ! Can anyone add this feature !?

Christine 06-27-2002 08:10 PM

Does anyone have this running as written on 2.2.6?

Erwin 06-27-2002 08:48 PM

Yup - it's running fine with my site on 2.2.6

And ethanks deliberately left out the automatic mark thread read - it's easy to put in though.

Christine 06-27-2002 08:55 PM

Sweet! I am going to load it now. It was a life saver on 2.0.3 all this time.

:)

Christine 06-27-2002 10:49 PM

Hmmm -- I am getting the same parse error in index.php.

unexpected $ in index.php on line 417 (the end of the file).

The brackets weren't the issue -- they are all in there.

Any ideas?


All times are GMT. The time now is 04:19 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.01989 seconds
  • Memory Usage 1,837KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_php_printable
  • (4)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete