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.

InfiniteWebby 09-04-2005 02:58 AM

Quote:

Originally Posted by wcbryant
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.

It probably has something todo with the permissions, because I didn't really change that bit of code at all.

y2krazy 09-04-2005 09:04 PM

Interesting enough, there seems to be a small error in the product. I go to the topXstats.php page and everything that I've read shows up as [OLD], but when I go back to FORUMHOME, everything still shows up as [NEW]. Even when I clicked on the "Mark Forums Read" link for my forums they still show up as new. I'm at a loss of what I need to do to fix this... ><

BTW: I just ran all of the Update Counters features, and that didn't fix it. Just wondering, but would the reason for it not working be because I am using the Database (automatic forum marking) feature that is new to vB?

EDIT: I just tried all three of the Thread/Forum Read Marking Type options and they all had the same problem, so this can't be it either. :(

InfiniteWebby 09-05-2005 07:51 AM

It is working fine for me, the code that tags a post as new or old is the same on both pages so I can't see why they shouldn't work the same. Are you sure you haven't edited the plugin or file in some way? Or even the templates?

y2krazy 09-05-2005 01:19 PM

Quote:

Originally Posted by InfiniteWebby
It is working fine for me, the code that tags a post as new or old is the same on both pages so I can't see why they shouldn't work the same. Are you sure you haven't edited the plugin or file in some way? Or even the templates?

Nope, I'll try re-installing though.

EDIT: Reinstalled and it seemed to work fine... that is until I logged out and logged back in. It's doing the same thing again. :(

InfiniteWebby 09-06-2005 07:29 AM

Quote:

Originally Posted by y2krazy
Nope, I'll try re-installing though.

EDIT: Reinstalled and it seemed to work fine... that is until I logged out and logged back in. It's doing the same thing again. :(

You've got me beat. For the moment you will have to put up with it untill I release the next version. It will be a major rehaul so maybe the change in code will stop the hiccup.

y2krazy 09-08-2005 03:51 PM

The only change is that I added a footer to the template, like I do with all the other hacks to make them look more streamlined with the forums. I also removed the extra <br> lines before and after the blocks because they were not necessary for me(you'll have to remove those youself if want to). Screenshots are included.

Phrase Manager -> Add New Phrase
Varname: topXstats_footer
Text: Powered by <b>topXstats</b> v1.2.1 by InfiniteWebby

Style Manager -> Choose the Style to Edit -> "topXstats_stats_bit"
Find:

Code:

</tbody>
</table>
<!-- end top statistics box -->

Add Above:

Code:

        <tr>
                <td class="tcat" align="right" colspan="3"><span class="smallfont">$vbphrase[topXstats_footer]</span></td>
        </tr>


angelo70 09-11-2005 06:53 PM

Howto.. ?
Newest Members
--------------------
Member: JoinDate:

post --> joindate vbdata formating.. plz

artonex 09-11-2005 07:46 PM

i just installed this on my forums, its great thanks for coding it :)

slank 09-12-2005 04:08 AM

installs installs installs :D

thetoolman 09-13-2005 01:13 PM

thanks, but how do i pull/echo just one variable.. say the top posters?

InfiniteWebby 09-14-2005 01:27 AM

Quote:

Originally Posted by angelo70
Howto.. ?
Newest Members
--------------------
Member: JoinDate:

post --> joindate vbdata formating.. plz

In the plugin code and topXstats.php find:

PHP Code:

    $getstats_member[musername] = fetch_musername($getstats_member); 

After it add:

PHP Code:

    $getstats_member[joindate] = vbdate($vbulletin->options['timeformat'], $getstats_member[joindate]); 

That should work. ;)

Quote:

Originally Posted by thetoolman
thanks, but how do i pull/echo just one variable.. say the top posters?

I'm not exactly sure what it is you want to do.

Brinnie 09-14-2005 07:31 AM

IW, is this the final version, or will you be adding to it?

InfiniteWebby 09-14-2005 07:34 AM

No, I'll be adding to it. When I get the time. ;)

angelo70 09-14-2005 10:47 AM

Quote:

Originally Posted by InfiniteWebby
No, I'll be adding to it. When I get the time. ;)

I'll be adding to it.

But timeis 1126674609 ??

vbdate() not working

thetoolman 09-14-2005 06:38 PM

Quote:

Originally Posted by InfiniteWebby
I'm not exactly sure what it is you want to do.

I want to display just the top posters not the other stats. Also, how do i move it to the footer template as when i do, it displays blank.

Thanks

InfiniteWebby 09-14-2005 09:57 PM

Quote:

Originally Posted by angelo70
I'll be adding to it.

But timeis 1126674609 ??

vbdate() not working

Try vbulletin->options['dateformat'] instead of vbulletin->options['timeformat']

angelo70 09-16-2005 02:24 AM

Quote:

Originally Posted by InfiniteWebby
Try vbulletin->options['dateformat'] instead of vbulletin->options['timeformat']

Thanks InfiniteWebby. ^^;

But joindate is only timeformat ?
What I want is timeforumat but dateformat.

sorry.. i am not good at English

lairnoc 09-18-2005 03:14 PM

hi guyz
got another question

how to import reputation into the top stats or/and rep power..

geoff4787 09-19-2005 06:49 AM

Works great, very nice!

theArchitect 09-25-2005 11:13 PM

Would it be possible to add control over how many stats are displayed?

AND

To have each stat as an individual box (which has its own stat limit?

So I could say that I wanted the Top 20 posters displayed, but only the Last 5 new members and have them as two seperate boxes.

I use to have a mod on my forum home called DevBox, but that does not seem to have been ported to 3.5.0 and by adding Top members with Rep will add some functionality that DevBox was missing.

fortnox 09-30-2005 05:41 AM

>Hi!

Does it run with gold? :rolleyes:

InfiniteWebby 09-30-2005 05:45 AM

Certainly does. =)

Alien 09-30-2005 06:55 AM

Is it possible to just have this run as an add-on script? So you would just go to sitename.com/topXstats.php if one wished to but not have it on the front page?

I know you can remove the template modification, but it still uses 3 queries on the forumhome. I'd love to keep it, but only as an add-on page.. Thoughts?

Alien 09-30-2005 07:00 AM

I tried disabling the modification, and only going to topXstats.php and it still *appears* to be working fine (and without the additional 3 queries on the forumhome). Is this safe enough? :)

InfiniteWebby 09-30-2005 07:07 AM

Yeah, the topXstats.php code is completely seperate to the plugin, it just uses the same settings and templates.

Alien 09-30-2005 07:21 AM

Excellent. I'll leave it disabled, and use it as an add on.. Working great on wtf.com right now (have it in the navbar).

Btw, typo bug fix.. If you search your xml file for "stong" you will find one occurance. Rename that to strong and you will have 100% XHTML valid code outputted!

Thanks again!

Capricia 09-30-2005 08:19 AM

Works great, thanks for this :D

Blackhat 10-01-2005 09:59 AM

exactly what I needed :) Great job, but how can I change from 5 to 10 ?

ThePimp 10-01-2005 01:17 PM

I just upgraded to 3.5.0 Gold and TopXStats seems to have broken, do I need to reinstall?

ukbill69 10-01-2005 01:25 PM

Working with Vbulletin 3.5 Gold


All times are GMT. The time now is 05:58 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.01585 seconds
  • Memory Usage 1,860KB
  • 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_code_printable
  • (4)bbcode_php_printable
  • (13)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)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