Topic: A few requests

1. Add an account activation page where a user can select their own password instead of having one emailed to them.

2. Convert PunBB to using search engine friendly urls, without using mod_rewrite. Rickard, I can show you how to do this, its very easy on a board coded like punbb.

There was something else, but I can't remember right now.

2

Re: A few requests

1. You can disable email verification in Admin/Options

Re: A few requests

I would like to have email verification, but still let the user choose their own password.

Re: A few requests

they can change their passwords in profile

Re: A few requests

The Wolf wrote:

2. Convert PunBB to using search engine friendly urls, without using mod_rewrite. Rickard, I can show you how to do this, its very easy on a board coded like punbb.

Please do. There's a topic on the subject here:

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

"Programming is like sex: one mistake and you have to support it for the rest of your life."

Re: A few requests

I will post on how to implement it here.

First thing you need to do is generate the URLs at runtime, something like this:

    function url_parse($module, $arguments) {
        $out = "/$module/";
        
        foreach ($arguments as $name => $value) {
            # If this argument is numeric:
            if (is_numeric($name)) {
                # Then its an argument without a value:
                $out .= "$value/";
            } else {
                # If not then its an argument with a value:
                $out .= "$name:$value/";
            }
        }
        
        return $out;
    }

You would call that function with code like this:

    echo url_parse('viewtopic', array(
        'id'    => 4574,
        'this'    => 'that',
        'something',
    ))

This would output a url like this:

/viewtopic/id:4574/this:that/something/

Thats all you need to generate the urls. Please note that this can also be used to generate the standard url.

Now for the fun part, making apache load the viewtopic.php file:

Make a .htaccess file with the following code:

MultiViews

Simple isn't it?

Re: A few requests

Ah, nice. There are two big problems though. What about people who aren't able to use htaccess files? I know quite a few hosts that just ignore htaccess. Also, what about people running PunBB on IIS or any other webserver for that matter?

"Programming is like sex: one mistake and you have to support it for the rest of your life."

Re: A few requests

Ohhh, ohhh, I know, let's just make a lot of folders and index.html  big_smile roll








* pun intended at a large scale* wink

Re: A few requests

"Ah, nice. There are two big problems though. What about people who aren't able to use htaccess files? I know quite a few hosts that just ignore htaccess. Also, what about people running PunBB on IIS or any other webserver for that matter?"

Nothing you can do to help them, thats why you have these urls off by default. ISS doesn't have mod_rewrite, and if you can't use an access file you can't use mod_rewrite either.

Re: A few requests

Another problem. What about forms with method="GET"? :)

Edit: Nevermind. I'm talking taco. Forms aren't interesting anyway. It's not like Googlebot fills out forms :)

"Programming is like sex: one mistake and you have to support it for the rest of your life."

Re: A few requests

nice..  but where i put the second code ?

the first one i quess in function.php there is his place smile

thx