Seite 22 von 29

Re: [RC] phpBB Statistics v1.0.1

Verfasst: 24.01.2010 17:08
von marc1706
Wahrscheinlich erst Ende Februar, da ich jetzt dann Klausuren habe.

Re: [RC] phpBB Statistics v1.0.1

Verfasst: 24.01.2010 17:45
von Gast234254
marc1706 hat geschrieben:Öffne install/install_functions.php
Finde:
....
Danach den Installer öffnen, und auf Uninstall klicken und das ganze durchlaufen. Danach kannst du dann die Installation noch einmal durchführen.
habe das gemacht und bekomme bei neu installieren diese Fehlermeldung

Code: Alles auswählen

Allgemeiner Fehler
SQL ERROR [ mysqli ]

Duplicate entry '[/size' for key 1 [1062]

SQL

INSERT INTO phpbb_stats_bbcodes (bbcode, bbcode_count) VALUES ('[/size', 237)

BACKTRACE

FILE: includes/db/mysqli.php
LINE: 163
CALL: dbal->sql_error()

FILE: install/install_functions.php
LINE: 414
CALL: dbal_mysqli->sql_query()

FILE: install/install_install.php
LINE: 275
CALL: overall_bbcode_smiley_count()

FILE: install/install_install.php
LINE: 77
CALL: install_install->obtain_advanced_settings()

FILE: install/index.php
LINE: 252
CALL: install_install->main()

FILE: install/index.php
LINE: 53
CALL: module->load()
Gruß
Stephan

Re: [RC] phpBB Statistics v1.0.1

Verfasst: 11.02.2010 12:46
von marc1706
Entschuldigung, dich habe ich ja total vergessen.
Das sollte das Problem beseitigen:
Öffne statistics/includes/functions.php
Finde:

Code: Alles auswählen

        $bbcode_ary[] = array('bbcode' => '[/' . strtolower($bbcode_row['tag']) . ':', 'count' => 0); 
Ersetze mit:

Code: Alles auswählen

        //Make sure we don't get any duplicates
        if(!in_array(array('bbcode' => '[/' . strtolower($bbcode_row['tag']) . ':', 'count' => 0), $bbcode_ary))
        {
            $bbcode_ary[] = array('bbcode' => '[/' . strtolower($bbcode_row['tag']) . ':', 'count' => 0);
        } 
Öffne install/install_functions.php
Finde:

Code: Alles auswählen

        $bbcode_ary[] = array('bbcode' => '[/' . strtolower($bbcode_row['tag']) . ':', 'count' => 0); 
Ersetze mit:

Code: Alles auswählen

        //Make sure we don't get any duplicates
        if(!in_array(array('bbcode' => '[/' . strtolower($bbcode_row['tag']) . ':', 'count' => 0), $bbcode_ary))
        {
            $bbcode_ary[] = array('bbcode' => '[/' . strtolower($bbcode_row['tag']) . ':', 'count' => 0);
        } 
So, und jetzt noch eine kleine Vorschau der nächsten Version:
http://www.m-a-styles.de/gallery/image_ ... image_id=5

Falls man die Add-Ons im ACP konfigurieren kann, erscheint dann rechts auch noch 'Einstellungen'. :wink:

Re: [RC] phpBB Statistics v1.0.1

Verfasst: 03.04.2010 14:15
von matteovice
Der Mod funktioniert perfekt.

allerdings habe ich ein kleines Problem.

Bei "Groups and their membership counts" werden die Mitglieder leider nur gezählt wenn diese sich in einer Hauptgruppe bzw. Sytemgruppe befinden. Alle anderen Gruppen werden somit mit "0" angegeben.

Bei mir befinden sich die Mitglieder aber in mehreren Gruppen gleichzeitig (man kann sie aber nur einer Hauptgruppe zuordnen). Was muss ich ändern, damit die Mitgliederzahl überall erscheint.

Gruß

Matthias

