You can downloads here : http://www.punbb.fr/mods/telecharger.php?id=135

PunBB Simple API is a kind of toolbox to play with PunBB on your website. This script amount using the PunBB common.php file but provided in addition some "ready to use" methods to easily handle the data coming from PunBB.

This script is intended to the users who know PHP, it is also recommended to have already used common.php script of PunBB but it is not obligatory; finally, it is provided in the state and without no support guarantees...

2

(13 replies, posted in PunBB 1.2 troubleshooting)

http://punbb.org/forums/viewtopic.php?pid=92795#p92795

ok is there a problem with the read_me.txt (en) ; instructions are for PunToolBar 1.3 I've forget to update it with the 1.4 release

if you read French use the lisez_moi.txt file, if not please wait the 1.4.1 I have little things to do on it

ok, thanks smile

not sure but I think I've found a little typo in email.php

    // Do a little spring cleaning
    $to = trim(preg_replace('#[\n\r]+#s', '', $to));
    $subject = trim(preg_replace('#[\n\r]+#s', '', $subject));
    $from = trim(preg_replace('#[\n\r:]+#s', '', $from));

this line in the mask :

$from = trim(preg_replace('#[\n\r:]+#s', '', $from));

ok i've try to switch collation to latin-1 and it's ok now

I've just notice this error when upgrading on MySQL 4.1.11-Debian_4sarge7-log

The request is : ALTER TABLE online ADD UNIQUE INDEX online_user_id_ident_idx(user_id,ident)

I have just seen that the collation of the tables is utf-8_bin; can this cause the error?

remove "e" at the end of the mask

Here a list of hardcoded languages definitions thats could be moved to language pack. I know in the majority of the cases that is admin related, and that it is probably the reason for which this is hardcoded, in this cases take it like a "post-it".

To minimalize I have replaced variables by "%s" like in sprintf function, or simply cut string with "..."


footer.php

line 109 : Powered by
line 118 : Generated in %d seconds, %d queries executed


header.php

line 180 : There are new reports
line 183 : Maintenance mode is enabled!


misc.php

line 204 : Report
line 205 : User %s has reported the following message ... Reason


moderate.php

line 53 : The IP address is: ... Show more users for this IP


post.php

line 476 : Guest


profile.php

line 221 : Alert - Banned e-mail detected
line 222 : User %s changed to banned e-mail address ... Do not reply to this message)

line 239 : Alert - Duplicate e-mail detected
line 240 : User %s changed to an e-mail address that also belongs to ... Do not reply to this message)

line 543 : Administrators cannot be deleted ... you must first move him/her to a different user group.


register.php

line 86 : A new user was registered with the same IP address ...  Sorry for the inconvenience.

line 206 : Alert - Banned e-mail detected
line 207 : User %s registered with banned e-mail ... Do not reply to this message)

line 215 : Alert - Duplicate e-mail detected
line 216 : User %s registered with an e-mail address ... Do not reply to this message)

line 224 : Alert - New registration
line 225 : User %s registered in the forums ... Do not reply to this message)


search.php

line 581 : Replies:


----

Another thing about translations ; the punctuation marks should be included in the definitions of languages pack, not hardcoded. Because for example in english we wrote : "Guests online: 12" and in french we have to put a space between the two points like this : "Guests online : 12"

Same things for question marks and others punctuation marks. smile

moonmoon use SimplePie, you should look at it

moonmoon but the current version is a 0.2, a young project

12

(7 replies, posted in PunBB 1.2 discussion)

it was what worried me with the extension system, it is an excellent thing smile

13

(7 replies, posted in PunBB 1.2 discussion)

oh! I think extensions will be able to add fields to the request; great! smile

14

(7 replies, posted in PunBB 1.2 discussion)

Hello,

http://dev.punbb.org/changeset/805

Can you explain what is the interest of using this? smile

Ruiz you probably forget to translate calendar module

each module have is proper language files

cool Paul smile

Smarty, perhaps I'm wrong but I think if a plugin will add is proper extension just to fetch some CSS or JS is not efficient, I'm talking in the plugin context ; ok for a "comlpete" mod, extension probably have to add some additionnal code in head and then the use of hook is appropriate, but for a plugin I don't thinks so

