SamTodo 1.2 making headway

1.2 is not dead! Last night I made some good progress.

Some of the features you will see in 1.2:

  • Multiple-user system
  • Cookie-remembered logins
  • Installation script
  • Language pack support, initially with French, German, Portuguese, and Spanish
  • An in-application configuration page
  • Tasks now have date selection with pop-up calendar

Development screenshots:

Continue reading

How to quickly add another user to SamTodo 1.1

I realize I have been taking my time with SamTodo 1.2, so here is a little something you can do until multi-user support becomes native.
Note: Please backup everything (including your database) before trying this!

STEP 1

EDIT _model\global\act_config.php

Add an $account_name2, and $account_password2 underneath the originals so it looks something like this:

1
2
3
4
5
6
// SamTodo login information
$account_name = "sam";
$account_password = "password";
 
$account_name2 = "sam2";
$account_password2 = "password2";
// SamTodo login information
$account_name = "sam";
$account_password = "password";

$account_name2 = "sam2";
$account_password2 = "password2";

STEP 2

EDIT _model\account\act_login.php

Change line 13 to 25 from:

1
2
3
4
5
6
7
8
9
10
11
12
13
if(($_REQUEST["accountName"] == $account_name) && ($_REQUEST["accountPassword"] == $account_password)) {
 
// establish their ID and name as session variables for use elsewhere
$_SESSION["accountID"]   = "00000000-0000-0000-0000-000000000000"; // account ID's will be used in a later release
$_SESSION["accountName"] = $account_name;
 
// redirect to main
header( "Location: " . $root_path . "main.default" );
}
else
{
$error = 1;
}
if(($_REQUEST["accountName"] == $account_name) && ($_REQUEST["accountPassword"] == $account_password)) {

// establish their ID and name as session variables for use elsewhere
$_SESSION["accountID"] 	 = "00000000-0000-0000-0000-000000000000"; // account ID's will be used in a later release
$_SESSION["accountName"] = $account_name;

// redirect to main
header( "Location: " . $root_path . "main.default" );
}
else
{
$error = 1;
}

To:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
        if(($_REQUEST["accountName"] == $account_name) && ($_REQUEST["accountPassword"] == $account_password)) {
            // establish their ID and name as session variables for use elsewhere
            $_SESSION["accountID"]      = "00000000-0000-0000-0000-000000000000"; // account ID's will be used in a later release
            $_SESSION["accountName"] = $account_name;
 
            // redirect to main
            header( "Location: " . $root_path . "main.default" );
        }
        elseif (($_REQUEST["accountName"] == $account_name2) && ($_REQUEST["accountPassword"] == $account_password2)) {
            // establish their ID and name as session variables for use elsewhere
            $_SESSION["accountID"]      = "00000000-0000-0000-0000-000000000001"; // account ID's will be used in a later release
            $_SESSION["accountName"] = $account_name2;
 
            // redirect to main
            header( "Location: " . $root_path . "main.default" );
        }
        else
        {
            $error = 1;
        }
        if(($_REQUEST["accountName"] == $account_name) && ($_REQUEST["accountPassword"] == $account_password)) {
            // establish their ID and name as session variables for use elsewhere
            $_SESSION["accountID"]      = "00000000-0000-0000-0000-000000000000"; // account ID's will be used in a later release
            $_SESSION["accountName"] = $account_name;

            // redirect to main
            header( "Location: " . $root_path . "main.default" );
        }
        elseif (($_REQUEST["accountName"] == $account_name2) && ($_REQUEST["accountPassword"] == $account_password2)) {
            // establish their ID and name as session variables for use elsewhere
            $_SESSION["accountID"]      = "00000000-0000-0000-0000-000000000001"; // account ID's will be used in a later release
            $_SESSION["accountName"] = $account_name2;

            // redirect to main
            header( "Location: " . $root_path . "main.default" );
        }
        else
        {
            $error = 1;
        }

Continue reading