Re: [RC] phpBB Statistics v1.0.1

Verfasst: 03.04.2010 22:12
von marc1706
Also für die nächste Version wurde der Fehler beseitigt. Du kannst das selber berichtigen, indem du portal/includes/functions.php öffnest und die Funktion "get_total_members" komplett durch diesen Code ersetzt:

Code: Alles auswählen

/* function get_total_members --- gets the total member count and the group membership counts.
@param $return_total --- the byref var for returning the total member count
@param $groups_data --- contains data about the groups
*/
function get_total_members(&$return_total, $groups_data)
{
    global $db;
    $return_total = 0;
    $member_counts = array();
    
    //populate the $return_ary with basic group_ids
    foreach ($groups_data as $group_row)
    {        
        $member_counts[$group_row['group_id']] = array();        
    }
    
    //get all the users and increment the group counter    
    $sql = 'SELECT COUNT(ug.user_id) AS count, ug.group_id AS g_id, g.group_name AS g_name 
                FROM ' . USER_GROUP_TABLE . ' ug, ' . GROUPS_TABLE . ' g 
                WHERE ug.group_id = g.group_id
                    AND ug.user_id <> ' . ANONYMOUS . '
                GROUP BY ug.group_id, g.group_name';
    $result = $db->sql_query($sql);
    while ($current_group = $db->sql_fetchrow($result))
    {
        $member_counts[$current_group['g_id']] = $current_group['count'];
        $return_total += $current_group['count'];        
    }
    $db->sql_freeresult($result);
        
    return $member_counts;
} 

Re: [RC] phpBB Statistics v1.0.1

Verfasst: 06.04.2010 11:34
von matteovice
Hallo,

ich nehme an statistics/includes/functions.php ist gemeint.

Es funktioniert einwandfrei. Danke.

Jetzt möchte ich noch einmal separat genau diesen Teilbereich der Statistik in das Portal auf der linken Seite in einem neuen Block einbauen. Wie man einen neuen Block erstellt weiß ich.

Nur was muss ich exakt in die php-Datei dieses neuen Blocks einfügen? Ich habe einfach den o.a. code dort eingesetzt und eine passendes Template dazu erstellt. Das funktioniert aber nicht.

Gruß

Matthias

Re: [RC] phpBB Statistics v1.0.1

Verfasst: 06.04.2010 15:20
von marc1706
Ja, tut mir leid, das sollte natürlich statistics/includes/functions.php heißen.

Ich werde mir das mal ansehen wenn ich dazu komme.

Re: [RC] phpBB Statistics v1.0.1

Verfasst: 11.04.2010 21:58
von sati
Hi all,

ich bekomme folgenden Fehler, wenn ich auf die stats.php klicke:
[phpBB Debug] PHP Notice: in file /includes/functions_module.php on line 175: Invalid argument supplied for foreach()
[phpBB Debug] PHP Notice: in file /includes/functions_module.php on line 228: array_merge() [function.array-merge]: Argument #1 is not an array
[phpBB Debug] PHP Notice: in file /includes/functions_module.php on line 237: Invalid argument supplied for foreach()

Warning: Cannot modify header information - headers already sent by (output started at /xxx/xxx/xxxx/xxxx/xx/includes/functions.php:3581) in /xxx/xxx/xxxx/xxxx/xx/includes/functions.php on line 3631

Allgemeiner Fehler
Module not accessible
Ich suche mir einen Wolf seit Stunden aber finde die Lösung nicht.

Gruß
Sati

Re: [RC] phpBB Statistics v1.0.1

Verfasst: 14.04.2010 18:44
von Faust
Hast du eventuell in einer php Datei ein Leerzeichen vor dem '<?' ? Könnte möglich sein.

Re: [RC] phpBB Statistics v1.0.1

Verfasst: 14.04.2010 20:16
von marc1706
Es scheint so als ob seine Hosting Lösung den Fehler verursacht, mehr weiß ich allerdings auch noch nicht.