vForums Support Banner



 

Welcome Guest! Please Login or Register
vForums Support :: Programming & Coding :: Code Requests & Support :: Graphic Database - View Topic
Topic Rating: *****
Printable View
RuhRoe
Full Member
***

Posts: 218
Status: Offline
Gender: Male
Age: 30
Joined:  
Reputation: 5%  


pmxfire
Graphic Database (5th Dec 08 at 10:39pm UTC)
Can anyone make a graphic database code? I know there is a code index one but I didn't know if I could just change to a Grahpic one or if I had to request one {Sad}
dog199200
Guest
Re: Graphic Database (6th Dec 08 at 5:19am UTC)
well fi you know what your going you can edit the title of it and stuff to Graphics, and you wouldn't need a request, but if you want like a Album setup, with image display that will take a lot of time
RuhRoe
Full Member
***

Posts: 218
Status: Offline
Gender: Male
Age: 30
Joined:  
Reputation: 5%  


pmxfire
Re: Graphic Database (6th Dec 08 at 5:38am UTC)
Not really an album {Tongue Out} Yeah I will probably just edit the code database.
dog199200
Guest
Re: Graphic Database (6th Dec 08 at 6:50am UTC)
well let me now how that turnes out and if you have problems let me know and i'll help
RuhRoe
Full Member
***

Posts: 218
Status: Offline
Gender: Male
Age: 30
Joined:  
Reputation: 5%  


pmxfire
Re: Graphic Database (6th Dec 08 at 4:23pm UTC)


