Hallo mgalaxy,
also die Version 1.0.1 funktioniert auch fehlerfrei mit 3.0.6, jedenfalls habe ich keine Fehler bei mir gefunden.
Deiner Beschreibung nach könnte es doch ein Einbaufehler sein und zwar die Stelle für die functions.php. Da ist es etwas unverständlich beschrieben:
Find
Tip: This may be a partial find and not the whole line.
Code: Alles auswählen
// The following assigns all _common_ variables that may be used at any point in a template.
$template->assign_vars(array(
Replace With
Tip: Replace the preceding line(s) to find with the following lines.
Code: Alles auswählen
// Start output Ad
$adID = '';
$forum_id = isset($f) ? $f : 0;
$sql = "SELECT a.code, a.ad_id, a.position, a.type, a.image, a.url, a.height, a.width
FROM " . AD_TABLE ." a, " . USER_GROUP_TABLE . " g
WHERE (a.max_views >= a.views OR a.max_views = '0')
AND (FIND_IN_SET(" . $forum_id . ", a.show_forums) > 0 OR a.show_all_forums = '1')
AND g.user_id = " . $user->data['user_id'] . "
AND FIND_IN_SET(g.group_id, a.groups)
AND FIND_IN_SET(" . $user->data['user_rank'] . ", a.ranks)
AND a.start_time < " . time() . "
AND a.end_time > " . time() . "
AND (a.clicks <= a.max_clicks OR a.max_clicks = '0')
ORDER BY rand()";
$result = $db->sql_query($sql, 3600);
while($row = $db->sql_fetchrow($result))
{
if ($row['type'] == 2)
{
$adcode[$row['position']] = '<a href="' . $phpbb_root_path . 'adclick.' . $phpEx . '?id=' . $row['ad_id'] . '"><img src="' . $row['image'] . '" height="' . $row['height'] . '" width="' . $row['width'] . '" alt="" /></a>';
}
else
{
$adcode[$row['position']] = html_entity_decode($row['code']);
}
$adID[$row['position']]['ad_id'] = $row['ad_id'];
}
$db->sql_freeresult($result);
// update views for every Ad
$ad_ids = array();
for ($i = 1; $i <= 6; $i++)
{
if (isset($adID[$i]['ad_id']))
{
$ad_ids[] = $adID[$i]['ad_id'];
}
}
if(sizeof($ad_ids))
{
$db->sql_query('UPDATE ' . AD_TABLE . ' SET views = views +1 WHERE ' . $db->sql_in_set('ad_id', $ad_ids));
}
// End output Ad
// The following assigns all _common_ variables that may be used at any point in a template.
$template->assign_vars(array(
'AD_CODE1' => isset($adcode[1]) ? $adcode[1] : '',
'AD_CODE2' => isset($adcode[2]) ? $adcode[2] : '',
'AD_CODE3' => isset($adcode[3]) ? $adcode[3] : '',
'AD_CODE4' => isset($adcode[4]) ? $adcode[4] : '',
'AD_CODE5' => isset($adcode[5]) ? $adcode[5] : '',
'AD_CODE6' => isset($adcode[6]) ? $adcode[6] : '',
Besser wäre es so in der Beschreibung:
Find
Tip: This may be a partial find and not the whole line.
Code: Alles auswählen
// The following assigns all _common_ variables that may be used at any point in a template.
$template->assign_vars(array(
Add before
Tip: Add these lines on a new blank line before the preceding line(s) to find.
Code: Alles auswählen
// Start output Ad
$adID = '';
$forum_id = isset($f) ? $f : 0;
$sql = "SELECT a.code, a.ad_id, a.position, a.type, a.image, a.url, a.height, a.width
FROM " . AD_TABLE ." a, " . USER_GROUP_TABLE . " g
WHERE (a.max_views >= a.views OR a.max_views = '0')
AND (FIND_IN_SET(" . $forum_id . ", a.show_forums) > 0 OR a.show_all_forums = '1')
AND g.user_id = " . $user->data['user_id'] . "
AND FIND_IN_SET(g.group_id, a.groups)
AND FIND_IN_SET(" . $user->data['user_rank'] . ", a.ranks)
AND a.start_time < " . time() . "
AND a.end_time > " . time() . "
AND (a.clicks <= a.max_clicks OR a.max_clicks = '0')
ORDER BY rand()";
$result = $db->sql_query($sql, 3600);
while($row = $db->sql_fetchrow($result))
{
if ($row['type'] == 2)
{
$adcode[$row['position']] = '<a href="' . $phpbb_root_path . 'adclick.' . $phpEx . '?id=' . $row['ad_id'] . '"><img src="' . $row['image'] . '" height="' . $row['height'] . '" width="' . $row['width'] . '" alt="" /></a>';
}
else
{
$adcode[$row['position']] = html_entity_decode($row['code']);
}
$adID[$row['position']]['ad_id'] = $row['ad_id'];
}
$db->sql_freeresult($result);
// update views for every Ad
$ad_ids = array();
for ($i = 1; $i <= 6; $i++)
{
if (isset($adID[$i]['ad_id']))
{
$ad_ids[] = $adID[$i]['ad_id'];
}
}
if(sizeof($ad_ids))
{
$db->sql_query('UPDATE ' . AD_TABLE . ' SET views = views +1 WHERE ' . $db->sql_in_set('ad_id', $ad_ids));
}
// End output Ad
Add after
Tip: Add these lines on a new blank line after the preceding line(s) to find.
Code: Alles auswählen
'AD_CODE1' => isset($adcode[1]) ? $adcode[1] : '',
'AD_CODE2' => isset($adcode[2]) ? $adcode[2] : '',
'AD_CODE3' => isset($adcode[3]) ? $adcode[3] : '',
'AD_CODE4' => isset($adcode[4]) ? $adcode[4] : '',
'AD_CODE5' => isset($adcode[5]) ? $adcode[5] : '',
'AD_CODE6' => isset($adcode[6]) ? $adcode[6] : '',
Bei diesem Teil der Änderungen passieren die meisten Einbaufehler weil davon die Anzeige der Seite direkt betroffen ist. Bitte prüfe diese Stelle bei dir noch einmal und ändere es ggf. entsprechend ab.
Im übrigen wirken sich auch fehlerhafte HTML Banner aus, da hierbei der HTML Code direkt in die Seite eingebunden wird. Zur Sicherhet probierst es zuerst einmal mit den normalen Bannern aus oder nimmst einen einfachen Testcode wie etwa <b>Test</b> um zu sehen ob überhaut was angezeigt wird.
Dann ist es in der Beschreibung auch nicht so genau erklärt dass du im ACP bei der Eintragung der Banner zwingend die berechtigten Gruppen eintragen musst, sonst wird garnichts angezeigt.
Gruß Helmut