Go Back   vb.org Archive > vBulletin Modifications > vBulletin 4.x Modifications > vBulletin 4.x Add-ons
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Userlevel Details »»
Userlevel
Version: 1.0.0 pl1, by Coroner Coroner is offline
Developer Last Online: Dec 2011 Show Printable Version Email this Page

Category: Show Thread Enhancements - Version: 4.0.1 Rating:
Released: 11-15-2009 Last Update: 01-18-2010 Installs: 109
DB Changes Uses Plugins Auto-Templates
Translations  
No support by the author.

What does it do
Shows a UserLevel in a post of a each user.
The level will calculate from the users registration date and from his posts (see pictures). This Mod can be switched off in the vBulletin settings.

Install
Simply upload the picture (gif) in or into your Style(s) and install the product.

Credits & Info
To @Tyran that he get the original wBB3 Mod. In wBB3 the UserLevel was also avaible in the users profile. NOT in this version.

Hooks
This Mod use a template hook. Without it, it won't work!
$template_hook [postbit_userinfo_right_after_posts]

This Mod is avaible in:
English, German, Italian and Turkish.

Permission for Translation is given !


Images see here:
https://vborg.vbsupport.ru/showthread.php?t=225925

EDIT: PL1 fixed the template cache !

Download Now

File Type: zip Userlevel v1.0 - vB4.zip (12.6 KB, 441 views)
File Type: zip Userlevel v1.0 PL1 - vB4.zip (12.6 KB, 387 views)

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #42  
Old 01-12-2010, 01:11 PM
Olli2k's Avatar
Olli2k Olli2k is offline
 
Join Date: Sep 2005
Location: Germany
Posts: 76
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Coroner View Post
I cannot found any "fetch_template" inside the xml ?
eval('$template_hook[postbit_userinfo_right_after_posts] .= "' . fetch_template('postbit_userlevel') . '";');

Is in every xml.

Complede User Level - Postbit Display start plugin code:

PHP Code:
PHP-Code des Plug-ins