Code:
 
  1. <script type="text/javascript">
  2. <!--
  3. /*
  4. Graphics Index by Cr0w
  5. Copyright 2008
  6. Do not repost
  7. */
  8.  
  9. //Last Update
  10. var lastup = "Sunday March 9th, 2008 12:51PM"; // Most recent update
  11.  
  12. //Database Options
  13. var dbshow = 0; // 0 = Show index in board, 1 = Show index in thread
  14. var dbthread = 2; // The thread where your index will be [if dbshow = 1]
  15. var dbforum = "general"; // The board id where your index is in
  16. var dbwin = 0; // 0 = Open graphics on same page, 1 = Open in new window
  17.  
  18. //Sections
  19. var sections = [];
  20. sections[0]=["Category Name","Category ID"];
  21. sections[1]=["Category Name","Category ID"];
  22. sections[2]=["Category Name","Category ID"];
  23.  
  24. //Creators
  25. var creators = [];
  26. creators[0] = ["Display Name 1","Username"]; // ID = 0
  27. creators[1] = ["Display Name 2","Username"]; // ID = 1
  28. creators[2] = ["Display Name 3","Username"]; // ID = 2
  29.  
  30. //Graphics
  31. var graphics = []; var _gfx = 0;
  32. graphics[_gfx++] = ["Graphics Name","Thread Number","Creator ID","Category ID"];
  33. graphics[_gfx++] = ["Graphics Name","Thread Number","Creator ID","Category ID"];
  34. graphics[_gfx++] = ["Graphics Name","Thread Number","Creator ID","Category ID"];
  35. graphics[_gfx++] = ["Graphics Name","Thread Number","Creator ID","Category ID"];
  36. graphics[_gfx++] = ["Graphics Name","Thread Number","Creator ID","Category ID"];
  37.  
  38. //Do not edit below
  39.  
  40. function showdb(){
  41. var td=document.getElementsByTagName("td");
  42. if(dbshow==1){
  43. for(t=6;t<td.length;t++){
  44. td[t].style.display="none";
  45. }
  46. }
  47.  
  48. document.getElementById('graphics_database').innerHTML='<table cellspacing="1" cellpadding="4" class="border" width="'+vf_width+'" align="center" id="graphicdb"><tr><td class="title1" colspan="2" align="center">Graphic Database</td></tr><tr><td class="title2" width="20%" align="center">Navigation</td><td class="title2" width="80%" align="center">Main</td></tr><tr><td class="window1" width="20%" valign="top"><div id="navhere"></div><div id="searchit"></div></td><td class="window1" width="80%" valign="top"><div id="dbmain"></div></td></tr></table><br />';
  49. var nav=document.getElementById("navhere");
  50. var main=document.getElementById("dbmain");
  51. var search=document.getElementById("searchit");
  52. /* Categories */
  53. nav.innerHTML="";
  54. nav.innerHTML+="<b>Categories</b><br />";
  55. for(l=0;l<sections.length;l++){
  56. var catnum=l+1;
  57. nav.innerHTML+=catnum+". <a href='javascript:void(0)' onclick=\"catchange('"+sections[l][1]+"')\">"+sections[l][0]+"</a><br />";
  58. }
  59. nav.innerHTML+="<br />";
  60. nav.innerHTML+="<b>Other</b><br />";
  61. nav.innerHTML+="1. <a href='javascript:void(0)' onclick='location.reload()'>Recent Graphics</a><br />";
  62. nav.innerHTML+="2. <a href='javascript:void(0)' onclick='showfulldb()'>All Graphics</a><br />";
  63. nav.innerHTML+="3. <a href='javascript:void(0)' onclick='showcreators()'>All Designers</a><br />";
  64. nav.innerHTML+="4. <a href='javascript:void(0)' onclick='aboutdb()'>About</a><br /><br />";
  65.  
  66. /* Main DB Page */
  67. main.innerHTML="";
  68. main.innerHTML+="<u><b>Database Info</b></u>";
  69. main.innerHTML+="<br />";
  70. main.innerHTML+="<b>Total Graphics:</b> <a href='javascript:void(0)' onclick='showfulldb()'>"+graphics.length+"</a><br />";
  71. main.innerHTML+="<b>Total Designers:</b> <a href='javascript:void(0)' onclick='showcreators()'>"+creators.length+"</a><br />";
  72. main.innerHTML+="<b>Last Updated:</b> "+lastup+"<br /><br />";
  73. main.innerHTML+="<b><u>Last 5 Graphics</u></b><br /><br />";
  74. var FiveNew="";
  75. var num=1;
  76. for(t=graphics.length-1;t>graphics.length-6;t--){
  77. FiveNew+=num+". <a href='/board/"+dbforum+"/action/view_topic/topic/"+graphics[t][1]+"/'"+((dbwin==1) ? " target='_blank'" : '')+">"+grahpics[t][0]+"</a> by <a href = '/action/view_profile/user/"+creators[grahpics[t][2]][1]+"/'"+((dbwin==1) ? " target='_blank'" : '')+">"+creators[graphics[t][2]][0]+"</a><br />";
  78. num=num+1;
  79. }
  80. main.innerHTML+=FiveNew;
  81.  
  82. /* Search DB */
  83. search.innerHTML="";
  84. search.innerHTML+="<b>Search:</b><br />";
  85. search.innerHTML+="<input type='text' id='lookfor' style='width: 60%' /> ";
  86. search.innerHTML+="<input type='submit' onclick='searchdb()' value='Go' />";
  87. }
  88.  
  89. function searchdb(){
  90. grahpics.sort();
  91. sections.sort();
  92. var main=document.getElementById("dbmain");
  93. var searchthis=document.getElementById('lookfor');
  94. main.innerHTML="<b><u>Search Results</u></b><br /><br />";
  95. for(i=0;i<graphics.length;i++){
  96. if(graphics[i][0].match(new RegExp(searchthis.value, 'gi'))){
  97. main.innerHTML+="<b>-</b> <a href='/board/"+dbforum+"/action/view_topic/topic/"+graphics[i][1]+"/'"+((dbwin==1) ? " target='_blank'" : '')+">"+graphics[i][0]+"</a> by <a href = '/action/view_profile/user/"+creators[graphics[i][2]][1]+"/'"+((dbwin==1) ? " target='_blank'" : '')+">"+creators[graphics[i][2]][0]+"</a><br />";
  98. }
  99. }
  100. }
  101. function catchange(tothis){
  102. graphics.sort();
  103. sections.sort();
  104. var main=document.getElementById("dbmain");
  105. main.innerHTML="";
  106. var num=1;
  107. for(q=0;q<graphics.length;q++){
  108. if(graphics[q][3]==tothis){
  109. main.innerHTML+=num+". <a href='/board/"+dbforum+"/action/view_topic/topic/"+graphics[q][1]+"/'"+((dbwin==1) ? " target='_blank'" : '')+">"+graphics[q][0]+"</a> by <a href = '/action/view_profile/user/"+creators[graphics[q][2]][1]+"/'"+((dbwin==1) ? " target='_blank'" : '')+">"+creators[graphics[q][2]][0]+"</a><br />";
  110. num=num+1;
  111. }
  112. }
  113. }
  114. function aboutdb(){
  115. graphics.sort();
  116. sections.sort();
  117. var main=document.getElementById("dbmain");
  118. main.innerHTML="";
  119. main.innerHTML+="<b><u><font size='+1'>";
  120. main.innerHTML+="This graphic database is coded by Cr0w. It is available for use by any forum, as long as it is not reposted without written permission from its creator.<br /><br />If you encounter any errors with this code, or find anyone who has reposted/ripped this code, please email Cr0w at <a href='mailto:admin@cr0wonline.com'>admin@cr0wonline.com</a>. Thank you.";
  121. main.innerHTML+="</font></u></b>";
  122. }
  123. function showfulldb(){
  124. graphics.sort();
  125. sections.sort();
  126. var main=document.getElementById("dbmain");
  127. main.innerHTML="";
  128. for(t=0;t<graphics.length;t++){
  129. var t2=t+1;
  130. main.innerHTML+=t2+". <a href='/board/"+dbforum+"/action/view_topic/topic/"+graphics[t][1]+"/'"+((dbwin==1) ? " target='_blank'" : '')+">"+graphics[t][0]+"</a> by <a href = '/action/view_profile/user/"+creators[graphics[t][2]][1]+"/'"+((dbwin==1) ? " target='_blank'" : '')+">"+creators[graphics[t][2]][0]+"</a><br />";
  131. }
  132. }
  133. function showcreators(){
  134. creators.sort();
  135. var main=document.getElementById("dbmain");
  136. main.innerHTML="";
  137. for(t=0;t<creators.length;t++){
  138. main.innerHTML+="<a href = 'javascript: void();' onclick='showgraphics("+t+")'>"+creators[t][0]+"</a><br />";
  139. }
  140. }
  141. function showgraphics(dsr){
  142. graphics.sort();
  143. var main=document.getElementById("dbmain");
  144. main.innerHTML="<b>Designer Profile: </b><a href = '/action/view_profile/user/"+creators[dsr][1]+"/'"+((dbwin==1) ? " target='_blank'" : '')+">"+creators[dsr][0]+"</a><br /><br />";
  145. for(t=0;t<graphics.length;t++){
  146. if(graphics[t][2]==dsr){
  147. main.innerHTML+="<a href='/board/"+dbforum+"/action/view_topic/topic/"+graphics[t][1]+"/'"+((dbwin==1) ? " target='_blank'" : '')+">"+graphics[t][0]+"</a><br />";
  148. }
  149. }
  150. }
  151. if(dbshow==1 && location.href.match("topic/"+dbthread) || dbshow==0 && !location.href.match("topic/")){
  152. showdb();
  153. }
  154. //-->
  155. </script>
 


