[RC] phpBB Statistics v1.0.2

In diesem Forum können Mod-Autoren ihre Mods vorstellen, die sich noch im Entwicklungsstatus befinden. Der Einbau in Foren im produktiven Betrieb wird nicht empfohlen.
Forumsregeln
phpBB 3.0 hat das Ende seiner Lebenszeit überschritten
phpBB 3.0 wird nicht mehr aktiv unterstützt. Insbesondere werden - auch bei Sicherheitslücken - keine Patches mehr bereitgestellt. Der Einsatz von phpBB 3.0 erfolgt daher auf eigene Gefahr. Wir empfehlen einen Umstieg auf die neuste phpBB-Version, welches aktiv weiterentwickelt wird und für welches regelmäßig Updates zur Verfügung gestellt werden.
Benutzeravatar
marc1706
phpBB.com
Beiträge: 323
Registriert: 20.08.2008 11:11
Wohnort: München
Kontaktdaten:

Re: [RC] phpBB Statistics v1.0.1

Beitrag von marc1706 »

Wahrscheinlich erst Ende Februar, da ich jetzt dann Klausuren habe.
phpBB Lead Developer
Gast234254
Gesperrt
Beiträge: 1999
Registriert: 08.02.2009 22:58

Re: [RC] phpBB Statistics v1.0.1

Beitrag 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
Benutzeravatar
marc1706
phpBB.com
Beiträge: 323
Registriert: 20.08.2008 11:11
Wohnort: München
Kontaktdaten:

Re: [RC] phpBB Statistics v1.0.1

Beitrag 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:
phpBB Lead Developer
matteovice
Mitglied
Beiträge: 54
Registriert: 25.04.2006 08:30

Re: [RC] phpBB Statistics v1.0.1

Beitrag 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
Benutzeravatar
marc1706
phpBB.com
Beiträge: 323
Registriert: 20.08.2008 11:11
Wohnort: München
Kontaktdaten:

Re: [RC] phpBB Statistics v1.0.1

Beitrag 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;
} 
phpBB Lead Developer
matteovice
Mitglied
Beiträge: 54
Registriert: 25.04.2006 08:30

Re: [RC] phpBB Statistics v1.0.1

Beitrag 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
Benutzeravatar
marc1706
phpBB.com
Beiträge: 323
Registriert: 20.08.2008 11:11
Wohnort: München
Kontaktdaten:

Re: [RC] phpBB Statistics v1.0.1

Beitrag 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.
phpBB Lead Developer
sati
Mitglied
Beiträge: 11
Registriert: 17.03.2010 12:54

Re: [RC] phpBB Statistics v1.0.1

Beitrag 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
Benutzeravatar
Faust
Mitglied
Beiträge: 29
Registriert: 09.10.2005 18:43
Wohnort: Windorf
Kontaktdaten:

Re: [RC] phpBB Statistics v1.0.1

Beitrag von Faust »

Hast du eventuell in einer php Datei ein Leerzeichen vor dem '<?' ? Könnte möglich sein.
Benutzeravatar
marc1706
phpBB.com
Beiträge: 323
Registriert: 20.08.2008 11:11
Wohnort: München
Kontaktdaten:

Re: [RC] phpBB Statistics v1.0.1

Beitrag von marc1706 »

Es scheint so als ob seine Hosting Lösung den Fehler verursacht, mehr weiß ich allerdings auch noch nicht.
phpBB Lead Developer
Antworten

Zurück zu „[3.0.x] Mods in Entwicklung“