Help to do this mod

Support for PhpBB3. Post here to get help with any phpBB3 related issue here
There is no support here! Only Read Access!
Forum rules
In order the get any support, you will have to do following:
1. Use a describing title!
2. Describe your problem and what happened when the problem occured
3. Tell us what version of phpBB3 you are currently using.
Else your topic may be ignored or locked!
User avatar
Fire-Fox
BBCoder IV
BBCoder IV
Posts: 275
Joined: 22 Mar 2010, 13:24
Location: Denmark

Re: Help to do this mod

Post by Fire-Fox »

think it's ABD
User avatar
Steve
BBCoder VI
BBCoder VI
Posts: 847
Joined: 05 Mar 2010, 01:10
BBCodes: 2000
Favourite BBCode: p**n tube
Favourite MOD: Non of Stokers

Re: Help to do this mod

Post 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 ;)
Steve wrote: 14 Nov 2024, 16:45 It's happy bastard day!
User avatar
Fire-Fox
BBCoder IV
BBCoder IV
Posts: 275
Joined: 22 Mar 2010, 13:24
Location: Denmark

Re: Help to do this mod

Post by Fire-Fox »

Done!

Just sent him a message via this board!
User avatar
Stoker
Site Admin
Site Admin
Posts: 3536
Joined: 12 May 2008, 23:26
BBCodes: 239
Favourite BBCode: Anipro
Favourite MOD: PrettyPhoto
Location: Denmark
Contact:

Re: Help to do this mod

Post by Stoker »

Why cant you use the custom profile fields?
Board rules! No PM support
User avatar
Fire-Fox
BBCoder IV
BBCoder IV
Posts: 275
Joined: 22 Mar 2010, 13:24
Location: Denmark

Re: Help to do this mod

Post by Fire-Fox »

Maybe i can, but i would reaslly like to to be separetet from the other things
User avatar
Fire-Fox
BBCoder IV
BBCoder IV
Posts: 275
Joined: 22 Mar 2010, 13:24
Location: Denmark

Re: Help to do this mod

Post 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
User avatar
Inner Circle
BBCoder III
BBCoder III
Posts: 107
Joined: 20 Mar 2010, 20:25
Location: Germany
Contact:

Re: Help to do this mod

Post by Inner Circle »

Nice one!

would you like to share it with us?
User avatar
Fire-Fox
BBCoder IV
BBCoder IV
Posts: 275
Joined: 22 Mar 2010, 13:24
Location: Denmark

Re: Help to do this mod

Post 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);
User avatar
Inner Circle
BBCoder III
BBCoder III
Posts: 107
Joined: 20 Mar 2010, 20:25
Location: Germany
Contact:

Re: Help to do this mod

Post 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'
Ather
BBCoder II
BBCoder II
Posts: 14
Joined: 09 Apr 2010, 18:27

Re: Help to do this mod

Post by Ather »

getting the same error here
Locked