Rouven89
Going for pro
Beiträge: 539 |
# Thema - 23.07.2010 um 16:25 Uhr
hey
ich würd gerne die begegnung (also mannschaft1 - mannschaft2 ) aus der navlist2 in der navlist angezeigt bekommen, da immoment nur in der navlist eine mannschaft angezigt wird... hab aus der themes schon das {wars:matchup} aus der navlist2 rauskopiert und in die navlist eingesetzt jetzt muss ich nurnoch wissen welchen code ich aus der navlist2 php rauskopieren muss um es dann in der navlist.php einzusetzen
hier die codes:
navlist2
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
16.
17.
18.
19.
20.
21.
22.
23.
24.
25.
26.
27.
28.
29.
30.
31.
32.
33.
34.
35.
36.
37.
38.
39.
40.
41.
42.
43.
44.
45.
46.
47.
48.
49.
50.
51.
52.
53.
54.
55.
56.
| 1. / 2. / ...
<?php
// ClanSphere 2009 - www.clansphere.net
// $Id: navlist2.php 3009 2009-05-03 14:57:11Z hajo $
$cs_lang = cs_translate('wars');
$max = 15;
$data = array();
$select = 'war.games_id AS games_id, war.wars_place AS wars_place, cln.clans_short AS clans_short, war.wars_score1 AS wars_score1, war.wars_score2 AS wars_score2, war.wars_date AS wars_date, sqd.squads_name AS squads_name, war.wars_id AS wars_id';
$from = 'wars war INNER JOIN {pre}_categories cat ON war.categories_id = cat.categories_id INNER JOIN {pre}_clans cln ON war.clans_id = cln.clans_id INNER JOIN {pre}_squads sqd ON war.squads_id = sqd.squads_id';
$order = 'wars_date DESC';
$cs_wars = cs_sql_select(__FILE__,$from,$select,"war.wars_status = 'played'",$order,0,$max);
if (!empty($cs_wars)) {
$all = count($cs_wars);
for ($i = 0; $i < $all; $i++) {
if ($cs_wars[$i]['wars_place']=='home') {
$cs_wars[$i]['game_icon'] = file_exists('uploads/games/' . $cs_wars[$i]['games_id'] . '.gif') ?
cs_html_img('uploads/games/' . $cs_wars[$i]['games_id'] . '.gif') : '';
$cs_wars[$i]['matchup'] = cs_secure($cs_wars[$i]['squads_name']) . ' - ' . cs_secure($cs_wars[$i]['clans_short']);
$cs_wars[$i]['url'] = cs_url('wars','view','id=' . $cs_wars[$i]['wars_id']);
$result = $cs_wars[$i]['wars_score1'] - $cs_wars[$i]['wars_score2'];
$icon = $result > 0 ? 'green' : 'red';
if(empty($result)) $icon = 'grey';
$cs_wars[$i]['icon'] = cs_html_img('symbols/clansphere/' . $icon . '.gif');
$cs_wars[$i]['date'] = cs_date('unix',$cs_wars[$i]['wars_date']);
}
else {
$cs_wars[$i]['game_icon'] = file_exists('uploads/games/' . $cs_wars[$i]['games_id'] . '.gif') ?
cs_html_img('uploads/games/' . $cs_wars[$i]['games_id'] . '.gif') : '';
$cs_wars[$i]['matchup'] = cs_secure($cs_wars[$i]['clans_short'] . ' - ' . cs_secure($cs_wars[$i]['squads_name']));
$cs_wars[$i]['url'] = cs_url('wars','view','id=' . $cs_wars[$i]['wars_id']);
$result = $cs_wars[$i]['wars_score2'] - $cs_wars[$i]['wars_score1'];
$icon = $result < 0 ? 'red' : 'green';
if(empty($result)) $icon = 'grey';
$cs_wars[$i]['icon'] = cs_html_img('symbols/clansphere/' . $icon . '.gif');
$cs_wars[$i]['date'] = cs_date('unix',$cs_wars[$i]['wars_date']);
}
}
$data['wars'] = $cs_wars;
echo cs_subtemplate(__FILE__,$data,'wars','navlist2');
}
else {
echo $cs_lang['no_data'];
} |
navlist:
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
16.
17.
18.
19.
20.
21.
22.
23.
24.
25.
26.
27.
28.
29.
30.
31.
32.
33.
34.
35.
36.
37.
38.
39.
40.
41.
42.
| 1. / 2. / ...
<?php
// ClanSphere 2009 - www.clansphere.net
// $Id: navlist.php 2266 2009-03-21 10:37:39Z duRiel $
$cs_lang = cs_translate('wars');
$cs_option = cs_sql_option(__FILE__,'wars');
$data = array();
$select = 'war.games_id AS games_id, cln.clans_short AS clans_short, war.wars_score1 AS wars_score1, war.wars_score2 AS wars_score2, war.wars_id AS wars_id';
$from = 'wars war INNER JOIN {pre}_categories cat ON war.categories_id = cat.categories_id INNER JOIN {pre}_clans cln ON war.clans_id = cln.clans_id';
$order = 'war.wars_date DESC';
$cs_wars = cs_sql_select(__FILE__,$from,$select,"war.wars_status = 'played'",$order,0,$cs_option['max_navlist']);
if (!empty($cs_wars)) {
$all = count($cs_wars);
for ($i = 0; $i < $all; $i++) {
$cs_wars[$i]['game_icon'] = file_exists('uploads/games/' . $cs_wars[$i]['games_id'] . '.gif') ?
cs_html_img('uploads/games/' . $cs_wars[$i]['games_id'] . '.gif') : '';
$secure_short = cs_secure($cs_wars[$i]['clans_short']);
$cs_wars[$i]['enemy'] = cs_link($secure_short,'wars','view','id=' . $cs_wars[$i]['wars_id']);
$result = $cs_wars[$i]['wars_score1'] - $cs_wars[$i]['wars_score2'];
$icon = $result > 0 ? 'green' : 'red';
if(empty($result)) $icon = 'grey';
$cs_wars[$i]['icon'] = cs_html_img('symbols/clansphere/' . $icon . '.gif');
}
$data['wars'] = $cs_wars;
echo cs_subtemplate(__FILE__,$data,'wars','navlist');
}
else {
echo $cs_lang['no_data'];
}
?> |
hier kann man sich das angucken www.sc-wiesens.de rechts unten ist die navlist2 und mittig unten ist die navlist und da wo {wars:matchup} teht sollen die mannschaften stehen
hoffe ihr versteht mich
mfg
------------------
http://sc-wiesens.de/
Der Sport Club "13 Eichen" Wiesens
|