1

(31 replies, posted in Feature requests)

Thanks for the report, you're right, that must be

if ($forum_user['is_guest']) return '';

The same a few lines later (should be return ''; instead of return;).

Updated version

Changed are just the bbnotify_functions.php (bugfix) and the manifest.xml (new version 1.1.1).

2

(31 replies, posted in Feature requests)

The @ is wrong in there. wink

You can type @PanBB.Ru, but it will become [notify]PanBB.Ru[/notify] without the @.

The extension already has a dependency to pun_jquery in the manifest. The extension pun_bbcode is not needed, the notify works well without, so I don't want to set that dependency.

3

(31 replies, posted in Feature requests)

Yes, of course it's free. I just put the GPL reference in the header which I also found in another extension.
For the javascript part I use two additional small libraries (see the subfolders inside the js folder), both are also free to use, one with MIT license, the other one without specific license. Licenses are inside the folders.

4

(31 replies, posted in Feature requests)

Thanks for the feedback and good ideas.

I just uploaded the new version 1.1.0.

Changes:

  • Fixed the link to bbnotify_search.php for name suggestions (now uses $ext_info['url'] to make sure the path will work), so typing @p should work now (to find usernames containing p in this example)

  • Fixed cursor position after inserting a name from suggestion list

  • Added BB code button (just works with plugin pun_bbcode enabled, otherwise no effect), icon is "@", title is "notify"

  • Added information on BBCode help page

  • Some general cleanup

Hope it works well now. As the version number changed, after uploading you can just choose the "upgrade" option in admin menu.

5

(31 replies, posted in Feature requests)

The javascript code needs the extension pun_jquery to be running - but it's in the manifest file, so I guess you have it installed.

Did you type anything after @? Just @ shows nothing, you need at least one more character, like @r

Do you get any javascript error?

6

(31 replies, posted in Feature requests)

You write a message and when writing the text, you just type @ and the beginning of a name. For example, if I want to tag you, I write @pan and a box will show "PanBB.Ru" (and maybe more users). Then you klick on the name. In the textbox it will show [notify]PanBB.Ru[/notify].
Then send the post.
In the post, it will show @PanBB.Ru as a link to your profile. Furthermore, you will get an e-mail with link to the post and you will see a red box on top of the forum showing the notification to you.

Maybe you tried to tag yourself, that doesn't work, you can just tag other users.

7

(31 replies, posted in Feature requests)

Just in case you already tried / downloaded: I just put another version online which allows the use of arrow keys and enter to select a user from the search result list. Before you had to click on it.

Furthermore it might be good to know that when you quote a post, all notify tags are removed to prevent users being accidentally notified again.

8

(31 replies, posted in Feature requests)

Screenshots:
http://www.danielrathjen.de/punbb/bbnotify1.png (writing a post using the extension)
http://www.danielrathjen.de/punbb/bbnotify2.png (notification showing up)
http://www.danielrathjen.de/punbb/bbnotify3.png (admin options)

9

(31 replies, posted in Feature requests)

I have kind of that feature as a plugin, although maybe not 100% what you're looking for:

Plugin-Download

The plugin won't set every @... as notification (because sometimes people might not want to notify somebody), but add the new bb tag [notify]username[/notify].
In the textarea for writing a new message, you can just type @user and you'll get a little popup recommending users starting with user* (those always come first) or containing *user*. Only the first 5 matches are shown to reduce loading time (obviously the database connection still shouldn't be too slow). If you click on one of the results, the "@user" will be replaced by [notify]username[/notify].
The feature only runs when the @ is at the beginning of the post or after some whitespace / line feed, so e-mail addresses won't be tagged.

The usernames offered for completion are only those users who have access to the current forum - just be aware that the php script which performs the search can be called separately by anybody, so people could test which users have access to which forums.
Guests never get any search results for safety reasons, so only logged in users get a result list.

In admin options (Settings -> Features) you can choose what kind of notification you'd like to have: Sending an e-mail to the user and/or showing a list of notifications on top of the forum.
Notifications are removed when the user opens the page of the thread containing the post. If you're tagged on page 3 of a post but open page 2, the notification will be kept active.

10

(154 replies, posted in Supported extensions)

Another thing that came to my mind: Even with the setting "Display 'New messages (N)' link at the top of every page." enabled, you don't really have a well visible indication for new messages (the "PM" is simply displayed bold then). As I don't like to change built-in extensions too much, I wrote my own little extension-extension for that purpose:
http://www.danielrathjen.de/punbb/pun_p … cation.zip

