View Single Post
  #1867  
Old 07-26-2012, 02:00 PM
Froberg Froberg is offline
 
Join Date: Jan 2006
Posts: 66
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hi,

I love the mod, it's an absolute Godsend in keeping malicious users out of my site.

I'm running a board in Danish, and it doesn't exactly look good that Spam-O-Matic is the only thing not translated.
I've been up and down the phrase variables, will I really have to modify the xml directly? A casual perusal seems to indicate that if I change the following:

Code:
		<!-- Stats -->

		<plugin active="1" product="glowhostspamomatic" executionorder="50">
			<title>Stats render</title>
			<hookname>forumhome_complete</hookname>
			<phpcode><![CDATA[

				if (($vbulletin->options['glowhostspamomatic_stat_show_denied'] == 1) || ($vbulletin->options['glowhostspamomatic_stat_show_banned'] == 1)) {
					//$vbulletin->

					$stats = $vbulletin->db->query_first("SELECT * FROM " . TABLE_PREFIX . "glowhostspamomatic_stats");

					//echo '<pre>';
					//print_r($vbulletin->stylevars['imgdir_misc']);
					//echo '</pre>';

					$template_hook[forumhome_wgo_pos2] .= '

					 	<div class="wgo_subblock section">
			               <h3 class="blocksubhead"><img src="'.$vbulletin->stylevars['imgdir_misc']['imagedir'].'/forum_stats.png" alt="Spam-O-Matic Statistics" />';

			        if ($vbulletin->options['glowhostspamomatic_stat_show_link'] == 1) {
			        	$template_hook[forumhome_wgo_pos2] .= '<a href="https://vborg.vbsupport.ru/showthread.php?t=248042" target="_blank">Spam-O-Matic Statistics</a>';
			        } else {
			        	$template_hook[forumhome_wgo_pos2] .= 'Spam-O-Matic Statistics';
			        }


			        $template_hook[forumhome_wgo_pos2] .= '       </h3>
			               <div>';

			        if (($vbulletin->options['glowhostspamomatic_stat_show_denied'] == 1) && ($stats['denied'] > 0)) {
			        	$template_hook[forumhome_wgo_pos2] .= '<p>'.$stats['denied'].' Spammer'.(($stats['denied'] > 1)?'s':'').' Denied Registration</p>';
			        }

			        if (($vbulletin->options['glowhostspamomatic_stat_show_banned'] == 1) && ($stats['banned'] > 0)) {
			        	$template_hook[forumhome_wgo_pos2] .= '<p>'.$stats['banned'].' Spammer'.(($stats['banned'] > 1)?'s':'').' Permanently Banned</p>';
			        }

			        if (($vbulletin->options['glowhostspamomatic_stat_show_s_sfs'] == 1) && ($stats['s_sfs'] > 0)) {
			        	$template_hook[forumhome_wgo_pos2] .= '<p>'.$stats['s_sfs'].' Spammer'.(($stats['s_sfs'] > 1)?'s':'').' submitted to StopForumSpam</p>';
			        }

			        if (($vbulletin->options['glowhostspamomatic_stat_show_s_akismet'] == 1) && ($stats['s_akismet'] > 0)) {
			        	$template_hook[forumhome_wgo_pos2] .= '<p>'.$stats['s_akismet'].' Spammer'.(($stats['s_akismet'] > 1)?'s':'').' submitted to Akismet</p>';
			        }

			        if (($vbulletin->options['glowhostspamomatic_stat_show_mod'] == 1) && ($stats['moderated'] > 0)) {
			        	$template_hook[forumhome_wgo_pos2] .= '<p>'.$stats['moderated'].' Spammy Post'.(($stats['moderated'] > 1)?'s':'').' Automatically Moderated</p>';
			        }

			         if (($vbulletin->options['glowhostspamomatic_stat_show_removed'] == 1) && ($stats['removed'] > 0)) {
			        	$template_hook[forumhome_wgo_pos2] .= '<p>'.$stats['removed'].' Spammy Post'.(($stats['removed'] > 1)?'s':'').' Removed</p>';
			        }

			        $template_hook[forumhome_wgo_pos2] .= '       </div>
			           </div>
					';

				}

			]]></phpcode>
		</plugin>

		<!-- Stats END -->
That ought to do the trick? It just seems weird that a lot of the phrases are in the phrase manager, but not these crucial bits?

Cheers!
Reply With Quote
 
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01330 seconds
  • Memory Usage 1,780KB
  • 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
  • (1)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