Pomoc - Szukaj - Użytkownicy - Kalendarz
Pełna wersja: [PHP]Problem z wyglądem strony po zalogowaniu
Forum PHP.pl > Forum > Przedszkole
glutek97
A więc mam taki o to problem. Po zalogowaniu się za stronie dodaję się ramka na samym dole menu ( po lewej stronie pod napisem Shop Offer ) oraz czarny pasek u dołu strony. Wygląda to tak Problem z layout. Brzydko ale sam sobie nie umiem poradzić. Chciałbym żeby menu się kończyło normalną grafiką a czarny pasek został w kolorze tapety. Może ktoś będzie w stanie pomóc. Wklejam jeszcze plik layout.php, ale niestety będą to musiał zrobić na 2 posty. Dziękuję za każdą pomoc.

  1. <html xmlns="http://www.w3.org/1999/xhtml">
  2. <head>
  3. <title><?PHP echo $title ?></title>
  4. <meta name="description" content="Tibia is a free massive multiplayer online role playing game (MMORPG)." />
  5. <meta name="author" content="Gesior" />
  6. <meta http-equiv="content-language" content="en" />
  7. <meta http-equiv="content-type" content="text/html; charset=UTF-8"/>
  8. <meta name="keywords" content="free online game, free multiplayer game, ots, open tibia server" />
  9. <link rel="shortcut icon" href="<?PHP echo $layout_name; ?>/images/tisania.png" type="image/x-icon">
  10. <link rel="icon" href="<?PHP echo $layout_name; ?>/images/tisania.png" type="image/x-icon">
  11. <?PHP echo $layout_header; ?>
  12. <link href="<?PHP echo $layout_name; ?>/basic.css" rel="stylesheet" type="text/css">
  13. <link rel="stylesheet" href="<?PHP echo $layout_name; ?>/tooltip.css" type="text/css" media="screen">
  14. <script src="<?PHP echo $layout_name; ?>/js/tooltip.js" type="text/javascript"></script>
  15. <script src="<?PHP echo $layout_name; ?>/js/flash.js" type="text/javascript"></script>
  16.  
  17. <script type='text/javascript'> var IMAGES=0; IMAGES='http://static.tibia.com/images'; var g_FormField='';</script>
  18. <script TYPE="text/javascript">
  19. <div id="page">
  20. <div id="logo-art">
  21. <div id="logo-box"></div>
  22. <!-- // Framekiller
  23. setTimeout ("changePage()", 6000);
  24. function changePage()
  25. {
  26. if (parent.frames.length > 2) {
  27. if (browserTyp == "ie") {
  28. parent.location=document.location;
  29. } else {
  30. self.top.location=document.location;
  31. }
  32. }
  33. }
  34. // -->
  35. </SCRIPT>
  36. <script type="text/javascript">
  37. state = new Array("0", "0", "0", "0", "0");
  38. function TickerAction(id) {
  39. var line = id.substr(12, 1);
  40. if(state[line] == "0") {
  41. state[line] = "1";
  42. OpenNews(id);
  43. }
  44. else {
  45. state[line] = "0";
  46. CloseNews(id);
  47. }
  48. }
  49.  
  50. function OpenNews(id)
  51. {
  52. var div = document.getElementById(id)
  53. var idShort = id.concat("-ShortText");
  54. var idMore = id.concat("-FullText");
  55. var idButton = id.concat("-Button");
  56. document.getElementById(idShort).style.display = "none";
  57. document.getElementById(idMore).style.display = "block";
  58. document.getElementById(idButton).style.backgroundImage = "url('<?PHP echo $layout_name; ?>/images/general/plus.gif')";
  59. }
  60.  
  61. function CloseNews(id)
  62. {
  63. var div = document.getElementById(id)
  64. var idShort = id.concat("-ShortText");
  65. var idMore = id.concat("-FullText");
  66. var idButton = id.concat("-Button");
  67. document.getElementById(idShort).style.display = "block";
  68. document.getElementById(idMore).style.display = "none";
  69. document.getElementById(idButton).style.backgroundImage = "url('<?PHP echo $layout_name; ?>/images/general/plus.gif')";
  70. }
  71.  
  72. function InitializePage() {
  73. LoadLoginBox();
  74. LoadMenu();
  75. }
  76.  
  77.  
  78. // initialisation of the loginbox status by the value of the variable 'loginStatus' which is provided to the HTML-document by PHP in the file 'header.inc'
  79. function LoadLoginBox()
  80. {
  81. if(loginStatus == "false") {
  82. document.getElementById('LoginstatusText_1').style.backgroundImage = "url('<?PHP echo $layout_name; ?>/images/loginbox/loginbox-font-you-are-not-logged-in.gif')";
  83. document.getElementById('ButtonText').style.backgroundImage = "url('<?PHP echo $layout_name; ?>/images/buttons/_sbutton_login.gif')";
  84. document.getElementById('LoginstatusText_2').style.backgroundImage = "url('<?PHP echo $layout_name; ?>/images/loginbox/loginbox-font-create-account.gif')";
  85. document.getElementById('LoginstatusText_2_1').style.backgroundImage = "url('<?PHP echo $layout_name; ?>/images/loginbox/loginbox-font-create-account.gif')";
  86. document.getElementById('LoginstatusText_2_2').style.backgroundImage = "url('<?PHP echo $layout_name; ?>/images/loginbox/loginbox-font-create-account-over.gif')";
  87. } else {
  88. document.getElementById('LoginstatusText_1').style.backgroundImage = "url('<?PHP echo $layout_name; ?>/images/loginbox/loginbox-font-welcome.gif')";
  89. document.getElementById('ButtonText').style.backgroundImage = "url('<?PHP echo $layout_name; ?>/images/buttons/_sbutton_myaccount.gif')";
  90. document.getElementById('LoginstatusText_2').style.backgroundImage = "url('<?PHP echo $layout_name; ?>/images/loginbox/loginbox-font-logout.gif')";
  91. document.getElementById('LoginstatusText_2_1').style.backgroundImage = "url('<?PHP echo $layout_name; ?>/images/loginbox/loginbox-font-logout.gif')";
  92. document.getElementById('LoginstatusText_2_2').style.backgroundImage = "url('<?PHP echo $layout_name; ?>/images/loginbox/loginbox-font-logout-over.gif')";
  93. }
  94. }
  95.  
  96. // mouse-over and click events of the loginbox
  97. function MouseOverLoginBoxText(source)
  98. {
  99. source.lastChild.style.visibility = "visible";
  100. source.firstChild.style.visibility = "hidden";
  101. }
  102. function MouseOutLoginBoxText(source)
  103. {
  104. source.firstChild.style.visibility = "visible";
  105. source.lastChild.style.visibility = "hidden";
  106. }
  107. function LoginButtonAction()
  108. {
  109. if(loginStatus == "false") {
  110. window.location = LINK_ACCOUNT + "?subtopic=accountmanagement";
  111. } else {
  112. window.location = LINK_ACCOUNT + "?subtopic=accountmanagement";
  113. }
  114. }
  115. function LoginstatusTextAction(source) {
  116. if(loginStatus == "false") {
  117. window.location = LINK_ACCOUNT + "?subtopic=createaccount";
  118. } else {
  119. window.location = LINK_ACCOUNT + "?subtopic=accountmanagement&action=logout";
  120. }
  121. }
  122.  
  123. var menu = new Array();
  124. menu[0] = new Object();
  125. var unloadhelper = false;
  126.  
  127. // load the menu and set the active submenu item by using the variable 'activeSubmenuItem' (provided to HTML-document by PHP in the file 'header.inc'
  128. function LoadMenu()
  129. {
  130. document.getElementById("submenu_"+activeSubmenuItem).style.color = "white";
  131. document.getElementById("ActiveSubmenuItemIcon_"+activeSubmenuItem).style.visibility = "visible";
  132. if(self.name.lastIndexOf("&") == -1) {
  133. self.name = "news=1&account=0&community=0&library=0&forum=0<?PHP if($config['site']['shop_system'] == 1) echo "&shops=0"; ?>&";
  134. }
  135. FillMenuArray();
  136. InitializeMenu();
  137. }
  138.  
  139. function SaveMenu()
  140. {
  141. if(unloadhelper == false) {
  142. SaveMenuArray();
  143. unloadhelper = true;
  144. }
  145. }
  146.  
  147. // store the values of the variable 'self.name' in the array menu
  148. function FillMenuArray()
  149. {
  150. while(self.name.length > 0 ){
  151. var mark1 = self.name.indexOf("=");
  152. var mark2 = self.name.indexOf("&");
  153. var menuItemName = self.name.substr(0, mark1);
  154. menu[0][menuItemName] = self.name.substring(mark1 + 1, mark2);
  155. self.name = self.name.substr(mark2 + 1, self.name.length);
  156. }
  157. }
  158.  
  159. // hide or show the corresponding submenus
  160. function InitializeMenu()
  161. {
  162. for(menuItemName in menu[0]) {
  163. if(menu[0][menuItemName] == "0") {
  164. document.getElementById(menuItemName+"_Submenu").style.visibility = "hidden";
  165. document.getElementById(menuItemName+"_Submenu").style.display = "none";
  166. document.getElementById(menuItemName+"_Lights").style.visibility = "visible";
  167. document.getElementById(menuItemName+"_Extend").style.backgroundImage = "url('<?PHP echo $layout_name; ?>/images/general/plus.gif')";
  168. }
  169. else {
  170. document.getElementById(menuItemName+"_Submenu").style.visibility = "visible";
  171. document.getElementById(menuItemName+"_Submenu").style.display = "block";
  172. document.getElementById(menuItemName+"_Lights").style.visibility = "hidden";
  173. document.getElementById(menuItemName+"_Extend").style.backgroundImage = "url('<?PHP echo $layout_name; ?>/images/general/minus.gif')";
  174. }
  175. }
  176. }
  177.  
  178. // reconstruct the variable "self.name" out of the array menu
  179. function SaveMenuArray()
  180. {
  181. var stringSlices = "";
  182. var temp = "";
  183. for(menuItemName in menu[0]) {
  184. stringSlices = menuItemName + "=" + menu[0][menuItemName] + "&";
  185. temp = temp + stringSlices;
  186. }
  187. self.name = temp;
  188. }
  189.  
  190. // onClick open or close submenus
  191. function MenuItemAction(sourceId)
  192. {
  193. if(menu[0][sourceId] == 1) {
  194. CloseMenuItem(sourceId);
  195. }
  196. else {
  197. OpenMenuItem(sourceId);
  198. }
  199. }
  200. function OpenMenuItem(sourceId)
  201. {
  202. menu[0][sourceId] = 1;
  203. document.getElementById(sourceId+"_Submenu").style.visibility = "visible";
  204. document.getElementById(sourceId+"_Submenu").style.display = "block";
  205. document.getElementById(sourceId+"_Lights").style.visibility = "hidden";
  206. document.getElementById(sourceId+"_Extend").style.backgroundImage = "url('<?PHP echo $layout_name; ?>/images/general/minus.gif')";
  207. }
  208. function CloseMenuItem(sourceId)
  209. {
  210. menu[0][sourceId] = 0;
  211. document.getElementById(sourceId+"_Submenu").style.visibility = "hidden";
  212. document.getElementById(sourceId+"_Submenu").style.display = "none";
  213. document.getElementById(sourceId+"_Lights").style.visibility = "visible";
  214. document.getElementById(sourceId+"_Extend").style.backgroundImage = "url('<?PHP echo $layout_name; ?>/images/general/plus.gif')";
  215. }
  216.  
  217.  
  218. </script>
  219. </head>
glutek97
W pierwszym poście widać na zdjęciu o co mi chodzi. Gdybym wiedział, które linijki za to odpowiadają to sam bym sobie poradził. Może ktoś mi podpowie czego szukać w layout.php. Nie jestem doświadczonym webmasterem.
gigzorr
najedź na to firebugiem i zobacz co to jest.
glutek97
Zaznaczyło mi ta linijkę
  1. <div onmouseout="MouseOutSubmenuItem(this)" onmouseover="MouseOverSubmenuItem(this)" class="Submenuitem" id="submenu_shopadmin">
  2. <div style="background-image: url(&quot;layouts/tisania/images/menu/icon-activesubmenu.gif&quot;);" class="ActiveSubmenuItemIcon" id="ActiveSubmenuItemIcon_shopadmin"></div>
  3. <div class="SubmenuitemLabel">Shop Admin</div>
  4. </div>
To jest wersja lo-fi głównej zawartości. Aby zobaczyć pełną wersję z większą zawartością, obrazkami i formatowaniem proszę kliknij tutaj.
Invision Power Board © 2001-2025 Invision Power Services, Inc.