vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.5 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=113)
-   -   Top 'X' Stats (https://vborg.vbsupport.ru/showthread.php?t=93065)

volcan 08-31-2005 10:57 PM

Hi
I cant find the Manage "Products link in the nav bar"
How do i get it please?\Thank you.

Valter 08-31-2005 11:17 PM

Quote:

Originally Posted by volcan
Hi
I cant find the Manage "Products link in the nav bar"
How do i get it please?\Thank you.

In Admin CP - left frame - at the bottom. Be sure menus are extended.

wcbryant 09-01-2005 07:51 PM

Hi all,

I'd like to install Amykhar's Hideaways extention, this allows certain usergroups to essentially spawn their own private forums.

What this creates for me is a situation where those will appear (for those users) in the TopXStats area, and I'd like to avoid that.

Does anyone know how I might turn the 'excludes' field into an 'includes' instead. There are only a few forums I want showing up on that list, and would much prefer to approach it from that angle.

InfiniteWebby 09-01-2005 10:21 PM

Quote:

Originally Posted by wcbryant
Hi all,

I'd like to install Amykhar's Hideaways extention, this allows certain usergroups to essentially spawn their own private forums.

What this creates for me is a situation where those will appear (for those users) in the TopXStats area, and I'd like to avoid that.

Does anyone know how I might turn the 'excludes' field into an 'includes' instead. There are only a few forums I want showing up on that list, and would much prefer to approach it from that angle.

In the plugin code:

Replace:

PHP Code:

if ($vbulletin->options['topXstats_excludedforums'] !== '') { 
    
$excludedforums ',' $vbulletin->options['topXstats_excludedforums']; 


$forumpermissions = array(); 
foreach(
$vbulletin->forumcache AS $forum) { 

    
$forumpermissions[$forum["forumid"]] = fetch_permissions($forum['forumid']); 

    
// ## HIDE FORUMS WITHOUT THE CANVIEW, CANVIEWOTHERS OR CANSEEDELNOTICE PERMISSION ## 
    
if (!($forumpermissions[$forum["forumid"]] & $vbulletin->bf_ugp_forumpermissions['canview']) AND !$vbulletin->options['showprivateforums'])  { 
        
$excludedforums $excludedforums ',' $forum['forumid']; 
    } 
    
// filter out deletion notices if can't be seen 
    
if ($forumpermissions[$forum["forumid"]] & $vbulletin->bf_ugp_forumpermissions['canseedelnotice'] OR can_moderate($forum['forumid'])){ 
        
$deljoin "LEFT JOIN " TABLE_PREFIX "deletionlog AS deletionlog ON(thread.threadid = deletionlog.primaryid AND type = 'thread')"
    } else { 
        
$deljoin ''
    } 



unset(
$forum); 

// get rid of initial comma 
$excludedforums substr($excludedforums1); 

if (
$excludedforums != "") { 
    
$excludedforums "AND thread.forumid NOT IN ($excludedforums)"


With:

PHP Code:

if ($vbulletin->options['topXstats_excludedforums'] !== '') {
    
$includedforums ',' $vbulletin->options['topXstats_excludedforums'];
}

$forumpermissions = array();
foreach(
$vbulletin->forumcache AS $forum) {

    
$forumpermissions[$forum["forumid"]] = fetch_permissions($forum['forumid']);

    
// ## HIDE FORUMS WITHOUT THE CANVIEW, CANVIEWOTHERS OR CANSEEDELNOTICE PERMISSION ##
    
if (!($forumpermissions[$forum["forumid"]] & $vbulletin->bf_ugp_forumpermissions['canview']) AND !$vbulletin->options['showprivateforums'])  {
        
$excludedforums ',' $forum['forumid'];
    }
    
// filter out deletion notices if can't be seen
    
if ($forumpermissions[$forum["forumid"]] & $vbulletin->bf_ugp_forumpermissions['canseedelnotice'] OR can_moderate($forum['forumid'])){
        
$deljoin "LEFT JOIN " TABLE_PREFIX "deletionlog AS deletionlog ON(thread.threadid = deletionlog.primaryid AND type = 'thread')";
    } else {
        
$deljoin '';
    }
}


unset(
$forum);

// get rid of initial comma
$excludedforums substr($excludedforums1);
$includedforums substr($includedforums1);

if (
$excludedforums != "") {
    
$excludedforums "AND thread.forumid IN ($includedforums) AND thread.forumid NOT IN ($excludedforums)";


This is untested so I am not sure if it will work properly. You also still need to use the setting "excluded forums" to set which forums you want to show. Cause messing with settings is alot harder than a simple code edit.

wcbryant 09-02-2005 09:25 AM

Thanks IW, that's a huge help. Will try it out first thing tomorrow. Appreciate the 'above and beyond' on top of making an already outstanding plug-in.

Pain86 09-02-2005 05:00 PM

how do i stop private forums showin.. i dont want threads from the admin forum or mod forums showin as latest threads.

how do i stop this?

thanks.

wcbryant 09-02-2005 09:49 PM

Works perfectly Infinite, thank you for the help.

InfiniteWebby 09-02-2005 11:30 PM

Quote:

Originally Posted by Pain86
how do i stop private forums showin.. i dont want threads from the admin forum or mod forums showin as latest threads.

how do i stop this?

thanks.

It should do this automatically based on forum permissions. Just because you can see the thread in the stats doesn't mean your members and guests can.

peterska2 09-03-2005 07:48 PM

nice one. thanks

wcbryant 09-04-2005 02:40 AM

Quote:

Originally Posted by wcbryant
Works perfectly Infinite, thank you for the help.

Actually, it's showing posts from forums that are not listed in excluded, but only a few. Bizarre behavior. Been looking at it, I'm no coder, but you'd think it's more a logic puzzle than anything else. In the unlikely event I can figure out why it's doing what it is, I'll post something here.


All times are GMT. The time now is 08:14 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.01506 seconds
  • Memory Usage 1,771KB
  • 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
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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