Quote:
Originally Posted by bananalive
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"; }
|
Hi friend
thanks again for your support
my apologies for the question i have edited the template
but the php code i have to add on form hook in my form or not? because don't work