Extension released

No (Page 1) in page title

Strips annoying (Page 1) from all forum page titles

Example: "Topic/Forum/etc (Page 1) - Forum Title" becomes "Topic/Forum/etc - Forum 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

4

(25 replies, posted in PunBB 1.3 extensions)

Great extension.

I noticed that the search results page for favorites didn't "match" the subscriptions page, so I tweaked the extension as follows, and thought I'd share back. smile

Added to manifest.xml:

<hook id="sf_fn_generate_search_crumbs_start"><![CDATA[
    if ($action == 'show_favorite')
    {
        if (file_exists($ext_info['path'].'/lang/'.$forum_user['language'].'/'.$ext_info['id'].'.php'))
        {
            include_once $ext_info['path'].'/lang/'.$forum_user['language'].'/'.$ext_info['id'].'.php';
        }

        else
        {
            include_once $ext_info['path'].'/lang/English/'.$ext_info['id'].'.php';
        }

        $forum_page['crumbs'][] = $lang_favorite_topic['Favorites'];
        $forum_page['items_info'] = generate_items_info($lang_search['Topics found'], ($forum_page['start_from'] + 1), $num_hits);
        $forum_page['main_head_options']['defined_search'] = '<span'.(empty($forum_page['main_head_options']) ? ' class="first-item"' : '').'><a href="'.forum_link($forum_url['search']).'">'.$lang_search['User defined search'].'</a></span>';

        return true;
    }
]]></hook>

<hook id="sf_fn_no_search_results_start"><![CDATA[
    if ($action == 'show_favorite')
    {
        if (file_exists($ext_info['path'].'/lang/'.$forum_user['language'].'/'.$ext_info['id'].'.php'))
        {
            include_once $ext_info['path'].'/lang/'.$forum_user['language'].'/'.$ext_info['id'].'.php';
        }

        else
        {
            include_once $ext_info['path'].'/lang/English/'.$ext_info['id'].'.php';
        }

        message($lang_favorite_topic['No favorites'], $forum_page['search_again'], $lang_favorite_topic['Favorites']);

        return true;
    }
]]></hook>

Added to $lang_favorite_topic in English favorite_topic.php:

    'Favorites'       => 'Favorites',
    'No favorites'    => 'You have no favorite topics.',

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

6

(61 replies, posted in PunBB 1.3 extensions)

Tried to install version 1.3 of the extension on PunBB 1.3.4:

Loading of extension "online_plus" failed.

Element extension/hooks/hook has content which does not end in PHP mode.

I traced it to the fact that you make use of at least one short open PHP tag in the extension, and I have short open tags disabled.

smile

7

(60 replies, posted in PunBB 1.3 extensions)

The problem regarding the categories is because of the JavaScript you're using:

function changeParent(cat_name, parent_name) {
    if (document.getElementsByName(parent_name)[0].value == 0)
        document.getElementsByName(cat_name)[0].disabled=false;
    else 
        document.getElementsByName(cat_name)[0].disabled=true;
}

Disabled means its value isn't sent, and then you've got the following code:

if (isset($_POST['add_forum']) && !empty($_POST['set_parent']) && empty($_POST['add_to_cat']))
    $_POST['add_to_cat'] = 1;

--snip--

Nevermind, the solution I posted here wouldn't work,  as the select element doesn't understand the readonly attribute.

--snip--

Cheers. smile

I'm rather confused as to the domain change too. I understand having the new owners host it. So why not host it on their server, keep the old domain, and have a "hosted by" link/graphic in a prominent but undistracting place?

Does it...?

Yep. It's a no-brainer. smile

10

(2 replies, posted in PunBB 1.2 discussion)

Private forums for that group, for example.

11

(11 replies, posted in PunBB 1.2 bug reports)

MadHatter wrote:

most companies I've worked w/ have used the notation © first pub date - current date.

I'm most familiar with that as well.

But, copyright doesn't expire until 70 years after the death of the author, regardless of the date on it, so it's just an aesthetic thing, rather than an enforcable disclaimer.

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

13

(8 replies, posted in News)

Same thing happened to Vanilla last month

It would be helpful if you simply added this as a permission (no minimum posts, just a checkbox). That way, you could only allow trusted members (people that have been around for more than 5 minutes...) to use the mailer at all.

This _exact_ same thing happened on the Textpattern support forum. I've had to turn it off for everyone except a few people that must have this ability.

Okay, thanks. smile

This plugin doesn't appear to be doing anything. I can load it up, click the various buttons, I get told the sync is done, and it redirects me.

But then I check and see nothing was updated. For example, I've got one user where his post count is 1, but he's actually got no posts anymore. After I syncronize the user post counts, his still remains as 1.

I don't get any warnings or errors. My error reporting and logs are turned on and working properly (double-checked).

I tried running the SQL query through phpMyAdmin:

CREATE TEMPORARY TABLE IF NOT EXISTS user_posts SELECT poster_id, count(*) as posts FROM posts GROUP BY poster_id;
UPDATE users, user_posts SET num_posts = posts WHERE id = poster_id;

It runs without error, but still doesn't appear to do anything.

PunBB 1.2.11, PHP 4.3.9, MySQL 4.1.7

I know, doesn't give you much to go on. Any ideas?

17

(300 replies, posted in PunBB 1.2 discussion)

Well, at the "worst" it could be a new year's gift, right? smile