Page 1 of 5 123 ... LastLast
Results 1 to 10 of 44

Thread: X-null mod / map Template

  1. #1

    Default X-null mod / map Template

    Hi ok could do with some help if someone can help to start create the X-null map and mod Template's for display of the raw data read so at present this is an all record dump http://www.mega-clan.co.uk/moddatabase1.php

    1.Index page of both Mod and Map databases with search on any field eg http://www.mohaaaa.co.uk/AAAAMOHAA/c...atabase?page=1 and http://www.mohaaaa.co.uk/AAAAMOHAA/c...map-database-0

    2.Mod and map Record display page eg http://www.mohaaaa.co.uk/AAAAMOHAA/c...app-watchdog-0

    At present the comment section on AAAA map/mod for each record is not part of the database so open to suggestions on that - IMO I am not sure if we should add a comment field or go separate on that so we can find a solution on xnull to include a comment field.

    But I think its required as the user input and feedback is a big part of the database

    After we get a read template we need to start on the new record input for adding to the data base's

  2. #2
    Über Prodigy & Developer Razo[R]apiD's Avatar
    Join Date
    May 2010
    Location
    Poland, Lublin
    Posts
    3,257

    Default

    I like the list templates that are on AAAA. Paging and search options look fine. I'd only change the colors to match what we'll have on xNULL. The details page doesn't look that nice for me. I'd change it, to make it more organnized, the table layout is fine, but I'd change few things, remove the table border, I'd add Show/Hide full description so it doesn't cover whole screen (jQuery for this purpose, 3 lines of code so it's simple). I'd change the rating icons to stars or something so it's more WWII game based style.

    Basically I'd make field labels with normal font weight, and field value in bold, because it's the value that's the most important thing, not a label for it. (speaking here about details page)

    The list templae is very good imho, it will just need different colors.

  3. #3

    Default

    Ok Base start for a mod record display which we can change
    Code:
    <!-- TemplateBeginEditable name="doctitle" -->
    <title>Untitled Document</title>
    <!-- TemplateEndEditable -->
    <style type="text/css">
    <!--
    .style2 {color: #000000}
    .style3 {color: #58ACFA}
    .style4 {font-weight: bold}
    -->
    </style>
    <div class="field field-type-text field-field-mapname style2">
      <table width="1091" border="0" cellpadding="3" cellspacing="3">
        <tr>
          <td width="272"><span class="style3">Mod Name</span>        <div class="field-items  style4">
              <div class="field-item"><?php print $node->field_modname[0]['view'] ?>
    </div>
          </div></td>
          <td width="284"><span class="style3">Mod File (number of downloads)</span>        <div class="field-items">
              <div class="field-item"><strong><?php print $node->field_modfile[0]['view'] ?>
                <?php
    $item = $node->field_modfile[0]; // change this to the correct field name
    if($item['filesize'] < 1024) {
       print ($item['filesize']);
       print (" bytes");
    }
    elseif ($item['filesize'] < 1048576) {
       $filesize = $item['filesize'];
       $filesize = $filesize / 1024;
       $filesize = round($filesize, 2);
       print ($filesize);
       print (" kB");
    }
    else {
       $filesize = $item['filesize'];
       $filesize = $filesize / 1048576;
       $filesize = round($filesize, 2);
       print ($filesize);
       print (" MB");
    }
    ?>
              </strong></div>
            </div>
          </td>
          <td width="243" rowspan="2"><span class="style3">Mod Screen shot</span>        <div class="field-items">
              <?php foreach ((array)$node->field_modscreen as $item) { ?>
              <div class="field-item"><?php print $item['view'] ?></div>
              <?php } ?>
            </div></td>
          <td width="243" rowspan="2"><span class="style3">Total Views of this Mod </span>        <div class="field-items ">
              <div class="field-item"><?php print $node->links['statistics_counter']['title'] ?></div>
          </div>        </td>
        </tr>
        <tr>
          <td><span class="style3">Mod Version </span>        <div class="field-items  style4">
              <div class="field-item"><?php print $node->field_modversion[0]['view'] ?> </div>
          </div></td>
          <td width="284"><span class="style3">Mod File Tested and Validated </span>        <div class="style4">
              <div class="field-items"><?php print $node->field_modtested[0]['view'] ?> By - <?php print $node->field_modtestedby[0]['view'] ?></div>
          </div></td>
        </tr>
        <tr>
          <td><span class="style3">Game Type</span>        <div class="field-items style4">
              <div class="field-item"><?php print $node->field_gametype[0]['view'] ?> </div>
            </div>
          <h3 class="field-label  style3">&nbsp; </h3>        <div class="field-items"></div>        </td>
          <td rowspan="2"><span class="style3">Server or Client Mod </span>        <div class="field-items style4">
              <div class="field-item"><?php print $node->field_serverclient[0]['view'] ?>
                  <?php
    $item = $node->field_serverclient[0]; // change this to the correct field name
    if($item['filesize'] < 1024) {
       print ($item['filesize']);
       print (" ");
    }
    elseif ($item['filesize'] < 1048576) {
       $filesize = $item['filesize'];
       $filesize = $filesize / 1024;
       $filesize = round($filesize, 2);
       print ($filesize);
       print (" kB");
    }
    else {
       $filesize = $item['filesize'];
       $filesize = $filesize / 1048576;
       $filesize = round($filesize, 2);
       print ($filesize);
       print (" MB");
    }
    ?>
              </div>
            </div>        </td>
          <td rowspan="2"><h3 class="field-label  style3">&nbsp;</h3>
            <span class="style3">Mod Info External</span>        <div class="field-items style4">
              <?php foreach ((array)$node->field_modextlinks as $item) { ?>
              <div class="field-item"><?php print $item['view'] ?></div>
              <?php } ?>
    </div>        </td>
          <td><span class="style3">Mod Status</span>        <div class="field-items style4">
              <div class="field-item"><?php print $node->field_modstatus[0]['view'] ?></div>
          </div></td>
        </tr>
        <tr>
          <td><span class="style3">Mod Type</span>        <div class="field-items style4">
              <div class="field-item"><?php print $node->field_typeofmod[0]['view'] ?> </div>
          </div></td>
          <td><span class="style3">Mod compatable with Reborn </span>        <div class="field-items">
              <div class="field-item"><?php print $node->field_modreborncompat[0]['view'] ?></div>
          </div></td>
        </tr>
        <tr>
          <td colspan="4"><span class="style3">Mod Short Description </span>        <div class="field-items style4">
              <div class="field-item"><?php print $node->field_shortdescription[0]['view'] ?></div>
          </div>      </td>
        </tr>
        <tr>
          <td colspan="4"><span class="style3">Mod Description</span>        <div class="field-items style4">
              <div class="field-item"><?php print $node->field_moddescription[0]['view'] ?></div>
            </div>        <div class="field-items"></div>        <div class="field-items"></div>        </td>
        </tr>
        <tr>
          <td><div class="field field-type-text field-field-submitterrating">
              <div class="field-items"></div>
            </div>
              <div class="field field-type-fivestar field-field-maprating">            <span class="style3">Mod Rating </span>            
                <div class="field-items style4">
                  <div class="field-item"><?php print $node->field_modrating[0]['view'] ?>
                      <p>&nbsp;</p>
                  </div>
                </div>
            </div></td>
          <td><h3 class="field-label  style3">&nbsp;</h3>
          <div class="field-items">        <span class="style3">Mod videoDirect Link </span>        
            <div class="field-items style4">
              <?php foreach ((array)$node->field_modvideolink as $item) { ?>
              <div class="field-item"><?php print $item['view'] ?></div>
              <?php } ?>
            </div>
          </div></td>
          <td colspan="2" rowspan="2"><span class="style3">Mod Xfire / Youtube Video of Map </span>        <div class="field-items style4">
              <div class="field-item"><?php print $node->field_modvideoembed[0]['view'] ?></div>
          </div>        <div class="field-items"></div></td>
        </tr>
        <tr>
          <td><span class="style3">Submitter Initial Rating </span>      <div class="field-items style4">
                <div class="field-item"><?php print $node->field_modsubratiing[0]['view'] ?></div>
            </div>        </td>
          <td><span class="style3">Please Vote for This Mod</span>        <div class="field-items style4">
              <div class="field-item">
                <?php
    print fivestar_widget_form($node); 
    ?>
              </div>
          </div></td>
        </tr>
        <tr>
          <td><span class="style3">Mod Percentage</span>        <div class="field-items style4">
              <div class="field-item">
                <p><?php print $node->field_modrating[0]['rating'] ?></p>
              </div>
          </div></td>
          <td><span class="style3">Mod's File External Link </span>        <div class="field-items style4">
              <div class="field-item"><?php print $node->field_modfileext[0]['view'] ?> </div>
          </div>        <div class="field-items"></div></td>
          <td><span class="style3">Mod Creator</span>        <div class="field-items style4">
              <div class="field-item"><?php print $node->field_modcreator[0]['view'] ?></div>
          </div></td>
          <td><span class="style3">Mod Support </span>        <div class="field-items style4">
              <div class="field-item"><?php print $node->field_modsupport[0]['view'] ?></div>
          </div></td>
        </tr>
        <tr>
          <td colspan="4"><span class="style3">Mod Credits </span>        <div class="field-items style4">
              <div class="field-item"><?php print $node->field_modcredits[0]['view'] ?> </div>
          </div>        <div class="field-items"></div></td>
        </tr>
        <tr>
          <td colspan="4"><span class="style3">Mod Requirements </span>        <div class="field-items style4">
              <div class="field-item"><?php print $node->field_modrequires[0]['view'] ?></div>
          </div></td>
        </tr>
        <tr>
          <td colspan="4"><span class="style3">Mod Install Info</span>        <div class="field-items style4">
              <div class="field-item"><?php print $node->field_modinstall[0]['view'] ?></div>
          </div></td>
        </tr>
        <tr>
          <td colspan="4"><span class="style3">Mod Config / setup </span>        <div class="field-items style4"><div class="field-item">
                <div class="field-items">
                  <div class="field-item"><?php print $node->field_modconfigs[0]['view'] ?></div>
                  </div>
                </div>
              </div>          <div class="field-items"></div>          <div class="field-items"></div></td>
        </tr>
        <tr>
          <td colspan="4"><span class="style3">Mod Remarks - notes </span>
            <div class="field-items style4">
              <div class="field-item">
                <div class="field-items">
                  <div class="field-item"><?php print $node->field_remarks[0]['view'] ?></div>
                </div>
              </div>
          </div></td>
        </tr>
        <tr>
          <td><div class="field-items style4"><div class="field-item"><div class="field-items">
            <div class="field-item"><span class="style3">Installation Server Side </span>
                    <div class="field-items style4">
                      <div class="field-item">
                        <div class="field-items">
                          <div class="field-item"><?php print $node->field_installationserverside[0]['view'] ?></div>
                        </div>
                      </div>
                    </div>
          </div>
                </div>
              </div>
          </div></td>
          <td><span class="style3">De Installation Serverside </span>
            <div class="field-items style4">
              <div class="field-item">
                <div class="field-items">
                  <div class="field-item"><?php print $node->field_deinstallationserverside[0]['view'] ?></div>
                </div>
              </div>
          </div></td>
          <td><span class="style3">Installation Client Side </span>
            <div class="field-items style4">
              <div class="field-item">
                <div class="field-items">
                  <div class="field-item"><?php print $node->field_installationclientside[0]['view'] ?></div>
                </div>
              </div>
          </div></td>
          <td><span class="style3">De Installation Clientside</span>
            <div class="field-items style4">
              <div class="field-item">
                <div class="field-items">
                  <div class="field-item"><?php print $node->field_deinstallationlientside[0]['view'] ?></div>
                </div>
              </div>
          </div></td>
        </tr>
      </table>
      <h3 class="field-label">&nbsp;</h3>
    </div>
    Last edited by heatsinkbod; September 3rd, 2012 at 08:53 AM.

  4. #4

    Default

    Have updated the template above more for showing the field names hopefully Own3mall can help tidy this up also the Jsscript as Razor suggested to do show hide on the big fields like install and mod description.

    I have added the patch Fields for Joto renamed - feel free to butcher all this it was just to show the field names...........

    Have posted the MYSQL access via PM

  5. #5

    Default Updated Xnull Template

    Ok this template is a bit of a tidy up from AAAA side and have added show hide for a few of the large fields as Razor suggested - I have used the same class for the show hide as it kind of works if you are interested in the mod you dont want to have to click on all the fields to get more info so now you click on any one button and get the expanded details on large field displays

    Demo on AAAA without the Xnull scheme -: http://www.mohaaaa.co.uk/AAAAMOHAA/c...rverside-stats

    James we are going to need to start building and testing this on Xnull soon so can we have some method and test area on xnull webhost to run these pages.

    The JS script would be better hosted on xnull for performance that I have used

    Code:
    <!-- TemplateEndEditable -->
    <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js"></script>
    <script type="text/javascript">
    $(function() {
    	function details(fn) {
    		return function() {
    			var r = $(this).closest("tbody").find("tr.detailsRow")[fn]();
    			$("tr.detailsRow").not(r).hide();
    		};
    	};
    	$(".detailsRow").hide();
    	$detailsButtons = $(".detailsButton").click(details('toggle'));
    	$detailsButtons.closest("tr").find("input").click(details('show'));
    });
    </script>
    
    
    <style type="text/css">
    <!--
    .style2 {color: #FFFFFF}
    .style3 {color: #FFBF55}
    -->
    .hover { background-color:#00f; color: #fff; cursor: pointer; }
    </style>
    <div class="field field-type-text field-field-mapname style2">
      <table width="1091" border="1" cellpadding="3" cellspacing="3">
        <tr>
          <td width="272"><h3 class="field-label  style3">Mod Name</h3>
            <div class="field-items ">
              <div class="field-item"><?php print $node->field_modname[0]['view'] ?>
    </div>
          </div></td>
          <td width="284"><h3 class="field-label  style3">Mod File (number of downloads)</h3>      
            <div class="field-items">
              <div class="field-item"><?php print $node->field_modfile[0]['view'] ?><?php
    $item = $node->field_modfile[0]; // change this to the correct field name
    if($item['filesize'] < 1024) {
       print ($item['filesize']);
       print (" bytes");
    }
    elseif ($item['filesize'] < 1048576) {
       $filesize = $item['filesize'];
       $filesize = $filesize / 1024;
       $filesize = round($filesize, 2);
       print ($filesize);
       print (" kB");
    }
    else {
       $filesize = $item['filesize'];
       $filesize = $filesize / 1048576;
       $filesize = round($filesize, 2);
       print ($filesize);
       print (" MB");
    }
    ?></div>
            </div>
          </td>
          <td width="243" rowspan="2"><h3 class="field-label  style3">Mod Screen shot</h3>
            <div class="field-items">
              <?php foreach ((array)$node->field_modscreen as $item) { ?>
              <div class="field-item"><?php print $item['view'] ?></div>
              <?php } ?>
            </div></td>
          <td width="243" rowspan="2"><h3 class="field-label  style3">Total Views of this Mod </h3>
            <div class="field-items ">
              <div class="field-item"><?php print $node->links['statistics_counter']['title'] ?></div>
          </div>        </td>
        </tr>
        <tr>
          <td><h3 class="field-label  style3">Mod Version </h3>
            <div class="field-items ">
              <div class="field-item"><?php print $node->field_modversion[0]['view'] ?> </div>
          </div></td>
          <td width="284"><h3 class="field-label  style3">Mod File Tested and Validated </h3>
            <div class="field-items">
              <div class="field-item"><?php print $node->field_modtested[0]['view'] ?> <span class="style3 field-label"><strong>By - <?php print $node->field_modtestedby[0]['view'] ?></strong></span></div>
          </div></td>
        </tr>
        <tr>
          <td><h3 class="field-label  style3">Game Type</h3>
            <div class="field-items">
              <div class="field-item"><?php print $node->field_gametype[0]['view'] ?> </div>
            </div>
          </td>
          <td><h3 class="field-label  style3">Server or Client Mod </h3>      
            <div class="field-items">
              <div class="field-item"><?php print $node->field_serverclient[0]['view'] ?>
                  <?php
    $item = $node->field_serverclient[0]; // change this to the correct field name
    if($item['filesize'] < 1024) {
       print ($item['filesize']);
       print (" ");
    }
    elseif ($item['filesize'] < 1048576) {
       $filesize = $item['filesize'];
       $filesize = $filesize / 1024;
       $filesize = round($filesize, 2);
       print ($filesize);
       print (" kB");
    }
    else {
       $filesize = $item['filesize'];
       $filesize = $filesize / 1048576;
       $filesize = round($filesize, 2);
       print ($filesize);
       print (" MB");
    }
    ?>
    </div>
            </div>        </td>
          <td><h3 class="field-label  style3">Mod Creator</h3>
            <div class="field-items">
              <div class="field-item"><?php print $node->field_modcreator[0]['view'] ?></div>
          </div>        </td>
          <td><h3 class="field-label  style3">Mod Status</h3>      
            <div class="field-items">
              <div class="field-item"><?php print $node->field_modstatus[0]['view'] ?>
    </div>
          </div></td>
        </tr>
        <tr>
          <td><h3 class="field-label  style3">Mod Type</h3>
            <div class="field-items">
              <div class="field-item"><?php print $node->field_typeofmod[0]['view'] ?> 
                <p>&nbsp;</p>
              </div>
          </div></td>
          <td><h3 class="field-label  style3">Mod Info External</h3>
            <div class="field-items">
              <?php foreach ((array)$node->field_modextlinks as $item) { ?>
              <div class="field-item"><?php print $item['view'] ?></div>
              <?php } ?>
            </div></td>
          <td rowspan="2"><h3 class="field-label  style3">Mod Support </h3>
            <div class="field-items">
              <div class="field-item"><?php print $node->field_modsupport[0]['view'] ?></div>
          </div></td>
          <td rowspan="2"><h3 class="field-label  style3">Mod compatable with Reborn </h3>
            <div class="field-items">
              <div class="field-item"><?php print $node->field_modreborncompat[0]['view'] ?></div>
          </div></td>
        </tr>
        <tr>
          <td><h3 class="field-label  style3">Mod Requirements </h3>
            <div class="field-items">
              <div class="field-item"><?php print $node->field_modrequires[0]['view'] ?></div>
          </div></td>
          <td><h3 class="field-label  style3">Mod's File External Link </h3>
            <div class="field-items">
              <div class="field-item"><?php print $node->field_modfileext[0]['view'] ?> </div>
          </div></td>
        </tr>
        <tr>
          <td colspan="4"><h3 class="field-label  style3">Mod Short Description </h3>
          <div class="field-items">
              <div class="field-item"><?php print $node->field_shortdescription[0]['view'] ?></div>
          </div>      </td>
        </tr>
        <tr>
          <td colspan="4"><h3 class="field-label  style3">Mod Description</h3>
            <div class="detailsRow">
              <div class="detailsRow"></div>
            </div>
            <div class="detailsRow"></div>
            <div class="detailsRow"></div>
            <button class="detailsButton">Show details </button>        <div class="detailsRow"> 
              <div class="detailsRow"></div>
            </div>        </td>
        </tr><tr class="detailsRow">
        <td colspan="5"><?php print $node->field_moddescription[0]['view'] ?></td>
        </tr>
        <tr>
          <td><div class="field field-type-text field-field-submitterrating">
              <div class="field-items"></div>
            </div>
              <div class="field field-type-fivestar field-field-maprating">
                <h3 class="field-label  style3">Mod Rating </h3>
                <div class="field-items">
                  <div class="field-item"><?php print $node->field_modrating[0]['view'] ?>
    </div>
                </div>
            </div></td>
          <td rowspan="2"><h3 class="field-label  style3">Mod videoDirect Link </h3>
          <div class="field-items">
            <div class="field-items">
              <?php foreach ((array)$node->field_modvideolink as $item) { ?>
              <div class="field-item"><?php print $item['view'] ?></div>
              <?php } ?>
    </div>
          </div></td>
          <td colspan="2" rowspan="3"><h3 class="field-label  style3">Mod Xfire / Youtube Video of Map </h3>
            <div class="field-items">
              <div class="field-item"><?php print $node->field_modvideoembed[0]['view'] ?></div>
          </div>        <div class="field-items"></div></td>
        </tr>
        <tr>
          <td><h3 class="field-label  style3">Mod Percentage</h3>
            <div class="field-items">
              <div class="field-item">
                <p><?php print $node->field_modrating[0]['rating'] ?></p>
              </div>
          </div></td>
        </tr>
        <tr>
          <td><h3 class="field-label  style3">Submitter Initial Rating </h3>
              <div class="field-items">
                <div class="field-item"><?php print $node->field_modsubratiing[0]['view'] ?></div>
            </div>        </td>
          <td><h3 class="field-label  style3">Please Vote for This Mod</h3>        
            <div class="field-items">
              <div class="field-item">
                <?php
    print fivestar_widget_form($node); 
    ?>
              </div>
          </div></td>
        </tr>
        <tr>
          <td colspan="4"><h3 class="field-label  style3">Mod Credits </h3>
            <div class="field-items">
              <div class="field-item"><?php print $node->field_modcredits[0]['view'] ?> </div>
          </div>        <div class="field-items"></div></td>
        </tr>
        <tr>
          <td colspan="4"><h3 class="field-label  style3">Mod Configs </h3>
            <div class="detailsRow">
              <div class="detailsRow"></div>
            </div>
            <div class="detailsRow"></div>
            <button class="detailsButton">Show details </button>        <div class="detailsRow"> 
              <div class="detailsRow"></div>
            </div>        </td>
        </tr><tr class="detailsRow">
        <td colspan="5"><?php print $node->field_modconfigs[0]['view'] ?></td>
        </tr>
        <tr>
          <td colspan="4"><h3 class="field-label  style3">Mod Install </h3>
            <div class="detailsRow">
              <div class="detailsRow"></div>
            </div>
            <div class="detailsRow"></div>
            <button class="detailsButton">Show details </button>        <div class="detailsRow"> 
              <div class="detailsRow"></div>
            </div>        </td>
        </tr><tr class="detailsRow">
        <td colspan="5"><?php print $node->field_modinstall[0]['view'] ?></td>
        </tr>
        <tr>
          <td colspan="4"><h3 class="field-label  style3">Mod Remarks / Notes </h3>
            <div class="detailsRow">
              <div class="detailsRow"></div>
            </div>
            <div class="detailsRow"></div>
            <button class="detailsButton">Show details </button>        <div class="detailsRow"> 
              <div class="detailsRow"></div>
            </div>        </td>
        </tr><tr class="detailsRow">
        <td colspan="5"><?php print $node->field_modremarks[0]['view'] ?></td>
             </tr>
      </table>

  6. #6
    Über Prodigy & Developer Razo[R]apiD's Avatar
    Join Date
    May 2010
    Location
    Poland, Lublin
    Posts
    3,257

    Default

    Hi, yes, we'll have to host it and create a DB here. But before this, Heatsink, check the other thread where I explained my idea of doing auto DB sync.

  7. #7

    Default

    Quote Originally Posted by Razo[R]apiD View Post
    Hi, yes, we'll have to host it and create a DB here. But before this, Heatsink, check the other thread where I explained my idea of doing auto DB sync.
    Yeh ready to give that a go ))) not sure how far I can get but understand what you are after, I go back to work on 27th so need to get stuck into this now ))

  8. #8

    Default

    If I'm understanding correctly, you guys would like KFM to create the records in the database for files? If that's the case, I could mod the hell out of KFM and make it serve this purpose. However, what I would like to have before making any such changes is a Microsoft Visio table diagram with all of the field names exactly as they are and their datatypes.

  9. #9

    Default

    The more I read these threads, the more I am thinking about just writing my own system from scratch using PHP and MySQL... There would be the upload section, admin section, and display / search section... doesn't sound too hard. Problem is, I don't have much time these days now that I have a relatively boring programming job dealing with insurance, which I understand nothing about rofl.
    Last edited by own3mall; September 4th, 2012 at 06:24 PM.

  10. #10
    Über Prodigy & Developer Razo[R]apiD's Avatar
    Join Date
    May 2010
    Location
    Poland, Lublin
    Posts
    3,257

    Default

    I have a job too, even 2. I wanted KFM to be a file manager only, so it wouldn't create records in database, but just serve as file uploading and management. Then in admin panel, you would just select file that was uploaded with KFM and give it description and so on. You would however need to remember not to rename or move the files that were used once or the links will get broken. You'd need to update the links.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •