I have used Connorhd´s miniportal quide on the wiki and created a new index.php, renamed the old index.php to forum.php and all works fine. But i wanted to extend the indexpage so i also used TGO´s extended external.php as you can find below:

http://punbb.org/forums/viewtopic.php?id=7552

What i have done is the following from start to end:

renamed index.php to forum.php
created a new index.php that calls external.php (to get short news)
the read more link on the index.php calls show_news.php
created a new file called new show_news.php (a copy of the new index.php) (to get longer news) it calls to extern.php

The files (3)
INDEX.PHP

<?php
 
define('PUN_ROOT', './');
define('PUN_QUIET_VISIT', 1);
require PUN_ROOT.'include/common.php';
 
$page_title = pun_htmlspecialchars($pun_config['o_board_title']);
define('PUN_ALLOW_INDEX', 1);
require PUN_ROOT.'header.php';
require PUN_ROOT.'include/parser.php';
 
function pun_news($fid='', $show=15, $truncate=1)
{
    global $lang_common, $db, $pun_config, $db_prefix;
    $max_subject_length = 30;
    $show_max_topics = 50;
    $fid = intval($fid);
    $order_by = 't.posted';
    $forum_sql = '';
    // Was a forum ID supplied?
    if ( $fid ) $forum_sql = 'f.id='.$fid.' AND ';
    $show = intval($show);
    if ($show < 1 || $show > $show_max_topics)
    $show = 15;
    $saveddate="";
    // Fetch $show topics
    $result = $db->query('SELECT t.id, t.poster, t.subject, t.posted, t.last_post, f.id AS fid, f.forum_name FROM '.$db_prefix.'topics AS t INNER JOIN '.$db_prefix.'forums AS f ON t.forum_id=f.id WHERE f.id='.$fid.' AND t.moved_to IS NULL ORDER BY '.$order_by.' DESC') or error('Unable to fetch topic list', __FILE__, __LINE__, $db->error());
    $show_count = 0;
    if ( !$db->num_rows($result) ) return $output;
    while ( ($show_count < $show) && ($cur_topic = $db->fetch_assoc($result)) ) {
        $temp = '';
        if ($pun_config['o_censoring'] == '1')
            $cur_topic['subject'] = censor_words($cur_topic['subject']);
        if (pun_strlen($cur_topic['subject']) > $max_subject_length)
            $subject_truncated = trim(substr($cur_topic['subject'], 0, ($max_subject_length-5))).' ...';
        else
            $subject_truncated = $cur_topic['subject'];
        $newsheading = '<a href="'.$pun_config['o_base_url'].'/viewtopic.php?id='.$cur_topic['id'].'&action=new" title="'.pun_htmlspecialchars($cur_topic['subject']).'">'.pun_htmlspecialchars($subject_truncated).'</a> - <em>Posted by '.$cur_topic['poster'].' at '.date('h:i A', $cur_topic['posted']).'</em><br>';
        // Group posts by date    
        $thisdate = date('l, d F Y', $cur_topic['posted']);
        if ($thisdate != $saveddate) 
 
        {
            if ($saveddate)
            {
                $temp .= "</div></div>";
            }
            $temp .= '<div class="block"><h2><span>'.$thisdate.'</span></h2><div class="box"><div class="inbox"><p>';
            $saveddate = $thisdate;
        }
        else {
            $temp .= '<div class="inbox"><p>';
        }
        $temp .= $newsheading.'</p><p>';
        $id = $cur_topic['id'];
        $msg = $db->query('SELECT id, poster, poster_id, poster_ip, poster_email, message, posted, edited, edited_by FROM '.$db_prefix.'posts WHERE topic_id='.$id.' LIMIT 1') or error('Unable to fetch post info', __FILE__, __LINE__, $db->error());
            if ( !$db->num_rows($msg) ) continue;
        $cur_post = $db->fetch_assoc($msg);
        // Display first paragraph only (comment out next four lines to turn off)
        if ($truncate == 1)
        {
        $paragraph = preg_split("/s*n+/", $cur_post['message']);
            if (isset($paragraph[1])) {
                $cur_post['message'] = $paragraph[0] . "...";
            }
        }
        $cur_post['message'] = parse_message($cur_post['message'], 0);
        $temp .= $cur_post['message'];
        $temp .= "</p></div>";
        if (isset($output)) {
            $output .= $temp;
        }
        else {
            $output = $temp;
        }
        ++$show_count;
    } // end of while
    $output .= "</div></div>";
    return $output;
}
?>
<div class="nyheter">
<div class="block">
   <h2><span>Nyheter</span></h2>
     <div class="box">
<?php  //inkludera 5 senaste headlines från forum kategori 3
include('http://xxx.jokiaho.se/.forum/extern.php?action=new&show=5&fid=3');
?>
     </div>
</div>
</div>

<div class="nyheter">
<div class="block">
   <h2><span>Övriga Nyheter</span></h2>
     <div class="box">
<?php  //inkludera 5 senaste headlines från forum kategori 5
include('http://xxx.jokiaho.se/.forum/extern.php?action=new&show=5&fid=5');
?>
     </div>
</div>
</div>
<br /> 

<?php //inkluderar 2st nyheter från forum kategori 5+3 och lägger till en läs mer länk samt möjlighet att kommentera
  include('http://www.xxx.jokiaho.se/.forum/extern.php?action=news&show=2&fid=3,5&summary=yes');
?>

<?php
echo pun_news(1, 5, 0);
 
require PUN_ROOT.'footer.php';

EXTERN.PHP (MODDED)

