vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Graveyard (https://vborg.vbsupport.ru/forumdisplay.php?f=224)
-   -   Display count of unread posts in welcome box (https://vborg.vbsupport.ru/showthread.php?t=96522)

Murty 07-05-2006 12:34 AM

Hey, i reckon something that would be really good for this mod would be:

to make it so users can choose what particular forums they want to know how many unread posts are in it. So say they choose forum A, forum D, forum M; then when they next come back online it will say 'XX Unread Posts', then they can click that and it will show unread posts like 'search.php?do=getnew' does, but just from the selected forums.

What do you reckon? to hard to do?

utw-Mephisto 07-06-2006 12:46 AM

Found finally a way to opt out forumIDs

find
Code:

                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

in the plugin and below add

Code:

AND thread.forumid NOT IN (xx,xx)
with xx = forumids you want to opt out ..

firstrebel 08-06-2006 07:04 PM

Quote:

Now that vb 3.6 has been released, there will be no further updates to this modification.
Support will be continued until around the end of 2006 - after that this will be come unsupported.
Is there a 3.6 version of this then?

Bob

Paul M 08-06-2006 07:37 PM

Not yet.

IrPr 08-07-2006 08:52 PM

Thanks Paul !

I'm using this plugin with "Opt-Out Forums from Get New Posts" by Andreas and i had trouble when i exclude some forums from Get New Posts, then i had modified Paul's Hack to make integration with ;)

Find:
PHP Code:

$xforum_ids array_keys($vbulletin->forumcache); 

Below that, Add:
PHP Code:

$exclude explode(",",$vbulletin->userinfo['excludeforumsgnp']); 

Now Find:
PHP Code:

if ( !($xfperms $vbulletin->bf_ugp_forumpermissions['canview']) OR !($xfperms $vbulletin->bf_ugp_forumpermissions['cansearch'])) 

Replace with:
PHP Code:

if ( !($xfperms $vbulletin->bf_ugp_forumpermissions['canview']) OR !($xfperms $vbulletin->bf_ugp_forumpermissions['cansearch']) OR (in_array($xforum_id$exclude))) 


RaceJunkie 08-10-2006 01:38 AM

probably the most missed mod on my site.. Can't wait untill 3.6 is out

Paul M 08-10-2006 01:52 AM

Quote:

Originally Posted by RaceJunkie
probably the most missed mod on my site.. Can't wait untill 3.6 is out

The 3.6 specific release will probably be over the weekend, I have a few minor changes to make (internal, nothing visible). If you really want, then there is no reason I can see that you cannot install this 3.5 version on a 3.6 forum, and then update it later.

RaceJunkie 08-10-2006 02:05 AM

Quote:

Originally Posted by Paul M
The 3.6 specific release will probably be over the weekend, I have a few minor changes to make (internal, nothing visible). If you really want, then there is no reason I can see that you cannot install this 3.5 version on a 3.6 forum, and then update it later.

Paul I can wait.. Thank you anyway though

testpig 08-13-2006 06:08 AM

Hi Paul.
I have the vB Advanced issue (and know you dont use it - got that bit).
I added the absolute path to the plugin but to no avail.
I then uninstalled the plugin but it still shows in my forum and vBA hhomepage no matter how hard I F5 my screen! The absolute path is definately in the plugin so its got me stumped.

Why would this plugin still show if its uninstalled? I couldnt see it in the navbar template so its got me stumped.

JohnBee 11-21-2006 01:48 PM

Quote:

Originally Posted by IrPr (Post 1047013)
Thanks Paul !

I'm using this plugin with "Opt-Out Forums from Get New Posts" by Andreas and i had trouble when i exclude some forums from Get New Posts, then i had modified Paul's Hack to make integration with ;)

Find:
PHP Code:

$xforum_ids array_keys($vbulletin->forumcache); 

Below that, Add:
PHP Code:

$exclude explode(",",$vbulletin->userinfo['excludeforumsgnp']); 

Now Find:
PHP Code:

if ( !($xfperms $vbulletin->bf_ugp_forumpermissions['canview']) OR !($xfperms $vbulletin->bf_ugp_forumpermissions['cansearch'])) 

Replace with:
PHP Code:

if ( !($xfperms $vbulletin->bf_ugp_forumpermissions['canview']) OR !($xfperms $vbulletin->bf_ugp_forumpermissions['cansearch']) OR (in_array($xforum_id$exclude))) 


Thats great IrPr
I added your code to our own forum and it works maginificently.
I tried to take it a bit futher by modifying Andreas's Opt-Out Forums from Get New/Get Daily MOD with default forum exclusions. Which works however the Display count of unread posts in welcome box still picks up new posts, although it will not list them.

