Seite 96 von 110
Re: [BETA] Version 0.3.5 - Formel 1 WebTipp - phpBB3
Verfasst: 25.03.2011 12:48
von murphyz
ah - created a quick file to see the server time:
http://www.murphyz.com/clock.php
I see this is indeed 6 hours behind my local time.
Is it best for me to offset the time by 6 hours in future, or should I change my board settings to match my server time?
thank you.
Re: [BETA] Version 0.3.5 - Formel 1 WebTipp - phpBB3
Verfasst: 25.03.2011 13:33
von Dr.Death
Set your UCP Timezone to the server timezone settings if you edit the racetimes.
All other settings should work automaticly. (Deadline)
Re: [BETA] Version 0.3.6 - Formel 1 WebTipp - phpBB3
Verfasst: 26.05.2011 15:48
von Dr.Death
Neue Version 0.3.6 released.
Die Update Anleitung findet Ihr im Ordner "contrib" --> update_035_to_036.xml
Re: [BETA] Version 0.3.6 - Formel 1 WebTipp - phpBB3
Verfasst: 26.05.2011 17:36
von DreamPromise
Moin moin
wir bekommen eine Meldung wenn man einen Beitrag aufrufen will:
Fatal error: Call to undefined function get_formel_auth() in /www/htdocs/w00943a5/viewtopic.php on line 1684
https://www.phpbb.de/support/pastebin.p ... view&s=720
Danke
Re: [BETA] Version 0.3.6 - Formel 1 WebTipp - phpBB3
Verfasst: 26.05.2011 18:44
von Dr.Death
Danke für den Hinweis.
Da ist ein Code Fragment aus einer alten Version herein gerutscht.
Ich werde ein Update heute Abend dazu erstellen.
Bis dahin baue die Änderungen in der viewtopic.php bitte wieder aus.
Re: [BETA] Version 0.3.6 - Formel 1 WebTipp - phpBB3
Verfasst: 26.05.2011 20:05
von Dr.Death
Der kleine Copy Paste Fehler in den Anleitungen sollte nun behoben sein.
Bitte das Paket erneut herunterladen.
Wer wissen möchte wo der Fehler war: Rot muss raus, grün muss rein:
https://github.com/DrDeath/phpBB3-F1-We ... 288f7e7211
Re: [BETA] Version 0.3.6 - Formel 1 WebTipp - phpBB3
Verfasst: 27.05.2011 08:05
von tekknodevil
Danke fürs Update. Eine Frage habe ich zum Update trotzdem:
In der viewtopic.php, soll ich vor:
Code: Alles auswählen
// Dump vars into template
$template->assign_block_vars('postrow', $postrow);
das einfügen:
Code: Alles auswählen
//
// F1 WebTipp
//
if (!function_exists('get_formel_config'))
{
include ($phpbb_root_path . 'includes/functions_formel.'.$phpEx);
}
$formel_config = get_formel_config();
$user->setup('mods/formel');
if ($formel_config['show_in_viewtopic'])
{
// Check if this user has one of the formular 1 admin permission. If this user has one or more of these permissions, he gets also moderator permissions.
$is_admin = $auth->acl_gets('a_formel_settings', 'a_formel_drivers', 'a_formel_teams', 'a_formel_races');
//Is the user member of the restricted group?
if (!function_exists('group_memberships'))
{
include ($phpbb_root_path . 'includes/functions_user.'.$phpEx);
}
$is_in_group = group_memberships($formel_config['restrict_to'], $user->data['user_id'], true);
if ($formel_config['restrict_to'] == 0 || $is_in_group || $is_admin == 1 || $user->data['user_id'] == $formel_config['mod_id'])
{
$tippers_rank = $user->lang['FORMEL_PROFILE_NORANK'];
$tippers_points = 0;
$race_done = 0;
// Get tipp data for this user
$sql = 'SELECT *, sum(tipp_points) as total_points, count(tipp_points) as tipps_made
FROM ' . FORMEL_TIPPS_TABLE . '
GROUP BY tipp_user
ORDER BY total_points DESC';
$result = $db->sql_query($sql);
$rank_count = $real_rank = 1;
$previous_points = false;
while ($row_f1 = $db->sql_fetchrow($result))
{
if ($row_f1['total_points'] != $previous_points)
{
$rank_count = $real_rank;
$previous_points = $row_f1['total_points'];
}
if ($row_f1['tipp_user'] == $poster_id)
{
$tippers_points = $row_f1['total_points'];
$race_done = $row_f1['tipps_made'];
$tippers_rank = sprintf($user->lang['FORMEL_PROFILE_RANK'], $rank_count);
break;
}
$real_rank++;
}
$db->sql_freeresult($result);
// Count total races with existing results
$sql = 'SELECT *
FROM ' . FORMEL_RACES_TABLE . '
WHERE race_result <> 0';
$result = $db->sql_query($sql);
$race_total = $db->sql_affectedrows($result);
$db->sql_freeresult($result);
$formel1 = array(
'TIPPER_POINTS' => $tippers_points,
'TIPPER_RANK' => $tippers_rank,
'RACE_DONE' => sprintf($user->lang['FORMEL_PROFILE_TIPSS'], $race_done, $race_total),
'U_FORMEL_STATS' => append_sid("formel.$phpEx?mode=stats"),
'U_FORMEL_WEB_TIPP' => append_sid("formel.$phpEx"),
);
$postrow = array_merge($postrow, $formel1);
}
}
//
// END of F1 WebTipp
//
Dort steht bei mir aber schon der Code aus Version 0.3.5:
Code: Alles auswählen
//
// F1 WebTipp
//
include_once($phpbb_root_path . 'includes/functions_formel.'.$phpEx);
$formel_config = get_formel_config();
$user->setup('mods/formel');
if ( $formel_config['show_in_profile'] )
{
// Check if this user has one of the formular 1 admin permission. If this user has one or more of these permissions, he gets also moderator permissions.
$is_admin = $auth->acl_gets('a_formel_settings', 'a_formel_drivers', 'a_formel_teams', 'a_formel_races');
if ( $formel_config['restrict_to'] == 0 || get_formel_auth() || $is_admin == 1 || $user->data['user_id'] == $formel_config['mod_id'] )
{
$tippers_rank = $user->lang['FORMEL_PROFILE_NORANK'];
$tippers_points = 0;
$race_done = 0;
// Get tipp data for this user
$sql = 'SELECT *, sum(tipp_points) as total_points, count(tipp_points) as tipps_made
FROM ' . FORMEL_TIPPS_TABLE . '
GROUP BY tipp_user
ORDER BY total_points DESC';
$result = $db->sql_query($sql);
$rank_count = $real_rank = 1;
$previous_points = false;
while ($row_f1 = $db->sql_fetchrow($result))
{
if($row_f1['total_points'] != $previous_points)
{
$rank_count = $real_rank;
$previous_points = $row_f1['total_points'];
}
if ( $row_f1['tipp_user'] == $poster_id )
{
$tippers_points = $row_f1['total_points'];
$race_done = $row_f1['tipps_made'];
$tippers_rank = sprintf($user->lang['FORMEL_PROFILE_RANK'], $rank_count);
break;
}
$real_rank++;
}
$db->sql_freeresult($result);
// Count total races with existing results
$sql = 'SELECT *
FROM ' . FORMEL_RACES_TABLE . '
WHERE race_result <> 0';
$result = $db->sql_query($sql);
$race_total = $db->sql_affectedrows($result);
$db->sql_freeresult($result);
$formel1 = array(
'TIPPER_POINTS' => $tippers_points,
'TIPPER_RANK' => $tippers_rank,
'RACE_DONE' => sprintf($user->lang['FORMEL_PROFILE_TIPSS'], $race_done, $race_total),
'U_FORMEL_STATS' => append_sid("formel.$phpEx?mode=stats"),
'U_FORMEL_WEB_TIPP' => append_sid("formel.$phpEx"),
);
$postrow = array_merge($postrow, $formel1);
}
}
//
// END of F1 WebTipp
//
Bleibt dieser drin, oder lösche ich dies raus?
Re: [BETA] Version 0.3.6 - Formel 1 WebTipp - phpBB3
Verfasst: 27.05.2011 18:07
von Dr.Death
Wenn der Code schon drin steht, ersetze ihn. Du hattest ggf. das AddOn bereits eingebaut.
In der Version 0.3.5 war das Addon nicht inklusive.
Re: [BETA] Version 0.3.6 - Formel 1 WebTipp - phpBB3
Verfasst: 30.05.2011 09:26
von tekknodevil
Dr.Death hat geschrieben:Wenn der Code schon drin steht, ersetze ihn. Du hattest ggf. das AddOn bereits eingebaut.
In der Version 0.3.5 war das Addon nicht inklusive.
Ja, Danke. Mein Fehler. Ich hatte vorher schonmal was aus dem Github genommen. Läuft alles.
Re: [BETA] Version 0.3.6 - Formel 1 WebTipp - phpBB3
Verfasst: 04.06.2011 08:04
von Hinderdaeler
Hallo,
mal ne blöde Frage, Gibt es irgend wie die Möglichkeit den Webtipp doppelt laufen zu lassen? Z.b. einmal für F1, und dann noch für Moto GP oder sonst eine Rennserie?