<?php
/***********************************************************************

  Copyright (C) 2002-2005  Rickard Andersson (rickard@punbb.org)

  This file is part of PunBB.

  PunBB is free software; you can redistribute it and/or modify it
  under the terms of the GNU General Public License as published
  by the Free Software Foundation; either version 2 of the License,
  or (at your option) any later version.

  PunBB is distributed in the hope that it will be useful, but
  WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  GNU General Public License for more details.

  You should have received a copy of the GNU General Public License
  along with this program; if not, write to the Free Software
  Foundation, Inc., 59 Temple Place, Suite 330, Boston,
  MA  02111-1307  USA

************************************************************************


  INSTRUCTIONS

  This script is used to include information about your board from
  pages outside the forums and to syndicate news about recent
  discussions via RSS. The script can display a list of recent
  discussions (sorted by post or last post time), a list of
  active users or a collection of general board statistics. The
  script can be called directly via an URL (for RSS), from a PHP
  include command or through the use of Server Side Includes (SSI).

  The scripts behaviour is controlled via variables supplied in the
  URL to the script. The different variables are: action (what to
  output), show (how many topics to display), fid (the ID or ID's of
  the forum(s) to poll for topics), nfid (the ID or ID's of forums
  that should be excluded) and type (output as HTML or RSS). The
  only mandatory variable is action. Possible/default values are:

    action: active (show most recently active topics) (HTML or RSS)
            new (show newest topics) (HTML or RSS)
            online (show users online) (HTML)
            online_full (as above, but includes a full list) (HTML)
            stats (show board statistics) (HTML)

    show:   Any integer value between 1 and 50. This variables is
            ignored for RSS output. The default is 15.

    fid:    One or more forum ID's (comma-separated). If ignored,
            topics from all guest-readable forums will be polled.

    nfid:   One or more forum ID's (comma-separated) that are to be
            excluded. E.g. the ID of a a test forum.

    type:   RSS. Anything else means HTML output.

  Here are some examples using PHP include().

    Show the 15 most recently active topics from all forums:
    include('http://host.com/forums/extern.php?action=active');

    Show the 10 newest topics from forums with ID 5, 6 and 7:
    include('http://host.com/forums/extern.php?action=new&show=10&fid=5,6,7');

    Show users online:
    include('http://host.com/forums/extern.php?action=online');

    Show users online with full listing of users:
    include('http://host.com/forums/extern.php?action=online_full');

    Show board statistics:
    include('http://host.com/forums/extern.php?action=stats');

  Here are some examples using SSI.

    Show the 5 newest topics from forums with ID 11 and 22:
    <!--#include virtual="forums/extern.php?action=new&show=5&fid=11,22" -->

    Show board statistics:
    <!--#include virtual="forums/extern.php?action=stats" -->

  And finally some examples using extern.php to output an RSS 0.91
  feed.

    Output the 15 most recently active topics:
    http://host.com/extern.php?action=active&type=RSS

    Output the 15 newest topics from forum with ID=2:
    http://host.com/extern.php?action=active&type=RSS&fid=2

  Below you will find some variables you can edit to tailor the
  scripts behaviour to your needs.


/***********************************************************************/

// The maximum number of topics that will be displayed
$show_max_topics = 60;

// The length at which topic subjects will be truncated (for HTML output)
$max_subject_length = 30;

// If you exceed max number of allowed topics, how many to display?
$show_default_topics = 10;

// Define the location of your punBB install
$forums = ".forum";

/***********************************************************************/

// DO NOT EDIT ANYTHING BELOW THIS LINE! (unless you know what you are doing)


define('PUN_ROOT', './');
@include PUN_ROOT.'config.php';
require PUN_ROOT.'include/parser.php';

// If PUN isn't defined, config.php is missing or corrupt
if (!defined('PUN'))
    exit('The file \'config.php\' doesn\'t exist or is corrupt. Please run install.php to install PunBB first.');


// Make sure PHP reports all errors except E_NOTICE
error_reporting(E_ALL ^ E_NOTICE);

// Turn off magic_quotes_runtime
set_magic_quotes_runtime(0);


// Load the functions script
require PUN_ROOT.'include/functions.php';

// Load DB abstraction layer and try to connect
require PUN_ROOT.'include/dblayer/common_db.php';

// Load cached config
@include PUN_ROOT.'cache/cache_config.php';
if (!defined('PUN_CONFIG_LOADED'))
{
    require PUN_ROOT.'include/cache.php';
    generate_config_cache();
    require PUN_ROOT.'cache/cache_config.php';
}

// Make sure we (guests) have permission to read the forums
$result = $db->query('SELECT g_read_board FROM '.$db->prefix.'groups WHERE g_id=3') or error('Unable to fetch group info', __FILE__, __LINE__, $db->error());
if ($db->result($result) == '0')
    exit('No permission');


// Attempt to load the common language file
@include PUN_ROOT.'lang/'.$pun_config['o_default_lang'].'/common.php';
if (!isset($lang_common))
    exit('There is no valid language pack \''.$pun_config['o_default_lang'].'\' installed. Please reinstall a language of that name.');

if (!isset($_GET['action']))
    exit('No parameters supplied. See extern.php for instructions.');


//
// Converts the CDATA end sequence ]]> into ]]>
//
function escape_cdata($str)
{
    return str_replace(']]>', ']]>', $str);
}


