sblum
09-20-2004, 10:00 PM
Create a new phrase in the category "Front-End Error Messages" titled "noicon", with the text "You must choose a post icon before posting a new thread."
Open includes/functions_newpost.php
Find:
// check for subject/message
if (($post['message'] == '' AND $vboptions['postminchars'] > 0) OR ($type == 'thread' AND empty($post['title'])))
{
eval('$errors[] = "' . fetch_phrase('nosubject', PHRASETYPEID_ERROR) . '";');
}
Add Below:
// check for post icon
if ($type == 'thread' AND $post['iconid'] == 0)
{
eval('$errors[] = "' . fetch_phrase('noicon', PHRASETYPEID_ERROR) . '";');
}
That's it. If you want to make it required on all posts instead of just new thread creation, change the phrase accordingly and add the following code instead:
// check for post icon
if ($post['iconid'] == 0)
{
eval('$errors[] = "' . fetch_phrase('noicon', PHRASETYPEID_ERROR) . '";');
}
Open includes/functions_newpost.php
Find:
// check for subject/message
if (($post['message'] == '' AND $vboptions['postminchars'] > 0) OR ($type == 'thread' AND empty($post['title'])))
{
eval('$errors[] = "' . fetch_phrase('nosubject', PHRASETYPEID_ERROR) . '";');
}
Add Below:
// check for post icon
if ($type == 'thread' AND $post['iconid'] == 0)
{
eval('$errors[] = "' . fetch_phrase('noicon', PHRASETYPEID_ERROR) . '";');
}
That's it. If you want to make it required on all posts instead of just new thread creation, change the phrase accordingly and add the following code instead:
// check for post icon
if ($post['iconid'] == 0)
{
eval('$errors[] = "' . fetch_phrase('noicon', PHRASETYPEID_ERROR) . '";');
}