1. Nhập đoạn SQL sau vào AdminCP hay phpMyAdmin và chạy:
SQL
alter table ibf_members add prankpost_background varchar(128) not null ;
2. Mở /sources/sql/mysql_queries.php
Tìm:
CODE
function topics_get_posts( $a )
{
# topics.php
return "SELECT p.*,
Thay bằng:
CODE
function topics_get_posts( $a )
{
# topics.php
return "SELECT p.*,m.prankpost_background,
Tìm:
CODE
function topics_get_posts_with_join( $a )
{
# topics.php
return "SELECT p.*,
Thay bằng:
CODE
function topics_get_posts_with_join( $a )
{
# topics.php
return "SELECT p.*,m.prankpost_background,
3. Mở /sources/Admin/ad_member.php
Tìm (trong function member_do_edit_form() ):
CODE
$ibforums->html .= $ibforums->adskin->add_td_row( array( "<b>Avatar Size</b>" ,
$ibforums->adskin->form_input("avatar_size", $mem['avatar_size'])
) );
Thêm vào sau:
CODE
$ibforums->html .= $ibforums->adskin->add_td_row( array( "<b>Member Post Prank Background</b>" ,
$ibforums->adskin->form_input("prankpost_background", $mem['prankpost_background'])
) );
Tìm trong function member_do_edit():
CODE
$DB->do_update( 'members', array (
'restrict_post' => $restrict_post,
'mgroup' => $ibforums->input['mgroup'],
'title' => $ibforums->input['title'],
'language' => $ibforums->input['language'],
'skin' => $ibforums->input['skin'],
'hide_email' => $ibforums->input['hide_email'],
'email_pm' => $ibforums->input['email_pm'],
'email' => $ibforums->input['email'],
Thay bằng:
CODE
$DB->do_update( 'members', array (
'restrict_post' => $restrict_post,
'mgroup' => $ibforums->input['mgroup'],
'title' => $ibforums->input['title'],
'language' => $ibforums->input['language'],
'skin' => $ibforums->input['skin'],
'hide_email' => $ibforums->input['hide_email'],
'email_pm' => $ibforums->input['email_pm'],
'email' => $ibforums->input['email'],
'prankpost_background' => $ibforums->input['prankpost_background'],
Mở topics.php
Tìm:
CODE
function parse_member( $member=array() )
{
global $ibforums, $std, $DB;
Thêm dưới:
CODE
// BEGIN PRANK-POST HACK
if ($member['prankpost_background'])
{
$member['prankpost_style'] = " style=\"background:url({$member['prankpost_background']}); \" ";
}
else
{
$member['prankpost_style'] = "";
}
// END PRANK-POST HACK
Vào acp --> Skin manager --> Edit Skin Templates HTML --> RenderRow
Tìm:
CODE
</td>
<td width='100%' valign='top' class='{$post['post_css']}'>
<!-- THE POST {$post['pid']} -->
Thay bằng:
CODE
</td>
<td width='100%' valign='top' class='{$post['post_css']}' {$author['prankpost_style']} >
<!-- THE POST {$post['pid']} -->
Save lại
Để chỉnh background của ai, vào acp --> manage member --> edit member profile, sẽ có thêm phần prank background image gì đó