FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » FUDforum Development » Plugins and Code Hacks » adding a 'simple' thing to FUD
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
icon5.gif  Re: adding a 'simple' thing to FUD [message #20147 is a reply to message #20139] Wed, 29 September 2004 07:57 Go to previous messageGo to previous message
johed802 is currently offline  johed802   Sweden
Messages: 24
Registered: September 2004
Karma:
Junior Member
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

[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message icon10.gif
Read Message icon5.gif
Read Message
Read Message icon5.gif
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: New script: fudbox.php
Next Topic: How do I get error messages?
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Wed Jun 26 04:46:53 GMT 2024

Total time taken to generate the page: 0.06322 seconds