//
// Show recent discussions
//
if ($_GET['action'] == 'active' || $_GET['action'] == 'new')
{
    $order_by = ($_GET['action'] == 'active') ? 't.last_post' : 't.posted';
    $forum_sql = '';

    // Was any specific forum ID's supplied?
    if (isset($_GET['fid']) && $_GET['fid'] != '')
    {
        $fids = explode(',', trim($_GET['fid']));
        $fids = array_map('intval', $fids);

        if (!empty($fids))
            $forum_sql = ' AND f.id IN('.implode(',', $fids).')';
    }

    // Any forum ID's to exclude?
    if (isset($_GET['nfid']) && $_GET['nfid'] != '')
    {
        $nfids = explode(',', trim($_GET['nfid']));
        $nfids = array_map('intval', $nfids);

        if (!empty($nfids))
            $forum_sql = ' AND f.id NOT IN('.implode(',', $nfids).')';
    }

    // Should we output this as RSS?
    if (isset($_GET['type']) && strtoupper($_GET['type']) == 'RSS')
    {
        $rss_description = ($_GET['action'] == 'active') ? $lang_common['RSS Desc Active'] : $lang_common['RSS Desc New'];
        $url_action = ($_GET['action'] == 'active') ? '&action=new' : '';

        // Send XML/no cache headers
        header('Content-Type: text/xml');
        header('Expires: '.gmdate('D, d M Y H:i:s').' GMT');
        header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
        header('Pragma: public');

        // It's time for some syndication!
        echo '<?xml version="1.0" encoding="'.$lang_common['lang_encoding'].'"?>'."\r\n";
        echo '<!DOCTYPE rss PUBLIC "-//Netscape Communications//DTD RSS 0.91//EN" "http://my.netscape.com/publish/formats/rss-0.91.dtd">'."\r\n";
        echo '<rss version="0.91">'."\r\n";
        echo '<channel>'."\r\n";
        echo "\t".'<title>'.pun_htmlspecialchars($pun_config['o_board_title']).'</title>'."\r\n";
        echo "\t".'<link>'.$pun_config['o_base_url'].'/</link>'."\r\n";
        echo "\t".'<description>'.pun_htmlspecialchars($rss_description.' '.$pun_config['o_board_title']).'</description>'."\r\n";
        echo "\t".'<language>en-us</language>'."\r\n";

        // Fetch 15 topics
        $result = $db->query('SELECT t.id, t.poster, t.subject, t.posted, t.last_post, f.id AS fid, f.forum_name FROM '.$db->prefix.'topics AS t INNER JOIN '.$db->prefix.'forums AS f ON f.id=t.forum_id LEFT JOIN '.$db->prefix.'forum_perms AS fp ON (fp.forum_id=f.id AND fp.group_id=3) WHERE (fp.read_forum IS NULL OR fp.read_forum=1) AND t.moved_to IS NULL'.$forum_sql.' ORDER BY '.$order_by.' DESC LIMIT 15') or error('Unable to fetch topic list', __FILE__, __LINE__, $db->error());

        while ($cur_topic = $db->fetch_assoc($result))
        {
            if ($pun_config['o_censoring'] == '1')
                $cur_topic['subject'] = censor_words($cur_topic['subject']);

            echo "\t".'<item>'."\r\n";
            echo "\t\t".'<title>'.pun_htmlspecialchars($cur_topic['subject']).'</title>'."\r\n";
            echo "\t\t".'<link>'.$pun_config['o_base_url'].'/viewtopic.php?id='.$cur_topic['id'].$url_action.'</link>'."\r\n";
            echo "\t\t".'<description><![CDATA['.escape_cdata($lang_common['Forum'].': <a href="'.$pun_config['o_base_url'].'/viewforum.php?id='.$cur_topic['fid'].'">'.$cur_topic['forum_name'].'</a><br />'."\r\n".$lang_common['Author'].': '.$cur_topic['poster'].'<br />'."\r\n".$lang_common['Posted'].': '.date('r', $cur_topic['posted']).'<br />'."\r\n".$lang_common['Last post'].': '.date('r', $cur_topic['last_post'])).']]></description>'."\r\n";
            echo "\t".'</item>'."\r\n";
        }

        echo '</channel>'."\r\n";
        echo '</rss>';
    }


    // Output regular HTML
    else
    {
        $show = isset($_GET['show']) ? intval($_GET['show']) : 15;
        if ($show < 1 || $show > 50)
            $show = 15;

        // Fetch $show topics
        $result = $db->query('SELECT t.id, t.subject FROM '.$db->prefix.'topics AS t INNER JOIN '.$db->prefix.'forums AS f ON f.id=t.forum_id LEFT JOIN '.$db->prefix.'forum_perms AS fp ON (fp.forum_id=f.id AND fp.group_id=3) WHERE (fp.read_forum IS NULL OR fp.read_forum=1) AND t.moved_to IS NULL'.$forum_sql.' ORDER BY '.$order_by.' DESC LIMIT '.$show) or error('Unable to fetch topic list', __FILE__, __LINE__, $db->error());

        while ($cur_topic = $db->fetch_assoc($result))
        {
            if ($pun_config['o_censoring'] == '1')
                $cur_topic['subject'] = censor_words($cur_topic['subject']);

            if (pun_strlen($cur_topic['subject']) > $max_subject_length)
                $subject_truncated = pun_htmlspecialchars(trim(substr($cur_topic['subject'], 0, ($max_subject_length-5)))).' …';
            else
                $subject_truncated = pun_htmlspecialchars($cur_topic['subject']);

            echo '<li><a href="'.$pun_config['o_base_url'].'/news_show.php?id='.$cur_topic['id'].'&action=new" title="'.pun_htmlspecialchars($cur_topic['subject']).'">'.$subject_truncated.'</a></li>'."\n";
        }
    }

    return;
}


//
// Show users online
//
else if ($_GET['action'] == 'online' || $_GET['action'] == 'online_full')
{
    // Load the index.php language file
    require PUN_ROOT.'lang/'.$pun_config['o_default_lang'].'/index.php';
    
    // Fetch users online info and generate strings for output
    $num_guests = $num_users = 0;
    $users = array();
    $result = $db->query('SELECT user_id, ident FROM '.$db->prefix.'online WHERE idle=0 ORDER BY ident', true) or error('Unable to fetch online list', __FILE__, __LINE__, $db->error());

    while ($pun_user_online = $db->fetch_assoc($result))
    {
        if ($pun_user_online['user_id'] > 1)
        {
            $users[] = '<a href="'.$pun_config['o_base_url'].'/profile.php?id='.$pun_user_online['user_id'].'">'.pun_htmlspecialchars($pun_user_online['ident']).'</a>';
            ++$num_users;
        }
        else
            ++$num_guests;
    }

    echo $lang_index['Guests online'].': '.$num_guests.'<br />';

    if ($_GET['action'] == 'online_full')
        echo $lang_index['Users online'].': '.implode(', ', $users).'<br />';
    else
        echo $lang_index['Users online'].': '.$num_users.'<br />';

    return;
}


//
// Show board statistics
//
else if ($_GET['action'] == 'stats')
{
    // Load the index.php language file
    require PUN_ROOT.'lang/'.$pun_config['o_default_lang'].'/index.php';

    // Collect some statistics from the database
    $result = $db->query('SELECT COUNT(id)-1 FROM '.$db->prefix.'users') or error('Unable to fetch total user count', __FILE__, __LINE__, $db->error());
    $stats['total_users'] = $db->result($result);

    $result = $db->query('SELECT id, username FROM '.$db->prefix.'users ORDER BY registered DESC LIMIT 1') or error('Unable to fetch newest registered user', __FILE__, __LINE__, $db->error());
    $stats['last_user'] = $db->fetch_assoc($result);

    $result = $db->query('SELECT SUM(num_topics), SUM(num_posts) FROM '.$db->prefix.'forums') or error('Unable to fetch topic/post count', __FILE__, __LINE__, $db->error());
    list($stats['total_topics'], $stats['total_posts']) = $db->fetch_row($result);

    echo $lang_index['No of users'].': '.$stats['total_users'].'<br />';
    echo $lang_index['Newest user'].': <a href="'.$pun_config['o_base_url'].'/profile.php?id='.$stats['last_user']['id'].'">'.pun_htmlspecialchars($stats['last_user']['username']).'</a><br />';
    echo $lang_index['No of topics'].': '.$stats['total_topics'].'<br />';
    echo $lang_index['No of posts'].': '.$stats['total_posts'];

    return;
}

//
// Use this to display 'news' - the recent topics from a specific forum
// expanded to include the first post text, posters, comments, etc.
//

