26

(7 replies, posted in General discussion)

And they don't use proxy or have other software installed?
Do they have their own internal DNS's that perhaps doesn't update correctly?

27

(3 replies, posted in General discussion)

I believe they measure it in weight/m2 paper.
Check out your local supplystore and have a look at the regular A4 printerpaper, usually 60 grams, might be 80 grams too.

EDIT: Check this link out http://www.tinyprints.com/thicknessandweight.htm
I use 80grams paper for my laser printer. With my printer it makes a fine result.

28

(15 replies, posted in Programming)

i'm not sure i entierly understand your question either but i'll give it a go anyways:
If you need something in download.php to fiddle with the uploaded file  you should look at php's filehandler here http://se2.php.net/manual/en/features.file-upload.php

Cold hard SEK cash in paperform via snailmail? smile

Yes, when i wrote this the version was 1.something.

Try this:
Replace

    if ($NUM == "1")
    {
        print("Username & Password Verified");
    }
    else
    {
        print("Username/Password Combo not found.");
    }

with

    if ($NUM == "1")
    {    // Username found
        if (strlen($ROW->password) == 32)
        { // Check against md5
            if ($ROW->password == md5(trim($_POST['password'])))
            { // Password match md5-hash
                print("Password Verified md5");
            }
            else
            {
                print("Password does not match.");
            }
        }
        elseif (strlen($ROW-password) == 40)
        { // Check against sha1
            if ($ROW->password == sha1(trim($_POST['password'])))
            { // Password match sha1
                print("Password Verified sha1");
            }
            else
            {
                if (function_exists(sha1))
                { // sha1 function exist, but password does not match.
                    print("Password does not match.");
                }
                else
                { // sha1 does not exist. user need to request new password
                    print("Password algorithm is wrong. Please request a new password via [link].");
                }
            }
        }
        else
        {
            print("Something bad happend. Catch the error here.");
        }
    }
    else
    {
        print("Username not found.");
    }

I -think- that code block should check if the returned password is 32 or 40 long, and the compare it to the provided password in the correct manner (ie: checking where to compare it).
It should also warn if the sha1 is not available if the stored password is 40 long.

Any inputs on this Rickard?

I would be interested in 2xQ-PAD® Large: 250 x 190mm
The backside of my two collegueblocks is really starting to wear out...
Or hmm...they are kinda already worn out...
Oh, btw, i'm on my 3:rd or 4:th set of blocks already big_smile

I suspected that, but wasn't sure.
Maybe write a little note or something about it in the installfile at the end?

What if the other way around?
all is stored in SHA1, but the moves to another host with only md5.

I'm not familiar with sha1 tho.

34

(180 replies, posted in PunBB 1.2 troubleshooting)

How about a compromise; strip out the http[,s]:// when doing the referer-check?

