vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Graveyard (https://vborg.vbsupport.ru/forumdisplay.php?f=224)
-   -   Miscellaneous Hacks - Top Posters List (https://vborg.vbsupport.ru/showthread.php?t=232021)

mindway 02-06-2011 11:05 AM

how can i display this on top of each page... for instance call the plugin at top of each page...

Paul M 02-06-2011 08:20 PM

You cannot do that, its designed to be its own page.

beatyourtruck 03-09-2011 01:46 AM

Excellent Paul. Working perfectly on 4.1.2.

Thank you! 8)

Strauss 03-29-2011 12:21 PM

awesome thanks!

dlewisr 04-20-2011 06:19 PM

Cheers mate. Job's a good 'un

Alan_SP 04-26-2011 12:14 AM

Quote:

Originally Posted by mindway (Post 2159340)
how can i display this on top of each page... for instance call the plugin at top of each page...

Quote:

Originally Posted by Paul M (Post 2159554)
You cannot do that, its designed to be its own page.

Well, it could be done, if he really want it and want to do a bit work on it.

You need to change template Top_posters, remove everything except table code for creating list and usual HTML page code. The rest is just how vBulletin creates its own pages, so it could go and in this case it should go.

Then find template that is used everywhere. You should use either navbar or footer (i.e. if you want it on top or bottom of your forum). After that, just put iframe html code calling top posters. :)

If you don't know about what I'm talking, don't do this.

Alan_SP 04-26-2011 12:26 AM

Paul, excellent mod, really like it. I use it for Top 100 posters, so I needed to add poster's position number (you can get lost in this many posters).

If someone wants to do this, edit this template:

Top_Posters_Bit

find:
HTML Code:

{vb:raw posts.username}
add before:
HTML Code:

{vb:raw posts.row}.
As posts.raw isn't defined, you need to create it. Edit plugin Top posters that uses hook misc_start (all plugins have same name, so look for hook).

Find:

PHP Code:

                $posts['userid'] = $posts[$col]['userid'];
                
$posts['username'] = $posts[$col]['username'];
                
$posts['postcount'] = vb_number_format($posts[$col]['postcount']);
                
$templater vB_Template::create('Top_Posters_Bit');
                
$templater->register('posts',$posts);
                
$toppostrow .= $templater->render(); 

Add right before or after this code:
PHP Code:

$posts['row'] = $row+1

That's it, you have users postion before users name. :) I attached modified file.

billstelling 04-26-2011 03:00 AM

awesome mod! I like it allot, well done.

jack150464 06-05-2011 10:45 PM

How do I change the background color?

thanks

Paul M 06-06-2011 12:12 PM

You would need to edit the custom CSS.


All times are GMT. The time now is 01:40 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.01141 seconds
  • Memory Usage 1,743KB
  • 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_html_printable
  • (2)bbcode_php_printable
  • (2)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
  • (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