Re: Externe Seite in das Board integrieren
Verfasst: 09.03.2012 14:27
Ok dann versuche ich es noch einmal von vorne.
Ich würde gerne dieses Webseite http://themonkeys.de/bf3leaderboard/index.php (BF3 Leaderboard) in die Webseite http://themonkeys.de/index.php einbinden und zwar zwischen Header und Footer.
Das Leaderboard muss nicht die CSS übernehmen, da das Leaderbaord eine eigene CSS hat die man anpassen kann.
Das Leaderboard soll genau zwischen die Forenübersicht Seperatoren, die sich über und unter der Foren Kategorien befinden.
Die Breite kann statisch sein, nur die Höhe sollte variable sein, das je nach Mitglieder im Leaderboard die Seite länger, oder kürzer wird.
Ich habe leider kein blassen Schimmer wie ich die Seite einbinden (interagieren) kann.
Habe mal mit Photoshop ein Grafik angefertigt wie ich es mir ungefähr vorstelle.
[ externes Bild ]
Habe natürlich bei Google und hier im Forum nach einer Lösung gesucht und bin dabei auf folgenden Eintrag gestoßen:
viewtopic.php?f=74&t=148994
Leider verstehe ich diesen Beitrag mangelnder Fachkompetenz leider überhaut nicht.
"Inhaltsbereich: Hier kannst du beliebigen php-Code verwenden." welcher Code?
Die HTML Datei die ich erstellen muss und die in dem Ordner /styles/euerStyle/ liegen muss, muss da nur dieser Code rein? "<!-- INCLUDE overall_header.html --> <!-- INCLUDE overall_footer.html -->"
Code der index.php vom Leaderboard
Ich hoffe meine Fragestellung ist jetzt besser!?
Ich würde gerne dieses Webseite http://themonkeys.de/bf3leaderboard/index.php (BF3 Leaderboard) in die Webseite http://themonkeys.de/index.php einbinden und zwar zwischen Header und Footer.
Das Leaderboard muss nicht die CSS übernehmen, da das Leaderbaord eine eigene CSS hat die man anpassen kann.
Das Leaderboard soll genau zwischen die Forenübersicht Seperatoren, die sich über und unter der Foren Kategorien befinden.
Die Breite kann statisch sein, nur die Höhe sollte variable sein, das je nach Mitglieder im Leaderboard die Seite länger, oder kürzer wird.
Ich habe leider kein blassen Schimmer wie ich die Seite einbinden (interagieren) kann.
Habe mal mit Photoshop ein Grafik angefertigt wie ich es mir ungefähr vorstelle.
[ externes Bild ]
Habe natürlich bei Google und hier im Forum nach einer Lösung gesucht und bin dabei auf folgenden Eintrag gestoßen:
viewtopic.php?f=74&t=148994
Leider verstehe ich diesen Beitrag mangelnder Fachkompetenz leider überhaut nicht.
"Inhaltsbereich: Hier kannst du beliebigen php-Code verwenden." welcher Code?
Die HTML Datei die ich erstellen muss und die in dem Ordner /styles/euerStyle/ liegen muss, muss da nur dieser Code rein? "<!-- INCLUDE overall_header.html --> <!-- INCLUDE overall_footer.html -->"
Code der index.php vom Leaderboard
Code: Alles auswählen
require_once ('inc/config.php');
require_once ('language/'.$row['language'].'.php');
$EoT = new eGamersofTomorrow;
$xajax = new xajax();
$xajax->configure('javascript URI', 'js/xajax');
$xajax->register(XAJAX_FUNCTION, 'updateStats');
$xajax->processRequest();
$_GET = security::escape($_GET);
$_POST = security::escape($_POST);
$order = "asc";
if (isset($_GET['sort'])){
$sort = $EoT->sort($_GET['sort']);
$order = $EoT->order($_GET['sort']);
}
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<head>
<title><?php echo LANG_INDEX_TITLE; ?></title>
<?php echo $styleSettings; ?>
</head>
<?php $xajax->printJavascript(); ?>
<body>
<script type="text/javascript" src="js/wz_tooltip.js"></script>
<script type="text/javascript" src="js/jquery-1.2.2.pack.js"></script>
<script type="text/javascript" src="js/ajaxupdate.js"></script>
<script type="text/javascript" src="js/jquery-1.4.3.min.js"></script>
<script type="text/javascript" src="js/jquery.mousewheel-3.0.4.pack.js"></script>
<script type="text/javascript" src="js/jquery.fancybox-1.3.4.pack.js"></script>
<script type="text/javascript">var url="<?php echo $domain ?>"</script>
<script type="text/javascript" src="js/ajaxtabs.js"></script>
<link rel="stylesheet" type="text/css" href="css/jquery.fancybox-1.3.4.css" media="screen" />
<div class="body_bfLB" style="width:<?php echo $style['IndexDivWidth']; ?>px;">
<input type="hidden" id="updating" value="0" />
<?php echo $Banner; ?>
<ul id="statstabs" class="shadetabs" style="margin-top:10px;">
<li><a href="#" rel="#default" class="selected">Leaderboard</a></li>
<li><a href="stats/class.php" rel="classcontainer"><?php echo LANG_CLANSTATS_TAB_KITS; ?></a></li>
<li><a href="stats/skill.php" rel="classcontainer"><?php echo LANG_CLANSTATS_TAB_SKILL; ?></a></li>
<li><a href="stats/teamplay.php" rel="classcontainer">Teamplay</a></li>
<li><a href="stats/vehicles.php" rel="classcontainer"><?php echo LANG_CLANSTATS_TAB_VEHICLES; ?></a></li>
<li><a href="stats/weaponstats.php" rel="classcontainer"><?php echo LANG_CLANSTATS_TAB_WEAPONS; ?></a></li>
<li><a href="stats/ribbonsstats.php" rel="classcontainer">Ribbons</a></li>
<li><a href="stats/medalsstats.php" rel="classcontainer">Medals</a></li>
<li><a href="stats/events.php" rel="classcontainer">Next Events</a></li>
</ul>
<div id="statscontainer" style=" margin-top:-17px;padding:7px;width:<?php echo $style['IndexTableWidth']; ?>px;">
<table class="default" style="width:<?php echo $style['IndexTableWidth']; ?>px;" cellspacing="0" cellpadding="0">
<tr>
<td class="head" colspan="20" height="20px" ><a href="<?php echo $row['clanhompage']; ?>" target="_blank"><img src="<?php echo $domain; ?>/img/hp.png" style="float:left;" /></a><?php echo LANG_INDEX_HEAD.htmlspecialchars($row['clanname']); ?> <img src="img/general/<?php echo $row['platform']; ?>.png" /></td>
</tr>
<tr>
<td class="object" width="20px"><b><?php echo LANG_INDEX_PLACE; ?></b></a></td>
<?php if($row['rank'] == 1 ){ ?><td class="object" width="45px"><a href="index.php?sort=<?php echo $order ?>&tab=rank"><b><?php echo LANG_INDEX_RANK; ?></b></a></td> <?php } ?>
<td class="object" width="150px"><a href="index.php?sort=<?php echo $order ?>&tab=soldiername"><b><?php echo LANG_INDEX_NAME; ?></b></a></td>
<?php if($row['progress'] == 1 ){ ?><td class="object" width="80px"><b><?php echo LANG_INDEX_ALL_PROGRESS; ?></b></a></td> <?php } ?>
<?php if($row['time'] == 1 ){ ?><td class="object" width="80px"><a href="index.php?sort=<?php echo $order ?>&tab=playtime"><b><?php echo LANG_INDEX_PLAYTIME; ?></b></a></td><?php } ?>
<?php if($row['kills'] == 1 ){ ?><td class="object" width="60px"><a href="index.php?sort=<?php echo $order ?>&tab=kills"><b><?php echo LANG_INDEX_KILLS; ?></b></a></td><?php } ?>
<?php if($row['deaths'] == 1 ){ ?><td class="object" width="60px"><a href="index.php?sort=<?php echo $order ?>&tab=deaths"><b><?php echo LANG_INDEX_DEATHS; ?></b></a></td><?php } ?>
<?php if($row['round'] == 1 ){ ?><td class="object" width="50px"><a href="index.php?sort=<?php echo $order ?>&tab=rounds"><b><?php echo LANG_INDEX_ROUNDS; ?></b></a></td><?php } ?>
<?php if($row['dogtags'] == 1 ){ ?><td class="object" width="50px"><a href="index.php?sort=<?php echo $order ?>&tab=dogtags"><b><?php echo LANG_INDEX_DOGTAGS; ?></b></a></td><?php } ?>
<?php if($row['kd'] == 1 ){ ?><td class="object" width="40px"><a href="index.php?sort=<?php echo $order ?>&tab=KD"><b><?php echo LANG_INDEX_KD; ?></b></a></td><?php } ?>
<?php if($row['team'] == 1 ){ ?><td class="object" width="110px"><a href="index.php?sort=<?php echo $order ?>&tab=team"><b>Team</b></a></td><?php } ?>
<?php if($row['points'] == 1 ){ ?><td class="object" width="150px"><a href="index.php?sort=<?php echo $order ?>&tab=points"><b><?php echo LANG_INDEX_POINTS; ?></b></a></td><?php } ?>
<td class="object" style="font-size:11px;"><?php echo LANG_INDEX_REFRESH; ?></td>
<?php
$place = 1;
$gKills = 0;
$gDeaths = 0;
$gTime = 0;
$gRounds = 0;
$gDogtags = 0;
$gPoints = 0;
$gRank = 0;
$gTeam = 0;
$aData = stats::getStats();
if (is_array($aData) && !empty($aData)){
foreach ($aData as $data){
$color = $row['vip_color'];
$vip = $data['vip_member'];
if ($data['rank'] < 145 && $data['nextrank'] > 0){
$a = $data['nextrank'] - $data['rankscore'];
$b = $data['nextrank'] - $data['points'];
$points = $a-$b;
$progress = number_format($points * 100 / $a, 2, '.', '');
}else{
$b= 'unknown';
$progress = '100';
}
if ($data['rank'] < 145 ){
$tooltip = '<img src=img/rank/big/P0'.$data['rank'].'.png width=100px /><br /><b>'.$EoT->rankname($data['rank']).'</b><br /><b>Level('.$data['rank'].')</b><br /><br />'.htmlspecialchars($data['soldiername']).LANG_INDEX_NEXT_POINTS.'<font color=#008FC4>'.$b.'</font>'.LANG_INDEX_NEXT_POINTS2.'<font color=#008FC4>'.$progress.'</font>'.LANG_INDEX_NEXT_POINTS3.'<p class=DIVtext>'.LANG_INDEX_ALL_LAST_UPDATE.'<br />'.$EoT->unix_to_time($data['playerupdate']).'</p>';
}else{
$tooltip = '<img src=img/rank/big/P0'.$data['rank'].'.png width=100px /><br /><b>'.$EoT->rankname($data["rank"]).'</b><br /><b>Level('.$data['rank'].')</b><br /><br />'.htmlspecialchars($data['soldiername']).LANG_INDEX_NEXT_FINISH.'<p class=DIVtext>'.LANG_INDEX_ALL_LAST_UPDATE.'<br />'.$EoT->unix_to_time($data['playerupdate']).'</p>';
}
if ($style['IndexRankIcon'] <= 20){
$rankIMG = '<img src="img/rank/P0'.$data['rank'].'.png"/>';
}else{
$rankIMG = '<img src="img/rank/big/P0'.$data['rank'].'.png" width="'.$style['IndexRankIcon'].'"/>';
}
?>
<tr class="hov">
<td class="result" style="height:<?php echo $style['IndexLineHeight']; ?>px">
<input type="hidden" id="<?php echo $data['pid']; ?>" value="false" /><?php echo $place++; ?></td>
<?php if($row['rank'] == 1 ){ ?>
<td id="rank_<?php echo $data['pid']; ?>" class="result" style="border-left:<?php echo $style['result_border']; ?>" height="20px">
<a onmouseover="Tip('<?php echo $tooltip; ?>',WIDTH, 200, TEXTALIGN, 'center', OFFSETY, -110, OFFSETX, 125)" onmouseout="UnTip()"><?php echo $rankIMG; ?></a></td>
<?php } ?>
<td class="result" style="border-left:<?php echo $style['result_border']; ?>" height="20px"><img src="img/fav/<?php echo $EoT->favclass($data['assault'],$data['recon'],$data['support'],$data['engineer']); ?>.png" title="<?php echo $EoT->favclass($data['assault'],$data['recon'],$data['support'],$data['engineer']); ?>" style="float:left;" /><a href="stats.php?name=<?php echo rawurlencode($data['soldiername']); ?>" target="_self"><?php echo $EoT->nameTrimchars($data['soldiername']); ?></a></td>
<?php if ($row['progress'] == 1){
?>
<td class="result" style="border-left:<?php echo $style['result_border']; ?>">
<div class="progress">
<div class="progress_size" style="width:<?php echo $progress; ?>%"> </div>
</div>
</td>
<?php }
if($row['time'] == 1 ){ ?><td id="time_<?php echo $data['pid']; ?>" class="result" style="border-left:<?php echo $style['result_border']; ?>" height="20px"><?php echo $EoT->timeIndex($data['playtime']); ?></td><?php } ?>
<?php if($row['kills'] == 1 ){ ?><td id="kills_<?php echo $data['pid']; ?>" class="result" style="border-left:<?php echo $style['result_border']; ?>" height="20px"><?php echo $EoT->points($data['kills']); ?></td><?php } ?>
<?php if($row['deaths'] == 1 ){ ?><td id="deaths_<?php echo $data['pid']; ?>" class="result" style="border-left:<?php echo $style['result_border']; ?>" height="20px"><?php echo $EoT->points($data['deaths']); ?></td><?php } ?>
<?php if($row['round'] == 1 ){ ?><td id="round_<?php echo $data['pid']; ?>" class="result" style="border-left:<?php echo $style['result_border']; ?>" height="20px"><?php echo $EoT->points($data['rounds']); ?></td><?php } ?>
<?php if($row['dogtags'] == 1 ){ ?><td id="dogtags_<?php echo $data['pid']; ?>" class="result" style="border-left:<?php echo $style['result_border']; ?>" height="20px"><?php echo $EoT->points($data['dogtags']); ?></td><?php } ?>
<?php if($row['kd'] == 1 ){ ?><td id="kd_<?php echo $data['pid']; ?>" class="result" style="border-left:<?php echo $style['result_border']; ?>" height="20px"><?php echo $EoT->kd($data['kills'],$data['deaths']); ?></td><?php } ?>
<?php if($row['team'] == 1 ){ ?><td id="team_<?php echo $data['pid']; ?>" class="result" style="border-left:<?php echo $style['result_border']; ?>" height="20px"><?php echo $EoT->points($data['team']); ?></td><?php } ?>
<?php if($row['points'] == 1 ){ ?><td id="score_<?php echo $data['pid']; ?>" class="result" style="border-left:<?php echo $style['result_border']; ?>" height="20px">
<?php if($row['History'] == 1 && $style['IndexTableWidth'] >= "814" ){ ?><a id="bf3stats_<?php echo $data['pid']; ?>" href="history.php?pid=<?php echo $data['pid']; ?>"><?php } ?>
<?php echo $EoT->points($data['points']); ?></td><?php if($row['History'] == 1 ){ ?></a><?php }} ?>
<td class="result" style="border-left:<?php echo $style['result_border']; ?>" onclick="refreshStats(<?php echo $data['pid']; ?>);">
<img id="anim_<?php echo $data['pid']; ?>" src="img/general/anim.gif" style='border: 0; cursor: pointer;' width="16px" />
<img id="anim_<?php echo $data['pid']; ?>_loading" src="img/general/anim1.gif" style='border: 0; cursor: pointer; display: none;' width="16px" />
</td>
<script type="text/javascript">
$(document).ready(function() {
$("a#bf3stats_<?php echo $data['pid']; ?>").fancybox({
'autoDimensions' : true,
'transitionIn' : 'none',
'transitionOut' : 'none',
'padding' : 0,
'overlayColor' : '#000',
'overlayOpacity' : 0.6
});
});
</script>
<?php
$gKills += $data['kills'];
$gDeaths += $data['deaths'];
$gTime += $data['playtime'];
$gRounds += $data['rounds'];
$gDogtags += $data['dogtags'];
$gPoints += $data['points'];
$gRank += $data['rank'];
$gTeam += $data['team'];
}
}
?>
<tr>
<td class="result" height="20px">Ø</td>
<?php
if ($place == 1){
$dRank = 0;
}else{
$dRank = round($gRank/($place-1));
}
$tooltip = '<img src=img/rank/big/P0'.$dRank.'.png width=100px /><br /><b>'.$EoT->rankname($dRank).'<br />Level('.$dRank.')</b>';
if($row['rank'] == 1 ){ ?>
<td class="result" style="border-left:<?php echo $style['result_border']; ?>" height="20px"><a onmouseover="Tip('<?php echo $tooltip; ?>', TEXTALIGN, 'center', OFFSETY, -110, OFFSETX, 125)" onmouseout="UnTip()"><img src="img/rank/P0<?php echo $dRank; ?>.png" />
</a></td>
<?php }
echo '<td class="result" style="border-left:'.$style['result_border'].'" height="20px">'.LANG_INDEX_ALL_STATS.'</td>';
if ($row['progress'] == 1){ echo '<td class="result" style="border-left:'.$style['result_border'].'">--</td>'; }
if($row['time'] == 1 ){ echo '<td class="result" style="border-left:'.$style['result_border'].'" height="20px">'.$EoT->timeIndex($gTime).'</td>';}
if($row['kills'] == 1 ){ echo '<td class="result" style="border-left:'.$style['result_border'].'" height="20px">'.$EoT->points($gKills).'</td>'; }
if($row['deaths'] == 1 ){echo '<td class="result" style="border-left:'.$style['result_border'].'" height="20px">'.$EoT->points($gDeaths).'</td>'; }
if($row['round'] == 1 ){ echo '<td class="result" style="border-left:'.$style['result_border'].'" height="20px">'.$EoT->points($gRounds).'</td>';}
if($row['dogtags'] == 1 ){echo '<td class="result" style="border-left:'.$style['result_border'].'" height="20px">'.$EoT->points($gDogtags).'</td>'; }
if($row['kd'] == 1 ){echo '<td class="result" style="border-left:'.$style['result_border'].'" height="20px">'.$EoT->kd($gKills,$gDeaths).'</td>'; }
if($row['team'] == 1 ){echo '<td class="result" style="border-left:'.$style['result_border'].'" height="20px">'.$EoT->points($gTeam).'</td>'; }
if($row['points'] == 1 ){echo '<td class="result" style="border-left:'.$style['result_border'].'" height="20px">'.$EoT->points($gPoints).'</td>'; }
echo '<td class="result" style="border-left:'.$style['result_border'].'" height="20px">--</td>';
?>
</tr>
<tr>
<td class="result" height="20px" colspan="20">Legende: <font color="<?php echo $row['vip_color']; ?>"><?php echo $row['vip']; ?></font> | <a href="#">Member</a></td></tr>
</table>
<?php
if ($row['autoupdateEnabled'] == 1 ){
include_once 'inc/nextact.php';
}
include_once 'inc/footer.php';
?>
</div>
</div>
</body>
</html>
<script type="text/javascript">
var countries=new ddajaxtabs("statstabs", "statscontainer")
countries.setpersist(true)
countries.setselectedClassTarget("link") //"link" or "linkparent"
countries.init()
</script>