global $vbulletin;
if (
$vbulletin->options['userlevel_on'])
{
    if (
THIS_SCRIPT == 'private')
    {
        
$up $vbulletin->db->query_first ("SELECT posts,joindate FROM " TABLE_PREFIX "user WHERE userid=" $this->post['fromuserid']);
        
$this->post array_merge ($this->post$up);
    }

    
$hl false;
    
$joindate 0;
    if (
$this->post['userid'])
    {
        
$joindate $this->post['joindate'];
    }
    if (
$vbulletin->options['userlevel_help']) $hl true;
    
$jointime = (TIMENOW $joindate) / 86400;
    
$exp ceil ($this->post['posts'] * $jointime);
    if (
$exp != 0)
    {
        
$level pow (log10 ($exp), 2);
    }
    else
    {
        
$level 0;
    }
    
$showlevel floor ($level) + 1;
    
$nextexp ceil (pow (10pow ($showlevel0.5)));
    if (
$showlevel == 1)
    {
        
$prevexp 0;
    }
    else
    {
        
$prevexp ceil (pow (10pow ($showlevel 10.5)));
    }

    
$width ceil ((($exp $prevexp) / ($nextexp $prevexp)) * 100) . 'px';
    
$needexp vb_number_format ($nextexp $exp);
    
$exp     vb_number_format ($exp);
    
$nextexp vb_number_format ($nextexp);

    eval(
'$template_hook[postbit_userinfo_right_after_posts] .= "' fetch_template('postbit_userlevel') . '";');

Files downloaded: today


Error messages:


Warning: fetch_template() calls should be replaced by the vB_Template class in [path]/includes/functions.php on line 3895

Warning: fetch_template() calls should be replaced by the vB_Template class in [path]/includes/functions.php on line 3895

Warning: fetch_template() calls should be replaced by the vB_Template class in [path]/includes/functions.php on line 3895
Reply With Quote
  #43  
Old 01-12-2010, 01:50 PM
Coroner Coroner is offline
 
Join Date: Feb 2008
Location: Germany
Posts: 797
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Nope !!
I have no idea why or where you can see "fetch_template" !?

The real vB4 Plugin is:
PHP Code:
global $vbulletin;
if (
$vbulletin->options['userlevel_on'])
{
    if (
THIS_SCRIPT == 'private')
    {
        
$up $vbulletin->db->query_first ("SELECT posts,joindate FROM " TABLE_PREFIX "user WHERE userid=" $this->post['fromuserid']);
        
$this->post array_merge ($this->post$up);
    }

    
$hl false;
    
$joindate 0;
    if (
$this->post['userid'])
    {
        
$joindate $this->post['joindate'];
    }
    if (
$vbulletin->options['userlevel_help']) $hl true;
    
$jointime = (TIMENOW $joindate) / 86400;
    
$exp ceil ($this->post['posts'] * $jointime);
    if (
$exp != 0)
    {
        
$level pow (log10 ($exp), 2);
    }
    else
    {
        
$level 0;
    }
    
$showlevel floor ($level) + 1;
    
$nextexp ceil (pow (10pow ($showlevel0.5)));
    if (
$showlevel == 1)
    {
        
$prevexp 0;
    }
    else
    {
        
$prevexp ceil (pow (10pow ($showlevel 10.5)));
    }

    
$width ceil ((($exp $prevexp) / ($nextexp $prevexp)) * 100) . 'px';
    
$needexp vb_number_format ($nextexp $exp);
    
$exp     vb_number_format ($exp);
    
$nextexp vb_number_format ($nextexp);

    
$templater vB_Template::create('postbit_userlevel');
        
$templater->register('hl'$hl);
        
$templater->register('exp'$exp);
        
$templater->register('ewidth'$width);
        
$templater->register('showlevel'$showlevel);
        
$templater->register('needexp'$needexp);
        
$templater->register('nextexp'$nextexp);
    
$template_hook[postbit_userinfo_right_after_posts] .= $templater->render();

Reply With Quote
  #44  
Old 01-14-2010, 05:20 AM
cellarius's Avatar
cellarius cellarius is offline
 
Join Date: Aug 2005
Posts: 1,987
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Olli2k View Post
eval('$template_hook[postbit_userinfo_right_after_posts] .= "' . fetch_template('postbit_userlevel') . '";');

Is in every xml.

Files downloaded: today
You so obviously downloaded the 3.8 version. Probably from the wrong thread?
Reply With Quote
  #45  
Old 01-18-2010, 06:16 PM
meissenation meissenation is offline
 
Join Date: Apr 2005
Posts: 476
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I bet you guys are clicking the link to see the images in the product description and then downloading the product from that link - which is the 3.8 version. I just downloaded the vb4 zip and I see no mention of fetch in the product XML at all.
Reply With Quote
  #46  
Old 01-18-2010, 10:24 PM
cellarius's Avatar
cellarius cellarius is offline
 
Join Date: Aug 2005
Posts: 1,987
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Coroner, would you consider fixing template caching, please? I think many users won't find the fix I posted buried in the thread
Reply With Quote
  #47  
Old 01-18-2010, 11:37 PM
molieman's Avatar
molieman molieman is offline
 
Join Date: Oct 2006
Location: Ocala, FL
Posts: 141
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Fantastic and I love it.

Thank You!!!!!
Reply With Quote
  #48  
Old 01-19-2010, 03:16 AM
Coroner Coroner is offline
 
Join Date: Feb 2008
Location: Germany
Posts: 797
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I'm sorry. Yes of course, we do it now.
Reply With Quote
  #49  
Old 01-19-2010, 09:24 AM
cellarius's Avatar
cellarius cellarius is offline
 
Join Date: Aug 2005
Posts: 1,987
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thank you
Reply With Quote
  #50  
Old 03-03-2010, 10:50 AM
Drache Drache is offline
 
Join Date: Aug 2004
Posts: 162
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

very nice mod. is there a list page that shows the top 10 highest level users?

also how do I make it show next to the reputation on left side and not above it?

Thanks.
Reply With Quote
  #51  
Old 03-20-2010, 08:03 AM
Toxic2 Toxic2 is offline
 
Join Date: Jul 2009
Posts: 82
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks for the Upgrade Corner
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 12:34 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.07739 seconds
  • Memory Usage 2,379KB
  • Queries Executed 26 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (2)bbcode_php
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (2)postbit_attachment
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_attachment
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete