Page 2 of 4

Re: Help to do this mod

Posted: 05 May 2010, 22:17
by Fire-Fox
think it's ABD

Re: Help to do this mod

Posted: 05 May 2010, 22:21
by Steve
jamie no longer frequents phpbb forums,s as much as he use to, the other author is doyouspeakwak track him down he,s a member here and phpbb.com and ask if he is willing to update finish the mod ;)

Re: Help to do this mod

Posted: 05 May 2010, 22:25
by Fire-Fox
Done!

Just sent him a message via this board!

Re: Help to do this mod

Posted: 05 May 2010, 23:17
by Stoker
Why cant you use the custom profile fields?

Re: Help to do this mod

Posted: 06 May 2010, 20:55
by Fire-Fox
Maybe i can, but i would reaslly like to to be separetet from the other things

Re: Help to do this mod

Posted: 06 May 2010, 22:29
by Fire-Fox
Have now completet the mod :)

From viewtopic_body.html
System-Specs.png
From ucp.php?i=profile&mode=profile_info
System-Profil.png

Re: Help to do this mod

Posted: 06 May 2010, 22:40
by Inner Circle
Nice one!

would you like to share it with us?

Re: Help to do this mod

Posted: 06 May 2010, 22:57
by Fire-Fox
MOD Title: System Specs Mod
MOD Author: Fire-Fox
MOD Description: Adds a dropdown box on viewtopic_body with your computer specs!
Credits: cisco007 - SteveĀ© - Stoker for pointing me in the right direction on how to accomplish this mod

Upload the image to your images folder
arrow_down.gif
Open: yourstyle/template/overall_header.html
Find:

Code: Select all

// ]]>
</script>
Add Before:

Code: Select all

function doCollapseExpand(id,img){
   var b = document.getElementById(id);
      if (b.style.display=='none'){
      b.style.display='';
   document.images[img].src='{ROOT_PATH}images/arrow_user_up.gif'; 
} else {
      b.style.display='none';
   document.images[img].src='{ROOT_PATH}images/arrow_user_down.gif';
} return false; }
Open: yourstyle/template/viewtopic_body.html
Find:

Code: Select all

<div class="back2top"><a href="#wrap" class="top" title="{L_BACK_TO_TOP}">{L_BACK_TO_TOP}</a></div>
Add After:

Code: Select all

<!-- Hardware Specs Start -->
<dl style="padding-left:5px;">
       <!-- IF postrow.U_POST_AUTHOR -->
        <a href="#" onclick="return doCollapseExpand('box{postrow.POST_ID}','btn{postrow.POST_ID}')"> 
            <!-- ENDIF -->
            {L_USERS} {L_INFORMATION} <img src="{ROOT_PATH}images/arrow_down.gif" height="6" width="11" name="btn{postrow.POST_ID}" /></a>   
        </dl>   
       <dl id="box{postrow.POST_ID}" style="display:none; margin-top:15px; margin-bottom:5px;">
<table width="682" border="0">
  <tr>
    <td width="361"><table width="363" border="0">
	 <!-- BEGIN custom_fields -->
     <!-- IF postrow.custom_fields.PROFILE_FIELD_NAME eq "System" -->
      <tr>
        <td width="353"><strong>{postrow.custom_fields.PROFILE_FIELD_NAME}:</strong> {postrow.custom_fields.PROFILE_FIELD_VALUE}</td>
      </tr>
	  <!-- ENDIF -->
	  <!-- END custom_fields -->
	  
	  <!-- BEGIN custom_fields -->
      <!-- IF postrow.custom_fields.PROFILE_FIELD_NAME eq "OS" -->
      <tr>
        <td><strong>{postrow.custom_fields.PROFILE_FIELD_NAME}:</strong> {postrow.custom_fields.PROFILE_FIELD_VALUE}</td>
      </tr>
	  <!-- ENDIF -->
	  <!-- END custom_fields -->
	  
	  <!-- BEGIN custom_fields -->
      <!-- IF postrow.custom_fields.PROFILE_FIELD_NAME eq "cpu" -->
      <tr>
        <td><strong>{postrow.custom_fields.PROFILE_FIELD_NAME}:</strong> {postrow.custom_fields.PROFILE_FIELD_VALUE}</td>
      </tr>
	  <!-- ENDIF -->
	  <!-- END custom_fields -->
	  
	  <!-- BEGIN custom_fields -->
      <!-- IF postrow.custom_fields.PROFILE_FIELD_NAME eq "Motherboard" -->
      <tr>
        <td><strong>{postrow.custom_fields.PROFILE_FIELD_NAME}:</strong> {postrow.custom_fields.PROFILE_FIELD_VALUE}</td>
      </tr>
	  <!-- ENDIF -->
	  <!-- END custom_fields -->
	  
	  <!-- BEGIN custom_fields -->
      <!-- IF postrow.custom_fields.PROFILE_FIELD_NAME eq "Memory" -->
      <tr>
        <td><strong>{postrow.custom_fields.PROFILE_FIELD_NAME}:</strong> {postrow.custom_fields.PROFILE_FIELD_VALUE}</td>
      </tr>
	  <!-- ENDIF -->
	  <!-- END custom_fields -->
	  
	  <!-- BEGIN custom_fields -->
      <!-- IF postrow.custom_fields.PROFILE_FIELD_NAME eq "Graphics Card" -->
      <tr>
        <td><strong>{postrow.custom_fields.PROFILE_FIELD_NAME}:</strong> {postrow.custom_fields.PROFILE_FIELD_VALUE}</td>
      </tr>
	  <!-- ENDIF -->
	  <!-- END custom_fields -->
	  
	  <!-- BEGIN custom_fields -->
      <!-- IF postrow.custom_fields.PROFILE_FIELD_NAME eq "Sound Card" -->
      <tr>
        <td><strong>{postrow.custom_fields.PROFILE_FIELD_NAME}:</strong> {postrow.custom_fields.PROFILE_FIELD_VALUE}</td>
      </tr>
	  <!-- ENDIF -->
	  <!-- END custom_fields -->
	  
	  <!-- BEGIN custom_fields -->
      <!-- IF postrow.custom_fields.PROFILE_FIELD_NAME eq "Monitor Display" -->
      <tr>
        <td><strong>{postrow.custom_fields.PROFILE_FIELD_NAME}:</strong> {postrow.custom_fields.PROFILE_FIELD_VALUE}</td>
      </tr>
	 <!-- ENDIF -->
	 <!-- END custom_fields -->
	  
	 <!-- BEGIN custom_fields -->
     <!-- IF postrow.custom_fields.PROFILE_FIELD_NAME eq "Screen Resolution" -->
      <tr>
        <td><strong>{postrow.custom_fields.PROFILE_FIELD_NAME}:</strong> {postrow.custom_fields.PROFILE_FIELD_VALUE}</td>
      </tr>
	 <!-- ENDIF -->
	 <!-- END custom_fields -->	  
	  
    </table></td>
    <td width="305"><table width="307" border="0">
	<!-- BEGIN custom_fields -->
    <!-- IF postrow.custom_fields.PROFILE_FIELD_NAME eq "Keyboard" -->
      <tr>
        <td width="297"><strong>{postrow.custom_fields.PROFILE_FIELD_NAME}:</strong> {postrow.custom_fields.PROFILE_FIELD_VALUE}</td>
      </tr>
	<!-- ENDIF -->
	<!-- END custom_fields -->
	  
	<!-- BEGIN custom_fields -->
    <!-- IF postrow.custom_fields.PROFILE_FIELD_NAME eq "Mouse" -->
      <tr>
        <td><strong>{postrow.custom_fields.PROFILE_FIELD_NAME}:</strong> {postrow.custom_fields.PROFILE_FIELD_VALUE}</td>
      </tr>
	<!-- ENDIF -->
	<!-- END custom_fields -->
	  
	<!-- BEGIN custom_fields -->
    <!-- IF postrow.custom_fields.PROFILE_FIELD_NAME eq "PSU" -->
      <tr>
        <td><strong>{postrow.custom_fields.PROFILE_FIELD_NAME}:</strong> {postrow.custom_fields.PROFILE_FIELD_VALUE}</td>
      </tr>
	<!-- ENDIF -->
	<!-- END custom_fields -->
	  
	<!-- BEGIN custom_fields -->
    <!-- IF postrow.custom_fields.PROFILE_FIELD_NAME eq "Case" -->
      <tr>
        <td><strong>{postrow.custom_fields.PROFILE_FIELD_NAME}:</strong> {postrow.custom_fields.PROFILE_FIELD_VALUE}</td>
      </tr>
	<!-- ENDIF -->
	<!-- END custom_fields -->
	  
	<!-- BEGIN custom_fields -->
    <!-- IF postrow.custom_fields.PROFILE_FIELD_NAME eq "Cooling" -->
      <tr>
        <td><strong>{postrow.custom_fields.PROFILE_FIELD_NAME}:</strong> {postrow.custom_fields.PROFILE_FIELD_VALUE}</td>
      </tr>
	<!-- ENDIF -->
	<!-- END custom_fields -->
	  
	<!-- BEGIN custom_fields -->
    <!-- IF postrow.custom_fields.PROFILE_FIELD_NAME eq "Hard Drives" -->
      <tr>
        <td><strong>{postrow.custom_fields.PROFILE_FIELD_NAME}:</strong> {postrow.custom_fields.PROFILE_FIELD_VALUE}</td>
      </tr>
	<!-- ENDIF -->
	<!-- END custom_fields -->
	  
	<!-- BEGIN custom_fields -->
    <!-- IF postrow.custom_fields.PROFILE_FIELD_NAME eq "Internet Speed" -->
      <tr>
        <td><strong>{postrow.custom_fields.PROFILE_FIELD_NAME}:</strong> {postrow.custom_fields.PROFILE_FIELD_VALUE}</td>
      </tr>
	<!-- ENDIF -->
	<!-- END custom_fields -->
	
	<!-- BEGIN custom_fields -->
    <!-- IF postrow.custom_fields.PROFILE_FIELD_NAME eq "Other Info" -->
      <tr>
        <td><strong>{postrow.custom_fields.PROFILE_FIELD_NAME}:</strong> {postrow.custom_fields.PROFILE_FIELD_VALUE}</td>
      </tr>
	<!-- ENDIF -->
	<!-- END custom_fields -->
    </table>
    <br /></td>
  </tr>