else if ($_GET['action'] == 'news')
{
    $order_by = ($_GET['action'] == 'active') ? 't.last_post' : 't.posted';
    $forum_sql = '';

    // Get the forum id(s) you'd like to post news from
    if (isset($_GET['fid']) && $_GET['fid'] != '')
    {
        $fids = explode(',', trim($_GET['fid']));
        $fids = array_map('intval', $fids);

        if (!empty($fids))
            $forum_sql = ' AND f.id IN('.implode(',', $fids).')';
    }

    // RSS support not implemented, if anyone wants to do it, feel free..
    if (isset($_GET['type']) && strtoupper($_GET['type']) == 'RSS')
    {    
    }
    // Regular HTML output
    else
    {
        $show = isset($_GET['show']) ? intval($_GET['show']) : $show_default_topics;
        if ($show < 1 || $show > $show_max_topics)
            $show = $show_default_topics;        

        $result = $db->query('SELECT t.id, t.poster, t.subject, t.posted, t.last_post, t.num_replies, t.num_views, f.id AS fid, f.forum_name FROM '.$db_prefix.'topics AS t INNER JOIN '.$db_prefix.'forums AS f ON t.forum_id=f.id WHERE t.moved_to IS NULL '.$forum_sql.' ORDER BY '.$order_by.' DESC LIMIT '.$show.' ') or error('Unable to fetch topic list', __FILE__, __LINE__, $db->error());
        $show_count = 0;

        if(!$db->num_rows($result))
        {
            echo "No news to display";
        }
        else
        {

            while ( ($show_count < $show) && ($cur_topic = $db->fetch_assoc($result)) ) 
            {
                echo "<div class=\"newsblock\">";
                $temp = '';
                if ($pun_config['o_censoring'] == '1')
                    $cur_topic['subject'] = censor_words($cur_topic['subject']);
                if (pun_strlen($cur_topic['subject']) > $max_subject_length)
                    $subject_truncated = trim(substr($cur_topic['subject'], 0, ($max_subject_length-5))).' ...';
                else
                    $subject_truncated = $cur_topic['subject'];

                // Simplify frequently required display information
                $thisdate = date('Y-m-d  H:i', $cur_topic['posted']);
                $poster = $cur_topic['poster'];
                $comments = $cur_topic['num_replies'];
                $views = $cur_topic['num_views'];

                // If using headlines, then after first item only show headlines...
                if(isset($_GET['headlines']) && $show_count > 0)
                {
                    echo '<p class="newsheadline"><a href="'.$pun_config['o_base_url'].'/viewtopic.php?id='.$cur_topic['id'].'">'.$subject_truncated."</a> ($comments)</p> \n";
                }
                else
                {
                    // DISPLAY FOR TITLE OF NEWS
                    echo '<h2>'.$subject_truncated."</h2> \n";
                    $id = $cur_topic['id'];
                    $msg = $db->query('SELECT id, poster, poster_id, poster_ip, poster_email, message, posted, edited, edited_by FROM '.$db_prefix.'posts WHERE topic_id='.$id.' LIMIT 1') or error('Unable to fetch post info', __FILE__, __LINE__, $db->error());
                    if ( !$db->num_rows($msg) ) continue;

                    $cur_post = $db->fetch_assoc($msg);
                    $posterid = $cur_post['poster_id'];    

                    // DISPLAY FOR "Posted on DATE by POSTER"
                    echo '<h4>'.$thisdate.'</h4>' . '<a href="'.$pun_config['o_base_url'].'/viewtopic.php?id='.$cur_topic['id'].'"><h4>Diskutera</a></h4><br />'."\n";                    $truncate = isset($_GET['summary']) ? 1 : 0;
                    if ($truncate == 1)
                    {
                        $paragraph = preg_split("/\s*\n+/", $cur_post['message']);
                        if (isset($paragraph[1])) 
                        {
                            $cur_post['message'] = $paragraph[0] . "...";
                        }
                    }

                    $message = parse_message($cur_post['message'], 0);            
                    echo ''.$message;
                    if ($truncate == 1) { echo '<br /><a href="'.$pun_config['o_base_url'].'/news_show.php?id='.$cur_topic['id'].'">Läs mer...</a>'; }
                    echo '<br />'."\n";

                    //echo '<p class="newsextra"><a href="'.$pun_config['o_base_url'].'/viewtopic.php?id='.$cur_topic['id'].'">Diskutera</a><br /></p>'."\n";
                }
                echo "</div>"; // end newsblock div
                $show_count++;
            }
        }
    }
}
else
    exit('Bad request');

NEWS_SHOW.PHP (A slightly modded version of my index.php)

<?php
 
define('PUN_ROOT', './');
define('PUN_QUIET_VISIT', 1);
require PUN_ROOT.'include/common.php';
 
$page_title = pun_htmlspecialchars($pun_config['o_board_title']);
define('PUN_ALLOW_INDEX', 1);
require PUN_ROOT.'header.php';
require PUN_ROOT.'include/parser.php';
 
function pun_news($fid='', $show=15, $truncate=1)
{
    global $lang_common, $db, $pun_config, $db_prefix;
    $max_subject_length = 30;
    $show_max_topics = 50;
    $fid = intval($fid);
    $order_by = 't.posted';
    $forum_sql = '';
    // Was a forum ID supplied?
    if ( $fid ) $forum_sql = 'f.id='.$fid.' AND ';
    $show = intval($show);
    if ($show < 1 || $show > $show_max_topics)
    $show = 15;
    $saveddate="";
    // Fetch $show topics
    $result = $db->query('SELECT t.id, t.poster, t.subject, t.posted, t.last_post, f.id AS fid, f.forum_name FROM '.$db_prefix.'topics AS t INNER JOIN '.$db_prefix.'forums AS f ON t.forum_id=f.id WHERE f.id='.$fid.' AND t.moved_to IS NULL ORDER BY '.$order_by.' DESC') or error('Unable to fetch topic list', __FILE__, __LINE__, $db->error());
    $show_count = 0;
    if ( !$db->num_rows($result) ) return $output;
    while ( ($show_count < $show) && ($cur_topic = $db->fetch_assoc($result)) ) {
        $temp = '';
        if ($pun_config['o_censoring'] == '1')
            $cur_topic['subject'] = censor_words($cur_topic['subject']);
        if (pun_strlen($cur_topic['subject']) > $max_subject_length)
            $subject_truncated = trim(substr($cur_topic['subject'], 0, ($max_subject_length-5))).' ...';
        else
            $subject_truncated = $cur_topic['subject'];
        $newsheading = '<a href="'.$pun_config['o_base_url'].'/viewtopic.php?id='.$cur_topic['id'].'&action=new" title="'.pun_htmlspecialchars($cur_topic['subject']).'">'.pun_htmlspecialchars($subject_truncated).'</a> - <em>Posted by '.$cur_topic['poster'].' at '.date('h:i A', $cur_topic['posted']).'</em><br>';
        // Group posts by date    
        $thisdate = date('l, d F Y', $cur_topic['posted']);
        if ($thisdate != $saveddate) 
 
        {
            if ($saveddate)
            {
                $temp .= "</div></div>";
            }
            $temp .= '<div class="block"><h2><span>'.$thisdate.'</span></h2><div class="box"><div class="inbox"><p>';
            $saveddate = $thisdate;
        }
        else {
            $temp .= '<div class="inbox"><p>';
        }
        $temp .= $newsheading.'</p><p>';
        $id = $cur_topic['id'];
        $msg = $db->query('SELECT id, poster, poster_id, poster_ip, poster_email, message, posted, edited, edited_by FROM '.$db_prefix.'posts WHERE topic_id='.$id.' LIMIT 1') or error('Unable to fetch post info', __FILE__, __LINE__, $db->error());
            if ( !$db->num_rows($msg) ) continue;
        $cur_post = $db->fetch_assoc($msg);
        // Display first paragraph only (comment out next four lines to turn off)
        if ($truncate == 1)
        {
        $paragraph = preg_split("/s*n+/", $cur_post['message']);
            if (isset($paragraph[1])) {
                $cur_post['message'] = $paragraph[0] . "...";
            }
        }
        $cur_post['message'] = parse_message($cur_post['message'], 0);
        $temp .= $cur_post['message'];
        $temp .= "</p></div>";
        if (isset($output)) {
            $output .= $temp;
        }
        else {
            $output = $temp;
        }
        ++$show_count;
    } // end of while
    $output .= "</div></div>";
    return $output;
}


