My swedish characters still look really bad... this is my code. Any other suggestions?
function add_topic ($id)
{
$msg_post = new fud_msg_edit;
/* Process Message Data */
$msg_post->poster_id = $id;
$msg_post->subject = "Välkommen till testforum_";
$msg_post->body = "Välkommen till forumet\n\nHär kan du göra lite av varje Å-Ä-Ö";
$msg_post->body = tags_to_html($msg_post->body);
$msg_post->subject = tags_to_html($msg_post->subject);
$msg_post->add(1, 0, "N", "N", "N", FALSE);
//additional stuff
q("insert into {SQL_TABLE_PREFIX}thread_view (forum_id, page, thread_id) select '1','1', max(id) from {SQL_TABLE_PREFIX}thread");
$result = uq("select max(id) from {SQL_TABLE_PREFIX}msg");
$var = db_rowarr($result);
if(isset($var[0])){
q("update {SQL_TABLE_PREFIX}msg set approved='Y' where id = ".$var[0]);
}
}
thnx
/Johan
[Updated on: Wed, 29 September 2004 11:46]
Report message to a moderator