Yo, here is a little PHP script to import users avatars from PHPBB forums. Copy it to the root of your punbb.

<?php
include ('config.php');

mysql_connect ($db_host, $db_username, $db_password) or die ('F*cK');
mysql_select_db ($db_name) or die ('f*ck');


$old = '/PATH/TO/PHPBB/images/avatars';
$new = 'img/avatars';

$query = 'SELECT * FROM users;';
$result = mysql_query ($query);

echo '<pre>'

while ($u = mysql_fetch_object ($result)) {
    $query = sprintf ('SELECT user_avatar FROM phpbb_users WHERE username=\'%s\';', $u->username);
    $res = mysql_query ($query);
    $p = mysql_fetch_object ($res);
    
    if ($p->user_avatar != '') {
        $n = strrpos ($p->user_avatar, '.');

        $name = substr ($p->user_avatar, 0, $n);
        $ext = substr ($p->user_avatar, $n);

        copy ($old . '/' . $p->user_avatar, $new . '/' . $u->id. $ext);
                $query = sprintf ('UPDATE users SET use_avatar=1 WHERE username=\'%s\';', $u->username);
                mysql_query ($query);

        echo '#!/bin/bash' . "\n";
        echo 'cp ' . $old . '/' . $p->user_avatar . ' ' . $new . '/' . $u->id. $ext . "\n";
    }
}

echo '</pre>';
?>

2

(2 replies, posted in Feature requests)

For me it's THE future who make punbb hard to admin.

An user can only be member of one group and it's a problem !
i.e :

They are 3 users : Paul, John and Mike. They are 3 forums : Sex, Drugs and Rock'n'roll.

Sex is public, evryone can read it. The two others are private rooms.
Paul can read Drugs but he's not allowed to read Rock'n'roll.
John can read Rock'n'roll but not Drugs.
Mike can read all but he's not an admin or a moderator, he's a "normal" member.

I make groups "drugs readers" and "rock'n'roll readers".
Paul is a member "drugs readers". He can read "drugs". It's good.
John is a member "Rock'n'roll readers". He can read "Rock'n'roll". It's good.

But Mike can not be a member of two groups ("Rock'n'roll readers" and "drugs reader") so he cannot read "Drugs" and "Rock'n'roll".

Maybe there is a solution but I don't know.

Please change the code to allow users to be in many groups (need a new table "Groups").

If Rickard is OK I can code this the next month for 1.3.
Tell me what ...

I'll don't support PunRewrite anymore.
I'm now using Sim07's PunOOgle : http://punres.org/desc.php?pid=162

Thanks.
I don't know about Chinese or Russian, works probably fine with all ISO charsets.
Just the id and ".html" is needed.
Rules for characters filtering must probably be imporved.

Please send me all URLs wich don't works fine.

Can be extended to profiles, pagination, ...

or in rewrite mode
...punbb.org/Modifications
that make easy to access my favorate forum by its name
...parmaja.org/forums/delphi

Making URL like view.php/forum/my-topic can be easly done without mod_rewrite (works evrywhere) just using the $_SERVER['PATH_INFO'] global var in PHP.
When I was using XOOPS, I have wrote a hack using this: http://www.xoops.org/modules/news/artic … ryid=1469.

PunRewrite is a mod to enhance your positioning in search engines.

It rewrites URLs to include the topic title. URL like http://placelibre.ath.cx/viewtopic.php?id=2459 comes http://placelibre.ath.cx/2459-maintenant-milices.html with this hack. Other features:

    * Rewrite URLs for forums and topics
    * Transform special characters like "é" or "ç" in normal characters like "e" or "c"
    * Remove words words of less than three letters.

Demo
Download

6

(3 replies, posted in Feature requests)

Good news smile

Fixed in this build: http://placelibre.ath.cx/keyes/index.ph … rs-map-102 (yes same version).

Hum, the problem is that i cannot use php function like htmlspecialchars in JS.

After full tests i've the same problem, changing line 64 by

        username = username.replace("<", "<");
        username = username.replace(">", ">");
        
        realname = realname.replace("<", "<");
        realname = realname.replace(">", ">");
    
        location = location.replace("<", "<");
        location = location.replace(">", ">");

And it works! But why ? hmm

Incendiary wrote:

Nearly there! The arrows show up, but it looks like the text that appears in the bubble also needs htmlspecialchars applied to it. Currently usernames with < in them are cut off.

Tested with Firefox and works (no test with IE):

        username = username.replace("<", "<");
        username = username.replace(">", ">");
        username = username.replace("&", "&");
        
        realname = realname.replace("<", "<");
        realname = realname.replace(">", ">");
        realname = realname.replace("&", "&");
    
        location = location.replace("<", "<");
        location = location.replace(">", ">");
        location = location.replace("&", "&");

in map.php

Please send me errors (and patches if possible).

Probably in the mod (and in IE ^^) ...

Users Map 1.0.2 fix this bug: http://placelibre.ath.cx/keyes/download … -1.0.2.zip try it.

Something is bad with XML: http://www.clanimmortals.com/forums/markers.php

  <marker id="2" username=">I<Eclipse" title="Web Monkey" realname="" url="" location="Durham" lat="54.779207124143404" lng="-1.5549087524414062" useavatar="1" avatar="img/avatars/2.jpg"/>

The > & < are not escaped. I make an update.

Incendiary, what page ? (I try UserMaps in IE with Wine now).

__Edit__: new version: http://placelibre.ath.cx/keyes/index.ph … rs-map-101

14

(3 replies, posted in Feature requests)

The live bookmarks feature in Firefox is very usefull ! Just a click and we can read all the news !

PunBB have a RSS backend, only one line is missing in the header to use this feature:

<link rel="alternate" type="application/rss+xml" title="<?php echo $pun_config['o_board_title'] ?>" href="extern.php?action=new&type=rss" />

Can you add it ? :-)

To patch manually:

#
#---------[ 1. OPEN ]---------------------------------------------------------
#

header.php

#
#---------[ 2. FIND (line: 64) ]---------------------------------------------
#

<title><?php echo $page_title ?></title>

#
#---------[ 3. AFTER, ADD ]-------------------------------------------------
#

<link rel="alternate" type="application/rss+xml" title="<?php echo $pun_config['o_board_title'] ?>" href="extern.php?action=new&type=rss" />

#
#---------[ 4. SAVE/UPLOAD ]-------------------------------------------------
#

Yes you must get a Google API key and respect Google Maps API terms of use (i.e: no commercial sites).

If the map run in Satelite mode you can see evrywhere, i can view my home who is located in a litte city in France.
Road map are only for US, UK and Japan. Perhaps that Google will extend its service to others country.

Users Map is punBB mod who use Google Maps to provide members localisation.

Users Map have 3 main functionalities:
- UM provide a general map with markers where users live.
- A little map with a marker where the user live is diplayed in the profile.
- All registred users can select their coordinates in their profiles.

An admin interface and a XML file (i.e: to use with AJAX) are also provided.

View a demo of the general map
View a demo of the per user map
If you signup you can also test the coordinates selector in Profile -> Personal.

Feedback and comments are welcome on my weblog.

Note: A French translation is provided with the mod

Get Users Map