?>
<div class="nyheter">
<div class="block">
   <h2><span>Nyheter</span></h2>
     <div class="box">
<?php  //inkludera 5 senaste headlines från forum kategori 3
include('http://xxx.jokiaho.se/.forum/extern.php?action=new&show=5&fid=3');
?>
     </div>
</div>
</div>

<div class="nyheter">
<div class="block">
   <h2><span>Övriga Nyheter</span></h2>
     <div class="box">
<?php  //inkludera 5 senaste headlines från forum kategori 5
include('http://xxx.jokiaho.se/.forum/extern.php?action=new&show=5&fid=5');
?>
     </div>
</div>
</div>
<br /> 

<?php //inkluderar 2st nyheter från forum kategori 5+3 och lägger till en läs mer länk samt möjlighet att kommentera
  include('http://www.xxx.jokiaho.se/.forum/extern.php?action=news&show=1&fid=3,5');
?>

<?php
echo pun_news(1, 5, 0);
 
require PUN_ROOT.'footer.php';

Somwhere when i click on news_show.php the error accures, it doesn´t matter on what link on the page you click, the page is loading the same news item.

And what can i use on a modified index.php i use the miniportal, i need to be able to extract the forumname and i guess i need to specify what one

How does i extract the forum name if i want to show that on a page...

Like this forum has the title "Integration", i would like to extract just that part no mor no less. I guess i need something like

'.$thisdate.' <---- but the one for the forumname

I have all the other necessary code

54

(5 replies, posted in PunBB 1.2 troubleshooting)

At work atm guess it will be something similar to this below, and i wonders if i can use
(defined('PUN_GALLERY')) and if i have to specify that somewhere

// Load the template
if (defined('PUN_ADMIN_CONSOLE'))
        $tpl_main = file_get_contents(PUN_ROOT.'include/template/admin.tpl');
else if (defined('PUN_HELP'))
        $tpl_main = file_get_contents(PUN_ROOT.'include/template/help.tpl');
else if (defined('PUN_GALLERY'))
        $tpl_main = file_get_contents(PUN_ROOT.'include/template/gallery.tpl');
else
        $tpl_main = file_get_contents(PUN_ROOT.'include/template/main.tpl');

55

(5 replies, posted in PunBB 1.2 troubleshooting)

Yes that is exactly what i mean.

Any ideas?

Offcource with punbb footer in the end

56

(5 replies, posted in PunBB 1.2 troubleshooting)

How does i create my own tpl and get my page to use it instead of main.tpl

I need to change some in the code that i dont want to be everywhere, so it is only used on my special page

Is it possible, i guess it is and have somone the solution.

I want to have it like this on my index.php:
Non clickable headlines, only the first 200 words displayed and then a read more link that precents the intire post, + number of comments. The comments are done in the forum, when you click on the (12) comment´s link you will be taken to the first post in the forum and there be able to add a comment to the news posted.

News 1 comes from forum id=1
News 2 comes from forum id=2

And also headlines like this:

5 latest headlines from forum id=1
5 latest headlines from forum id=2

When you click on them the post will be precented on index.php, so users can read and also comment (in the forum)

CodeXP

I working on a webpage, where index.php (not forum index.php) will fetch posts from the forum.

And the question is how do i do that, guess i have to include ajax_extern.php into my index php, but what more is needed so my webpages startpage can fetch those posts

It must be possible in some way i guess i have to include common.php and what more must be done?

Tryed this one below and cant get the parser to work, the smileys are not showing up...

Diviance wrote:

Well, it is slightly modified from the versions I posted, to make it easier to edit some things.

<?php
/***********************************************************************

  Copyright (C) 2002-2005  Rickard Andersson (rickard@punbb.org)

  This file is part of PunBB.

  PunBB is free software; you can redistribute it and/or modify it
  under the terms of the GNU General Public License as published
  by the Free Software Foundation; either version 2 of the License,
  or (at your option) any later version.

  PunBB is distributed in the hope that it will be useful, but
  WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  GNU General Public License for more details.

  You should have received a copy of the GNU General Public License
  along with this program; if not, write to the Free Software
  Foundation, Inc., 59 Temple Place, Suite 330, Boston,
  MA  02111-1307  USA

************************************************************************


  INSTRUCTIONS

  This script is used to include information about your board from
  pages outside the forums and to syndicate news about recent
  discussions via RSS. The script can display a list of recent
  discussions (sorted by post time or last post time), a list of
  active users or a collection of general board statistics. The
  script can be called directly via an URL (for RSS), from a PHP
  include command or through the use of Server Side Includes (SSI).

  The scripts behaviour is controlled via variables supplied in the
  URL to the script. The different variables are: action (what to
  output), show (how many topics to display), fid (the ID or ID's of
  the forum(s) to poll for topics), nfid (the ID or ID's of forums
  that should be excluded) and type (output as HTML or RSS). The
  only mandatory variable is action. Possible/default values are:

    action: active (show most recently active topics) (HTML or RSS)
            new (show newest topics) (HTML or RSS)
            online (show users online) (HTML)
            online_full (as above, but includes a full list) (HTML)
            stats (show board statistics) (HTML)

    show:   Any integer value between 1 and 50. This variables is
            ignored for RSS output. The default is 15.

    fid:    One or more forum ID's (comma-separated). If ignored,
            topics from all guest-readable forums will be polled.

    nfid:   One or more forum ID's (comma-separated) that are to be
            excluded. E.g. the ID of a a test forum.

    type:   RSS. Anything else means HTML output.

  Here are some examples using PHP include().

    Show the 15 most recently active topics from all forums:
    include('http://host.com/forums/extern.php?action=active');

    Show the 10 newest topics from forums with ID 5, 6 and 7:
    include('http://host.com/forums/extern.php?action=new&show=10&fid=5,6,7');

    Show users online:
    include('http://host.com/forums/extern.php?action=online');

    Show users online with full listing of users:
    include('http://host.com/forums/extern.php?action=online_full');

    Show board statistics:
    include('http://host.com/forums/extern.php?action=stats');

  Here are some examples using SSI.

    Show the 5 newest topics from forums with ID 11 and 22:
    <!--#include virtual="forums/extern.php?action=new&show=5&fid=11,22" -->

    Show board statistics:
    <!--#include virtual="forums/extern.php?action=stats" -->

  And finally some examples using extern.php to output an RSS 0.91
  feed.

    Output the 15 most recently active topics:
    http://host.com/extern.php?action=active&type=RSS

    Output the 15 newest topics from forum with ID=2:
    http://host.com/extern.php?action=active&type=RSS&fid=2

  Below you will find some variables you can edit to tailor the
  scripts behaviour to your needs.


/***********************************************************************/

