Menu

#1003 Enhancement to Recent Changes

open
nobody
None
5
2008-06-28
2008-06-28
Wes Groleau
No

1. Add change lang.en.php as follows:

$pgv_lang["recent_changes_one"] = "<b>#pgv_lang[temp_num]# change in the last #pgv_lang[global_num1]# days</b><br />";
$pgv_lang["recent_changes_some"] = "<b>#pgv_lang[temp_num]# changes in the last #pgv_lang[global_num1]# days</b><br />";

2. lang.es.php could be

$pgv_lang["recent_changes_one"] = "<b>#pgv_lang[global_num1]# cambio habido en los últimos #pgv_lang[global_num1]# días</b><br />";
$pgv_lang["recent_changes_some"] = "<b>#pgv_lang[global_num1]# cambios habidos en los últimos #pgv_lang[global_num1]# días</b><br />";

3. recent_changes.php would get

// Print block content
$content = "";
$pgv_lang["global_num1"] = $config["days"]; // Make this visible
$pgv_lang["temp_num"] = count($found_facts);
if (count($found_facts)==0) {
$content .= print_text("recent_changes_none",0,1);
} else {

if (count($found_facts)==0)
$content .= print_text("recent_changes_one",0,1);
else $content .= print_text("recent_changes_some",0,1);

// sortable table
require_once("includes/functions_print_lists.php");
ob_start();
print_changes_table($found_facts);
$content .= ob_get_clean();
}

4. Remove the "### Names" from the bottom of the table. (It's wrong, anyway. It counts the number of level zero records that have had one or more changes, NOT the number of names associated with those records.)

If the code is hard to read in tracker, I have attached the files that are actually working on http://UniGen.us/PGV

Discussion

  • Wes Groleau

    Wes Groleau - 2008-06-28
     
  • Anonymous

    Anonymous - 2008-06-28

    Logged In: YES
    user_id=1910459
    Originator: NO

    Wes can you explain what 1-3 are about / supposed to achieve. I can't open your attachment, and can't see the point from whats written here (probably being dumb today)

     
  • Wes Groleau

    Wes Groleau - 2008-06-28

    Logged In: YES
    user_id=1537714
    Originator: YES

    On Mac/BSD/Linux/Unix, open the attachment with
    mkdir temp
    cd temp
    tar xfz PGV_recent.tgz

    On Windows, WinZip nows how to open it.

    If you go to http://UniGen.us/PGV/ and look at the third block down, you will see
    "33 changes in the last 30 days"

    Without this change, that would always be one of
    No changes made within the last 30 days
    Changes made within the last 30 days

    With this change, there are three possibilities:
    No changes in the last 30 days
    1 change in the last 30 days
    (#) changes in the last 30 days

    Section 2 is the Spanish equivalent of the same. I am not sufficiently fluent in other languages, though chances are I could get it right in French/Italian/Portuguese.

    Too bad this #$%&$%^& tracker doesn't allow us to post readable code!

    And since this makes the top correctly describe the contents, the wrong description at the bottom can be removed.

     

Log in to post a comment.