Topic: How to remove (Page 1) from page title?

Hello,

I recently installed punbb on my website. I'm in the prcess of customizing the theme. Unfortunately I can't remove the "(Page 1)" from title. In every forum category, forum and post title (i.e., page title), it displays like this:

http://punbb.informer.com/forums/forum/ … -requests/

In the above punBB page, the title is: <title>PunBB feature requests (Page 1) - PunBB Forums</title>

How I can remove (at least change) this?

Re: How to remove (Page 1) from page title?

I think you have to make an extension, see function generate_crumbs() in include/functions.php.

Re: How to remove (Page 1) from page title?

Waiting for that extension, would be cool big_smile

Re: How to remove (Page 1) from page title?

this is relevant to my interests. big_smile

5 (edited by sunshine 2009-07-06 04:48)

Re: How to remove (Page 1) from page title?

I think I've figured out how to do it. I'm new to PunBB extensions, so I hope knowledgeable people will let me know any corrections that should be made. It seems to work for me, though. smile

--removed--

Extension released

Re: How to remove (Page 1) from page title?

Good !!

Thank

Re: How to remove (Page 1) from page title?

Can't wait for release! yikes

Re: How to remove (Page 1) from page title?

sunshine wrote:

I think I've figured out how to do it. I'm new to PunBB extensions, so I hope knowledgeable people will let me know any corrections that should be made. It seems to work for me, though. smile

manifest.xml looks like:

<?xml version="1.0" encoding="utf-8"?>

<extension engine="1.0">
    <id>no_page1_title</id>
    <title>No (Page 1) in page title</title>
    <description>Strips annoying (Page 1) from all forum page titles</description>
    <version>0.1</version>
    <author>Mary Fredborg</author>
    <minversion>1.3.4</minversion>
    <maxtestedon>1.3.4</maxtestedon>
    <hooks>
        <hook id="co_common"><![CDATA[
            $pun_extensions_used = array_merge(isset($pun_extensions_used) ? $pun_extensions_used : array(), array($ext_info['id']));
        ]]></hook>

        <hook id="fn_generate_crumbs_start"><![CDATA[
            // take it out, so it won't appear in page <title>
            if ($reverse == true and $forum_page['page'] == 1)
            {
                $current_page = $forum_page['page'];
                unset($forum_page['page']);
            }
        ]]></hook>
    </hooks>
</extension>

It seems to be the code will work! Can you please release this extension? or atleast let me know the steps to archieve this!

Thanks in advance.

Re: How to remove (Page 1) from page title?

Extension released

Re: How to remove (Page 1) from page title?

sunshine wrote:

I think I've figured out how to do it. I'm new to PunBB extensions, so I hope knowledgeable people will let me know any corrections that should be made. It seems to work for me, though. smile

--removed--

Extension released

Hello Sunshine,

Thanks for releasing the extension. Now the "Page 1" from title field is removed. Thanks again!