View Single Post
  #673  
Old 02-15-2006, 12:52 PM
andrefedalto andrefedalto is offline
 
Join Date: Dec 2005
Location: Brazil
Posts: 81
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

ok, lets go:
Open AdminCP, go to Plugin management and edit this plugin: "AWS: Show Warning Options/Points in Postbit/Threads"

replace this:
Code:
global $hierarchical, $viewoption, $showpoints;
with this:
Code:
global $hierarchical, $viewoption, $showpoints, $vbulletin, $stylevar;
scroll down to the end of the plugin and BEFORE this:
Code:
DEVDEBUG("useradmin = $useradmin, postadmin = $postadmin, usermod = $usermod, postmod = $postmod, usersmod = $usersmod");
DEVDEBUG("showpoints = $showpoints, showwarnsignmgm = $showwarnsignmgm, showwarnsign = $showwarnsign");
DEVDEBUG("showwarnlink = $showwarnlink, showviewwarnlink = $showviewwarnlink, showviewyourslink = $showviewyourslink");
add this:
Code:
if ($post[warning_level]>0) {
	$width_max = 70;
	$percent = $post[warning_level]/$vbulletin->options['warn_points_before_banned'];
	$width_max = $width_max - 4;
	$width1 = round($percent*$width_max);
	$width2 = $width_max-$width1;
	$graphic_warn_level = "<img src=\"".$stylevar[imgdir_misc]."/warn_left.png\" width=\"2\" height=\"10\"><img src=\"".$stylevar[imgdir_misc]."/warn_dark.png\" width=\"".$width1."\" height=\"10\"><img src=\"".$stylevar[imgdir_misc]."/warn_light.png\" width=\"".$width2."\" height=\"10\"><img src=\"".$stylevar[imgdir_misc]."/warn_right.png\" width=\"2\" height=\"10\">";
}
ATTENTION: in this variable $width_max change "70" for the MAXIMUM width of the bar you can use in postbit. I have 70 pixels to use, so i set it to 70. When doing the edit, set it to some value (IN PIXELS) that fits to your template.

Now you must go to template edition and edityour postbit/postbit_legacy template.
Find this:
Code:
Warnings Level: $post[warning_level]
and replace with
Code:
Warnings Level: $graphic_warn_level
Upload the attached images to your MISC image directory.
And now just enjoy your cool userbar instead of just numbers

See attached image to see how is the final result (my text is in portuguese, but after you follow this small tutorial you will get the text in ENGLISH).

Hope you enjoy this little mod. Thanks you all!
Reply With Quote
 
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01347 seconds
  • Memory Usage 1,778KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD_SHOWPOST
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (6)bbcode_code
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_box
  • (1)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit_info
  • (1)postbit
  • (1)postbit_onlinestatus
  • (1)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • reputationlevel
  • showthread
Included Files:
  • ./showpost.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_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showpost_start
  • bbcode_fetch_tags
  • bbcode_create
  • postbit_factory
  • showpost_post
  • 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_display_complete
  • post_thanks_function_can_thank_this_post_start
  • showpost_complete