[MOD] Hide User Details

แนะนำ Mod ต่างๆ ของ PHPBB3 แนะนำความสามารถ ของ mod การติดตั้ง การเข้ากันได้กับเวอร์ชั่น

Moderator: mindphp

buay
PHP Super Member
PHP Super Member
โพสต์: 250
ลงทะเบียนเมื่อ: 02/06/2014 9:55 am

[MOD] Hide User Details

โพสต์ที่ยังไม่ได้อ่าน โดย buay »

3-7-2557 14-35-09.png
3-7-2557 14-35-09.png (5.55 KiB) Viewed 4007 times
รายละเอียด : MOD นี้จะสามารถซ่อนรายละเอียดของผู้ใช้ได้ (ฝั่ง user)
พัฒนาโดย : phpbbmodders.net
Version : 1.0.1
ดาวน์โหลดได้ที่ : https://www.mindphp.com/download/files/1 ... o-zip.html

ไฟล์ที่ใช้ในการติดตั้ง
>>language/en/viewtopic.php,
>>styles/prosilver/template/overall_header.html,
>>styles/prosilver/template/viewtopic_body.html

วิธีติดตั้ง
เปิดไฟล์ : language/en/viewtopic.php,

ค้นหา เติมก่อน

โค้ด: เลือกทั้งหมด

// BEGIN Hide User Details
$lang = array_merge($lang, array(
    'HIDEDETAILS'    => 'Hide details',
    'SHOWDETAILS'    => 'Show details',
    'USERDETAILS'    => 'User Details',
));
//END Hide User Details
 
เปิดไฟล์ : styles/prosilver/template/overall_header.html,

ค้นหา

โค้ด: เลือกทั้งหมด

</head>
 
เติมก่อน

โค้ด: เลือกทั้งหมด

<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js"></script>
เปิดไฟล์ : styles/prosilver/template/viewtopic_body.html

ค้นหา

โค้ด: เลือกทั้งหมด

<!-- INCLUDE overall_header.html -->
 
เติมหลัง

โค้ด: เลือกทั้งหมด

<script type="text/javascript">
// <![CDATA[
var hideDetails = '{LA_HIDEDETAILS}';
var showDetails = '{LA_SHOWDETAILS}';
showDisplay = function(id)
{
    // close open details
    $('dt[id*=hide_]').each(function(){
        if ($(this).is(':visible'))
        {
            var divid = $(this).attr('id').replace('hide_','');
            $('#hide_' + divid).hide();
            $('a#href_' + divid).replaceWith('<a href="#" id="href_'+divid+'" onclick="showDisplay('+divid+'); return false;"><img src="{ROOT_PATH}images/open.png" alt="'+showDetails+'" title="'+showDetails+'" height="16px" width="16px" /></a>');
        }
    });
    
    $('#show_' + id).find('a#href_' + id).replaceWith('<a href="#" id="href_' +id+'" onclick="hideDisplay('+id+'); return false;"><img src="{ROOT_PATH}images/close.png" alt="'+hideDetails+'" title="'+hideDetails+'" height="16px" width="16px" /></a>');
    $('#hide_' + id).fadeIn();
};

hideDisplay = function(id)
{
    $('#hide_' + id).fadeOut();
    $('a#href_' + id).replaceWith('<a href="#" id="href_'+id+'" onclick="showDisplay('+id+'); return false;"><img src="{ROOT_PATH}images/open.png" alt="'+showDetails+'" title="'+showDetails+'" height="16px" width="16px" /></a>');
}
// ]]>
</script>
ค้นหา

โค้ด: เลือกทั้งหมด

        <dd>&nbsp;</dd>

        <!-- IF postrow.POSTER_POSTS != '' --><dd><strong>{L_POSTS}:</strong> {postrow.POSTER_POSTS}</dd><!-- ENDIF -->
        <!-- IF postrow.POSTER_JOINED --><dd><strong>{L_JOINED}:</strong> {postrow.POSTER_JOINED}</dd><!-- ENDIF -->
        <!-- IF postrow.POSTER_FROM --><dd><strong>{L_LOCATION}:</strong> {postrow.POSTER_FROM}</dd><!-- ENDIF -->

        <!-- IF postrow.S_PROFILE_FIELD1 -->
            <!-- Use a construct like this to include admin defined profile fields. Replace FIELD1 with the name of your field. -->
            <dd><strong>{postrow.PROFILE_FIELD1_NAME}:</strong> {postrow.PROFILE_FIELD1_VALUE}</dd>
        <!-- ENDIF -->

        <!-- BEGIN custom_fields -->
            <dd><strong>{postrow.custom_fields.PROFILE_FIELD_NAME}:</strong> {postrow.custom_fields.PROFILE_FIELD_VALUE}</dd>
        <!-- END custom_fields -->
 
เติมทับ

โค้ด: เลือกทั้งหมด

            <!-- IF not S_IS_BOT && postrow.U_POST_AUTHOR -->
            <dt id="show_{postrow.POST_ID}">
                    <strong>{L_USERDETAILS}:</strong>&nbsp;<a href="#" id="href_{postrow.POST_ID}" onclick="showDisplay({postrow.POST_ID}); return false;"><img src="{ROOT_PATH}images/open.png" alt="{L_SHOWDETAILS}" title="{L_SHOWDETAILS}" height="16px" width="16px" /></a>
            </dt>
            <dt id="hide_{postrow.POST_ID}" style="display:none;">             
                <!-- IF postrow.POSTER_POSTS != '' --><strong>{L_POSTS}:</strong> {postrow.POSTER_POSTS}<br /><!-- ENDIF -->
                <!-- IF postrow.POSTER_JOINED --><strong>{L_JOINED}:</strong> {postrow.POSTER_JOINED}<br /><!-- ENDIF -->
                <!-- IF postrow.POSTER_FROM --><strong>{L_LOCATION}:</strong> {postrow.POSTER_FROM}<br /><!-- ENDIF -->
                <!-- IF postrow.POSTER_LASTVISIT --><strong>{L_LASTVISIT}:</strong> {postrow.POSTER_LASTVISIT}<br /><!-- ENDIF -->
                <!-- IF postrow.S_PROFILE_FIELD1 -->
                    <!-- Use a construct like this to include admin defined profile fields. Replace FIELD1 with the name of your field. -->
                    <strong>{postrow.PROFILE_FIELD1_NAME}:</strong> {postrow.PROFILE_FIELD1_VALUE}<br />
                <!-- ENDIF -->

                <!-- BEGIN custom_fields -->
                    <strong>{postrow.custom_fields.PROFILE_FIELD_NAME}:</strong> {postrow.custom_fields.PROFILE_FIELD_VALUE}<br />
                <!-- END custom_fields -->
            </dt>
            <!-- ENDIF -->
 
บุคคลทั่วไป

Re: [MOD] Hide User Details

โพสต์ที่ยังไม่ได้อ่าน โดย บุคคลทั่วไป »

มันไว้ทำอะไร
ตอบกลับโพส
  • Similar Topics
    ตอบกลับ
    แสดง
    โพสต์ล่าสุด

ผู้ใช้งานขณะนี้

สมาชิกกำลังดูบอร์ดนี้: ไม่มีสมาชิกใหม่ และบุคลทั่วไป 29