Connorhd wrote:

what problem? Its not a problem with punbb, that people aren't too smart and don't read the instructions.

The converse could be true, when developers arn't smart enough to code....

Is EasyPoll verified to work with 1.2.7?

rgds

Si

Frank H wrote:

yep, I believe that should be correct

smile

Frank H wrote:

remember that you still have the quirks of 1.2.6 mentioned in this installation guide aswell

Followed, and installed now.  Thanks smile smile

rgds

Si

ross3093 wrote:

yea i upgraded to 1.2.7 an it worked

Thanks for the info.


Frank, in the readme.txt file, you have the following line:

index.htm to attachment-directory  (read the preparations above!)

no index.htm file exists, index.html does, however.  Is this the file its referring to?

rgds

Si

5

(2 replies, posted in PunBB 1.2 discussion)

Seen smile, and patched smile

Thanks

Hi,

Has this mod been verified with 1.2.7 yet?

Is this safe to do or should I install intermediate releases as well?

Rickard wrote:

Just so we're clear. "User unknown; rejecting" is the error from your mail server. You've simply supplied the wrong information.

No, my original message included the error code returned by the smtp server, the code is 550.  If you look here the description for err code 550 is "Requested action not taken: mailbox unavailable." i.e. User unknown.

PHP, like I said is not my forté, however looking at the code in email.php you have a function smtp_mail, this method frequently makes calls to another function "server_parse" looking for a response code, if the expected response code is not found it raises an exception, e.g.

    if (!(substr($server_response, 0, 3) == $expected_response))
        error('Unable to send e-mail. Please contact the forum administrator with the following error message reported by the SMTP server: "'.$server_response.'"', __FILE__, __LINE__);

Which is the adzact error I have been receiving.

if you expand the code in smtp_mail function, from:

    fwrite($socket, 'Subject: '.$subject."\r\n".$to_header."\r\n".$headers."\r\n\r\n".$message."\r\n");

    fwrite($socket, '.'."\r\n");
    server_parse($socket, '250');

you could add an extra check to see if the email account it is trying to send to is valid, prior to checking for ok message, something like:

    fwrite($socket, 'Subject: '.$subject."\r\n".$to_header."\r\n".$headers."\r\n\r\n".$message."\r\n");

        if (IsValidEmailAddress($socket))
        {
           // email address is invalid, can't send email
           return (false);        
        }

    fwrite($socket, '.'."\r\n");
    server_parse($socket, '250');

this would require a new function to check if email address is valid, something like:

