Quote:
Originally Posted by troppodel
ok friend thanks but i'm not a coder can you write the query string?
|
I've added in $customerror into v2.7
To add it in yourself: find in template
form_view
Code:
<if condition="$unanswered_questions"><phrase 1="$incompleteqs">$vbphrase[form_not_submitted]</phrase></if>
Add Below:
Either: (uses $threadtitle)
PHP Code:
$count = $vbulletin->db->query_first("SELECT COUNT(*) AS countrows FROM " . TABLE_PREFIX . "thread WHERE title='".addslashes($threadtitle)."'");
if ($count[countrows] > 0)
{
$complete = false;
$customerror = "Error, thread already exists with this title";
}
Or (uses question output - remember to replace $q_{4} with the correct question number)
PHP Code:
$count = $vbulletin->db->query_first("SELECT COUNT(*) AS countrows FROM " . TABLE_PREFIX . "thread WHERE title='".addslashes($q_{4})."'");
if ($count[countrows] > 0)
{
$complete = false;
$customerror = "Error, thread already exists with this title";
}