Terminanzeige usw.original Thema anzeigen
16.10.04, 10:30:00
Biker
17.10.04, 12:50:18
also für die termine:
suche in der index.php
[php]
#
#
### Termine
$event_list = '';
if (!empty($_config['INDEX_EVENTS'])) {
$liste = array();
$result = $_db->query('SELECT id, subject, UNIX_TIMESTAMP(event_date) AS date
FROM `'.$_cfg['DB_PREFIX'].'calendar`
WHERE event_date = NOW()
AND (typ=0 OR (user_id = '.intval($_user['id']).' AND typ=1))');
while ($event = $_db->fetch_array($result)) {
$liste[] = ''.$event['subject'].' '.pmfdate($event['event_Date']).'';
}
$event_list = (count($liste) > 0) ? implode(', ', $liste) : '';
unset($liste);
}
[/php]
und ersetze es durch das hier:
[php]
#
#
### Termine
$event_list = '';
if (!empty($_config['INDEX_EVENTS'])) {
$liste = array();
$result = $_db->query('SELECT id, subject,DATE_FORMAT(event_date,"%e.%c.") as event_date
FROM `'.$_cfg['DB_PREFIX'].'calendar`
WHERE (TO_DAYS(NOW()) - TO_DAYS(event_date) <= 30) AND (typ=0 OR (user_id = '.intval($_user['id']).' AND typ=1))');
while ($event = $_db->fetch_array($result)) {
$liste[] = ''.$event['subject'].' ('.$event[event_date].') ';
}
$event_list = (count($liste) > 0) ? implode(', ', $liste) : '';
unset($liste);
}
[/php]
dann ändere noch evtl das templalte index und / oder die PSrachvariable index_events_text
BugHunter2k
17.10.04, 13:00:20
Die benutzer:
index.php:
[php]
#
#
### Statistik Werte
$stat_forum = $_db->fetch_first('SELECT COUNT(f.`id`) AS `forums`,
SUM(f.`topics`) AS `topics`,
SUM(f.`posts`) AS `posts`
FROM `'.$_cfg['DB_PREFIX'].'board` AS f
WHERE `id` IN ('.get_aviable_boards('board').')');
$_stat['forums'] = $stat_forum['forums'];
$_stat['topics'] = $stat_forum['topics'];
$_stat['posts'] = $stat_forum['posts'];
$user_anz = $_db->fetch_first('SELECT COUNT(`id`) AS `anz`
FROM `'.$_cfg['DB_PREFIX'].'user`');
$last_user = $_db->fetch_first('SELECT `id`, `name`
FROM `'.$_cfg['DB_PREFIX'].'user`
ORDER BY `reg` DESC');
$_stat['users'] = $user_anz['anz'];
$_stat['last_user_name'] = $last_user['name'];
$_stat['last_user_id'] = $last_user['id'];
$_stat['time'] = pmf_time(PMF_TIME);
$_stat['date'] = pmf_date(PMF_TIME);
[/php]
ändern in
[php]
#
#
### Statistik Werte
$stat_forum = $_db->fetch_first('SELECT COUNT(f.`id`) AS `forums`,
SUM(f.`topics`) AS `topics`,
SUM(f.`posts`) AS `posts`
FROM `'.$_cfg['DB_PREFIX'].'board` AS f
WHERE `id` IN ('.get_aviable_boards('board').')');
$_stat['forums'] = $stat_forum['forums'];
$_stat['topics'] = $stat_forum['topics'];
$_stat['posts'] = $stat_forum['posts'];
$user_anz = $_db->fetch_first('SELECT COUNT(`id`) AS `anz`
FROM `'.$_cfg['DB_PREFIX'].'user`');
$_stat['users'] = $user_anz['anz'];
$last_user = $_db->query('SELECT `id`, `name`
FROM `'.$_cfg['DB_PREFIX'].'user`
ORDER BY `reg` DESC LIMIT 0,5');
$_stat['last_user'] = '';
while ($row=$_db->fetch_array($last_user)){
$_stat['last_user'] .= ''.$row[name].' ';
}
$_stat['time'] = pmf_time(PMF_TIME);
$_stat['date'] = pmf_date(PMF_TIME);
[/php]
index template:
[code]
BugHunter2k
<#lng_boards#>: $_stat[forums] | <#lng_topics#>: $_stat[topics] | <#lng_posts#>: $_stat[posts] | <#lng_user#>: $_stat[users] |
[/code]
ändern in:
[code]
<#lng_index_welcome_new#>: $_stat[last_user_name]
<#lng_boards#>: $_stat[forums] | <#lng_topics#>: $_stat[topics] | <#lng_posts#>: $_stat[posts] | <#lng_user#>: $_stat[users] |
[/code]
<#lng_index_welcome_new#>: $_stat[last_user]
17.10.04, 13:12:22
BugHunter2k
21.10.04, 09:26:09
Biker
<#lng_boards#>: $_stat[forums] | <#lng_topics#>: $_stat[topics] | <#lng_posts#>: $_stat[posts] | <#lng_user#>: $_stat[users] |
[/code]
ändern in:
[code]
<#lng_index_welcome_new#>: $_stat[last_user_name]
<#lng_boards#>: $_stat[forums] | <#lng_topics#>: $_stat[topics] | <#lng_posts#>: $_stat[posts] | <#lng_user#>: $_stat[users] |
[/code] [/quote]
Funzt leider net, nach dem ändern des Temp. wird der neueste User auch nicht mehr angezeigt, geschweige denn mehrer! :no:
<#lng_index_welcome_new#>: $_stat[last_user]
21.10.04, 09:31:58
Biker
21.10.04, 09:51:36
Biker
21.10.04, 10:53:55
Biker
21.10.04, 16:25:24
BugHunter2k
21.10.04, 19:54:07
Biker
26.10.04, 20:44:23
Biker
27.10.04, 20:57:41
BugHunter2k
28.10.04, 07:50:19
Biker
29.10.04, 13:00:32
Biker
29.10.04, 15:45:48
BugHunter2k
29.10.04, 16:41:15
Biker
29.10.04, 17:26:26
BugHunter2k
29.10.04, 17:30:21
Biker
29.10.04, 22:23:39
BugHunter2k
30.10.04, 08:14:31
Biker
|