The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
Display Unread Posts and New Reputation Comments Details »» | |||||||||||||||||||||||||||
Display Unread Posts and New Reputation Comments
Developer Last Online: Nov 2023
As of 24 Nov 2017 this modification has been withdrawn.
Note: The unread posts portion of this hack only works if you use the database thread marking system, also, this attaches itself to certain phrases in the "welcome" box and will not work if they are not present (or are modified by other code). FYI, the Forum Marking Choices are located in vBulletin Options ; vBulletin Options > General Settings > Thread/Forum Read Marking Type The Read Marking options were removed from vB 3.8.11, it defaults to database marking. ** For vBulletin 3.8.11 you will need to use the Unread-posts-3811.zip ** This displays the actual number of posts that are still considered unread by you (and will show up in a 'getnew' search). It also displays the number of new reputation comments since you last checked your usercp. There is the option to count the unread posts since your last visit, or all posts considered unread. This setting reflects the divider in the 'getnew' search display. There is also the option to disable the unread posts display or the new reputation comments display. There is also the option to display the New Reputation Comments counter as a Welcome Box Notification. All settings are located in vBulletin Options > Display Unread Posts and Reputation. Version 3.8.001 adds support for forums excluded if you have the "Get New/Get Daily Opt Out Modification" installed (by Andreas). Version 3.8.004 adds support for forums excluded if you have the "Selective Forum Filter Modification" installed (by Psionic Vision). To install this hack unzip the xml file and import it using the ACP Product Manager. History: v3.8.001 : Initial vb 3.8 Release. v3.8.002 : Fix forum exclusion bugs. v3.8.003 : Fix spelling and phrase bug. v3.8.004 : Added support for Psionic Visions Selective Forum Filter. v3.8.005 : Updated version for vBulletin 3.8.11 (only). Show Your Support
|
Comments |
#252
|
|||
|
|||
OK, found it in the XML file.
I tried replacing the reference to "usercp?" with "member.php?$session[sessionurl]u=$bbuserinfo[userid]" but that doesn't work. Anyone got any ideas what I need to put there to have it go to the user's profile page? |
#253
|
||||
|
||||
Why dont you just enable your reputation display in your usercp.
|
#254
|
|||
|
|||
Because I can't find the control to do so. As far as I can tell from the AdminCp it is set to show. The code must have gotten deleted from the USERCP temlpate somehow.
|
#255
|
||||
|
||||
Sounds unlikely, are you sure you havent just disabled it in your usercp ?
|
#256
|
|||
|
|||
Quote:
It may have sounded unlikely, but the code was missing. I copied it over from someone else's vBulletin board, and now it's back. Thanks to that person for their help. |
#257
|
|||
|
|||
Can't think of a better place to ask this, so here it goes.
What I have is a forum section with several subforums that are populated using the RSS feed system in VB. People want to be able to see these forums, but because of the number of threads, they don't want them showing up in the search results for unread posts. So using the new version of the Unread Posts mod in conjunction with the Selective Forum Filter won't work because that would prevent them from seeing the subforums at all. The code below is from the Unread Posts mod version I have installed (version 1.02). So what I am hoping is that it might be a simple case of just adding a conditional or something to the PHP code to force the exclusion of those subforums from the search all the time. The problem is I don't know squat about coding in PHP. Can someone please indicate what I would have to add/change to accomplish this? Code:
$unread = ""; if ($vbulletin->userinfo['userid'] AND $vbulletin->options['threadmarking']) { $unread = "No unread posts"; $xforum_ids = array_keys($vbulletin->forumcache); foreach ($xforum_ids AS $key => $xforum_id) { $xfperms = & $vbulletin->userinfo['forumpermissions']["$xforum_id"]; $xforum = & $vbulletin->forumcache["$xforum_id"]; if ( !($xfperms & $vbulletin->bf_ugp_forumpermissions['canview']) OR !($xfperms & $vbulletin->bf_ugp_forumpermissions['cansearch'])) { unset($xforum_ids["$key"]); } } if (empty($xforum_ids)) { $xforum_list = "0"; } else { $xforum_list = implode(', ', $xforum_ids); } if ($vbulletin->options['unreadlv']) { $cutoff = $vbulletin->userinfo['lastvisit']; } else { $cutoff = TIMENOW - ($vbulletin->options['markinglimit'] * 86400); } $postcount = $vbulletin->db->query_first(" SELECT COUNT(post.postid) as unread FROM " . TABLE_PREFIX . "post as post INNER JOIN " . TABLE_PREFIX . "thread as thread ON (thread.threadid = post.threadid) LEFT JOIN " . TABLE_PREFIX . "threadread AS threadread ON (threadread.threadid = thread.threadid AND threadread.userid = " . $vbulletin->userinfo['userid'] . ") INNER JOIN " . TABLE_PREFIX . "forum AS forum ON (forum.forumid = thread.forumid) LEFT JOIN " . TABLE_PREFIX . "forumread AS forumread ON (forumread.forumid = forum.forumid AND forumread.userid = " . $vbulletin->userinfo['userid'] . ") WHERE thread.forumid IN($xforum_list) AND thread.sticky IN (0,1) AND thread.visible IN (0,1,2) AND thread.lastpost > IF(threadread.readtime IS NULL, $cutoff, threadread.readtime) AND thread.lastpost > IF(forumread.readtime IS NULL, $cutoff, forumread.readtime) AND thread.lastpost > $cutoff AND post.dateline > IF(threadread.readtime IS NULL, $cutoff, threadread.readtime) AND post.dateline > IF(forumread.readtime IS NULL, $cutoff, forumread.readtime) AND post.dateline > $cutoff "); if ($postcount['unread']) { if ($postcount['unread'] == 1) { $unread = "1 Unread Post"; } else { $unread = $postcount['unread']." Unread Posts"; } } if ($vbulletin->options['unreadlv']) { $unread = "<a href='/forums/search.php?do=getnew'><b>" . $unread . "</b></a> since your last visit.<br />"; } else { $unread = "You have <a href='/forums/search.php?do=getnew'><b>" . $unread . "</b></a><br />"; } $search_text = '</strong><br />'; $vbulletin->templatecache['navbar'] = str_replace($search_text,$search_text.$unread,$vbulletin->templatecache['navbar']); } |
#258
|
||||
|
||||
Version 1.02 ? Thats ancient vb3.5 code !
If you change the forum option "Index New Posts in Search Engine" to no, they will be excluded. Other than that it would require a bit of new code. |
#259
|
|||
|
|||
Yeah, I know it is ancient code, hehe. However, when we tried upgrading to one of the newer versions a while back, we kept having server load spikes that would shut down our site. When we reviewed the logs it constantly showed that it was queries by the Unread Post mod that were causing the spikes. When we disabled the mod, the spikes stopped. When we re-enabled it, they started again. The old version was working fine so we just stayed with it. I have not tried the latest version though, which I may do since it appears you have released a new version or two since we last tried.
Quote:
If I upgrade to the new version of the mod, does it have a setting that lets me exclude individual forum sections from the search but would still allow users to see those forums if they want to view them? |
#260
|
|||
|
|||
Problem solved.
I have the forum properties for "Index New Posts in Search Engine" set to NO. But your comment got me to thinking... I did not have the forum permissions for ALL usergroups set to NO for searching as well. I had the default "Registered Users" set to NO for searching, but some of those users are also members of other additional usergroups whose permissions for searching searching the forum were still set to yes. The forum permission system will always pick the yes if there is a conflict between settings in different places. I set ALL those other groups to NO as well, and now everything works fine! Thanks! |
#261
|
|||
|
|||
is it possible to insert this count near the link New Posts in navbar? F.e.:
New Posts (429) |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|