Hallo,
ich veröffentliche hier ein Plugin einzeln!
Wie füge ich das Plugin ein?
Erstelle eine Template über das ACP names:
teamoverview.tpl !
Füge dem Template folgenden Inhalt ein:
|
Quellcode
|
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
|
<!-- INCLUDE header.tpl -->
<!-- INCLUDE navi.tpl -->
<div id="content">
<div id="shadow_nodown">
<div id="single_box">Zusatzteamübersicht bei {CHAT_NAME}</div>
</div>
<div id="shadow_ende"></div>
<div id="shadow_nodown">
<div id="box"><a name="start"></a>Übersicht</div>
<div id="box_content">
<!-- BEGIN teamlist -->
<span style="width:50%;float:left;"><a href="#{teamlist.NAME}">{teamlist.NAME}</a></span>
<!-- END teamlist -->
<div id="clear"></div>
</div>
<div id="box_bottom"></div>
</div>
<div id="shadow_ende"></div>
<!-- BEGIN teamlist -->
<div id="shadow_nodown">
<div id="box"><a id="{teamlist.NAME}"></a>{teamlist.NAME}<span id="right_value"><a href="#start">nach oben</a></span></div>
<div id="box_content">
<h3>Teammitglieder</h3>
<!-- IF teamlist.MEMBER == '' -->keine<!-- ELSE -->{teamlist.MEMBER}<!-- ENDIF -->
<h3>Teamleitung</h3>
<!-- IF teamlist.LEADER == '' -->keine<!-- ELSE -->{teamlist.LEADER}<!-- ENDIF -->
</div>
<div id="box_bottom"></div>
</div>
<div id="shadow_ende"></div>
<!-- END teamlist -->
</div>
<div id="clear"></div>
<!-- INCLUDE footer.tpl -->
|
Füge in den Ordner Plugins folgende Datei hinzu:
teamoverview.php mit dem Inhalt:
|
Quellcode
|
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
|
<?php
global $config;
$allteams = @mysql_fetch_assoc(mysql_query("select * from settings"));
$allteamnamen = $allteams["teams"];
$tids = "0";
$tsplit = explode("|",$allteamnamen);
foreach($tsplit as $key => $values) {
if ($values != '') {
$tids++;
$teammember = explode("~",getTeammembers($values,"0"));
$teamleader = explode("~",getTeammembers($values,"1"));
$vktm = "0";
$leader = "";
$member = "";
$vktl = "0";
foreach($teamleader as $key => $value) {
if ($value != '') {
$leader .= ($vktm != '0') ? ', ' : '';
$leader .= $value;
$vktm++;
}
}
foreach($teammember as $key => $value) {
if ($value != '') {
$member .= ($vktl != '0') ? ', ' : '';
$member .= $value;
$vktl++;
}
}
$tpl->block_assign('teamlist', array(
'NAME' => $values,
'LEADER' => $leader,
'MEMBER' => $member,
'ID' => $tids,
));
}
}
?>
|
Vorschaubild?!
index.php?page=Attachment&attachmentID=188
Sollte alles richtig sein, könnt ihr die Seite über index.php?page=teamoverview einsehen.