Wawa666 schrieb:wie kann ich den infos aus den note.txt in die statistik bringen wie z.b.:
Teambeteiligung, Transportmittel
auf der seite hier
gibts da was fertiges oder muss man sich das selbst erknobeln????
<a href="http://www.geocaching.com/profile/?guid=blabla"><font color="#FF0000">xyz</font></a>
foreach $mem (("H", "S", "C", "A", "R", "L"))
<a href="http://www.geocaching.com/profile/?guid=blabla"><font color="#FF0000">xyz</font></a>, <a href="http://www.geocaching.com/profile/?guid=blabla1"><font color="#FF0000">abc</font></a>
##eval(
sub StatAccess {
my(%access);
my($title);
foreach (keys(%found)) {
$title = "";
$title = $1 if ($found{$_}->{'Optional1'});
$access{$found{$_}->{'Optional1'}}++
if ($found{$_}->{'Optional1'} ne "");
}
return(maketds(1,4,13,5,7,scalar(keys(%found)),pairsort(1,0,%access)));
}
StatAccess();
)##
Eine Möglichkeit wäre deinen kompletten String mit split aufzuteilen.Wawa666 schrieb:wie kann ich das nun noch machen das wenn ich 2 einträge mit
drin hab das der nicht den kompletten string als eintrag sieht sondern dann nur die einzelnen angugt???Code:<a href="http://www.geocaching.com/profile/?guid=blabla"><font color="#FF0000">xyz</font></a>, <a href="http://www.geocaching.com/profile/?guid=blabla1"><font color="#FF0000">abc</font></a>
@tokens = split(/,/,$found{$_}->{'Optional1'});
Ich dachte in Optional1 steht dein Team drin? Wenn in Optional1 der Wert drinnen steht, den du zählen möchtest, dann reicht:Wawa666 schrieb:so hab ichs aktuell muss dann hinter $title = $1 if ($found{$_}->{'Optional1'}); noch was schreiben oder aber was????Code:##eval( sub StatAccess { my(%access); my($title); foreach (keys(%found)) { $title = ""; $title = $1 if ($found{$_}->{'Optional1'}); $access{$found{$_}->{'Optional1'}}++ if ($found{$_}->{'Optional1'} ne ""); } return(maketds(1,4,13,5,7,scalar(keys(%found)),pairsort(1,0,%access))); } StatAccess(); )##
##eval(
sub StatAccess {
my(%access);
foreach (keys(%found)) {
$access{$found{$_}->{'Optional1'}}++
}
return(maketds(1,4,13,5,7,scalar(keys(%found)),pairsort(1,0,%access)));
}
StatAccess();
)##
@tokens = split(/,/,$found{$_}->{'Optional1'});
##eval(
sub StatAccess {
my(%access);
foreach (keys(%found)) {
@tokens = split(/,/,$found{$_}->{'Optional1'});
$access{$found{$_}->{'Optional1'}}++
}
return(maketds(1,4,13,5,7,scalar(keys(%found)),pairsort(1,0,%access)));
}
StatAccess();
)##
<a href="http://www.geocaching.com/profile/?guid=blabla"><font color="#FF0000">xyz</font></a>,
<a href="http://www.geocaching.com/profile/?guid=blabla1"><font color="#FF0000">abc</font></a>
<a href="http://www.geocaching.com/profile/?guid=blabla"><font color="#FF0000">xyz</font></a>
Wawa666 schrieb:und wie bau ich denin diese sortierung ein??Code:@tokens = split(/,/,$found{$_}->{'Optional1'});
Code:##eval( sub StatAccess { my(%access); foreach (keys(%found)) { @tokens = split(/,/,$found{$_}->{'Optional1'}); $access{$found{$_}->{'Optional1'}}++ } return(maketds(1,4,13,5,7,scalar(keys(%found)),pairsort(1,0,%access))); } StatAccess(); )##
????
naja ich hab in Optional1 die leute drin mit denen ich cachen war also entweder
oderCode:<a href="http://www.geocaching.com/profile/?guid=blabla"><font color="#FF0000">xyz</font></a>, <a href="http://www.geocaching.com/profile/?guid=blabla1"><font color="#FF0000">abc</font></a>
und das möchte ich eben auch so anzeigen lassen wie das mit der Teambeteiligung...Code:<a href="http://www.geocaching.com/profile/?guid=blabla"><font color="#FF0000">xyz</font></a>
##eval(
sub StatAccess {
my(%access);
my(@token);
my($teammember);
foreach (keys(%found)) {
@token = split(/,/,$found{$_}->{'Optional1'});
foreach($teammember(@token))
$access{$teammember}++;
}
}
return(maketds(1,4,13,5,7,scalar(keys(%found)),pairsort(1,0,%access)));
}
StatAccess();
)##
##eval(
sub StatAccess {
my(%access);
my(@token);
my($teammember);
foreach (keys(%found))
{
@token = split(/, /,$found{$_}->{'Optional1'});
foreach($teammember(@token))
{
%access{$teammember}++
}
}
return(maketds(1,4,13,5,7,scalar(keys(%found)),pairsort(1,0,%access)));
}
StatAccess();
)##
##eval(
sub StatAccess {
my(%access);
my(@token);
foreach (keys(%found)) {
@token = split(/,/,$found{$_}->{'Optional1'});
foreach(@token) {
$access{$_}++;
}
}
return(maketds(1,4,13,5,7,scalar(keys(%found)),pairsort(1,0,%access)));
}
StatAccess();
)##