vForums Support Banner


Visit Base Classics - Gaming Chairs

 

Welcome Guest! Please Login or Register
vForums Support :: Programming & Coding :: Programming Discussion :: Need help with my ShoutOut code I made myself - View Topic
Topic Rating: *****
Printable View
Aiken
Full Member
***

[Avatar]

Posts: 333
Status: Offline
Gender: Male
Location: In a very lonely place, the domain of despair
Age: 35
Joined:  
Reputation: 12%  


pmtwitterskypemsnyahooxfire
Need help with my ShoutOut code I made myself (23rd Sep 08 at 5:45pm UTC)
Header:
Code:
 
  1. <script>
  2.  
  3. var recent = '5';
  4. var ShoutOutmin = 0;
  5.  
  6. var g = 0
  7. var ShoutOutList = []
  8.     //SoutOutList[g++] = ["username","display name","message"];
  9.     ShoutOutList[g++] = ["admin","IonFortuna","ShoutOuts will be posted here"];
  10.  
  11. function ShoutOutButton(){
  12.  
  13.     var SObutton = document.createElement('a');
  14.  
  15.     SObutton.onclick = function(){
  16.  
  17.         get('ShoutOutTop','id').style.display = (get('ShoutOutTop','id').style.display=='none')? '' : 'none';
  18.         get('ShoutOuts','id').style.display = (get('ShoutOuts','id').style.display=='none')? '' : 'none';
  19.  
  20.     };
  21.  
  22.     SObutton.href = 'javascript: void(0);';
  23.     SObutton.appendChild(document.createTextNode('ShoutOuts'));
  24.     get('pms','id').firstChild.insertBefore(document.createTextNode(' :: '),get('pms','id').firstChild.firstChild);
  25.     get('pms','id').firstChild.insertBefore(SObutton,get('pms','id').firstChild.firstChild);
  26.  
  27. }
  28.  
  29. function ShoutOut(){
  30.  
  31.     var ShoutOut = "<table border='0' class='border' align='center' cellspacing='1' >";
  32.     ShoutOut += "<tr>";
  33.     ShoutOut += "<td class='title1' align='center'>Poster</td>";
  34.     ShoutOut += "<td class='title1' align='center'>Message</td>";
  35.     ShoutOut += "</tr>";
  36.     ShoutOut += "<tr>";
  37.     
  38.     ShoutOutDisplay();
  39.  
  40.     ShoutOut += "</tr>";
  41.     ShoutOut += "<tr>";
  42.     ShoutOut += "<td cols='2'>";
  43.  
  44.     if (SOmin > 0){
  45.  
  46.         ShoutOut += "<a href='javascript: void(0)' onclick='ShoutOutUpdate(-1)'>Up</a>";
  47.  
  48.     } else {
  49.  
  50.         ShoutOut += "Up";
  51.  
  52.     }
  53.  
  54.     ShoutOut += " - ";
  55.  
  56.     if (Somin+5 < g){
  57.  
  58.         ShoutOut += "<a href='javascript: void(0)' onclick='ShoutOutUpdate(1)'>Down</a>";
  59.  
  60.     } else {
  61.  
  62.         ShoutOut += "Down";
  63.  
  64.     }
  65.  
  66.     ShoutOut += "</td>";
  67.     ShoutOut += "</tr>";
  68.     ShoutOut += "</table>";
  69.  
  70.     getElementById("ShoutOuts").innerHTML = ShoutOut;
  71.  
  72. }
  73.  
  74. function ShoutOutDisplay(){
  75.  
  76.     ShoutOut += "<td class='window1' align='right'><a href='http://theanimehideout.vforums.co.uk/action/view_profile/user/admin'>IonFortuna</a></td>";
  77.     ShoutOut += "<td class='window1' align='left'>ShoutOuts will be posted here</td>";
  78.  
  79. }
  80.  
  81.  
  82. function ShoutOutDisplayEdit(){
  83.  
  84.     for(i=ShoutOutmin+recent;i>ShoutOutmin;i--){
  85.  
  86.         ShoutOut += "<td class='window1' align='right'><a href='/action/view_profile/user/" +ShoutOutList[i][0]+ "'>" +ShoutOutList[i][1]+ "</a></td>";
  87.         ShoutOut += "<td class='window1' align='left'>" +ShoutOutList[i][2]+ "</td>";
  88.  
  89.     }
  90.  
  91. }
  92.  
  93. function ShoutOutUpdate(ShoutOutdir){
  94.  
  95.     ShoutOutmin += ShoutOutdir;
  96.     ShoutOut();
  97.  
  98. }
  99.  
  100. </script>
 


Footer:
Code:
 
  1. <script>
  2.  
  3. ShoutOut();
  4.  
  5. </script>
 

vF forums:
Perfect World RP
BLEACH Universe - Under Construction / Testing Phase
Xen Qarna RP - Stage I
Vyren Entar Battle Network RP - Under Construction / Maintenance Mode Enabled
the Final Anime Hideout
dog199200
Guest
Re: Need help with my ShoutOut code I made myself (29th Sep 08 at 2:13am UTC)
OK well first it would really be nice to know what is wrong with it {Tongue Out} But why are you doing it with JS, I'm not sure if it would comply right when trying to read for accounts, giving that they don't have to input there own name. So many questions, no where to start so can you please give usd an idea of what its suppose to do {Smile} as like all the features and stuff
 Printable View

All times are GMT+0 :: The current time is 3:13pm
Page generated in 0.4516 seconds
This Forum is Powered By vForums (v2.4)
Create a Forum for Free | Find Forums