It's not going so well {Tongue Out} It won't work.
CåñåÐå™
Full Member
***

[Avatar]

Posts: 427
Status: Offline
Gender: Male
Location: Toronto Ontario
Joined:  
Reputation: 7%  


pmwww
Re: Graphic Database (6th Dec 08 at 5:29pm UTC)
This should work, its working for me {Smile} .

Board header :
Code:
 
  1. <div id="graphic_database"></div>
 


Board footer :
Code:
 
  1. <script type="text/javascript">
  2. <!--
  3. /*
  4. Graphic Index by Cr0w
  5. Copyright 2006
  6. Do not repost
  7. */
  8.  
  9. //Last Update
  10. var lastup="Wednesday November 15th, 2006 8:45PM"; //Most recent update
  11.  
  12. //Database Info
  13. var dbthread="000"; //The thread where your index will be
  14. var dbforum="abc"; //The board id where your index is in
  15.  
  16. //Sections
  17. var sections=[];
  18. sections[0]=["Category Name","Category ID"];
  19. sections[1]=["Category Name","Category ID"];
  20. sections[2]=["Category Name","Category ID"];
  21.  
  22. //Graphics
  23. var graphics=[];
  24. graphics[0]=["Graphics Name 1","Thread Number","Category ID"];
  25. graphics[1]=["Graphics Name 2","Thread Number","Category ID"];
  26. graphics[2]=["Graphics Name 3","Thread Number","Category ID"];
  27. graphics[3]=["Graphics Name 4","Thread Number","Category ID"];
  28.  
  29. //Do not edit below
  30.  
  31. function showdb(){
  32. var td=document.getElementsByTagName("td");
  33. for(t=6;t<td.length;t++){
  34. td[t].style.display="none";
  35. }
  36. document.getElementById('graphic_database').innerHTML='<table cellspacing="1" cellpadding="4" class="border" width="'+vf_width+'" align="center" id="graphicdb"><tr><td class="title1" colspan="2" align="center">Graphics Database</td></tr><tr><td class="title2" width="20%" align="center">Navigation</td><td class="title2" width="80%" align="center">Main</td></tr><tr><td class="window1" width="20%" valign="top"><div id="navhere"></div><div id="searchit"></div></td><td class="window1" width="80%" valign="top"><div id="dbmain"></div></td></tr></table>';
  37. var nav=document.getElementById("navhere");
  38. var main=document.getElementById("dbmain");
  39. var search=document.getElementById("searchit");
  40. /* Categories */
  41. nav.innerHTML="";
  42. nav.innerHTML+="<b>Categories</b><br />";
  43. for(l=0;l<sections.length;l++){
  44. var catnum=l+1;
  45. nav.innerHTML+=catnum+". <a href='javascript:void(0)' onclick=\"catchange('"+sections[l][1]+"')\">"+sections[l][0]+"</a><br />";
  46. }
  47. nav.innerHTML+="<br />";
  48. nav.innerHTML+="<b>Other</b><br />";
  49. nav.innerHTML+="1. <a href='javascript:void(0)' onclick='location.reload()'>Recent Graphics</a><br />";
  50. nav.innerHTML+="2. <a href='javascript:void(0)' onclick='showfulldb()'>All Graphics</a><br />";
  51. nav.innerHTML+="3. <a href='javascript:void(0)' onclick='aboutdb()'>About</a><br /><br />";
  52.  
  53. /* Main DB Page */
  54. main.innerHTML="";
  55. main.innerHTML+="<u><b>Database Info</b></u>";
  56. main.innerHTML+="<br />";
  57. main.innerHTML+="<b>Total Graphics:</b> "+graphics.length+"<br />";
  58. main.innerHTML+="<b>Last Updated:</b> "+lastup+"<br /><br />";
  59. main.innerHTML+="<b><u>Last 5 Graphics</u></b><br /><br />";
  60. var FiveNew="";
  61. var num=1;
  62. for(t=graphics.length-1;t>graphics.length-6;t--){
  63. FiveNew+=num+". <a href='/board/"+dbforum+"/action/view_topic/topic/"+graphics[t][1]+"/'>"+graphics[t][0]+"</a><br />";
  64. num=num+1;
  65. }
  66. main.innerHTML+=FiveNew;
  67.  
  68. /* Search DB */
  69. search.innerHTML="";
  70. search.innerHTML+="<b>Search:</b><br />";
  71. search.innerHTML+="<input type='text' id='lookfor' /> ";
  72. search.innerHTML+="<input type='submit' onclick='searchdb()' value='Go' />";
  73. }
  74.  
  75. function searchdb(){
  76. graphics.sort();
  77. sections.sort();
  78. var main=document.getElementById("dbmain");
  79. var searchthis=document.getElementById('lookfor');
  80. main.innerHTML="<b><u>Search Results</u></b><br /><br />";
  81. for(i=0;i<graphics.length;i++){
  82. if(graphics[i][0].match(new RegExp(searchthis.value, 'gi'))){
  83. main.innerHTML+="<li><a href='/board/"+dbforum+"/action/view_topic/topic/"+graphics[i][1]+"/'>"+graphics[i][0]+"</a></li>";
  84. }
  85. }
  86. }
  87. function catchange(tothis){
  88. graphics.sort();
  89. sections.sort();
  90. var main=document.getElementById("dbmain");
  91. main.innerHTML="";
  92. var num=1;
  93. for(q=0;q<graphics.length;q++){
  94. if(graphics[q][2]==tothis){
  95. main.innerHTML+=num+". <a href='/board/"+dbforum+"/action/view_topic/topic/"+graphics[q][1]+"/'>"+graphics[q][0]+"</a><br />";
  96. num=num+1;
  97. }
  98. }
  99. }
  100. function aboutdb(){
  101. graphics.sort();
  102. sections.sort();
  103. var main=document.getElementById("dbmain");
  104. main.innerHTML="";
  105. main.innerHTML+="<b><u><font size='+1'>";
  106. main.innerHTML+="This graphic database is coded by Cr0w. It is available for use by any forum, as long as it is not reposted without written permission from it's creator.<br /><br />If you encounter any errors with this code, or find anyone who has reposted/ripped this code, please email Cr0w at <a href='mailto:admin@cr0wonline.com'>admin@cr0wonline.com</a>. Thank you.";
  107. main.innerHTML+="</font></u></b>";
  108. }
  109. function showfulldb(){
  110. graphics.sort();
  111. sections.sort();
  112. var main=document.getElementById("dbmain");
  113. main.innerHTML="";
  114. for(t=0;t<graphics.length;t++){
  115. var t2=t+1;
  116. main.innerHTML+=t2+". <a href='/board/"+dbforum+"/action/view_topic/topic/"+graphics[t][1]+"/'>"+graphics[t][0]+"</a><br />";
  117. }
  118. }
  119. if(location.href.match("topic/"+dbthread)){
  120. showdb();
  121. }
  122. //-->
  123. </script>
 


If you need help let me know and i'll try my best to help {Grin} .

Image
click here We have 15 Different Skins/Templates for your vForum
RuhRoe
Full Member
***

Posts: 218
Status: Offline
Gender: Male
Age: 30
Joined:  
Reputation: 5%  


pmxfire
Re: Graphic Database (7th Dec 08 at 9:35pm UTC)
Thanks Canada {Smile} It works for me now {Wink}
CåñåÐå™
Full Member
***

[Avatar]

Posts: 427
Status: Offline
Gender: Male
Location: Toronto Ontario
Joined:  
Reputation: 7%  


pmwww
Re: Graphic Database (8th Dec 08 at 4:43am UTC)
Your welcome mezorro {Grin} .

Image
click here We have 15 Different Skins/Templates for your vForum
 Printable View

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