// The maximum number of topics that will be displayed
$show_max_topics = 60;

// The length at which topic subjects will be truncated (for HTML output)
$max_subject_length = 30;

// If you exceed max number of allowed topics, how many to display?
$show_default_topics = 10;

// Define the location of your punBB install
$forums = "forum";

/***********************************************************************/

// DO NOT EDIT ANYTHING BELOW THIS LINE! (unless you know what you are doing)


define('PUN_ROOT', './');
@include PUN_ROOT.'config.php';
require PUN_ROOT.'include/parser.php';

// If PUN isn't defined, config.php is missing or corrupt
if (!defined('PUN'))
    exit('The file \'config.php\' doesn\'t exist or is corrupt. Please run install.php to install PunBB first.');


// Make sure PHP reports all errors except E_NOTICE
error_reporting(E_ALL ^ E_NOTICE);

// Turn off magic_quotes_runtime
set_magic_quotes_runtime(0);


// Load the functions script
require PUN_ROOT.'include/functions.php';

// Load DB abstraction layer and try to connect
require PUN_ROOT.'include/dblayer/common_db.php';

// Load cached config
@include PUN_ROOT.'cache/cache_config.php';
if (!defined('PUN_CONFIG_LOADED'))
{
    require PUN_ROOT.'include/cache.php';
    generate_config_cache();
    require PUN_ROOT.'cache/cache_config.php';
}

// Make sure we (guests) have permission to read the forums
$result = $db->query('SELECT g_read_board FROM '.$db->prefix.'groups WHERE g_id=3') or error('Unable to fetch group info', __FILE__, __LINE__, $db->error());
if ($db->result($result) == '0')
    exit('No permission');


// Attempt to load the common language file
@include PUN_ROOT.'lang/'.$pun_config['o_default_lang'].'/common.php';
if (!isset($lang_common))
    exit('There is no valid language pack \''.$pun_config['o_default_lang'].'\' installed. Please reinstall a language of that name.');

if (!isset($_GET['action']))
    exit('No parameters supplied. See extern.php for instructions.');


//
// Converts the CDATA end sequence ]]> into ]]>
//
function escape_cdata($str)
{
    return str_replace(']]>', ']]>', $str);
}


//
// Show recent discussions
//
if ($_GET['action'] == 'active' || $_GET['action'] == 'new')
{
    $order_by = ($_GET['action'] == 'active') ? 't.last_post' : 't.posted';
    $forum_sql = '';

    // Was any specific forum ID's supplied?
    if (isset($_GET['fid']) && $_GET['fid'] != '')
    {
        $fids = explode(',', trim($_GET['fid']));
        $fids = array_map('intval', $fids);

        if (!empty($fids))
            $forum_sql = ' AND f.id IN('.implode(',', $fids).')';
    }

    // Any forum ID's to exclude?
    if (isset($_GET['nfid']) && $_GET['nfid'] != '')
    {
        $nfids = explode(',', trim($_GET['nfid']));
        $nfids = array_map('intval', $nfids);

        if (!empty($nfids))
            $forum_sql = ' AND f.id NOT IN('.implode(',', $nfids).')';
    }

    // Should we output this as RSS?
    if (isset($_GET['type']) && strtoupper($_GET['type']) == 'RSS')
    {
        $rss_description = ($_GET['action'] == 'active') ? $lang_common['RSS Desc Active'] : $lang_common['RSS Desc New'];
        $url_action = ($_GET['action'] == 'active') ? '&action=new' : '';

        // Send XML/no cache headers
        header('Content-Type: text/xml');
        header('Expires: '.gmdate('D, d M Y H:i:s').' GMT');
        header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
        header('Pragma: public');

        // It's time for some syndication!
        echo '<?xml version="1.0" encoding="'.$lang_common['lang_encoding'].'"?>'."\r\n";
        echo '<!DOCTYPE rss PUBLIC "-//Netscape Communications//DTD RSS 0.91//EN" "http://my.netscape.com/publish/formats/rss-0.91.dtd">'."\r\n";
        echo '<rss version="0.91">'."\r\n";
        echo '<channel>'."\r\n";
        echo "\t".'<title>'.pun_htmlspecialchars($pun_config['o_board_title']).'</title>'."\r\n";
        echo "\t".'<link>'.$pun_config['o_base_url'].'/</link>'."\r\n";
        echo "\t".'<description>'.pun_htmlspecialchars($rss_description.' '.$pun_config['o_board_title']).'</description>'."\r\n";
        echo "\t".'<language>en-us</language>'."\r\n";

        // Fetch 15 topics
        $result = $db->query('SELECT t.id, t.poster, t.subject, t.posted, t.last_post, f.id AS fid, f.forum_name FROM '.$db->prefix.'topics AS t INNER JOIN '.$db->prefix.'forums AS f ON f.id=t.forum_id LEFT JOIN '.$db->prefix.'forum_perms AS fp ON (fp.forum_id=f.id AND fp.group_id=3) WHERE (fp.read_forum IS NULL OR fp.read_forum=1) AND t.moved_to IS NULL'.$forum_sql.' ORDER BY '.$order_by.' DESC LIMIT 15') or error('Unable to fetch topic list', __FILE__, __LINE__, $db->error());

        while ($cur_topic = $db->fetch_assoc($result))
        {
            if ($pun_config['o_censoring'] == '1')
                $cur_topic['subject'] = censor_words($cur_topic['subject']);

            echo "\t".'<item>'."\r\n";
            echo "\t\t".'<title>'.pun_htmlspecialchars($cur_topic['subject']).'</title>'."\r\n";
            echo "\t\t".'<link>'.$pun_config['o_base_url'].'/viewtopic.php?id='.$cur_topic['id'].$url_action.'</link>'."\r\n";
            echo "\t\t".'<description><![CDATA['.escape_cdata($lang_common['Forum'].': <a href="'.$pun_config['o_base_url'].'/viewforum.php?id='.$cur_topic['fid'].'">'.$cur_topic['forum_name'].'</a><br />'."\r\n".$lang_common['Author'].': '.$cur_topic['poster'].'<br />'."\r\n".$lang_common['Posted'].': '.date('r', $cur_topic['posted']).'<br />'."\r\n".$lang_common['Last post'].': '.date('r', $cur_topic['last_post'])).']]></description>'."\r\n";
            echo "\t".'</item>'."\r\n";
        }

        echo '</channel>'."\r\n";
        echo '</rss>';
    }


    // Output regular HTML
    else
    {
        $show = isset($_GET['show']) ? intval($_GET['show']) : 15;
        if ($show < 1 || $show > 50)
            $show = 15;

        // Fetch $show topics
        $result = $db->query('SELECT t.id, t.subject FROM '.$db->prefix.'topics AS t INNER JOIN '.$db->prefix.'forums AS f ON f.id=t.forum_id LEFT JOIN '.$db->prefix.'forum_perms AS fp ON (fp.forum_id=f.id AND fp.group_id=3) WHERE (fp.read_forum IS NULL OR fp.read_forum=1) AND t.moved_to IS NULL'.$forum_sql.' ORDER BY '.$order_by.' DESC LIMIT '.$show) or error('Unable to fetch topic list', __FILE__, __LINE__, $db->error());

        while ($cur_topic = $db->fetch_assoc($result))
        {
            if ($pun_config['o_censoring'] == '1')
                $cur_topic['subject'] = censor_words($cur_topic['subject']);

            if (pun_strlen($cur_topic['subject']) > $max_subject_length)
                $subject_truncated = pun_htmlspecialchars(trim(substr($cur_topic['subject'], 0, ($max_subject_length-5)))).' …';
            else
                $subject_truncated = pun_htmlspecialchars($cur_topic['subject']);

            echo '<li><a href="'.$pun_config['o_base_url'].'/viewtopic.php?id='.$cur_topic['id'].'&action=new" title="'.pun_htmlspecialchars($cur_topic['subject']).'">'.$subject_truncated.'</a></li>'."\n";
        }
    }

    return;
}


