Willkommen Gast. Bitte Einloggen oder Registrieren
 
Sprache wählen:
 
 
Statistik Version 20 online.

  ÜbersichtHilfeSuchenEinloggenRegistrieren  
 
Seitenindex umschalten Seiten: 1
Thema versenden Drucken
Individueller Counter (Gelesen: 2871 mal)
BaerchenHH
YaBB Newbies
*
Offline



Beiträge: 31
Individueller Counter
28.01.17 um 22:57:42
 
Hallo liebe Wissende,

ich hab da mal ein Problem, und zwar möchte ich neben der Original counter.php (die ich so auf einer meiner Webseiten eingebunden habe) zusätzlich eine einfache Textversion haben, a la:

"Besucher heute: 1 • Tagesrekord: 95 • Gesamt: 20170• ..."

Also habe ich eine weitere Counterdatei (altcounter.php) erstellt und versucht diese entsprechend zu füllen (wobei ich die Wertevariablen aus der counter.php gezogen habe:
Code (PHP):
<?php

##### Einstellungen ###########################################################################

if ($_SESSION["language"] == "en") {
$txtonline = "Online: ";				// Text before the active number of visitors
$txttoday = "Visitor today: ";			// Text before the number of visitors of the today's daily
$txtyesterday = "Yesterday: ";			// Text before the number of visitors of the day before
$txtrecord = "Daily record: ";			// Text before the daily record
$txtweek = "Week: ";					// Text before the number of visitors this week
$txtlastweek = "Last week: ";			// Text before the number of visitors of the last week
$txtmonth = "Month: ";					// Text before the number of visitors in this month
$txtlastmonth = "Last month: ";			// Text before the number of visitors of the last month
$txtyear = "Year: ";					// Text before the number of visitors in this year
$txtlastyear = "Last year: ";			// Text before the number of visitors in the last year
$txtaverage = "Daily average: ";		// Text before the number of total visitors
$txttotal = "Total: ";					// Text before the number of total visitors
$txtpagestotal = "Page hits: ";			// Text before the hints
$dateform1 = "Y/m/d";
$dateform2 = "y/m/d";
}
else {

$txtonline = "Online: ";				// Text vor der aktiven Besucheranzahl
$txttoday = "Besucher heute: ";			// Text vor der Besucheranzahl des heutigen Tages
$txtyesterday = "Vortag: ";				// Text vor der Besucheranzahl des Vortages
$txtrecord = "Tagesrekord: ";			// Text vor dem Tagesrekord
$txtweek = "Woche: ";					// Text vor der Besucheranzahl in dieser Woche
$txtlastweek = "Vorwoche: ";			// Text vor der Besucheranzahl der letzten Woche
$txtmonth = "Monat: ";					// Text vor der Besucheranzahl in diesem Monat
$txtlastmonth = "Vormonat: ";			// Text vor der Besucheranzahl des letzten Monats
$txtyear = "Jahr: ";					// Text vor der Besucheranzahl in diesem Jahr
$txtlastyear = "Vorjahr: ";				// Text vor der Besucheranzahl im letzten Jahr
$txtaverage = "Tagesdurchschnitt: ";	// Text vor dem Tagesdurchschnitt
$txttotal = "Gesamt: ";					// Text vor der Gesamtbesucheranzahl
$txtpagestotal = "Seitenaufrufe: ";		// Text vor den Seitenklicks
$dateform1  = "d.m.Y";
$dateform2 = "d.m.y";
}

$splitter = " &bull; ";					// Statistiktrennung
$bv = " <b>";							// HTML-Tag VOR der Counterzahl
$bh = "</b> ";							// HTML-Tag NACH der Counterzahl
###############################################################################################

 //------------------------------------------------------------------------------
error_reporting(0);
@ini_set ( "max_execution_time","false" );	// set the script time

include ( "config/config.php" );	// include path to logfile
include ( "log/cache_visitors_counter.php");
if ( $db_active == 1 )
 {
  include ( "config/config_db.php" );		// include db prefix
  include ( "db_connect.php" );		// include database connectivity
 }
//-------------------------------

	if ( $counter_display_show_visitors_online == 1 ) { $counting .= $txtonline.$bv. number_format ( $module1 , 0 , "," , "." ) .$bh.$splitter; }
	if ( $counter_display_show_today == 1 ) { $counting .= $txttoday.$bv. number_format ( $module2 , 0 , "," , "." ) .$bh.$splitter; }
	if ( $counter_display_show_yesterday == 1 ) { $counting .= $txtyesterday.$bv. number_format ( $module3 , 0 , "," , "." ). $bh.$splitter; }
	if ( $counter_display_show_this_month == 1 ) { $counting .=  $txtmonth.$bv. number_format ( $module4 , 0 , "," , "." ). $bh.$splitter; }
	if ( $counter_display_show_last_month == 1 ) { $counting .= $txtlastmonth.$bv. number_format ( $module5 , 0 , "," , "." ). $bh.$splitter; }
	if ( $counter_display_show_max == 1 ) { $counting .= $txtrecord.$bv. number_format ( $module6 , 0 , "," , "." ). $bh.$splitter; }
	if ( $counter_display_show_average == 1 ) { $counting .= $txtaverage.$bv. .number_format ( $module7 , 0 , "," , "." ). $bh.$splitter; }
	if ( $counter_display_show_total == 1 ) { $counting .= $txttotal.$bv. number_format ( ($module8+$counter_add_visitors) , 0 , "," , "." ). $bh.$splitter; }
  echo $counting;

?> 



Aber, das einzige, was ich zu sehen bekomme ist eine weiße Seite...
Da meine PHP-Kenntnisse beschränkt sind und mir soweit alles richtig erscheint, kann ich den Fehler nicht erkennen, weshalb ich denke, daß mit da ein ganz entscheidender Codeteil fehlt
Könnt ihr mir helfen???

Webstat-Version ist 4.9.15
PHP-Version ist 5.6.21-1+donate.sury.org~trusty+1

LG Baerchen
Zum Seitenanfang
 

Wer etwas erreichen will sucht Wege, wer etwas verhindern will sucht Gründe !
 
IP gespeichert
 
michaelsam
Global Moderator
Validiert
*****
Offline



Beiträge: 132
Re: Individueller Counter
Antwort #1 - 02.02.17 um 11:34:21
 
also ich würd die counter.php einfach 1zu1 kopieren, die werte die nicht gebraucht werden php konform remarken und dann den table halt auf das umarbeiten per html bzw. css, wie man es haben will. dann funktioniert die sache auch.
Zum Seitenanfang
 
 
IP gespeichert
 
Seitenindex umschalten Seiten: 1
Thema versenden Drucken