Or forcibly put in place (checking to see if there is a http or https first naturally) when installing/updating the base url so it will always be there is the user forgets to set it( or doesn't think it's needs to be there smile...

Just though i'd shine some light on the matter for future updates.

35

(180 replies, posted in PunBB 1.2 troubleshooting)

I set my Base Url to exactly 'forum.nonet.org' - without http:// and it gives me Bad Referer in some admin-operations but not all (Managing categories is one where it gives me bad ref)

In include/functions.php

function confirm_referer($script)
{
    global $pun_config, $lang_common;

    if (!preg_match('#^'.preg_quote($pun_config['o_base_url'].'/'.$script, '#').'#i', $_SERVER['HTTP_REFERER']))
        message($lang_common['Bad referer']);
}

Why not try a substr for http:// or https:// and strip them out of both http-referer and base url if present?

36

(8 replies, posted in PunBB 1.2 bug reports)

The Admin password fields are text-fields instead of password-type fileds.

This an oversight or by design?

Bear in mind that xml/xslt/sablotron is not available on every webhost when designing the solution which it may be.

It shouldn't be so difficult if you look in the post.php-file and examine what it calls in the post-form element and just send that info directly to the db when posting your news.

39

(93 replies, posted in PunBB 1.2 discussion)

I don't normally use textbased only browsers other when i'm on remote sshlocation and needs something downloaded etc, but i wanted to bring it up anyways so all areas get their fair part of voices if a switch to css is made...

40

(93 replies, posted in PunBB 1.2 discussion)

Anyone knows how a CSS-base layout looks in browsers available on the unix platform?
NS, Mozilla, FB, Opera, Konqueror
and text-based browsers like
Lynx, Links, Arena, w3
?

Cuz Pun is a good forum suited for text-based browsers due to it's simplicity and lightweightness.

41

(7 replies, posted in Programming)

I've worked out a pretty good usage of constants vs variables for certain configitems like dbhost, username etc

42

(6 replies, posted in PunBB 1.2 discussion)

But yeah, i think sqlite is a nice addition for smaller sites and projects even tho i seriously doubt anyone with an evolving bigger site/commynity use it due to it's non-advanceness (such a word smile.

But for a slick forum of this size, why not.

43

(6 replies, posted in PunBB 1.2 discussion)

What i ment with powerful, is what the db can do apart from the standard operations like inserts, updates etc.
What comes into mind is triggers, sp, views etc when the SQLite fallws somewhat behind.

I'v a script on my server for comparison (Similar to Test 15):
PG 7.3.4 (default install), P200mmx, 64mb ram, ata66 hd.
PHP Script does the following:
Drop Table if exist;
create table and fields;
opens and reads a csv-file and does an INSERT for each line.
24172 lines, total 1.3mb data
Close csv file and exit.

Operation takes about 20sec or around there.

I have no way of testing sqlite on that machine at the moment.

44

(6 replies, posted in PunBB 1.2 discussion)

Pros:
It's bundled with PHP5.

It uses a file in a location you specify

You can use SQLite on any server that has PHP5, but no other db like PG or MYsql.

DB-file is easily movable. Just shutdown your website, zip up all files, move to new location, unzip and you're ready to go.


Cons:
What i've seen and used it; it's nowhere near as powerful as a "real" db like MY or PG.

SQLite querys puts som extra load on the php-engine as it's bundled with php, and not a standalone app like my or pg.

If you touch(move, copy etc) the file while a SQL-operation is active, you can corrupt the db-file (so make sure to halt your website while you perform backups etc)



Anything else i've missed?

45

(5 replies, posted in General discussion)

It doesnät, what i mean is, if the format changes between versions, the lang-packs should be versionized (funny word) so ppl know that for instance lan->.zip is for v1.0.1 and not for v1.1 etc.

It's basiclly come down to this; if someone wants a pack in their lang, and it's not available, they either use the default, or translate it themself.

Don't wanna step on anyones toes here, but if there is a base template, translations will come smile

46

(5 replies, posted in General discussion)

Or you could put a tag with the intended pun-version alongside the language-file (so you have one lang_1.0.1.se and one lang_1.1.se). Not everyone may want to upgrade to latest version if they made extensive mods to the old one etc.

47

(4 replies, posted in Programming)

Yes, it's a little clearer, it's actually almost a text-book example from a java-tutorial about class-inheritance, which i still have some headace trying to iron out =/

I get the general picture of how to use them, now i just need to figure out what parts goes together etc...

48

(4 replies, posted in Programming)

I'm not entierly sure i understand why this would be better or different then using the oldfashion:
$one = new One();
$two = new Two();

and working with those...

49

(4 replies, posted in Programming)

In a few programs i've seen simliar to these (in the jpgraph gd lib among others):

$var->anothervar->more->setHeadline('blah');

What are they and how do i use them and for what?

The only thing i can relate to with this is the dotted format that java use:
system.out.println("test")
for instance...

any clarifications?

50

(4 replies, posted in Programming)

Yeah, that is something i did have at first, but didn't know how to make the sql-statements correctly.
But now i will make only one bank-table with types instead.
More Q's will no doubt surface during development.

Thanks