1

(5 replies, posted in PunBB 1.3 discussion)

I also have the same problem. Login does not work, the Pun shows the confirm-page. Logout does work!

/**
     *  @brief  returns the login formular
     *  @return [string] form HTML
     */
    public static function getFormLogin()
    {
        global $dict;
       
        $register_url = forum_link('register.php');
        $redirect_url = $_SERVER['REQUEST_URI'];
        $post_url     = forum_link('login.php');
        $csrf_token   = generate_form_token($post_url);

        $form = '
            <form id="login" name="login" method="post" action="'.$post_url.'" accept-charset="utf-8">
                <input type="hidden" name="form_sent" value="1" />
                <input type="hidden" name="redirect_url" value="'.$redirect_url.'" />
                <input type="hidden" name="csrf_token"   value="'.$csrf_token.'" />
                <label for="req_username">'.$dict->getDict( 'username', 'login').': </label><input type="text" name="req_username" size="16" maxlength="25" />
                <label for="req_password">'.$dict->getDict( 'password', 'login').': </label><input type="password" name="req_password" size="16" maxlength="16" />
                <input type="submit" name="submit" value="'.$dict->getDict( 'login', 'login').'">
        <a href="#" onclick="document.login.submit(); return false;">'.$dict->getDict( 'login', 'login').'</a>
        &nbsp; | &nbsp;
        <a href="'.$register_url.'">'.$dict->getDict( 'register', 'login').'</a>
            </form>';
   
        return $form;
    }

/**
     *  @brief  returns the logout formular
     *  @return [string] form HTML
     */
    public static function getFormLogout()
    {
        global $dict, $currentuser;

        $redirect_url = $_SERVER['REQUEST_URI'];
        $post_url     = forum_link('login.php').'?action=out&amp;id='.$currentuser->getID();
        $csrf_token   = generate_form_token($post_url);
   
        $form = '
            <form id="login" name="login" method="post" action="'.$post_url.'">
                <input type="hidden" name="form_sent" value="1" />
                <input type="hidden" name="redirect_url" value="'.$redirect_url.'" />
                <input type="hidden" name="csrf_token"   value="'.$csrf_token.'" />
                <input type="submit" name="submit" value="'.$dict->getDict( 'logout', 'login').'">
            </form>';
   
        return $form;
    }

2

(5 replies, posted in PunBB 1.3 discussion)

that doesn't help

Thank you quaker! That helped me much, it works very great!

Hi and thanks for your answer. I'm also using pun 1.2 and I integrated it into my html/php pages. The structure is nearly the same:

/index.php
/cms/index.php (pun)


I just want to have something like a blog -> A page with the first posts (and headlines) of all threads in a category:


Headline (title of the thread in pun)
Post
....
Headline
Post
...
Headline
Post
...

quaker wrote:

sorta example:
http://bunpai.com/

How can I list any posts from a category like there? I want news on a page which are posted in the forum.

6

(5 replies, posted in PunBB 1.3 discussion)

Oh, I'm sorry, here is the message:

Confirm action
Please confirm or cancel your last action

Unable to confirm security token. A likely cause for this is that some time passed between when you first entered the page and when you submitted a form or clicked a link. If that is the case and you would like to continue with your action, please click the Confirm button. Otherwise, you should click the Cancel button to return to where you were.

[ Confirm ]        [ Cancel ]

Sometimes == I'm not sure cause I cannot reproduce it. It happens often, I think after the first visit (or successfully login and logout) of a page.

7

(5 replies, posted in PunBB 1.3 discussion)

$redirect_url = $_SERVER['REQUEST_URI'];
        $post_url     = forum_link('login.php');
        $csrf_token   = generate_form_token($post_url);

$form = '
            <form id="login" name="login" method="post" action="'.$post_url.'">
                <input type="hidden" name="form_sent" value="1" />
                <input type="hidden" name="redirect_url" value="'.$redirect_url.'" />
                <input type="hidden" name="csrf_token"   value="'.$csrf_token.'" />
                <input type="submit" name="submit" value="'.$dict->getDict( 'logout', 'login').'">
            </form>';

Where is the bug? The error is that the error message from the first post is displayed SOMETIMES when we log in.

8

(3 replies, posted in General discussion)

i found the mod. im now trying to change the urls in the rss feed.

// Edit:

wow great! it works. thank you!

9

(3 replies, posted in General discussion)

Hello,

I just have a question about opening a thread without loading header and footer:

I want to include threads from my punbb just into small ajax windows on a website. So if I click on an url to a thread (fetched by php or rss), there should be popup a window which shows the thread. This allready works but I allways have the header and footer - so much overhead.

I prefer a way like "forum/viewtopic.php?id=238?nolayout"

Any ideas?


Thank you very much

yes it is. I've sent you mail.

The quote above was not from my server..

I personally get only this:

File: /home/htdocs/web5/html/forum/install_mod.php
Line: 117

PunBB reported: Unable to copy .htaccess file to new subfolder with name '/home/htdocs/web5/html/forum/dateien/56366c992579fe1e49c928102aae5ce2'

safemode IS disabled

Yes, that was the error I noticed. Unable to copy htaccess .... blahw. Something like:

Warning: move_uploaded_file(): SAFE MODE Restriction in effect. The script whose uid is 636 is not allowed to access /srv/www/htdocs/web1/html/www/_pictures/user/1 owned by uid 30 in /srv/www/htdocs/web1/html/www/_class/classPictures.php on line 80

I dont know how it works on suPHP/EXEC/CGI, I'm running mod_php. But its wrong to believe that it works without safemode. I tried, but the problem is that the apache is owner of the files. That has nothing to do with safemode cause these other scripts have no problems with moving their files from the tmp dir of the vhost with safemode enabled. The problem is that the files have 0644 or 0600. If the file has 0644, php cant move, with or without safemode, if the apache is not in the same group as vhost.


I would thank you very much If you try some of the (small) solutions on php.net to extend the installer cause I cannot code php. If you want to code this, I can give you acess to a vhost environment on a server like this to test if you dont have.

Hello,

I'm new to the punBB board and the community. I have a few questions about this mod.

Is it compatible with 1.2.14?

I have a Debian server with php4 and a multi vhost architecture controlled by Confixx 3. The vhosts have php safe_mode on by default but I had no problems with many other scripts like Mediawiki, Wordpress, s9y or things like phpBB. Every vhosts has its own phptemp, htdocs and so on.

The only problem I announced is that every file which is uploaded by apache has www-user as owner so the scripts cant move the file to another directory if they dont run chown/chmod (or use any other solution which are listened on php.net)

I allready tried to install the mod but the installation script failed cause it couldnt move a file. If you can say that the script is compatible with the current punBB version, I will go to perform the installation again to get the error-messages.