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?