</table>
<a href="ucp.php?i=profile&mode=profile_info">{L_SYSTEM_SPECS}</a>
	  </dl>   
<!-- Hardware Specs Stop -->
Here is the sql you can use, but backup your database before you use the sql i postet

Code: Select all

INSERT INTO `phpbb_profile_fields` (`field_id`, `field_name`, `field_type`, `field_ident`, `field_length`, `field_minlen`, `field_maxlen`, `field_novalue`, `field_default_value`, `field_validation`, `field_required`, `field_show_on_reg`, `field_show_on_vt`, `field_show_profile`, `field_hide`, `field_no_view`, `field_active`, `field_order`, `field_stats_show`) VALUES
(11, 'cpu', 2, 'cpu', '52', '0', '20', '', '', '.*', 0, 1, 1, 1, 0, 0, 1, 4, 1),
(10, 'system', 2, 'system', '52', '0', '20', '', '', '.*', 0, 1, 1, 1, 0, 0, 1, 3, 1),
(9, 'os', 2, 'os', '52', '0', '20', '', '', '.*', 0, 1, 1, 1, 0, 0, 1, 2, 1),
(14, 'motherboard', 2, 'motherboard', '52', '0', '20', '', '', '.*', 0, 1, 1, 1, 0, 0, 1, 5, 1),
(15, 'memory', 2, 'memory', '52', '0', '20', '', '', '.*', 0, 1, 1, 1, 0, 0, 1, 6, 1),
(16, 'graphics_card', 2, 'graphics_card', '52', '0', '20', '', '', '.*', 0, 1, 1, 1, 0, 0, 1, 7, 1),
(17, 'sound_card', 2, 'sound_card', '52', '0', '20', '', '', '.*', 0, 1, 1, 1, 0, 0, 1, 8, 1),
(18, 'monitor_display', 2, 'monitor_display', '52', '0', '255', '', '', '.*', 0, 1, 1, 1, 0, 0, 1, 9, 1),
(19, 'screen_resolution', 2, 'screen_resolution', '52', '0', '100', '', '', '.*', 0, 1, 1, 1, 0, 0, 1, 10, 1),
(20, 'keyboard', 2, 'keyboard', '52', '0', '100', '', '', '.*', 0, 1, 1, 1, 0, 0, 1, 11, 1),
(21, 'mouse', 2, 'mouse', '52', '0', '100', '', '', '.*', 0, 1, 1, 1, 0, 0, 1, 12, 1),
(22, 'psu', 2, 'psu', '52', '0', '100', '', '', '.*', 0, 1, 1, 1, 0, 0, 1, 13, 1),
(23, 'case', 2, 'case', '52', '0', '255', '', '', '.*', 0, 1, 1, 1, 0, 0, 1, 14, 1),
(24, 'cooling', 2, 'cooling', '52', '0', '255', '', '', '.*', 0, 1, 1, 1, 0, 0, 1, 15, 1),
(25, 'hard_drives', 2, 'hard_drives', '52', '0', '255', '', '', '.*', 0, 1, 1, 1, 0, 0, 1, 16, 1),
(26, 'internet_speed', 2, 'internet_speed', '52', '0', '255', '', '', '.*', 0, 1, 1, 1, 0, 0, 1, 17, 1),
(27, 'other_info', 2, 'other_info', '52', '0', '255', '', '', '.*', 0, 1, 1, 1, 0, 0, 1, 18, 1);

Re: Help to do this mod

Posted: 06 May 2010, 23:03
by Inner Circle
ok i tried it on my localhost testforum and when i try to enter the SQL, i get this:

Code: Select all

#1054 - Unknown column 'field_stats_show' in 'field list'

Re: Help to do this mod

Posted: 07 May 2010, 22:05
by Ather
getting the same error here