Hướng dẫn thêm bản quyền vào bài viết cho johncms bằng php

Admin

AdminAdmin is verified member.

Well-Known Member
Staff member
Administrator
Demo ảnh
p6dl.png

Mở post.php tìm echo $text; và thay thành
PHP:
preg_match_all ('#(.+?)(<br>|<br />|<br/>)#',$text,$arr);
      $text = str_replace ($arr[0][floor(count($arr[0])/2)],
                           $arr[0][floor(count($arr[0])/2)] .
                           "<center>----------------------------------<br>
                                    Bạn đang đọc truyện tại<br><font color='red'>
                                        thay bằng tên trang wap bạn</font><br>
                                    Chúc bạn online vui vẻ<br>
                                    ----------------------------------<br></center>",$text);
w29o.png

Lưu lại là xong
Chúc các bạn thành công!
 

Facebook Comments

Similar threads

Admin
Replies
0
Views
1K
AdminAdmin is verified member.
Admin
Admin
Replies
0
Views
978
AdminAdmin is verified member.
Admin
T
Replies
1
Views
3K
AdminAdmin is verified member.
Admin
Back
Top