//
// Show users online
//
else if ($_GET['action'] == 'online' || $_GET['action'] == 'online_full')
{
    // Load the index.php language file
    require PUN_ROOT.'lang/'.$pun_config['o_default_lang'].'/index.php';
    
    // Fetch users online info and generate strings for output
    $num_guests = $num_users = 0;
    $users = array();
    $result = $db->query('SELECT user_id, ident FROM '.$db->prefix.'online WHERE idle=0 ORDER BY ident', true) or error('Unable to fetch online list', __FILE__, __LINE__, $db->error());

    while ($pun_user_online = $db->fetch_assoc($result))
    {
        if ($pun_user_online['user_id'] > 1)
        {
            $users[] = '<a href="'.$pun_config['o_base_url'].'/profile.php?id='.$pun_user_online['user_id'].'">'.pun_htmlspecialchars($pun_user_online['ident']).'</a>';
            ++$num_users;
        }
        else
            ++$num_guests;
    }

    echo $lang_index['Guests online'].': '.$num_guests.'<br />';

    if ($_GET['action'] == 'online_full')
        echo $lang_index['Users online'].': '.implode(', ', $users).'<br />';
    else
        echo $lang_index['Users online'].': '.$num_users.'<br />';

    return;
}


//
// Show board statistics
//
else if ($_GET['action'] == 'stats')
{
    // Load the index.php language file
    require PUN_ROOT.'lang/'.$pun_config['o_default_lang'].'/index.php';

    // Collect some statistics from the database
    $result = $db->query('SELECT COUNT(id)-1 FROM '.$db->prefix.'users') or error('Unable to fetch total user count', __FILE__, __LINE__, $db->error());
    $stats['total_users'] = $db->result($result);

    $result = $db->query('SELECT id, username FROM '.$db->prefix.'users ORDER BY registered DESC LIMIT 1') or error('Unable to fetch newest registered user', __FILE__, __LINE__, $db->error());
    $stats['last_user'] = $db->fetch_assoc($result);

    $result = $db->query('SELECT SUM(num_topics), SUM(num_posts) FROM '.$db->prefix.'forums') or error('Unable to fetch topic/post count', __FILE__, __LINE__, $db->error());
    list($stats['total_topics'], $stats['total_posts']) = $db->fetch_row($result);

    echo $lang_index['No of users'].': '.$stats['total_users'].'<br />';
    echo $lang_index['Newest user'].': <a href="'.$pun_config['o_base_url'].'/profile.php?id='.$stats['last_user']['id'].'">'.pun_htmlspecialchars($stats['last_user']['username']).'</a><br />';
    echo $lang_index['No of topics'].': '.$stats['total_topics'].'<br />';
    echo $lang_index['No of posts'].': '.$stats['total_posts'];

    return;
}

//
// Use this to display 'news' - the recent topics from a specific forum
// expanded to include the first post text, posters, comments, etc.
//

