(01-13-2012 03:29 PM)akm Wrote: And, thanks again for getting me on the right track !
Hope this question relates...
How to change error message at forums with xthreads textfields (scrnshot attached) ?
Source selection...
Quote:<!-- start: error_inline -->
<div class="error">
<p><em>Please correct the following errors before continuing:</em></p>
<ul>
<li>The subject is missing. Please enter a subject.</li>
<li>The message is missing. Please enter a message.</li>
</ul>
</div>
<br>
<!-- end: error_inline -->
Assume template is error_inline...
Quote:<div class="error">
<p><em>{$title}</em></p>
<ul>
{$errorlist}
</ul>
</div>
<br />
Can change text for all new threads at datahandler_post.lang.php...
$l['postdata_missing_subject'] = 'The test is missing. Please enter a subject.';
$l['postdata_missing_message'] = 'The message is missing. Please enter a message.';
...but not able to find {$errorlist} place to modify for get new language if save as templateprefix_error_inline ?
Think found {$errorlist} code at functions.php...
Quote:/**
* Produce an error message for displaying inline on a page
*
* @param array Array of errors to be shown
* @param string The title of the error message
* @return string The inline error HTML
*/
function inline_error($errors, $title="")
{
global $theme, $mybb, $db, $lang, $templates;
if(!$title)
{
$title = $lang->please_correct_errors;
}
if(!is_array($errors))
{
$errors = array($errors);
}
// AJAX error message?
if($mybb->input['ajax'])
{
$error = implode("\n\n", $errors);
// Send our headers.
@header("Content-type: text/html; charset={$lang->settings['charset']}");
echo "<error>{$error}</error>\n";
exit;
}
foreach($errors as $error)
{
$errorlist .= "<li>".$error."</li>\n";
}
eval("\$errors = \"".$templates->get("error_inline")."\";");
return $errors;
}
...but not sure what/if anything to do with it.
Confused, as usual.
Place to look ?