vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.8 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=235)
-   -   End-User Options - Selective Forum Filter (https://vborg.vbsupport.ru/showthread.php?t=215001)

Freesteyelz 08-03-2009 11:56 AM

Cool mod, Psionic Vision and Andreas. :)



Quote:

Originally Posted by Trek (Post 1823380)
Would it be possible to add a checkbox in the user CP for "Do not display forums in forum list"?

Basically, I'd like to still be able to see the forums in the forum list, but only report new posts in the forums I've selected. Would be nice if it was a global setting and then allowed users to change it to what they would like to see for each person.

I'd like to also be able to see the forums displayed without editing the product file. I was able to suppress New Posts searches and have the forums still display by removing roughly 13 lines of codes from the product XML:

Code:

  <plugin active="1" executionorder="5">
  <title>SFF: Suppress Display of Excluded Forums</title>
 
code bits...
 
  </plugin>


I can't say that it's efficient or if it's upsetting vBulletin protocol but the tests so far seem to work.

paintballer.ie 08-13-2009 12:30 AM

I am also using the 'unread post hacks'
https://vborg.vbsupport.ru/showthrea...t=unread+posts

Event though I have selected some forums to be excluded, this other hack still says I have x posts unread in those hidden forums.

Any work around for this, or will I just have to live with it?

akanevsky 08-15-2009 12:50 PM

Quote:

Originally Posted by Freesteyelz (Post 1860661)
Cool mod, Psionic Vision and Andreas. :)





I'd like to also be able to see the forums displayed without editing the product file. I was able to suppress New Posts searches and have the forums still display by removing roughly 13 lines of codes from the product XML:

Code:

  <plugin active="1" executionorder="5">
  <title>SFF: Suppress Display of Excluded Forums</title>
 
code bits...
 
  </plugin>


I can't say that it's efficient or if it's upsetting vBulletin protocol but the tests so far seem to work.

I have written plugin titles that are pretty much self explanatory. They do not perform any unexpected actions, as far as I am concerned... So if you disable the plugins that say that they disable display of excluded forums, that should do the trick for you.

Quote:

Originally Posted by paintballer.ie (Post 1866211)
I am also using the 'unread post hacks'
https://vborg.vbsupport.ru/showthrea...t=unread+posts

Event though I have selected some forums to be excluded, this other hack still says I have x posts unread in those hidden forums.

Any work around for this, or will I just have to live with it?



The thread for that modification says "Version 3.8.001 adds support for forums excluded if you have the "Get New/Get Daily Opt Out Modification" installed (by Andreas).". Maybe Paul also supports this hack? Please ask him, it should be pretty much the same piece of code to support either hack.

Freesteyelz 08-18-2009 08:50 PM

Quote:

Originally Posted by Psionic Vision (Post 1867848)
I have written plugin titles that are pretty much self explanatory. They do not perform any unexpected actions, as far as I am concerned... So if you disable the plugins that say that they disable display of excluded forums, that should do the trick for you.


:o I have no idea why I didn't think of disabling the plugin. :p That did the trick and is more practical than my work around. Thanks, Psionic! :)

Saint_ago 08-26-2009 01:52 PM

Quote:

Originally Posted by Walter (Post 1824500)
Thank you for the hack!

A small bug occured: the settings in the user control panel work only in IE and Firefox, in Opera the list of the forums is scrollable but the forums actually don't scroll so the feature is not usable in Opera....

Quote:

Originally Posted by Psionic Vision (Post 1824725)
That's weird. Can you please link me to your site so that I can see what is going on?

Same here!

http://www.battlecentral.xpg.com.br/forum/

Works fine on IE and FF, but in Opera don't.. :/

djvj 09-05-2009 05:12 AM

Awesome, awesome! Thanks for this great hack, exactly what I needed.

glennybee 10-06-2009 05:09 PM

Quote:

Originally Posted by woostar (Post 1836478)
This doesn't seem to work with vBSEO. Can anyone confirm this or is it just me?

When I install the product it says "Importing Product, Please Wait.." but it never installs.

I also have vBSEO installed and it would be great if this mod could be altered to work with vBSEO. I guess it has something to do with the urls.

CristianoDiaz 10-08-2009 02:29 PM

I am having a problem with this hack - it previously has worked fine, but now, the list of forums to filter in User CP is blank - it only has Reset Exclusions at the top. There are multiple forums set to be excludable, and it was fine in the past Any ideas what might be causing this to happen?

guvner 10-08-2009 08:08 PM

Excellent mod - many thanks!

Mike :)

Crazy-Achmet 10-16-2009 12:23 PM

Quote:

Originally Posted by CristianoDiaz (Post 1896624)
I am having a problem with this hack - it previously has worked fine, but now, the list of forums to filter in User CP is blank - it only has Reset Exclusions at the top. There are multiple forums set to be excludable, and it was fine in the past Any ideas what might be causing this to happen?

I'm having the same problem! :(

paintballer.ie 10-17-2009 07:07 PM

Quote:

Originally Posted by Ov3rrun (Post 1857666)
What to fix to work with vbadvanced last posts module????

