Modul whos_online Timeout weg und autom. Aktualisierung

Thema wurde von Steffen (indiv-style.de), 24. Januar 2013 erstellt.

  1. Steffen (indiv-style.de)

    Steffen (indiv-style.de) G-WARD 2013/14/15/16

    Mit dieser kleinen Erweiterung der whos_online.php kann man nun diese Seite automatisch aktualisieren lassen. Dafür stehen mehrere Butons mit Zeitvorgaben zur Verfügung.

    whos_online.jpg

    Diskusionsbereich:
    http://www.gambio-forum.de/threads/464-Autologoff

    Einfach die die beiden Ordner admin und lang aus der Angehängten ZIP ins root kopieren.
    Getestet in V2.0.10g und V2.0.11.1

    Wer schon darin Änderungen hat, öffnet die Dateien mit einem Editor und sucht nach: Änderung indiv-style.de

    Daten vorher sichern!!!! Viel Spas damit!

    Edit: Neue Funktion!

    Jetzt sieht man die Bots und per klick auf die IP wo wer herkommt!


    googlebot.jpg

     

    Anhänge:

    Zuletzt bearbeitet: 24. Januar 2013
  2. Anonymous

    Anonymous G-WARD 2015/2016

    Hallo Steffen

    Super Idee, ich hatte zwar schon irgendetwas installiert, war aber verbesserungswürdig.
    Habe die Dateien komplett überspielt, allllllllllle Caches geleert und nix passiert.
    Kann das evtl. an der Modifikation durch Avengers admin_menü liegen?

    ----------------------------------------------------------------------------------------

    Vergiss es, hatte die Dateien in den Testshop überspielt :)
     
  3. Steffen (indiv-style.de)

    Steffen (indiv-style.de) G-WARD 2013/14/15/16

    Das kann sein, aber die Antwort kann nur Avenger selbst geben, da ich mich mit dem Menü nicht weiter beschäftigt habe. Ich habs jetzt in 36 Kundenshops reingetackert und keine Probleme damit. Haben aber alle nicht das Menü!!!
     
  4. jox

    jox G-WARD 2012

    Sehr gute Einrichtung von Steffen.
    Zusätzlich habe ich noch das mit den IPs (siehe: hier) von HolgerNils eingepflegt. - Und funktioniert!
     
  5. Steffen (indiv-style.de)

    Steffen (indiv-style.de) G-WARD 2013/14/15/16

    Ja, das ist gut! Ich hab das so gelöst:

    suche inder whos_online.php nach:

    PHP:
    //EOF_GM_MOD
        
    if ($whos_online['session_id'] == $info) {
          echo 
    '              <tr class="dataTableRowSelected">' . "\n";
        } else {
          echo 
    '              <tr class="dataTableRow" onmouseover="this.className=\'dataTableRowOver\';this.style.cursor=\'hand\'" onmouseout="this.className=\'dataTableRow\'" onclick="document.location.href=\'' . xtc_href_link(FILENAME_WHOS_ONLINE, xtc_get_all_get_params(array('info', 'action')) . 'info=' . $whos_online['session_id'], 'NONSSL') . '\'">' . "\n";
        }
    füge darunter ein:

    PHP:
                    if (ereg("googlebot", gethostbyaddr($whos_online['ip_address'])))            $whos_online['full_name'] = "<strong><i>[Bot] Googlebot</i></strong>";
                    if (
    ereg("yahoo.", gethostbyaddr($whos_online['ip_address'])))                $whos_online['full_name'] = "<strong><i>[Bot] Yahoo</i></strong>";
                    if (
    ereg("msnbot", gethostbyaddr($whos_online['ip_address'])))                $whos_online['full_name'] = "<strong><i>[Bot] MSM Bot</i></strong>";
                    if (
    ereg("ia_archiver", gethostbyaddr($whos_online['ip_address'])))            $whos_online['full_name'] = "<strong><i>[Bot] Alexa</i></strong>";
                    if (
    ereg("crawl.baidu.com", gethostbyaddr($whos_online['ip_address'])))        $whos_online['full_name'] = "<strong><i>[Bot] Baidu China</i></strong>";
                    if (
    ereg("bingbot/", gethostbyaddr($whos_online['ip_address'])))            $whos_online['full_name'] = "<strong><i>[Bot] Bingbot</i></strong>";
                    if (
    ereg("msnbot-media/", gethostbyaddr($whos_online['ip_address'])))        $whos_online['full_name'] = "<strong><i>[Bot] MSNbot Media</i></strong>";
                    if (
    ereg("Mediapartners-Google", gethostbyaddr($whos_online['ip_address'])))$whos_online['full_name'] = "<strong><i>[Bot] Google Adsense</i></strong>";
                    if (
    ereg("Exabot/", gethostbyaddr($whos_online['ip_address'])))                $whos_online['full_name'] = "<strong><i>[Bot] Exabot</i></strong>";
                    if (
    ereg("MJ12bot/", gethostbyaddr($whos_online['ip_address'])))            $whos_online['full_name'] = "<strong><i>[Bot] Majestic-12</i></strong>";
                    if (
    ereg("Speedy Spider", gethostbyaddr($whos_online['ip_address'])))        $whos_online['full_name'] = "<strong><i>[Bot] Speedy Spider</i></strong>";
                    if (
    ereg("ichiro/", gethostbyaddr($whos_online['ip_address'])))                $whos_online['full_name'] = "<strong><i>[Bot] ichiro</i></strong>";
                    if (
    ereg("AdsBot-Google", gethostbyaddr($whos_online['ip_address'])))        $whos_online['full_name'] = "<strong><i>[Bot] GoogleAds</i></strong>";
                    if (
    ereg("Gigabot/", gethostbyaddr($whos_online['ip_address'])))            $whos_online['full_name'] = "<strong><i>[Bot] Gigabot</i></strong>";
                    if (
    ereg("W3C_*Validator", gethostbyaddr($whos_online['ip_address'])))        $whos_online['full_name'] = "<strong><i>[Validator] W3C</i></strong>";
                    if (
    ereg("TurnitinBot/", gethostbyaddr($whos_online['ip_address'])))        $whos_online['full_name'] = "<strong><i>[Bot] TurnitinBot</i></strong>";
                    if (
    ereg("msnbot/", gethostbyaddr($whos_online['ip_address'])))                $whos_online['full_name'] = "<strong><i>[Bot] MSN</i></strong>";
    suche nach:

    PHP:
    ?>
                <td class="smallText"><?php echo gmdate('H:i:s', $time_online); ?></td>
                <td class="smallText" align="left"><?php echo $whos_online['customer_id']; ?></td>
                <td class="smallText"><?php echo $whos_online['full_name']; ?></td>
                <td class="smallText" align="left"><?php echo $whos_online['ip_address']; ?></td>
                <td class="smallText"><?php echo date('H:i:s', $whos_online['time_entry']); ?></td>
                <td class="smallText" align="left"><?php echo date('H:i:s', $whos_online['time_last_click']); ?></td>
              </tr>
      <?php
    ersetze mit:

    PHP:
    ?>
                <td class="smallText"><?php echo gmdate('H:i:s', $time_online); ?></td>
                <td class="smallText" align="left"><?php echo $whos_online['customer_id']; ?></td>
                <td class="smallText"><?php echo $whos_online['full_name']; ?></td>
                <td class="smallText" align="left"><?php echo "<a href='http://www.ip-adress.com/ip_lokalisieren/".$whos_online['ip_address']."' target='_blank' title='".gethostbyaddr($whos_online['ip_address'])."'>".$whos_online['ip_address']."</a>"; ?></td>
                <td class="smallText"><?php echo date('H:i:s', $whos_online['time_entry']); ?></td>
                <td class="smallText" align="left"><?php echo date('H:i:s', $whos_online['time_last_click']); ?></td>
              </tr>
      <?php
    Ergebnis:

    googlebot.jpg

    Da hast du auch die IP als Link und zusätzlich noch die Ansicht ob es Bots sind!
     

    Anhänge:

    Zuletzt bearbeitet: 24. Januar 2013
  6. jox

    jox G-WARD 2012

    Das ist jetzt aber nicht in der Download-Version schon drin, oder?
     
  7. Steffen (indiv-style.de)

    Steffen (indiv-style.de) G-WARD 2013/14/15/16

  8. jox

    jox G-WARD 2012

    Also die, die ich vorher ganz oben heruntergeladen habe?
     
  9. Steffen (indiv-style.de)

    Steffen (indiv-style.de) G-WARD 2013/14/15/16

    Nein da noch nicht aber die V1.1 schon! Kannste aber einfach drüberbügeln! ;)
     
  10. Steffen (indiv-style.de)

    Steffen (indiv-style.de) G-WARD 2013/14/15/16

    Habs oben mal aktualisiert!
     
  11. jox

    jox G-WARD 2012

    Noch besser - und Noch ein Danke!
     
  12. Steffen (indiv-style.de)

    Steffen (indiv-style.de) G-WARD 2013/14/15/16

    Naja, da geht noch mehr! Wenn ich div Bilder von Manfred mir anschaue, ist da nach oben hin noch viel Luft! ;)
     
  13. Dennis (MotivMonster.de)

    Dennis (MotivMonster.de) G-WARD 2013/14/15/16

    Manni bastelt ja auch den ganzen Tag..... :D
    Aber ja, kann man sicher noch einiges optimieren. Gerade was die schnelle Übersicht angeht bei Bestellungen, Artikeln usw. kann man sicher noch einiges an INfos dazupacken.
     
  14. Manni_HB

    Manni_HB G-WARD 2012/13/14/15

    Also wenn Du nur zwischen "Menschen" und "Bots" unterscheiden willst, dann füge doch mal in der "\inc\xtc_update_whos_online.inc.php" nach " $wo_full_name = 'Guest';" dies ein:
    PHP:
            if (xtc_check_agent())
              
    $wo_full_name = $_SERVER['HTTP_USER_AGENT'];
    Sind ein paar Programmzeilen weniger .. und auch nicht soooo schlecht - siehe Bild.
     

    Anhänge:

  15. Steffen (indiv-style.de)

    Steffen (indiv-style.de) G-WARD 2013/14/15/16

    Dat geht net!?!?! Fehlt da noch was???
     
  16. Manni_HB

    Manni_HB G-WARD 2012/13/14/15

    Was Du auch immer merkst! :cool:
    Hier der ganze Bereich:
    PHP:
          $wo_customer_id = '';
          
    $wo_full_name = 'Guest';
    //    ##################################### BOF[001] ############################
            
    if (xtc_check_agent())
              
    $wo_full_name = $_SERVER['HTTP_USER_AGENT'];
    //    ##################################### BOF[001] ############################
        
    }

        
    $wo_session_id = xtc_session_id();
     
  17. Steffen (indiv-style.de)

    Steffen (indiv-style.de) G-WARD 2013/14/15/16

    Nö, auch da nix??? :confused::confused::confused:
     
  18. jox

    jox G-WARD 2012

    Bei mir taucht u. a. die IP 66.249.81.159 auf und das ist auch Google. Doch wird es nicht als Bot angezeigt.
    Was muß ich machen, dass dies auch fett als Bot angezeigt wird?

    Genauso ziemlich oft die IP 141.8.147.11 irgendwas russisches.
     
    Zuletzt bearbeitet: 25. Januar 2013
  19. jox

    jox G-WARD 2012

    Hallo Steffen,
    Die IP 66.249.81.159 kommt auch von Google und taucht ziemlich oft auf.
    Leider kann ich den Host nicht identifizieren.
    Was muß ich eintragen, damit das bei Whos_online auch als Googlebot gekennzeichnet wird?

    Kannst Du mir helfen?
     
  20. Steffen (indiv-style.de)

    Steffen (indiv-style.de) G-WARD 2013/14/15/16

    du musst nur diesen Bereich erweitern!

    PHP:
                    if (ereg("googlebot", gethostbyaddr($whos_online['ip_address'])))            $whos_online['full_name'] = "<strong><i>[Bot] Googlebot</i></strong>";
                    if (
    ereg("yahoo.", gethostbyaddr($whos_online['ip_address'])))                $whos_online['full_name'] = "<strong><i>[Bot] Yahoo</i></strong>";
                    if (
    ereg("msnbot", gethostbyaddr($whos_online['ip_address'])))                $whos_online['full_name'] = "<strong><i>[Bot] MSM Bot</i></strong>";
                    if (
    ereg("ia_archiver", gethostbyaddr($whos_online['ip_address'])))            $whos_online['full_name'] = "<strong><i>[Bot] Alexa</i></strong>";
                    if (
    ereg("crawl.baidu.com", gethostbyaddr($whos_online['ip_address'])))        $whos_online['full_name'] = "<strong><i>[Bot] Baidu China</i></strong>";
                    if (
    ereg("bingbot/", gethostbyaddr($whos_online['ip_address'])))            $whos_online['full_name'] = "<strong><i>[Bot] Bingbot</i></strong>";
                    if (
    ereg("msnbot-media/", gethostbyaddr($whos_online['ip_address'])))        $whos_online['full_name'] = "<strong><i>[Bot] MSNbot Media</i></strong>";
                    if (
    ereg("Mediapartners-Google", gethostbyaddr($whos_online['ip_address'])))$whos_online['full_name'] = "<strong><i>[Bot] Google Adsense</i></strong>";
                    if (
    ereg("Exabot/", gethostbyaddr($whos_online['ip_address'])))                $whos_online['full_name'] = "<strong><i>[Bot] Exabot</i></strong>";
                    if (
    ereg("MJ12bot/", gethostbyaddr($whos_online['ip_address'])))            $whos_online['full_name'] = "<strong><i>[Bot] Majestic-12</i></strong>";
                    if (
    ereg("Speedy Spider", gethostbyaddr($whos_online['ip_address'])))        $whos_online['full_name'] = "<strong><i>[Bot] Speedy Spider</i></strong>";
                    if (
    ereg("ichiro/", gethostbyaddr($whos_online['ip_address'])))                $whos_online['full_name'] = "<strong><i>[Bot] ichiro</i></strong>";
                    if (
    ereg("AdsBot-Google", gethostbyaddr($whos_online['ip_address'])))        $whos_online['full_name'] = "<strong><i>[Bot] GoogleAds</i></strong>";
                    if (
    ereg("Gigabot/", gethostbyaddr($whos_online['ip_address'])))            $whos_online['full_name'] = "<strong><i>[Bot] Gigabot</i></strong>";
                    if (
    ereg("W3C_*Validator", gethostbyaddr($whos_online['ip_address'])))        $whos_online['full_name'] = "<strong><i>[Validator] W3C</i></strong>";
                    if (
    ereg("TurnitinBot/", gethostbyaddr($whos_online['ip_address'])))        $whos_online['full_name'] = "<strong><i>[Bot] TurnitinBot</i></strong>";
                    if (
    ereg("msnbot/", gethostbyaddr($whos_online['ip_address'])))                $whos_online['full_name'] = "<strong><i>[Bot] MSN</i></strong>";
                    if (
    ereg("Google /", gethostbyaddr($whos_online['ip_address'])))            $whos_online['full_name'] = "<strong><i>[Bot] Google </i></strong>";
                    if (
    ereg("YandexBot/", gethostbyaddr($whos_online['ip_address'])))            $whos_online['full_name'] = "<strong><i>[Bot] Yandex  </i></strong>";
                    if (
    ereg("Pixray-Seeker/", gethostbyaddr($whos_online['ip_address'])))            $whos_online['full_name'] = "<strong><i>[Bot] Pixray </i></strong>";