The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
Real "read/not read" threads and "new messages in forum" highlighting v1.2 Details »» | |||||||||||||||||||||||||||
Real "read/not read" threads and "new messages in forum" highlighting v1.2
Developer Last Online: Apr 2014
Hello all!
It is just a vb3 version of old hack https://vborg.vbsupport.ru/showthread.php?t=47101 And with same weak sides. Features: - Thread on forumdisplay highlighted for user as read only if that user saw last post in that thread or if last post in that thread is older then user defined (from user CP profile) amount of time (from 1 to 999 hours and infinity) - Forums on index page and subforums on forumdisplay pages will be highlited as "have no new posts" only if user saw last post in that forum or subforum - Highliting system is completly cookie-free - System will require extra Database space (2-4% on large forums and 5-6% on small) - Sytem will add some extra queries to scripts -one addditional UPDATE is showthread.php (if there are new posts since your last visit of that thread) -one additional SELECT (of 2 fields only) for each subforum on forumdisplay.php -one additional SELECT (of 2 fields only) for each forum on index.php -one addditional UPDATE in newreply.php -"mark forum read" works using one extra UPDATE -and "mark all forums read" using one extra UPDATE for each forum Few words how it works As you know vb "marking threads and posts read" system is time and cookie based. This hack is based on adding to "thread" table one extra field - "view" (suppose that it must work fine with TEXT type, but for really large forums we can make it LONGTEXT Now when somebody open thread, his usedid will be added to that "view". After several users (who open that thread) string in that field may look like 37 298 16879 7287 29087 28 298 So it will be just a long string with userid-s separated by space Now then user open forumdisplay.php script will check string in that view field of each thread for part of string [space userid space] and if is will be found thread will be marked as read. If you think that it will use too much database space, i can say that it will use some place of course, but not too much, because after each reply in thread (new last post in thread) all old data in "view" field of thread will be deleted. On forum home page script looks for userid number in "view" field of last thread in each forum and if it found, display that there were no new posts in that forum. Additionally read\unread marking can be time based (new field ) "marktime" in users custom fields. And users are able to select number of hours (all posts older then that number of hours will be marked as read) in their CP profile settings. And at last to mark forum (or all forums) read we just mark read last thread in that forum (or in all forums History: v.1.2 Fixed moved threads highlighting. some changes in functions.php and functions_forumdisplay.php v.1.1 Fixed SQL request. If you tried to install v 1.0 already, better drop view field ALTER TABLE `thread` DROP `view` and recreate it again ALTER TABLE `thread` ADD `view` TEXT NOT NULL Sorry for my English and please ask questions if you don't understand something Show Your Support
|
Comments |
#32
|
|||
|
|||
Quote:
can you make if they click on make all forums read that all is marked as read (even if it has to check all database new users have to read everything to mark as read? can you solve this last so that new users don't get everything marked as to be read ? |
#33
|
||||
|
||||
sorry, but is still can't understand why it is problem and what for you need to mark everything ?
When user click "mark all forums read" all forums become not highlighted ("no new messages in forum" icon), and i can't see why you need to lose all read-not read information for all threads in all forums? In any way each user may set highliting time to for example to 1 hour in his user CP and all threads older then 1 hour will have "read" highlight |
#34
|
|||
|
|||
for me it is ok now :-)
i set default to 48h se new members when they activate they see post from last 48h mark to be read |
#35
|
|||
|
|||
Tried.
Mark all readed, and mark thread readed is not working. It is a problem Debugged: in this function, when it will be called from MARK ALL READED action, input parameter $threadid is zero, but $forumcache["$forumid"]['lastthreadid'] is not working: function mark_thread_read($threadid,$forumid=0,$unique=0) { global $DB_site,$forumcache,$bbuserinfo; $m_thread = intval($threadid); if ($m_thread == 0 && $forumid > 0) { $m_thread = intval($forumcache["$forumid"]['lastthreadid']); } echo("$m_thread $forumid.<br>"); $m_thread is always zero. As a result follows (next lines in listed function) SQL query will never works. Can you advise please? P.S. I am using 3.0.1 |
#36
|
|||
|
|||
Hi and thanks for a great hack!
I have one problem thou The problem is that if there is a new post in one of my subforums it doesn?t indicates as new posts in the main forum. But if I enter that main forum and see all the sub forums it indicates there that there are new posts. Any idea how this can be fixed? |
#37
|
|||
|
|||
Quote:
anyone? |
#38
|
|||
|
|||
What happened to this? It had so much promise! I'm going to try my luck with it, and see what happens. I'm desperate for this hack to work.
EDIT: It seems to work great, except for the inability to mark forums read, which is really an important flaw. I'll see if there's a cure. |
#39
|
|||
|
|||
Ok, I can't figure it out - I don't know PHP. It must be something easy though, because there is only so much code changed for this hack. If one of the people who are knowledgable in such things could take a look at it, that would be appreciated. Thanks.
|
#40
|
|||
|
|||
When i hit MARK FORUMS AS READ it doesnt work. I have edited the code to see the relevant bits are parsing and they are.
|
#41
|
||||
|
||||
Hello!
It is little server sensitive solution, but try to say cache_ordered_forums(1, 1); before each call of mark_thread_read(0,$forumid); function |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|