I am too am looking for a fix for this. The recent threads block is literally constantly blocked with threads that are filtered out.

akanevsky 10-25-2009 05:11 PM

Quote:

Originally Posted by paintballer.ie (Post 1901434)
I am too am looking for a fix for this. The recent threads block is literally constantly blocked with threads that are filtered out.

What's the problem with it?

Rickeo 10-25-2009 07:49 PM

Amazing addition just what I needed :)

yesfans 11-09-2009 12:14 AM

I can still see the forums blocked in my NEW POSTS and LAST 3 DAYS POSTS feature on my site. Is it supposed to do that?

yesfans 11-09-2009 12:18 AM

evermind

MoMan 11-13-2009 05:03 PM

I'd just like to say that this is probably one of the most elegant modifications I've seen in a while. Installed and 5/5!

autje 11-23-2009 03:39 PM

I importd the product file, but I see no change? I'm under the impression something should appear in my User CP under 'Miscellaneous', but... nothing?

CarlitoBrigante 11-23-2009 07:29 PM

Quote:

Originally Posted by CristianoDiaz (Post 1896624)
I am having a problem with this hack - it previously has worked fine, but now, the list of forums to filter in User CP is blank - it only has Reset Exclusions at the top. There are multiple forums set to be excludable, and it was fine in the past Any ideas what might be causing this to happen?

Found out this issue occurs if you have vBSEO installed. At that stage of the processing of the page, vBSEO has added links to the forumcache array, so the check done in the plugin SFF: User Options won't work as it should and will effectively make the forum select box empty, since all forums have been assigned a link by vBSEO

A simple solution is to change the "Direct Category Links" option in your vBSEO Control Panel to "No". Otherwise, you could modify the code of the plugin build the forum list before vBSEO intercepts it, but I have not tried.

MrD 11-25-2009 09:50 PM

Hi,
will this Addon ported for vb4?

StarFire 11-26-2009 04:51 AM

Thanx a lot! Quite a few of my users were begging for this.

SledgeHead 12-21-2009 10:58 PM

Will this be available for 4.0?

al_rhar 01-08-2010 11:03 AM

Excellent thanks. My users have been moaning about having this option for ages. works fine on 3.8.4

CyberRanger 01-12-2010 03:25 PM

Quote:

Originally Posted by SledgeHead (Post 1934977)
Will this be available for 4.0?

I would be ever so grateful! I stupidly updated my forum to vb4 without realizing I'd break this product.

Fiel 01-25-2010 06:47 AM

I was able to get this to work with vB4. The plugin "SFF: User Options" has to be changed to work with the new template engine used with vB4. Learning a little PHP never hurt, right?

Fiel 01-28-2010 04:32 PM

Since I've been getting a steady stream of questions regarding the update to vB4, here's how you update to vB4:

The only problem with this hack in vB4 is that it doesn't appear correctly in the UserCP. This is due to vB4 using a new template creation engine (which is much, much easier to use - makes it obvious which variables are available to templates and which are not). As of right now, the templates are using variables that they don't have access to, so it doesn't work. These modifications fixes it to work with vB4:

AdminCP --> Products & Plugins --> Plugin Manager --> "SFF: User Options"

Replace this:

PHP Code:

    else 
    { 
        
$optionselected ''
    } 
    eval(
'$optoutforumbits .= "' fetch_template('option') . '";'); 
}

$find_string '$customfields[other]'
$add_string fetch_template('modifyoptions_excludeforums'); 
$vbulletin->templatecache['modifyoptions'] = str_replace($find_string$find_string $add_string$vbulletin->templatecache['modifyoptions']); 


With this:

PHP Code:

    else 
    { 
        
$optionselected ''
    } 
    
$templater vB_Template::create('option');  
    
$templater->register('optionvalue'$optionvalue);  
    
$templater->register('optiontitle'$optiontitle);  
    
$templater->register('optionclass'$optionclass); 
    
$templater->register('optionselected'$optionselected); 
    
$optoutforumbits .= $templater->render(); 


$templater vB_Template::create('modifyoptions_excludeforums');
$templater->register('optoutforumbits'$optoutforumbits);
$template_hook['usercp_options_other'] .= $templater->render(); 

Make sure you save it.

Then go back into the plugin manager and edit "SFF: Cache Templates". This plugin is trying to access a variable which doesn't exist in vB4.

Change this:

PHP Code:

