vForums Support :: Programming & Coding :: Code Requests & Support :: Graphic Database - View Topic
| |
| RuhRoe Full Member
Posts: 218 Status: Offline Gender: Male Age: 30 Joined:
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 | |
| 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:
pmxfire | Re: Graphic Database (6th Dec 08 at 5:38am UTC) | | Not really an album 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:
pmxfire | Re: Graphic Database (6th Dec 08 at 4:23pm UTC) | |
Code: - <script type="text/javascript">
- <!--
- /*
- Graphics Index by Cr0w
- Copyright 2008
- Do not repost
- */
-
- //Last Update
- var lastup = "Sunday March 9th, 2008 12:51PM"; // Most recent update
-
- //Database Options
- var dbshow = 0; // 0 = Show index in board, 1 = Show index in thread
- var dbthread = 2; // The thread where your index will be [if dbshow = 1]
- var dbforum = "general"; // The board id where your index is in
- var dbwin = 0; // 0 = Open graphics on same page, 1 = Open in new window
-
- //Sections
- var sections = [];
- sections[0]=["Category Name","Category ID"];
- sections[1]=["Category Name","Category ID"];
- sections[2]=["Category Name","Category ID"];
-
- //Creators
- var creators = [];
- creators[0] = ["Display Name 1","Username"]; // ID = 0
- creators[1] = ["Display Name 2","Username"]; // ID = 1
- creators[2] = ["Display Name 3","Username"]; // ID = 2
-
- //Graphics
- var graphics = []; var _gfx = 0;
- graphics[_gfx++] = ["Graphics Name","Thread Number","Creator ID","Category ID"];
- graphics[_gfx++] = ["Graphics Name","Thread Number","Creator ID","Category ID"];
- graphics[_gfx++] = ["Graphics Name","Thread Number","Creator ID","Category ID"];
- graphics[_gfx++] = ["Graphics Name","Thread Number","Creator ID","Category ID"];
- graphics[_gfx++] = ["Graphics Name","Thread Number","Creator ID","Category ID"];
-
- //Do not edit below
-
- function showdb(){
- var td=document.getElementsByTagName("td");
- if(dbshow==1){
- for(t=6;t<td.length;t++){
- td[t].style.display="none";
- }
- }
-
- 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 />';
- var nav=document.getElementById("navhere");
- var main=document.getElementById("dbmain");
- var search=document.getElementById("searchit");
- /* Categories */
- nav.innerHTML="";
- nav.innerHTML+="<b>Categories</b><br />";
- for(l=0;l<sections.length;l++){
- var catnum=l+1;
- nav.innerHTML+=catnum+". <a href='javascript:void(0)' onclick=\"catchange('"+sections[l][1]+"')\">"+sections[l][0]+"</a><br />";
- }
- nav.innerHTML+="<br />";
- nav.innerHTML+="<b>Other</b><br />";
- nav.innerHTML+="1. <a href='javascript:void(0)' onclick='location.reload()'>Recent Graphics</a><br />";
- nav.innerHTML+="2. <a href='javascript:void(0)' onclick='showfulldb()'>All Graphics</a><br />";
- nav.innerHTML+="3. <a href='javascript:void(0)' onclick='showcreators()'>All Designers</a><br />";
- nav.innerHTML+="4. <a href='javascript:void(0)' onclick='aboutdb()'>About</a><br /><br />";
-
- /* Main DB Page */
- main.innerHTML="";
- main.innerHTML+="<u><b>Database Info</b></u>";
- main.innerHTML+="<br />";
- main.innerHTML+="<b>Total Graphics:</b> <a href='javascript:void(0)' onclick='showfulldb()'>"+graphics.length+"</a><br />";
- main.innerHTML+="<b>Total Designers:</b> <a href='javascript:void(0)' onclick='showcreators()'>"+creators.length+"</a><br />";
- main.innerHTML+="<b>Last Updated:</b> "+lastup+"<br /><br />";
- main.innerHTML+="<b><u>Last 5 Graphics</u></b><br /><br />";
- var FiveNew="";
- var num=1;
- for(t=graphics.length-1;t>graphics.length-6;t--){
- 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 />";
- num=num+1;
- }
- main.innerHTML+=FiveNew;
-
- /* Search DB */
- search.innerHTML="";
- search.innerHTML+="<b>Search:</b><br />";
- search.innerHTML+="<input type='text' id='lookfor' style='width: 60%' /> ";
- search.innerHTML+="<input type='submit' onclick='searchdb()' value='Go' />";
- }
-
- function searchdb(){
- grahpics.sort();
- sections.sort();
- var main=document.getElementById("dbmain");
- var searchthis=document.getElementById('lookfor');
- main.innerHTML="<b><u>Search Results</u></b><br /><br />";
- for(i=0;i<graphics.length;i++){
- if(graphics[i][0].match(new RegExp(searchthis.value, 'gi'))){
- 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 />";
- }
- }
- }
- function catchange(tothis){
- graphics.sort();
- sections.sort();
- var main=document.getElementById("dbmain");
- main.innerHTML="";
- var num=1;
- for(q=0;q<graphics.length;q++){
- if(graphics[q][3]==tothis){
- 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 />";
- num=num+1;
- }
- }
- }
- function aboutdb(){
- graphics.sort();
- sections.sort();
- var main=document.getElementById("dbmain");
- main.innerHTML="";
- main.innerHTML+="<b><u><font size='+1'>";
- 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.";
- main.innerHTML+="</font></u></b>";
- }
- function showfulldb(){
- graphics.sort();
- sections.sort();
- var main=document.getElementById("dbmain");
- main.innerHTML="";
- for(t=0;t<graphics.length;t++){
- var t2=t+1;
- 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 />";
- }
- }
- function showcreators(){
- creators.sort();
- var main=document.getElementById("dbmain");
- main.innerHTML="";
- for(t=0;t<creators.length;t++){
- main.innerHTML+="<a href = 'javascript: void();' onclick='showgraphics("+t+")'>"+creators[t][0]+"</a><br />";
- }
- }
- function showgraphics(dsr){
- graphics.sort();
- var main=document.getElementById("dbmain");
- 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 />";
- for(t=0;t<graphics.length;t++){
- if(graphics[t][2]==dsr){
- main.innerHTML+="<a href='/board/"+dbforum+"/action/view_topic/topic/"+graphics[t][1]+"/'"+((dbwin==1) ? " target='_blank'" : '')+">"+graphics[t][0]+"</a><br />";
- }
- }
- }
- if(dbshow==1 && location.href.match("topic/"+dbthread) || dbshow==0 && !location.href.match("topic/")){
- showdb();
- }
- //-->
- </script>
It's not going so well It won't work. | |
| CåñåÐå™ Full Member
Posts: 427 Status: Offline Gender: Male Location: Toronto Ontario Joined:
pmwww | Re: Graphic Database (6th Dec 08 at 5:29pm UTC) | | This should work, its working for me .
Board header :
Code: - <div id="graphic_database"></div>
Board footer :
Code: - <script type="text/javascript">
- <!--
- /*
- Graphic Index by Cr0w
- Copyright 2006
- Do not repost
- */
-
- //Last Update
- var lastup="Wednesday November 15th, 2006 8:45PM"; //Most recent update
-
- //Database Info
- var dbthread="000"; //The thread where your index will be
- var dbforum="abc"; //The board id where your index is in
-
- //Sections
- var sections=[];
- sections[0]=["Category Name","Category ID"];
- sections[1]=["Category Name","Category ID"];
- sections[2]=["Category Name","Category ID"];
-
- //Graphics
- var graphics=[];
- graphics[0]=["Graphics Name 1","Thread Number","Category ID"];
- graphics[1]=["Graphics Name 2","Thread Number","Category ID"];
- graphics[2]=["Graphics Name 3","Thread Number","Category ID"];
- graphics[3]=["Graphics Name 4","Thread Number","Category ID"];
-
- //Do not edit below
-
- function showdb(){
- var td=document.getElementsByTagName("td");
- for(t=6;t<td.length;t++){
- td[t].style.display="none";
- }
- 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>';
- var nav=document.getElementById("navhere");
- var main=document.getElementById("dbmain");
- var search=document.getElementById("searchit");
- /* Categories */
- nav.innerHTML="";
- nav.innerHTML+="<b>Categories</b><br />";
- for(l=0;l<sections.length;l++){
- var catnum=l+1;
- nav.innerHTML+=catnum+". <a href='javascript:void(0)' onclick=\"catchange('"+sections[l][1]+"')\">"+sections[l][0]+"</a><br />";
- }
- nav.innerHTML+="<br />";
- nav.innerHTML+="<b>Other</b><br />";
- nav.innerHTML+="1. <a href='javascript:void(0)' onclick='location.reload()'>Recent Graphics</a><br />";
- nav.innerHTML+="2. <a href='javascript:void(0)' onclick='showfulldb()'>All Graphics</a><br />";
- nav.innerHTML+="3. <a href='javascript:void(0)' onclick='aboutdb()'>About</a><br /><br />";
-
- /* Main DB Page */
- main.innerHTML="";
- main.innerHTML+="<u><b>Database Info</b></u>";
- main.innerHTML+="<br />";
- main.innerHTML+="<b>Total Graphics:</b> "+graphics.length+"<br />";
- main.innerHTML+="<b>Last Updated:</b> "+lastup+"<br /><br />";
- main.innerHTML+="<b><u>Last 5 Graphics</u></b><br /><br />";
- var FiveNew="";
- var num=1;
- for(t=graphics.length-1;t>graphics.length-6;t--){
- FiveNew+=num+". <a href='/board/"+dbforum+"/action/view_topic/topic/"+graphics[t][1]+"/'>"+graphics[t][0]+"</a><br />";
- num=num+1;
- }
- main.innerHTML+=FiveNew;
-
- /* Search DB */
- search.innerHTML="";
- search.innerHTML+="<b>Search:</b><br />";
- search.innerHTML+="<input type='text' id='lookfor' /> ";
- search.innerHTML+="<input type='submit' onclick='searchdb()' value='Go' />";
- }
-
- function searchdb(){
- graphics.sort();
- sections.sort();
- var main=document.getElementById("dbmain");
- var searchthis=document.getElementById('lookfor');
- main.innerHTML="<b><u>Search Results</u></b><br /><br />";
- for(i=0;i<graphics.length;i++){
- if(graphics[i][0].match(new RegExp(searchthis.value, 'gi'))){
- main.innerHTML+="<li><a href='/board/"+dbforum+"/action/view_topic/topic/"+graphics[i][1]+"/'>"+graphics[i][0]+"</a></li>";
- }
- }
- }
- function catchange(tothis){
- graphics.sort();
- sections.sort();
- var main=document.getElementById("dbmain");
- main.innerHTML="";
- var num=1;
- for(q=0;q<graphics.length;q++){
- if(graphics[q][2]==tothis){
- main.innerHTML+=num+". <a href='/board/"+dbforum+"/action/view_topic/topic/"+graphics[q][1]+"/'>"+graphics[q][0]+"</a><br />";
- num=num+1;
- }
- }
- }
- function aboutdb(){
- graphics.sort();
- sections.sort();
- var main=document.getElementById("dbmain");
- main.innerHTML="";
- main.innerHTML+="<b><u><font size='+1'>";
- 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.";
- main.innerHTML+="</font></u></b>";
- }
- function showfulldb(){
- graphics.sort();
- sections.sort();
- var main=document.getElementById("dbmain");
- main.innerHTML="";
- for(t=0;t<graphics.length;t++){
- var t2=t+1;
- main.innerHTML+=t2+". <a href='/board/"+dbforum+"/action/view_topic/topic/"+graphics[t][1]+"/'>"+graphics[t][0]+"</a><br />";
- }
- }
- if(location.href.match("topic/"+dbthread)){
- showdb();
- }
- //-->
- </script>
If you need help let me know and i'll try my best to help . | |
click here We have 15 Different Skins/Templates for your vForum |
| RuhRoe Full Member
Posts: 218 Status: Offline Gender: Male Age: 30 Joined:
pmxfire | Re: Graphic Database (7th Dec 08 at 9:35pm UTC) | | Thanks Canada It works for me now | |
| CåñåÐå™ Full Member
Posts: 427 Status: Offline Gender: Male Location: Toronto Ontario Joined:
pmwww | Re: Graphic Database (8th Dec 08 at 4:43am UTC) | | Your welcome mezorro . | |
click here We have 15 Different Skins/Templates for your vForum |
| |
| |
|