• Downloading from our site will require you to have a paid membership. Upgrade to a Premium Membership from 10$ a month today!

    Dont forget read our Rules! Also anyone caught Sharing this content will be banned. By using this site you are agreeing to our rules so read them. Saying I did not know is simply not an excuse! You have been warned.

Seo thanks for post phpBB - Tích hợp mod thanks và phpBB seo

Admin

Well-Known Member
Staff member
Administrator
1. Seo thanks for post: để tích hợp seo cho nó bạn làm như sau nà:
Mở tập tin viewtopic.php
Bước 1: Tìm:
Code:
// www.phpBB-SEO.com SEO TOOLKIT BEGIN -> Zero dupe
$phpbb_seo->seo_opt['zero_dupe']['start'] = $phpbb_seo->seo_chk_start( $start, $config['posts_per_page'] );

Thêm vào trước nó:
Code:
// Thanks mod
$to_id = request_var('to_id', 0);
$thanks = request_var('thanks', 0);
$rthanks = request_var('rthanks', 0);

Bước 2: Tiếp tục tìm:
Code:
$phpbb_seo->seo_chk_dupe();

Thay thế nó bằng:
Code:
if (!$to_id && !$thanks && !$rthanks) {
   $phpbb_seo->seo_chk_dupe();
}


2. Kết hợp mod thanks for post với mod Ultimate points: nếu muốn tích hợp thì bạn làm như sau:
Mở tập tin functions_thanks.php
Bước 1: Tìm:
Code:
       $sql = 'INSERT INTO ' . THANKS_TABLE . ' ' . $db->sql_build_array('INSERT', array(
        'user_id'   => $user_id,
        'post_id'   => $post_id,
        'poster_id'   => $to_id,
        'topic_id'   => $row['topic_id'],
        'forum_id'   => $row['forum_id'],
        'thanks_time'   => time()
       ));

       $db->sql_query($sql);

Thêm vào sau nó:
Code:
    if ($user_id == 2)
        {
        $thanks_points=10;
          $sql = "UPDATE " . USERS_TABLE . "
                   SET user_points = user_points + $thanks_points
                   WHERE user_id = $to_id" ;
          $db->sql_query($sql);
        }

Bước 2: Tiếp tục tìm:
Code:
             $sql = "DELETE FROM " . THANKS_TABLE . '
                WHERE post_id ='. (int) $post_id ." AND user_id = " . $user->data['user_id'];
             $db->sql_query($sql);

Thêm vào sau nó:
Code:
    if ($user_id == 2)
        {
        $thanks_points=10;
          $sql = "UPDATE " . USERS_TABLE . "
                   SET user_points = user_points - $thanks_points
                   WHERE user_id = $to_id" ;
          $db->sql_query($sql);
        }
 

Facebook Comments

New posts New threads New resources

Back
Top