else if ($_GET['action'] == 'news')
{
    $order_by = ($_GET['action'] == 'active') ? 't.last_post' : 't.posted';
    $forum_sql = '';

    // Get the forum id(s) you'd like to post news from
    if (isset($_GET['fid']) && $_GET['fid'] != '')
    {
        $fids = explode(',', trim($_GET['fid']));
        $fids = array_map('intval', $fids);

        if (!empty($fids))
            $forum_sql = ' AND f.id IN('.implode(',', $fids).')';
    }

    // RSS support not implemented, if anyone wants to do it, feel free..
    if (isset($_GET['type']) && strtoupper($_GET['type']) == 'RSS')
    {    
    }
    // Regular HTML output
    else
    {
        $show = isset($_GET['show']) ? intval($_GET['show']) : $show_default_topics;
        if ($show < 1 || $show > $show_max_topics)
            $show = $show_default_topics;        

        $result = $db->query('SELECT t.id, t.poster, t.subject, t.posted, t.last_post, t.num_replies, t.num_views, f.id AS fid, f.forum_name FROM '.$db_prefix.'topics AS t INNER JOIN '.$db_prefix.'forums AS f ON t.forum_id=f.id WHERE t.moved_to IS NULL '.$forum_sql.' ORDER BY '.$order_by.' DESC LIMIT '.$show.' ') or error('Unable to fetch topic list', __FILE__, __LINE__, $db->error());
        $show_count = 0;

        if(!$db->num_rows($result))
        {
            echo "No news to display";
        }
        else
        {

            while ( ($show_count < $show) && ($cur_topic = $db->fetch_assoc($result)) ) 
            {
                echo "<div class=newsblock>";
                $temp = '';
                if ($pun_config['o_censoring'] == '1')
                    $cur_topic['subject'] = censor_words($cur_topic['subject']);
                if (pun_strlen($cur_topic['subject']) > $max_subject_length)
                    $subject_truncated = trim(substr($cur_topic['subject'], 0, ($max_subject_length-5))).' ...';
                else
                    $subject_truncated = $cur_topic['subject'];
                    
                // Call Avatars Code
                    if ($img_size = @getimagesize($pun_config['o_avatars_dir'].'/'.$cur_post['poster_id'].'.gif'))
                    $user_avatar = '<img src="$forums/'.$pun_config['o_avatars_dir'].'/'.$cur_post['poster_id'].'.gif" '.$img_size[3].' alt="" />';
                    else if ($img_size = @getimagesize($pun_config['o_avatars_dir'].'/'.$cur_post['poster_id'].'.jpg'))
                    $user_avatar = '<img src="$forums/'.$pun_config['o_avatars_dir'].'/'.$cur_post['poster_id'].'.jpg" '.$img_size[3].' alt="" />';
                    else if ($img_size = @getimagesize($pun_config['o_avatars_dir'].'/'.$cur_post['poster_id'].'.png'))
                    $user_avatar = '<img src="$forums/'.$pun_config['o_avatars_dir'].'/'.$cur_post['poster_id'].'.png" '.$img_size[3].' alt="" />';

                // Simplify frequently required display information
                $thisdate = date('l, d F Y', $cur_topic['posted']);
                $poster = $cur_topic['poster'];
                $comments = $cur_topic['num_replies'];
                $views = $cur_topic['num_views'];

                // If using headlines, then after first item only show headlines...
                if(isset($_GET['headlines']) && $show_count > 0)
                {
                    echo "<p class=\"newsheadline\"><a href=".$pun_config['o_base_url']."/viewtopic.php?id=".$cur_topic['id'].">$subject_truncated</a> ($comments)</p> \n";
                }
                else
                {
                    // DISPLAY FOR TITLE OF NEWS
                    echo "<p class=\"newstitle\"><a href=".$pun_config['o_base_url']."/viewtopic.php?id=".$cur_topic['id'].">$subject_truncated</a></p> \n";

                    $id = $cur_topic['id'];
                    $msg = $db->query('SELECT id, poster, poster_id, poster_ip, poster_email, message, posted, edited, edited_by FROM '.$db_prefix.'posts WHERE topic_id='.$id.' LIMIT 1') or error('Unable to fetch post info', __FILE__, __LINE__, $db->error());
                    if ( !$db->num_rows($msg) ) continue;

                    $cur_post = $db->fetch_assoc($msg);
                    $posterid = $cur_post['poster_id'];    

                    // DISPLAY FOR "Posted on DATE by POSTER"
                    echo "<p class=\"newsdetails\">Posted on $thisdate by <a href=".$pun_config['o_base_url']."/profile.php?id=$posterid>$poster</a> $user_avatar</p> \n";

                    $truncate = isset($_GET['summary']) ? 1 : 0;
                    if ($truncate == 1)
                    {
                        $paragraph = preg_split("/\s*\n+/", $cur_post['message']);
                        if (isset($paragraph[1])) 
                        {
                            $cur_post['message'] = $paragraph[0] . "...";
                        }
                    }

                    // parse BBCode, smilies and HTML
                    $cur_post['message'] = parse_message($cur_post['message'], 0);
                    if ($pun_config['o_smilies'] == '1')
                    $message = do_smilies($cur_post['message']);        
     
                    echo str_replace("img/smilies", "$forums/img/smilies", "<p class=\"newstext\">$message");
                    if ($truncate == 1) { echo "<p><a href=".$pun_config['o_base_url']."/viewtopic.php?id=".$cur_topic['id'].">Read More...</a></p>"; }
                    echo "</p> \n";

                    echo "<p class=\"newsextra\">Comments(<a href=".$pun_config['o_base_url']."/viewtopic.php?id=".$cur_topic['id'].">$comments</a>) | Views (<a href=".$pun_config['o_base_url']."/viewtopic.php?id=".$cur_topic['id'].">$views</a>) </p> \n";                
                }
                echo "</div>"; // end newsblock div
                $show_count++;
            }
        }
    }
}

else
    exit('Bad request');

Entire extern.php modified with news mod, smilies mod and avatars mod.  Currently, the avatars are placed right after the poster's name in the Posted By: area.  Remove $user_avatar and place it wherever you want to move it around.

Now, the first thing you should do is change the $forums definition to the name of your punBB root install folder name.  It is currently set as "forum".  The code to change it is placed near the top, easy to find.

60

(1 replies, posted in PunBB 1.2 discussion)

Is it possible to get it with a read more link after x numbers of letters? Have any of you tryed that?

<form />

?

62

(68 replies, posted in PunBB 1.2 discussion)

Reines wrote:

One thing I would suggest is either adding image verification to password resetting, or make a limit so a user can only request a new password once a day. I had a problem with people auto posting a users email in the reset page, resulting in them getting mail bombed with reset requests (not good for the user, or for my server).

That would be something for 1.3 or a mod/plugin?

Im going to use the extern.php to get some info from the forum to the site, like users online, newest posts and more. And i wondering the upcoming 1.3 will there be massive changes in the database or minor. Not fun to rewrite all if all tables changes name and so on.

print tpl would be a nice future, and perhaps possible to toggle it off/on?

http://extensions.joomla.org/component/ … Itemid,35/

What i would need is how to intergrate so my users on my joomla site are logged in when they click on my forum link if they are logged into my site? How can i do that most easily. (Thinking of migrating from phpbb to punbb when 1.3 arrives)

How can i get swedish åäö to work with this chat? Gets a error msg when a guest = gäst enters the chat!

I also get a error msg in the java console

Error: document.pjircb.getFieldText is not a function
Source File: http://punbb.luleafans.se/chat/chat.js
Line: 30

But that dont apear every time.. from time to time.

Any ideas do implement this plugin or Connorhd´s plugin in punbb 1.3 i think it is very useful. Or as Connorhd says abowe to merge the two plugins to one plugin.

Whoho... my first post