View Single Post
  #1  
Old 12-01-2003, 05:09 PM
wolfstream wolfstream is offline
 
Join Date: Jan 2003
Location: Iowa
Posts: 382
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default cannot find phrase "blah"

ok, I posted this one on vbulletin.com, maybe can get a bit better help here:

I'm working with tweaking functionality a bit in vb3, trying to make it so that users can not create threads in certain forums if their rating is below a certain point. Here's what I've managed to do so far:
in includes/functions.php

PHP Code:
/* merely a hack of print_no_permission */
function print_no_dice()
{
        global 
$vboptions$logincode$url$bbuserinfo$session$stylevar;
        
$postvars construct_post_vars_html();
        
$bbuserinfo['badlocation'] = 1// Used by exec_shut_down();
         
                
eval(print_standard_error('error_nopermission_lowr  ating'));

in newthread.php, only the beginnings so far
PHP Code:
if ($forumid==12)
{
print_no_dice();

now , my understanding is that print_no_dice will execute an sql query, grab nopermission_lowrating from the table and throw the phrase out to the user. Am I wrong here? Obviously so, because it's just not clicking somewhere. What I get
instead is:

Quote:
Could not find phrase 'nopermission_lowrating'.
The sql entry nopermission_lowrating DOES exist, and is as follows:
phraseid = 4207
languageid = -1
varname = nopermission_lowrating
text =
Quote:
<p>The administrators have required that all advertisement threads be started by an individual with a rating of 250 or higher. You will need to raise your rating in order to make this post. This was done in an effort to encourage community involvement.
</p>
I'm not sure at all what is being done wrong here. Any thoughts or ideas on what I missed?
 
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01113 seconds
  • Memory Usage 1,776KB
  • 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
  • (2)bbcode_php
  • (2)bbcode_quote
  • (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