Topic: RSS Feed url's and page title

Hello. I'm using PunnBB and I like it. But.. I would like to solve two little problems.

1. In the page title is allways Page 1, Page 2 etc..
2. URL's generated by RSS (or Atom) extension include /viewtopic.php?id=401&action=new instead of /viewtopic.php?id=401

..how to solve (remove)? Thx.

2

Re: RSS Feed url's and page title

Hi,

You'll have to modify extern.php:

1. For page 1, 2, etc - got an example?

2. Line 229, remove .$url_action

3 (edited by miller 2008-06-15 16:19)

Re: RSS Feed url's and page title

Thank you for quick answer but on the line 229 i have no .$url_action. Lines 220 - 240:

//
// Output $feed as HTML (using <li> tags)
//
function output_html($feed)
{
    global $pun_config;

    $num_items = count($feed['items']);
    for ($i = 0; $i < $num_items; ++$i)
    {
        if ($pun_config['o_censoring'] == '1')
            $feed['items'][$i]['title'] = censor_words($feed['items'][$i]['title']);

        if (pun_strlen($feed['items'][$i]['title']) > MAX_SUBJECT_LENGTH)
            $subject_truncated = pun_htmlencode(trim(substr($feed['items'][$i]['title'], 0, (MAX_SUBJECT_LENGTH-5)))).' ?';
        else
            $subject_truncated = pun_htmlencode($feed['items'][$i]['title']);

        echo '<li><a href="'.$feed['items'][$i]['link'].'" title="'.pun_htmlencode($feed['items'][$i]['title']).'">'.$subject_truncated.'</a></li>'."\n";
    }
}

Page 1.. screenshot here:
http://img294.imageshack.us/img294/4316/obrazovkaiu6.png

4

Re: RSS Feed url's and page title

What version of PunBB are you running?

Re: RSS Feed url's and page title

1.3 Beta

Re: RSS Feed url's and page title

The first one solved. Removed from the /include/url/Default.php "action=new"

7 (edited by miller 2008-06-23 12:52)

Re: RSS Feed url's and page title

No solution for (Page 1) remove from the page title ??

Re: RSS Feed url's and page title

Hi, miller. If you need to remove Page 1, etc. from all forum pages, you should replace Line 583 from inlclude/functions.php

$crumbs .= (is_array($pun_page['crumbs'][$i]) ? htmlspecialchars($pun_page['crumbs'][$i][0]) : htmlspecialchars($pun_page['crumbs'][$i])).((isset($pun_page['page']) && $i == ($num_crumbs - 1)) ? ' ('.$lang_common['Page'].' '.$pun_page['page'].')' : '').($i > 0 ? $lang_common['Title separator'] : '');

with this

$crumbs .= (is_array($pun_page['crumbs'][$i]) ? htmlspecialchars($pun_page['crumbs'][$i][0]) : htmlspecialchars($pun_page['crumbs'][$i])).($i > 0 ? $lang_common['Title separator'] : '');

Re: RSS Feed url's and page title

fantasma, in report you wrote:

add this in the next update of punbb

What exectly would you like us to add to the next update?

10

Re: RSS Feed url's and page title

Slavok wrote:

Hi, miller. If you need to remove Page 1, etc. from all forum pages, you should..

((isset($pun_page['page']) && $i == ($num_crumbs - 1)) ? ' ('.$lang_common['Page'].' '.$pun_page['page'].')' : '')

removed. Works, nice Thx