Essencee
07-21-2009, 04:48 PM
Hello guys.
I have written a small modification to my vBulletin system, which allows to bold threads titles. In the newthread templete, I added a radio / input type which allows the user to choose if he wants to bold the thread title or not.
The problem is as such: I added this code to the newthread.php file:
...
$newpost['title'] =& $vbulletin->GPC['subject'];
$newpost['iconid'] =& $vbulletin->GPC['iconid'];
if ($_POST["boldtitle"])
{
if ($_POST["boldtitle"] == "yes")
{
$boldtitle = "<b>{$newpost['title']}</b>";
$newpost['title'] = $boldtitle;
}
}
require_once(DIR . '/includes/functions_prefix.php');
...
The problem is that the title is inserting to the database like this: <b>test</b>Actually, it needs to be like this:
<b>test</b>
The encoding of the title field in the database is latin1_swedish_ci.
The encoding of the database connection is utf8_unicode_ci.
Please, help me.
Thanks :)
I have written a small modification to my vBulletin system, which allows to bold threads titles. In the newthread templete, I added a radio / input type which allows the user to choose if he wants to bold the thread title or not.
The problem is as such: I added this code to the newthread.php file:
...
$newpost['title'] =& $vbulletin->GPC['subject'];
$newpost['iconid'] =& $vbulletin->GPC['iconid'];
if ($_POST["boldtitle"])
{
if ($_POST["boldtitle"] == "yes")
{
$boldtitle = "<b>{$newpost['title']}</b>";
$newpost['title'] = $boldtitle;
}
}
require_once(DIR . '/includes/functions_prefix.php');
...
The problem is that the title is inserting to the database like this: <b>test</b>Actually, it needs to be like this:
<b>test</b>
The encoding of the title field in the database is latin1_swedish_ci.
The encoding of the database connection is utf8_unicode_ci.
Please, help me.
Thanks :)