if (THIS_SCRIPT == 'profile'

    
$globaltemplates array_merge($globaltemplates, array( 
        
'modifyoptions_excludeforums'
    )); 


To this:

PHP Code:

if (THIS_SCRIPT == 'profile')
{
    
$cache array_merge($cache, array(
        
'modifyoptions_excludeforums',
    ));


Now you need to change user options to allow the user to select it. For this hack, the creator included his own template (modifyoptions_excludeforums), but that works with vB3 and needs updating for vB4.

So, go to Styles & Templates --> Style Manager --> YOUR_STYLE_HERE --> "Modify User Template Options" --> "modifyoptions_excludeforums"

Replace the entire template contents with this:

Code:

<div class="blockrow">
        <legend>{vb:rawphrase exclude_forums_title}</legend>
        <p class="description">{vb:rawphrase exclude_forums_desc_1} <br /> <br />{vb:rawphrase exclude_forums_desc_2}</p>
        <div class="group">
        <select style="width: 50%" size="13" name="excludeforumids[]" id="sel_excludeforumids" multiple="multiple">
                <option value="">{vb:rawphrase exclude_none}</option>
                {vb:raw optoutforumbits}
        </select>
        </div>
</div>

And you're done. It should work fine and dandy now.

CyberRanger 01-28-2010 05:14 PM

Thanks!

But I'm still getting

PHP Code:

Warningarray_merge() [function.array-merge]: Argument #1 is not an array in [path]/includes/class_bootstrap.php(1146) : eval()'d code on line 5 

at the top of the user profile pages.

In SFF: Cache Templates, do you still have -

PHP Code:

if (THIS_SCRIPT == 'profile')
{
    
$globaltemplates array_merge($globaltemplates, array(
        
'modifyoptions_excludeforums',
    ));



Fiel 01-28-2010 06:20 PM

Ah, my bad. Forgot to say that I did correct that error too.

At that point in the script, $globaltemplates is not defined (nor is it ever). Change it to this:

PHP Code:

if (THIS_SCRIPT == 'profile')
{
    
$cache array_merge($cache, array(
        
'modifyoptions_excludeforums',
    ));



CyberRanger 01-28-2010 06:34 PM

Quote:

Originally Posted by Fiel (Post 1969193)
At that point in the script, $globaltemplates is not defined ...

Awesome! That made the error go away but (always a but!) the template modifyoptions_excludeforums isn't showing up anywhere in the user profile.

Should it still display on the profile.php?do=editoptions page?

Fiel 01-28-2010 06:39 PM

Yes, that's where it displays for me. I know that we've been PMing each other. Make sure you're using the version of the script I posted, not the one I PMed (they are different versions).

CyberRanger 01-28-2010 07:03 PM

Quote:

Originally Posted by Fiel (Post 1969204)
.. not the one I PMed (they are different versions).

duh! I didn't notice that. Now I have the forum listing under profile.php?do=editoptions. I've successfully tested modifying the forums selected and seeing that the changes are saved ...

but ...

when I do "New Posts", new posts from the exclude forums are still showing. :eek:

Fiel 01-28-2010 07:38 PM

Thanks for catching that. Now we've got a serious problem on our hands.

If you click on the "SFF: Exclude Forums From Search" you'll notice in the combo box that there is no hook location. I looked in the PHP files and the hook location needed for this plugin to work in vB4 is non-existant. So in order for it to work, you're going to have to submit a ticket to vBulletin or add in your own hook.

I filed a vB4 bug report. Hopefully this hook will be included with 4.0.2:

http://www.vbulletin.com/forum/proje...?issueid=35758

Thanks for catching that bug. Sharp eye.

EDIT: The bug has been accepted and will be fixed in 4.0.3.

CyberRanger 01-29-2010 12:32 AM

Thanks for posting the bug report. I tried sticking
PHP Code:

($hook vBulletinHook::fetch_hook('search_getnew_start')) ? eval($hook) : false

at line 1115 in search.php but that didn't work. Given how the old search.php is 3761 lines vs 1155 lines in the new search.php, I guess I shouldn't be surprised that didn't work.

I'll look some more in the morning but I think this requires a vb god with much greater knowledge than I have!

rwoscott 03-13-2010 03:28 AM

Quote:

Originally Posted by SledgeHead (Post 1934977)
Will this be available for 4.0?

+1, please

scottct1 03-15-2010 01:34 PM

This is the only mod which is holding me back from switching to VB4. I need this one!

TheChaosFactor 03-16-2010 02:40 AM

@Fiel -

Thanks a million man. People were going to be upset if I had to tell them this one wouldn't make the jump with us...

mandingo 03-16-2010 06:30 AM

So this works for 4+ if we edit all that stuff up there?^^ or is there going to be a legit release?

Tettinntil 03-29-2010 01:43 PM

We have a modified "new posts" search on the forum; http://myforum/search.php?do=getnew&f=xx , where xx is a forum with many sub forums. The members choices for which forums to filter from new posts search do not work on this modified search. Is there anything I could do to make it work?

stevebullman 04-04-2010 09:11 AM

ive installed this and it seems to be working fine, very good mod......

is there a way to set my off topic forums so as default they dont appear in todays posts/unread posts, and members and choose to include them if they want?

scottct1 04-21-2010 07:43 PM

Quote:

EDIT: The bug has been accepted and will be fixed in 4.0.3.
4.0.3 is out... is this fully working yet on vB4?

profanitytalker 04-28-2010 06:53 PM

This is just the hack I was looking for! Thank you!


All times are GMT. The time now is 05:56 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.01528 seconds
  • Memory Usage 1,865KB
  • 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
  • (3)bbcode_code_printable
  • (8)bbcode_php_printable
  • (16)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)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