Xuất hiện những cảnh báo sau đây:
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 871 - File: showthread.php PHP 7.3.33 (Linux)
File Line Function
/showthread.php 871 errorHandler->error




  • 0 Votes - 0 Average
  • 5
  • 4
  • 3
  • 2
  • 1
Chế độ chủ đề

Tạo trang Redirect cho mybb
ngocvu1403 Offline
Phó giám đốc
******
Administrators

Bài viết: 1,186
Chủ đề: 877
Tham gia: May 2011
Danh tiếng: 4
Bạn vào trong inc/class_parser.php

Tìm:



Code:
$name = preg_replace("#&\#([0-9]+);#si", "&#$1;", $name); // Fix & but allow unicode 


Và:



Code:
/**
     * Parses IMG MyCode.
     *
     * @param string The URL to the image
     * @param array Optional array of dimensions
     */

Xóa tất cả mọi thứ ở giữa đi thay bằng



Trích dẫn://redirect link
$url_info = parse_url($fullurl);
global
$mybb;
if (
$url_info["host"]=="haiquan.info"): //Thay tên miền của bạn.
$link = "<a href=\"$fullurl\" target=\"_blank\">$name</a>";
else:
$link = "<a href=\"{$mybb->settings['bburl']}/links.php?url=$fullurl\" target=\"_blank\">$name</a>";
endif;
// end mod

return $link;
}



save lại là xong


Tiếp theo cần tạo file links.php có thể như sau


Code:
<?php 
define('IN_MYBB', 1);
require "./global.php";
$link='';
if (isset($_GET['url']))
$link = $_GET['url'];
else $link = '';
eval("\$chuyenlink = \"".$templates->get("redirect_page")."\";"); 
output_page($chuyenlink);
?>

Lưu lại và up lên host ngang hàng file index


và tạo trong ACP vào theme&template/template/global template

tạo một temp mới với tên:

redirect_page

và nội dung:



<html>
Code:
<head>

<title>{$mybb->settings[bbname]}</title>

{$headerinclude}

<style>

#khung_thong_bao{

position: absoluted;

width: 85%;

height: 70%;

top: 200;

}

fieldset {

background: white;

}

</style>

<script type="text/javascript">

num = 6;

function demgio()

{

num--;

$('thoi_gian_con_lai').innerHTML = num

hengio=setTimeout("demgio();",1000);

if (num<= 0) {

clearTimeout(hengio);

num = 6;

window.location="$link";

}

}

</script>

</head>

<body onload="demgio();">

<br><br><br><br><br>

<center>

<div id="khung_thong_bao">

<div>

<div><strong>Chú ý</strong></div>

<div>

Bạn đang truy cập tại <a
href="http://haiquan.info"><strong>Diễn đàn SV Khoa Kinh Doanh Quốc Tế</strong></a></br>

Hãy chắc chắn rằng link mà bạn muốn chuyển là an toàn.<br>

<b>Site bạn yêu cầu sẽ được chuyển tự động sau <div
id="thoi_gian_con_lai" style="font: arial; size:
18;">vài</div>giây</b>

<br>

<img src="http://haiquan.info/F@rum/images/loading.gif" style="vertical-align: middle; padding-bottom: 4px;" />

<fieldset><legend>Are you want to go to $link ?</legend>

<input type="button" onclick="window.location=\"$link\"" value="ĐỒNG Ý CHUYỂN NGAY" />

<input type="button" onclick="self.close();" value="No! Close"/>

</fieldset>

</div>

</div>

</div>

<br>


<div style="postion: absolute; width: 80%; bottom: 10px;">

<fieldset>

<a href="http://haiquan.info/F@rum" target="_blank"><img
src=https://lh3.googleusercontent.com/-sjc8M7boNco/UbiAQmK0rHI/AAAAAAAAA28/CH0eYJNXrSI/haiquan.info-KDQT.jpg width="100%" height="150"/></a>

</fieldset>

</div>

</center>

</body>

</html>


Cái này bạn có thể tùy chỉnh tùy theo ý thích của mình:

Đã Fix lỗi nhận nhầm link nội và ngoại
Để thêm link nào không bị chặn. Sửa




Code:
if ($url_info["host"]=="haiquan.info"):
thành




Mã:



Code:
if ($url_info["host"]=="haiquan.info" Or $url_info["host"]=="cái khác.com"): 
Nguồn mybbvietnam

Có thể liên quan đến chủ đề...
Code load trang bằng css
code trang trí tết đẹp nhưng đơn giản
Share code trang trí Noel
Plugin SCEditor-MyBB Version 1.4.4.1
lỗi quote không hoạt động khi upgrade từ mybb 1.6.9 lên 1.6.10
BỘ GÕ TIẾNG VIỆT THỤT THÒ FULL CHO MYBB
Add Facebook Comments - MyBB
Thêm trang upanh lên picasa cho mybb
[Plugins/Mods] FaceBook Connect for MyBB
[MyBB Plugin/Mod] IC Ads - Adds advertisements to category on index page

Hãy nhấn
Like - Share Nếu Bài Viết Có Ích



Các bài viết trong chủ đề này
Tạo trang Redirect cho mybb - bởi ngocvu1403 - 12-06-2013, 11:35 PM
Có thể liên quan đến chủ đề...
Chủ đề: / Tác giả Trả lời: / Xem: Bài mới nhất
0 Replies 3,571 Views
Bài mới nhất by ngocvu1403
21-06-2013, 02:56 PM




Những người đang xem chủ đề này: 1 khách

Color Skins

Change Color:

Background Patterns:

Background Images:

Background Header:

Setting Panel

Main Options: