Seite 2 von 4
Verfasst: 28.04.2003 12:22
von Gast
Nein, ich hab zur Zeit derbe Login/Session Probleme hier auf phpbb.de ..
Was des mit´m "Last Visit" angeht... dort gib´s doch auch (glaub in der index.php) ´ne Definierung das ADMIN diese Farbe und MOD ´ne andere Farbe kriegt, dort musst Du dann ähnlich wie in der page_header.php (s. Anleitung) auch JUNIOR_ADMIN definieren.
Verfasst: 28.04.2003 12:44
von Murphy
Yepp, ich habe als "junior admin" zugriff auf alle foren.
ein bug:
im calendar lite, ist er nur als Gast geführt.
lasse ich aber zu, dass auch registrierte schreiben können, kann er
einträge machen.
andere beiträge bearbeiten - nicht!
@acid
ich lasse das alles mal so drauf (localhost)
wenn du hier rumprobieren willst, mache ich alle änderungen mit.
kein problem
----------------------------
könntest du mal nachschauen im "last visit hack", wegen den Farben?
wo kann ich es da so machen, dass er auch in der z.B. grünen Farbe
dort auftaucht.
Verfasst: 28.04.2003 13:15
von Gast
Ich weiss jetzt ned welche Version des Hacks Du benutzt, aber bei der, die ich gerade parat habe, findet sich folgendes in der index.php (beim hinzugefügten Last Visit Code)..
Code: Alles auswählen
switch ($todayrow['user_level'])
{
case ADMIN :
$todayrow['username'] = '<b>' . $todayrow['username'] . '</b>';
$style_color = 'style="color:#' . $theme['fontcolor3'] . '"';
break;
case MOD :
$todayrow['username'] = '<b>' . $todayrow['username'] . '</b>';
$style_color = 'style="color:#' . $theme['fontcolor2'] . '"';
break;
}
..dort müsstest Du dann über
case MOD : folgendes einfügen...
Code: Alles auswählen
case JUNIOR_ADMIN :
$todayrow['username'] = '<b>' . $todayrow['username'] . '</b>';
$style_color = 'style="color:#' . $theme['fontcolor1'] . '"';
break;
Allerdings schau ersma ob der Code bei Dir genauso aussieht (wenn nich, musst es halt anpassen). Eventuell musst Du
$theme['fontcolor1'] ersetzen (halt das was Du in der page_header.php beim Junior zu stehen hast).
Such ma in der calendar.php (ka wie sie heisst) nach "auth"... was findest ´n da alles ?
Verfasst: 29.04.2003 02:16
von Murphy
bei mir siehts so aus:
## Mod Title: Last Visit Mod
## Mod Version: 1.2.4
eine zusätzliche "else if" funktion mit "== JUNIOR ADMIN" führt zum weissen Bildschirm.
Code: Alles auswählen
{
$style_color = "";
if( $todayrow['user_level'] == ADMIN )
{
$todayrow['username'] = '<b>' . $todayrow['username'] . '</b>';
$style_color = 'style="color:#' . $theme['fontcolor3'] . '"';
}
else if( $todayrow['user_level'] == MOD )
{
$todayrow['username'] = '<b>' . $todayrow['username'] . '</b>';
$style_color = 'style="color:#' . $theme['fontcolor2'] . '"';
}
Calendar lite 1.4.1c
in der mycalendar.php (nirgendwo in der calendar.php)
ob dir das weiterhilft
Code: Alles auswählen
$current_isodate = $monthView['year'] . '-' . $monthView['month'] . '-' . sprintf('%02d', $day) . ' 00:00:00';
$query = "SELECT
c.*,
t.topic_title,
pt.post_text,
pt.bbcode_uid,
t.topic_views,
t.topic_replies,
f.forum_name,
f.auth_read,
(cal_interval_units = 'DAY' && cal_interval = 1 && '$current_isodate' = INTERVAL (cal_interval * (cal_repeat - 1)) DAY + cal_date) as block_end
FROM
" . MYCALENDAR_TABLE . " as c,
" . TOPICS_TABLE . " as t,
" . FORUMS_TABLE . " as f,
" . POSTS_TEXT_TABLE . " as pt
WHERE
c.forum_id = f.forum_id
AND
c.topic_id = t.topic_id
AND
f.events_forum > 0
AND
pt.post_id = t.topic_first_post_id
AND
'$current_isodate' >= cal_date
AND
(
# If the repeat is forever just continue here
cal_repeat = 0
OR
(
# If the repeat is limited, then make sure we are not past the end
cal_repeat > 0
AND
(
(cal_interval_units = 'DAY' AND ('$current_isodate' <= INTERVAL (cal_interval * (cal_repeat - 1)) DAY + cal_date))
OR
(cal_interval_units = 'WEEK' AND ('$current_isodate' <= INTERVAL ((cal_interval * (cal_repeat - 1)) * 7) DAY + cal_date))
OR
(cal_interval_units = 'MONTH' AND ('$current_isodate' <= INTERVAL (cal_interval * (cal_repeat - 1)) MONTH + cal_date))
OR
(cal_interval_units = 'YEAR' AND ('$current_isodate' <= INTERVAL (cal_interval * (cal_repeat - 1)) YEAR + cal_date))
)
)
)
AND
(
(
cal_interval_units = 'DAY'
AND
(TO_DAYS('$current_isodate') - TO_DAYS(cal_date)) % cal_interval = 0
)
OR
(
cal_interval_units = 'WEEK'
AND
(TO_DAYS('$current_isodate') - TO_DAYS(cal_date)) % (7 * cal_interval) = 0
)
OR
(
cal_interval_units = 'MONTH'
AND
DAYOFMONTH(cal_date) = DAYOFMONTH('$current_isodate')
AND
PERIOD_DIFF(DATE_FORMAT('$current_isodate', '%Y%m'), DATE_FORMAT(cal_date, '%Y%m')) % cal_interval = 0
)
OR
(
cal_interval_units = 'YEAR'
AND
DATE_FORMAT(cal_date, '%m%d') = DATE_FORMAT('$current_isodate', '%m%d')
AND
(YEAR('$current_isodate') - YEAR(cal_date)) % cal_interval = 0
)
)
ORDER BY
cal_interval_units ASC,
cal_date ASC,
cal_repeat DESC";
if (!$result = $db->sql_query($query)) {
message_die(GENERAL_ERROR, 'Error querying dates for calendar.');
}
$numEvents = 0;
while ($topic = $db->sql_fetchrow($result)) {
$is_auth = array();
$is_auth = auth(AUTH_ALL, $topic['forum_id'], $userdata);
if ( $is_auth['auth_read'] ) {
$topic_id = $topic['topic_id'];
Verfasst: 29.04.2003 11:11
von Gast
..ersetz ma das testweise mit..
Code: Alles auswählen
if ( $is_auth['auth_read'] || $userdata['user_level'] == JUNIOR_ADMIN ) {
...zeig mir ma wie der abgeänderte Codebereich mit der "JUNIOR_ADMIN kriegt ´ne Farbe"-Abfrage aussieht.
Verfasst: 29.04.2003 11:54
von Murphy
so siehts jetzt aus (weisser Schirm)
Code: Alles auswählen
{
$style_color = "";
if( $todayrow['user_level'] == ADMIN )
{
$todayrow['username'] = '<b>' . $todayrow['username'] . '</b>';
$style_color = 'style="color:#' . $theme['fontcolor3'] . '"';
}
else if( $todayrow['user_level'] == MOD )
{
$todayrow['username'] = '<b>' . $todayrow['username'] . '</b>';
$style_color = 'style="color:#' . $theme['fontcolor2'] . '"';
}
else if( $todayrow['user_level'] == JUNIOR ADMIN )
{
$todayrow['username'] = '<b>' . $todayrow['username'] . '</b>';
$style_color = 'style="color:#' . $theme['fontcolor1'] . '"';
}
änderungen in der mycalendar.php brachten leider keine veränderungen !
Verfasst: 04.05.2003 10:43
von Murphy
denkst du nochmal an mich?

Verfasst: 04.05.2003 11:09
von Acid
Ich bin mir nicht sicher, aber setz ma den JUNIOR Part vor den MOD Part.

Verfasst: 04.05.2003 12:04
von Murphy
leider nein!
ich habe jetzt alle varianten ausprobiert.
theme weggelassen, mod weggelassen - style vom mod übernommen usw.
ich habe die vermutung, es liegt am "==Junior Admin"
da er damit nchts anfangen kann, weisse seite.
vielleicht nicht die richtige bezeichnung?
am last visit - myadmin scheints nicht zu liegen.
legt auch nur allgemeine daten ab.
könnte es sein, dass er nur zwischen - "Admin" und "Mod" unterscheiden kann?
müsste dann nicht eine zuweisung/abfrage im phpbb_table extra für
für den junior admin kommen?
bei "whos online" wirds ja auch umgesetzt.
Verfasst: 04.05.2003 12:22
von Acid
else if( $todayrow['user_level'] == JUNIOR_ADMIN )
..du hast da was vergessen.