then a hook... well, in the absence of another thing it is already better than nothing smile

another thing but for same purpose, how to add to <body onload=""> ? no way for the moment, we have to edit .tpl files

I've found in DotClear2 this code :

//
// ChainHandler, py Peter van der Beken
//
function chainHandler(obj, handlerName, handler) {
    obj[handlerName] = (function(existingFunction) {
        return function() {
            handler.apply(this, arguments);
            if (existingFunction)
                existingFunction.apply(this, arguments); 
        };
    })(handlerName in obj ? obj[handlerName] : null);
};

//
// On load
//
chainHandler(window,'onload',function() {
    
});

really simple to add window.onload event...

all of this to allow plugins authors to do more things

i've try my idea :

in admin_loader.php, replace

$page_title = pun_htmlspecialchars($pun_config['o_board_title']).' / Admin / '.$plugin;
require PUN_ROOT.'header.php';

// Attempt to load the plugin. We don't use @ here to supress error messages,
// because if we did and a parse error occurred in the plugin, we would only
// get the "blank page of death".
include PUN_ROOT.'plugins/'.$plugin;
if (!defined('PUN_PLUGIN_LOADED'))
    message('Loading of the plugin \''.$plugin.'\' failed.');

by this :

// Attempt to load the plugin. We don't use @ here to supress error messages,
// because if we did and a parse error occurred in the plugin, we would only
// get the "blank page of death".
ob_start();
include PUN_ROOT.'plugins/'.$plugin;
$plugin_content = trim(ob_get_contents());
ob_end_clean();

if (!defined('PUN_PLUGIN_LOADED'))
    message('Loading of the plugin \''.$plugin.'\' failed.');

$page_title = pun_htmlspecialchars($pun_config['o_board_title']).' / Admin / '.$plugin;
require PUN_ROOT.'header.php';

echo $plugin_content;

in header.hp search for :

$user_agent = isset($_SERVER['HTTP_USER_AGENT']) ? strtolower($_SERVER['HTTP_USER_AGENT']) : '';

just before, add :

if (isset($custom_head)) echo $custom_head;

then in plugin file, I could simply add for exemple :

$custom_head =
'<script type="text/javascript">
//<![CDATA[
...
//]]>
</script>';

yes it is that the problem

but if we use the extension mecanism, will must create an extension for a plugin ; so for the purpose we will have to add an extension just for display a JS or CSS code, I think it is not really appropriate
therefor it is really simple to add in header.php a simple test if variable exist we add content to head

Actually we could not add JS or additionnal CSS for our plugins.

A simple conventionned variable could be added to make it possible to add customized code in <head></head> like JS or CSS.

Then in admin_loader.php we load the plugin file before header.php so if (isset($custom_head)) etc.

... not sure my explanation really clear hmm

21

(4 replies, posted in PunBB 1.2 bug reports)

please could you report fix to the dedicated forum on punbb.fr to enhance the next release of french version

or send me an email

why don't save in DB title plus title-url ? when you post, a function "strToUrl" transform the title in a valid url and you store it in the db in title-url

Here a plugin for DotClear which will allow you to display informations coming from your forum PunBB 1.2.x.

What you can do with this plugin:
- Display the "navigation bar" of the forums
- Display the "welcom bar"
- Display a login form and perform login/logout
- Display current user avatar
- Display somes topics lists
- Display online users list
- Display stats
- Display forums announcement
- Display the "quickjump" to forums
- and others ...

Current version: 0.6

Install this plugin:

Installer (.pkg.gz)
Archive (.tar.gz)

have topic title in uri is a good thing ; the title could be in the URI for information but the system only use the id

something like /topic/56-topic-title/ and just use 56 (the id) so when you change topic title there is no problem /topic/56-new-topic-title/

25

(2 replies, posted in PunBB 1.2 discussion)

and punbb.fr mods : http://www.punbb.fr/mods/

and punbb.fr styles : http://www.punbb.fr/styles/

wink