vForums Support > vForums :: Report a Bug :: Resolved Bugs :: > Adding A Button Error

Adding A Button Error - Posted By dog199200 (dog199200) on 10th May 08 at 12:34am
http://overobvious.vforums.co.uk/

Please dont tell me to move this, this has to be a forum error because i have used the code on may forums before. For some reason the add menu button (in this case my rp button) when clicked logs members out....so since i have use dthis exact code may times and i have even tried to recopy it from the database and yet the same error i'm thinking there is an error in the forum.


Re: Adding A Button Error - Posted By Michael (wrighty) on 10th May 08 at 12:37am
change the link for it to... /board/shadowblade

Not the domain part as well... {Smile}

Re: Adding A Button Error - Posted By dog199200 (dog199200) on 10th May 08 at 12:49am
stil keeps trying to log out i have tried that before

Edit: also there is another glitch, look down at the bottom quick login, the head/base images are messed up.

Re: Adding A Button Error - Posted By Marc (cr0w) on 10th May 08 at 3:24am
Try placing the code at the very top of your headers. {Smile}

Re: Adding A Button Error - Posted By dog199200 (dog199200) on 10th May 08 at 5:01am
doint you think i have already tried that? trust me i have tried all of it...

Edit: also i check and it is running under the skins global header so its the only code there...

Re: Adding A Button Error - Posted By Ross (admin) on 10th May 08 at 12:22pm
1. The button is conflicting with this code:

Code:
 
  1. <script>
  2. /*Confirm Logout
  3. Coded By Wrighty
  4. No Ripping, Reposting or Claiming*/
 


Swap their order so that code is first. If necessary, you may have to change the header/footer order.

2. That looks like a tag from your custom info-center is not properly being closed. However I've not got time to go through and try to find which one. You could try adding this to the bottom of the info-center:

Code:
 
  1. </td>
  2. </tr>
  3. </tbody>
  4. </table>
 

Re: Adding A Button Error - Posted By dog199200 (dog199200) on 10th May 08 at 4:45pm
ok the button problem has been fixed, but i cant seem to see where the info center is messed up and i'm just wondering, is my skin select on the far side because my info center is messed up?

Re: Adding A Button Error - Posted By Michael (wrighty) on 10th May 08 at 6:02pm
Post your Info Center code please? {Smile}