Preview:
http://www.danielrathjen.de/punbb/pm_notification.png
It's not the Oxygen style in that forum, but it should be clear enough to see how it works. Unfortunately only one link allowed in this post, so please copy&paste. smile

Any thoughts on that extension?

11

(154 replies, posted in Supported extensions)

I also ran into the problem on mobile devices and changed the css style Oxygen of the extension adding this:

.pun_pm_list .td4 {
    width:100%;
    min-width:10em;
}

.pun_pm_list td.td3  a {
    overflow:hidden;
}

@media screen and (max-width: 600px) {
    .pun_pm_list .td5 {
        display:none;
    }
    .pun_pm_list .td3 {
        width:8em;
    }
    .pun_pm_msg .td1 {
        width:auto;
    }
}

@media screen and (max-width: 460px) {
    .pun_pm_list .td3 {
        width:4em;
    }
}

Im not sure whether the first part - width for td4 - is really necessary, but it helped me whenever the other rules messed up, giving it at least some minimal width.
On smaller screens the column "Last edited" will be hidden and the "From" column gets narrower, giving the subject enough space.
The change for .pun_pm_msg .td1 on small screen is for the header (From / Sent / Subject) when reading a message, in the original style it would be too far on the right.

Another issue is that the collapsed menu on small screen gets the title "Profile Menu" although it's the "PM Menu" - however, at first sight it looks like a change for that might need some changes in the forum software itself. As it's not very important for me, I didn't look into it any further.

12

(1 replies, posted in PunBB 1.4 bug reports)

Hi,
I already searched the forum but surprisingly couldn't find the problem listed anywhere (maybe just tried wrong search words...).
If I use nested tags inside a list tag, the inner one gets broken.

Example (the two whitespaces are just to be able to post it here as only one link per post is allowed):

[list=*]
[*][url=ht tp://ww w.example.com]Example[/url][/*]
[/list]

Results in:

You can see that the " of the url are escaped. That is due to the "e" modifier used for preg_replace of the list tag (parser.php, function do_bbcode):

        $pattern[] = '%\[list(?:=([1a*]))?+\]((?:(?>.*?(?=\[list(?:=[1a*])?+\]|\[/list\]))|(?R))*)\[/list\]%ise';
        $replace[] = 'handle_list_tag(\'$2\', \'$1\')';

The PHP documentation says about the e modifier:

Caution

The addslashes() function is run on each matched backreference before the substitution takes place. As such, when the backreference is used as a quoted string, escaped characters will be converted to literals. However, characters which are escaped, which would normally not be converted, will retain their slashes. This makes use of this modifier very complicated.

I'm not sure whether stripslashes() would simply solve the problem or might cause other problems depending on the content. What do you think?

I guess a clean solution would be to changing it to preg_replace_callback as the e modifier is deprecated anyways.

13

(11 replies, posted in PunBB 1.3 troubleshooting)

Same for me with German language.

Got the problem with debugging:
Subject an message are "cleaned" with forum_trim (misc.php, line 210-211) which calls utf8_trim in /include/utf8/trim.php.
There, utf8_ltrim and utf8_rtrim use pattern modifier 'u' which treats pattern string as UTF-8.
In German this does not work (because of our great 'umlauts' wink). Should be the same with French accents.
As hotfix, just remove the 'u' modifier at both occurences:

replace

return preg_replace('/^['.$charlist.']+/u','',$str);

with

return preg_replace('/^['.$charlist.']+/','',$str);

and replace

return preg_replace('/['.$charlist.']+$/u','',$str);

with

return preg_replace('/['.$charlist.']+$/','',$str);

in /include/utf8/trim.php.

Note: It's just a quick hotfix for this special problem, I don't now if it could cause (security) problems somewhere else.

Btw, utf8 causes more similar problems. For example, after database update from 1.2.x to 1.3, all users with non-utf8-passwords (as mentioned umlauts, accents etc.) could not log in anymore (bad thing in combination with empty password mails wink).

14

(6 replies, posted in PunBB 1.2 discussion)

I've translated the admin interface of PunBB 1.2.6 into German. It's possibly not the best translation (just quick and dirty), but it should be understandable.
You may download it here.

P.S.: It's an informal version, but it's just for admins so i think it's ok. wink