Forum script

Results 1 to 2 of 2
  1. #1
    Novice TheJ0ker is offline
    MemberRank
    Feb 2010 Join Date
    1Posts

    Forum script

    hi all,
    i was wondering if someone has the script for showing forum threads in mpog, like euro gunz but for Invision Power Board.
    Thanks.

    ---------- Post added at 02:14 PM ---------- Previous post was at 01:53 PM ----------

    help :X


  2. #2
    Account Upgraded | Title Enabled! alfredao is offline
    MemberRank
    Jan 2008 Join Date
    Coronel FabriciLocation
    705Posts

    Re: Forum script

    PHP Code:
    <?php 
    $mysql_host    
    "localhost";
    $mysql_user    "alfredoc";
    $mysql_senha    "password";
    $mysql_db    "Forum";

    $mostrar    10//Links to show
    $letras        32//Max letters of topic title
    $sufixo        "..."//Title sufix
    $link_forum        "http://forum.systemgunz.com"//Your forum link
    $tbl_prefixo    "ibf_"//Your forum table prefix

    $mysql_conexao = @mysql_connect($mysql_host$mysql_user$mysql_senha) or die("Erro ao conectar-se ao fórum");
    $mysql_selecao = @mysql_select_db($mysql_db,$mysql_conexao) or die("Erro ao Selecionar Banco de Dados");


    $query mysql_query("SELECT last_poster_name, last_poster_id, title, tid, forum_id, last_post FROM " $tbl_prefixo "topics WHERE forum_id = 4 OR forum_id = 20 OR forum_id = 19 AND forum_id != 7 ORDER BY last_post DESC LIMIT 0, " $mostrar);

    while(
    $tpf mysql_fetch_array($query))
    {
        if (
    $letras != 0
        {
            if(
    strlen($tpf[title]) > $letras
            {
                
    $titulo substr($tpf[title], 0$letras) . $sufixo;
            } 
            else 
            {
                
    $titulo $tpf[title];
            }
        } 
        else 
        {
            
    $titulo $tpf[title];
        }

        echo 
    "<a href=\"$link_forum/index.php?showtopic=$tpf[tid]&view=getnewpost\" target=\"_blank\" title=\"$titulo\">$titulo</a><br />\n";
    }
    ?>



Advertisement