I followed the instructions here:
https://vborg.vbsupport.ru/showthrea...ghlight=fields
which worked great, for adding a field called "zipcode" to my newthread template. When entered the zipcode goes in the database. Now I'm attemping to take that particular zip code from a new thread and put it in the beginning of the thread title.
Almost like this hack:
https://vborg.vbsupport.ru/showthread.php?t=115772
In my
newthread_start I have something like this
PHP Code:
$field_get = $vbulletin->db->query_read("SELECT threadid, zipcode FROM " . TABLE_PREFIX . "thread");
while ($miscfield = $vbulletin->db->fetch_array($field_get))
{
$zipcode = $miscfield['zipcode'];
$_POST['subject'] = "$zipcode $_POST[subject]";
}
which actually works the first time you punch in a zip in the field and hit new thread button. However if you create another thread, and enter in the zip it usses the original threads zip. Im assuming cuz theres no
WHERE clause. Anyone help out?