function IsValidEmailAddress($socket)
{
    $server_response = '';
    while (substr($server_response, 3, 1) != ' ')
    {
        if (!($server_response = fgets($socket, 256)))
            error('Couldn\'t get mail server response codes. Please contact the forum administrator.', __FILE__, __LINE__);
    }

    return(!(substr($server_response, 0, 3) == '550');
}

I am not trying to be awkward, honestly smile, I thought I was reporting a genuine bug, which is:

when "verify registrations" is on, and the email address is obviously invalid (returns err code 550), then the account which has been created will never be able to be verified and should be deleted. 

This might help eliminate bogus sign-ups, which I, and others (like in this post) have been receiving lately.

btw, I have not tried compiling/running the above script.

kind regards

Si

Thinking about it a little further, I have the "verify registrations" options turned on, if an email can not be sent, especially as in the case of my error "User Unknown" then it will never verify, and shouldn't really create the account  or at the very least delete it afterwards.

I havn't dug too much into the code, but the parts of the code I read in register.php never used any sort of caching mechanism so as it could resend the email at a later time, if it fails initially.  That being said, my PHP scripting abilities are minimal smile

10

(2 replies, posted in PunBB 1.2 show off)

Connorhd wrote:

wow, descriptive post tongue

I don't believe in wasting words wink

However, its a (slighly moded) forum dedicated to Firebird RDBMS smile

11

(2 replies, posted in PunBB 1.2 show off)

URL Removed

keldar wrote:
CodeXP wrote:

I might be wrong here (don't think I am though), but that's the way it's supposed to work. The user account will be created no matter if it's a valid e-mail or not, but the user won't be able to use that account until logging in with the password supplied in the e-mail...

I can see where your coming from on this, but I fail to see the reason that someone can sign up with a duff address.  If they want to hide that address then its quite simple for them to do so.

TBH I added the "verify registrations" as some muppet kept signing in with duff emails, literally creating dozens of accounts. 

If this is not a bug, then perhaps a feature request could be made to only accept valid emails (optionally of course smile).

rgds

Si

I recently changed the signup options on my board by changing the "Verify registrations" to yes.  Now, when I test using an email address which is not valid, I get the following error:

Error: Unable to send e-mail. Please contact the forum administrator with the following error message reported by the SMTP server: "550 5.1.1  User unknown; rejecting ".

The user account is still created despite rejecting the address.

FYI I did a search through the forums but didn't find a workaround / fix to this possible issue.

rgds

Si

14

(24 replies, posted in Feature requests)

zaher wrote:

Is that mean stored procedure for every table?

Not always, only if you have multiple updates where things like the ID is required for the next update

15

(24 replies, posted in Feature requests)

zaher wrote:

WHen makeing a new topic PunBB make INSERT then get the id of topic for INSERT the post messge, in FB we must take the ID then make the 2 INSERTs that mean we must change the code not DBLayer.

Stored procedures, will solve this problem straight off.

16

(24 replies, posted in Feature requests)

If punbb does not have support for firebird soon I will have finished a new firebird based forum.  I would however prefer to have punbb support FB, but...

It wasn't that mod, it was the mod that allowed me to add polls to the board, thanks for the feedback and help smile

rgds

Thanks for the quick response. I have managed to fix the problem, however I am not sure wether the original problem is of my own making (I installed a poll) or inherant

I made two small changes to the board, they are

Changed option "User has posted earlier" to yes
Changed option "Quick post" to no

This, from my basic understanding of PHP changed the flow of execution within viewforum.php the following code shows..

// Fetch list of topics to display on this page
if ($pun_user['is_guest'] || $pun_config['o_show_dot'] == '0')
{
    // Without "the dot"
    //$sql = 'SELECT id, poster, subject, posted, last_post, last_post_id, last_poster, num_views, num_replies, closed, sticky, moved_to FROM '.$db->prefix.'topics WHERE forum_id='.$id.' ORDER BY sticky DESC, '.(($cur_forum['sort_by'] == '1') ? 'posted' : 'last_post').' DESC LIMIT '.$start_from.', '.$pun_user['disp_topics'];
    $sql = 'SELECT id, poster, subject, posted, last_post, last_post_id, last_poster, num_views, num_replies, closed, sticky, moved_to, question FROM '.$db->prefix.'topics WHERE forum_id='.$id.' ORDER BY sticky DESC, '.(($cur_forum['sort_by'] == '1') ? 'posted' : 'last_post').' DESC LIMIT '.$start_from.', '.$pun_user['disp_topics'];
}
else
{
    // With "the dot"
    switch ($db_type)
    {
        case 'mysql':
        case 'mysqli':
            $sql = 'SELECT p.poster_id AS has_posted, t.id, t.subject, t.poster, t.posted, t.last_post, t.last_post_id, t.last_poster, t.num_views, t.num_replies, t.closed, t.sticky, t.moved_to, t.question FROM '.$db->prefix.'topics AS t LEFT JOIN '.$db->prefix.'posts AS p ON t.id=p.topic_id AND p.poster_id='.$pun_user['id'].' WHERE t.forum_id='.$id.' OR t.announcement!=\'1\' GROUP BY t.id ORDER BY sticky DESC, '.(($cur_forum['sort_by'] == '1') ? 'posted' : 'last_post').' DESC LIMIT '.$start_from.', '.$pun_user['disp_topics'];
            break;

        case 'sqlite':
            $sql = 'SELECT p.poster_id AS has_posted, t.id, t.subject, t.poster, t.posted, t.last_post, t.last_post_id, t.last_poster, t.num_views, t.num_replies, t.closed, t.sticky, t.moved_to, t.question FROM '.$db->prefix.'topics AS t LEFT JOIN '.$db->prefix.'posts AS p ON t.id=p.topic_id AND p.poster_id='.$pun_user['id'].' WHERE t.id IN(SELECT id FROM '.$db->prefix.'topics WHERE forum_id='.$id.' OR announcement!=\'1\' ORDER BY announcement DESC, sticky DESC, '.(($cur_forum['sort_by'] == '1') ? 'posted' : 'last_post').' DESC LIMIT '.$start_from.', '.$pun_user['disp_topics'].') GROUP BY t.id ORDER BY t.sticky DESC, t.last_post DESC';
            break;

        default:
            $sql = 'SELECT p.poster_id AS has_posted, t.id, t.subject, t.poster, t.posted, t.last_post, t.last_post_id, t.last_poster, t.num_views, t.num_replies, t.closed, t.sticky, t.moved_to, t.question FROM '.$db->prefix.'topics AS t LEFT JOIN '.$db->prefix.'posts AS p ON t.id=p.topic_id AND p.poster_id='.$pun_user['id'].' WHERE t.forum_id='.$id.' GROUP BY t.id, t.subject, t.poster, t.posted, t.last_post, t.last_post_id, t.last_poster, t.num_views, t.num_replies, t.closed, t.sticky, t.moved_to, t.question, p.poster_id ORDER BY sticky DESC, '.(($cur_forum['sort_by'] == '1') ? 'posted' : 'last_post').' DESC LIMIT '.$start_from.', '.$pun_user['disp_topics'];
            break;

    }
}

The problem as reported with debug info, was:

File: G:\Domains\fbtalk.net\wwwroot\viewforum.php
Line: 141

PunBB reported: Unable to fetch topic list

Database reported: Unknown column 't.announcement' in 'where clause' (Errno: 1054)

rgds and thanks for the debug mode pointer smile

When logged into my forum I get the following message when trying to view *ANY* forum.

Unable to fetch topic list.

When not logged in all appears ok.  I am using PUNBB v1.2.4 (I know there is a new version but am unable to upgrade at the moment). and using 

    Operating system: WINNT
    PHP: 5.0.1 - Show info
    Accelerator: N/A
    MySQL 4.0.22-nt
    Rows: 5350
    Size: 678.12 KB

Any help appreciated as this was working fine this morning.

rgds

20

(24 replies, posted in Feature requests)

This is where stored procedures come in to play, I am more than willing to help (on the FB side) if you want.

21

(24 replies, posted in Feature requests)

zaher wrote:

You can create DOMIAN in firebired as TEXT

More conflicts

- unbuffered_query not found
- you cant seek result as in mysql or sqllite or pgsql
- rows effected for "select" query not supported in firebird 1.5
- getting insert_id not found becuase there is no AUTO_INCREMENT field type in firebird we generate it before inserting a row by user firebird gen_id function (long story) pgsql has sequence number for each table retrive it by table name is easy but this idea not work because you can use one sequence (generator) for more than one, there is open request for retrive an insert_id when inserting but in firebird 2.0, not released yet.

I stoped here.

It might be worth asking some of these question on the FB-PHP list http://groups.yahoo.com/group/firebird-php

The autoinc is easily replicated, you can either grab the id using something like the following

SELECT GEN_ID(GeneratorName, 1) FROM RDB$DATABASE;

Or more typically use a stored procedure where you pass the input data in and it returns the id thats been generated.

rgds

Si

Connorhd wrote:

make one topic with a numbered list of requests and its Much easier for us

Point taken, feel free to delete the other topics

23

(2 replies, posted in Feature requests)

Would be nice (imo) if all links within topics were opened in a new window so users were not taken away from the current board.

24

(1 replies, posted in Feature requests)

It would be nice if the "Subscribe to this topic" check box was checked by default when submitting a new topic.  Perhaps allowing users to decide this through their profile settings somewhere.

... in a Forum.

For instance I might want to watch a complete forum for new posts (only new posts).