Re: Adding A Button Error - Posted By dog199200 (dog199200) on 10th May 08 at 6:05pm
Code:
 
  1. <table align="center" cellpadding="0" cellspacing="1" class="border" width="100%" id="info_center">
  2. <tr>
  3. <td class="title1" valign="middle" align="center" width="21%"><center><font size="2"><b><u>Private Messages</u></b></font></center>
  4. </td>
  5. <td class="title1" valign="middle" width="58%"></div><center><font size="2"><b><u>Forum Statistics</u></b></font></center>
  6. </td>
  7. <td class="title1" valign="center" align="center" width="21%"><center><font size="2"><b><u>Links & Events</u></b></font></center>
  8. </td>
  9. </tr>
  10. <tr>
  11. <td class="window1" valign="middle" align="center" width="21%">
  12. {if:guest}<a href="action/login">Sign In</a> Or <a href="action/register">Register</a> <br>To View{/if:guest}
  13. {if:member}
  14. <div align="left">
  15. *Your New PM's: <font size="1"><b><a href="/action/pm/">{new_pms}</a><br>
  16. *Your PM Inbox <a href="action/pm&view=1">{total_pms}</a>  <br>
  17. <a href="action/pmprefs">*Your PM Preferences</a>
  18. </b></font>{/if:member}
  19. </td>
  20. <td class="window1" valign="left" align=center width="58%"></div>
  21.  
  22. <font size="1">
  23. *Last Post Is {last_post}, made by  {last_post_user}, {last_post_date}.<br><br>
  24.  
  25. *Welcome the newest member to the Forum:
  26. {newest_members:1}</font><br></center>
  27.  
  28. </td>
  29. <td class="window1" valign="center" align="left" width="21%">
  30. <font size="1"><b>
  31. {if:events}
  32. *Number Of Event{event_plural}: {event_total}<br/>{/if:events}
  33. {ifnot:events}*No Events To Display<br>{/ifnot:events}
  34. {if:birthdays}*Number Of Birthday{birthday_plural}: {birthday_total}<br/>{/if:birthdays}
  35. {ifnot:birthdays}*No Birthdays Today<br>{/ifnot:birthdays}
  36. *MoM of February; <font color=orange>N/A</font>
  37. </b></font>
  38. </td>
  39. </tr>
  40. <tr>
  41. <td class="title1" valign="middle" align="middle" width="19%"><center><font size="2"><b><u>Online Statistics</u></b></font></center>
  42. </td>
  43. <td class="title1" valign="middle" align="middle" width="60%"><center><font size="2"><b><u>Currently Online</u></b></font></center>
  44. </td>
  45. <td class="title1" width="19%" align="middle"><center><font size="2"><b><u>Board Stats</u></b></font></center>
  46. </td>
  47. </tr>
  48. <tr>
  49. <td class="window1" valign="middle" align="left" width="19%">
  50. <font size="1">
  51. *Guests: {guest_on}
  52. <br/>*Members: {member_on}
  53. <br/>*Staff:  {staff_on}
  54. </b></font><br></td></b></font>
  55. </td>
  56. <td class="window1" valign="middle" align="left" width="60%">
  57. <font size="1"><center><b>There is now {online_total} member{online_plural} online.<b> Currently logged in are:</b>
  58. <br>
  59. <font size="1"><center>{online_str}
  60. <br>
  61. <br>
  62. Users Online Today:<br>{today_str}
  63. </font></center>
  64. <br>
  65. </td>
  66. <td class="window1" width="19%" align="left">
  67. <style>img { border: 0px; }</style>
  68.  
  69.  
  70. <div align="left">
  71. <font size="1"><b>
  72. *Registered Members: <a href="action/members">{total_members}</a><br/>
  73. *Number of Topics: {total_topics}<br/>
  74. *Number of Posts: {total_posts}<br />
  75. *Number of Boards: {total_boards}<br/>
  76. *Number of Categories: {total_categories}<br/>
  77. </b></font>
  78. </td></tr></table>
  79. <table align="center" cellpadding="0" cellspacing="0" class="border" width="100%" id="info_center">
  80. <tr>
  81. <td class="title1" align="center" width="100%">
  82. <center><font size="3"><b><u>Affiliates</u></b></font></center></td>
  83. </tr>
  84. <tr>
  85. <td class="window1" align="center" width="100%">
  86. <script type="text/javascript">
  87. /*Random Affiliate Display*/
  88.  
  89. /*Only Edit Below*/
  90.  
  91. var affiliates = Array();
  92. affiliates[0] = Array('http://pokemonhelp.vforums.co.uk', 'http://i25.photobucket.com/albums/c51/dog199200/pokemon/pokeunichatxd5.gif', 'Pokemon Universal Chat');
  93. affiliates[1] = Array('http://www.freegamesjungle.com', 'http://images.freegamesjungle.com/freegamesjungle.gif', 'free games jungle');
  94.  
  95.  
  96. /*Only Edit Above*/
  97.  
  98. for(i=0; i<7; i++) {
  99. var rand = Math.floor(Math.random() * affiliates.length);
  100. document.write('<a href="'+ affiliates[rand][0] +'"><img src="'+ affiliates[rand][1] +'" alt="'+ affiliates[rand][2] +'" /></a>');
  101. affiliates.splice(rand, 1);
  102. }
  103. </script>
  104. <br>
  105.  
  106. <div align="left"><a href="board/viewallafiliate">View All</a> ~ <script>
  107. function affPopup(){ prompt("Press CTRL + C to copy.","<a href='http://OverObvious.vforums.co.uk'><img src='http://i25.photobucket.com/albums/c51/dog199200/pokemon/pokeunichatxd5.gif' border='0' alt='OverObvious' title='OverObvious' /></a>"); }
  108. </script>
  109. <a href="javascript: affPopup();">Get Affiliate Code</a>
  110. </div>
  111.  
  112. </td>
  113. </tr>
  114. </table>
  115. </td>
  116. </tr>
  117. </table>
 

Re: Adding A Button Error - Posted By Ross (admin) on 10th May 08 at 7:01pm
I was mistaken. There were too many closing tags, not too many opening tags. I found a few </div> and </center> tags in places that they shouldn't be. I've gone through and spaced out the code & removed the excess tags for you.

Re: Adding A Button Error - Posted By dog199200 (dog199200) on 10th May 08 at 7:21pm
ah i see, so tahts why my code converted back, I had made some changes to it and moved stuff around and them it converted back, i though ity was a glitch so i hit back and resaved it, so sorry all you fixed were undone...I didn't mean to.

Edit: Ok i think i found the </center> tag and the </div tag, but it still isn't fixed, can you please take another look and i wont edit it till you respond here.

Re: Adding A Button Error - Posted By Ross (admin) on 10th May 08 at 7:50pm
There was a lot more than just one of each and I'm not going to go through and do it again. Once I had done it, it displayed fine and therefore is not a bug with the software.