Autor | Zpráva | ||
---|---|---|---|
PePe15th Profil |
#1 · Zasláno: 14. 1. 2011, 17:32:45
Zdravím,
mám problém s tímto kódem: <div class="novehryh"> <?php defined( 'AVARCADE_' ) or die( '' ); $category_games = mysql_query("SELECT * FROM ava_games WHERE published=1 ORDER BY id desc LIMIT 6"); while($cat_games = mysql_fetch_array($category_games)) { $featured_game = array('plays' => $cat_games['hits']); if (strlen($cat_games['name']) > $template['home_game_chars']) { $featured_game['name'] = substr($cat_games['name'], 0, $template['home_game_chars']).""; } else { $featured_game['name'] = $cat_games['name']; } if (strlen($cat_games['description']) > $template['home_game_desc_chars']) { $featured_game['description'] = substr($cat_games['description'], 0, 20)."..."; } if ($setting['seo_on'] == 0) { $featured_game['url'] = $setting['site_url'].'/index.php?task=view&id='.$cat_games['id']; } else if ($setting['seo_on'] == 2) { $cat_name = mysql_fetch_array(mysql_query("SELECT name FROM ava_cats WHERE id=$cat_games[category_id]")); $seo_name = seoname($cat_games['name']); $seo_cat_name = seoname($cat_name['name']); $featured_game['url'] = $setting['site_url'].'/'.$seo_cat_name.'/'.$cat_games['id'].'/'.$seo_name.$setting['seo_extension']; } else { $seo_name = seoname($cat_games['name']); $featured_game['url'] = $setting['site_url'].'/view/'.$cat_games['id'].'/'.$seo_name.$setting['seo_extension']; } if ($cat_games['import'] == 1) { $featured_game['image_url'] = $setting['site_url'].'/games/images/'.$cat_games['url'].'.png'; } else if ($cat_games['import'] == 3) { $featured_game['image_url'] = $setting['site_url'].'/games/images/'.$cat_games['image']; } else { $featured_game['image_url'] = $cat_games['image']; } if ($user['admin'] == 1) { $featured_game['admin_edit'] = '<a href="'.$setting['site_url'].'/admin/?task=manage_games&id='.$cat_games['id'].'">Edit</a>'; } else { $featured_game['admin_edit'] = ''; } $game = array('plays' => $cat_games['hits']); if (strlen($cat_games['name']) > $template['home_game_chars']) { $game['name'] = substr($cat_games['name'], 0, $template['home_game_chars'])."..."; } else { $game['name'] = $cat_games['name']; } $game['description'] = $cat_games['description']; if ($setting['seo_on'] == 0) { $game['url'] = $setting['site_url'].'/index.php?task=view&id='.$cat_games['id'];} else if ($setting['seo_on'] == 2) { $seo_name = seoname($cat_games['name']); $seo_cat_name = seoname($category['name']); $game['url'] = $setting['site_url'].'/'.$seo_cat_name.'/'.$cat_games['id'].'/'.$seo_name.$setting['seo_extension']; } else { $seo_name = seoname($cat_games['name']); $game['url'] = $setting['site_url'].'/view/'.$cat_games['id'].'/'.$seo_name.$setting['seo_extension']; } if ($cat_games['import'] == 1) { $game['image_url'] = $setting['site_url'].'/games/images/'.$cat_games['url'].'.png'; } else if ($cat_games['import'] == 3) { $game['image_url'] = $setting['site_url'].'/games/images/'.$cat_games['image']; } else { $game['image_url'] = $cat_games['image']; } if ($user['admin'] == 1) { $game['admin_edit'] = '<a href="'.$setting['site_url'].'/admin/?task=manage_games&id='.$cat_games['id'].'">Edit</a>'; } else { $game['admin_edit'] = ''; } // Define the overall rating for use in the template $featured_game['rating'] = GenerateRating($cat_games['rating'], 'featured'); include('.'.$setting['template_url'].'/'.$template['featured_game']); } ?> </div> Konkrétně s řádkem $game['description'] = $cat_games['description'] (řádek 64); , tento řádek zobrazuje popis hry v headeru stránky exgames.cz (mimojiné je tam i obrázek, hodnocení a nadpis Fish Catcher atd.) Pokud si zobrazíte jakoukoliv hru, zobrazí se u každé tento text: Popis: Jak byste bránili svou vlajku z vlny nepřátel? Chtěli byste Commando nebo možná torpédoborec, který neponechává nic v cestě? Vytvořit bludiště s barikádami. Pokud onen řádek odstraním ($game['de...), popis se u každé hry zobrazí správně, ale samozřejmě popis v headeru žádný. Děkuji za každou odpověď. Přidám kód featured_game (řádek 98): <?php echo ' <div id="novahra"> <a href="'.$featured_game['url'].'" title="Hrát hru '.$featured_game['name'].'"> <ins><p class="img"><img src="'.$featured_game['image_url'].'" height="73" width="130" alt="'.$featured_game['name'].'" /></p></ins> <ins><h2>'.$featured_game['name'].'</h2></ins> <ins><p class="text">'.$game['description'].'</p></ins> <ins><p class="hvezdy">'.$featured_game['rating'].'</p></ins> </a> </div>'; ?> |
||
Kajman_ Profil * |
#2 · Zasláno: 15. 1. 2011, 21:40:12
Zkuste minimalizovat kód, ve kterém se chyba projevuje.
|
||
Časová prodleva: 11 let
|
0