I was hoping perhaps someone here could help figure out what changes need to be done for it to work fully with the modifications.


Code:

PHP Code:
$xforum_ids = array_keys($vbulletin->forumcache);

Below that, Add:

PHP Code:
$exclude = explode(",",$vbulletin->userinfo['excludeforumsgnp']);

Now Find:

PHP Code:
if ( !($xfperms & $vbulletin->bf_ugp_forumpermissions['canview']) OR !($xfperms &

$vbulletin->bf_ugp_forumpermissions['cansearch']))

Replace with:

PHP Code:
if ( !($xfperms & $vbulletin->bf_ugp_forumpermissions['canview']) OR !($xfperms &

$vbulletin->bf_ugp_forumpermissions['cansearch']) OR (in_array($xforum_id, $exclude)))

Opt-Out Forums from Get New Daily changes:
To have one specific forum thats will not show up at all in new posts
ACP / Plugin System / Plugin Manager. Locate the Plugin on Hook search_getnew_start for this Hack, click edit.

Find and edit
Code:

The comma-separated list of excluded forums - add your ID to it.
$vbulletin->GPC['exclude'] .= ((!$vbulletin->GPC['exclude']) ? $vbulletin->userinfo['excludeforumsgnp'] : ',' . $vbulletin->userinfo['excludeforumsgnp']) . ',8';

With the forum id being 8

This only kicks in if the user has defined custom excludes as well.
If you want it to be always active, undo the edit and place

Code:

$vbulletin->GPC['exclude'] .= ',8';
below the }

*** all of these changes work nicely however the Display unread will only filter out excluded forums completely if it is done via the user control panel. Otherwise(this method) it partially filters out the new posts. ex: it shows a new post(no.) but will not display them when clicked on.

Anyone know what needs to be done to get the Display to filter out the excluded forums completely?

dead7 11-29-2006 04:13 PM

This is a great hack and it's been working great so far!

Recently i edited my navbar and removed the welcome/pm/post count because i added a right column to every page of the forum. I updated this new right column in header and footer templates in the style manager for my style.

I pasted the exact same navbar bit that had the unread postcount (that previously worked great) into it and now it won't show the count?

I haven't changed anything except where i display the actual unread post count, it shows the rest of the phrase just not the physical # of actual posts unread now.

Is it sensitive where its being displayed?

Basically i cleaned up our design and put that type of info on the right column thus bumping the forums up .. any help is appreciated

Paul M 11-29-2006 05:22 PM

TBH, I don't really follow what you are describing - can you post a sceen shot, or better still, a link and test login.

dead7 11-29-2006 06:35 PM

I'll try to post a screenshot here in a bit. This is a temp design so a login won't work since its not active to show.

Basically you're familiar with navbar and how your hack goes into that template to display X Unread Posts.

I have removed everything from navbar except the breadcrumb portion which gives the breadcrumb nav as people use the forums.

I then added a right column to the entire forum. I took the Welcome/PM/Unread Posts from the navbar and added it into my right column on the top.

Therefore what navbar had, i removed, and put inside of my right column.

Basically in the end, all i did was move $newposts to my right column and removed it from navbar template. Everything the phrase has displays just fine, just the actual count of how many posts are unread doesn't show up.

For instance i changed mine to say

# Unread Posts since your last visit.

It now says

Unread posts since your last visit

It doesn't even render that $newposts variable to show the actual number of posts.

If this still isn't clear let me know and i'll find a way to get a good screen shot in the half_done design that we're trying this in.

Thanks for your help on this support issue Paul, its truly appreciated.

dead7 11-29-2006 07:07 PM

Shouldn't I be able to take this:

Quote:

<if condition="$vbulletin->userinfo['userid'] != '0' AND THIS_SCRIPT == 'index'">

<a href="$vboptions[bburl]/search.php?do=getnew"><strong>$newposts unread posts</strong></a> since last visit.

</if>

And put it anywhere I want it? Right now I use the Right Column hack which adds a quick snip to the header template and footer. In the footer template is where the code above is.

Paul M 11-29-2006 07:25 PM

There is no such variable as $newposts, I'm not sure where you got that from, try $postcount[unread].

dead7 11-29-2006 07:35 PM

Ah sorry thanks, i meant to use that variable.

I believe what it was is the end of the if condition ='index'. I removed that if condition and it seems to show up great on all the other pages now.

flynnibus 11-30-2006 12:24 AM

*install*

Thanks PaulM!

LjubavnaZona 08-04-2007 01:45 AM

Thank you so much for this :) I love it. Installed.


All times are GMT. The time now is 06:21 PM.

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.01659 seconds
  • Memory Usage 1,786KB
  • 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
  • (5)bbcode_code_printable
  • (8)bbcode_php_printable
  • (5)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
  • (18)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