Discuz Thai

 ลืมรหัสผ่าน
 สมัครสมาชิก

ข้อตกลงการใช้งานกระดานข่าวดิสคัสไทย DiscuzThai Agreement (English Version) ประกาศดิสคัสไทย - ทำเนียบดิสคัสภาษาไทย

Discuz! X3.5 Thai R20231001 Rev.8 (NEW) [วิดีโอช่วยสอน] อัปเกรด Discuz! X3.4 เป็น X3.5 Discord ของ Discuz! Thai Community อย่างเป็นทางการ

Discuz! X3.4 Thai R20220811 (REV.75) สิ้นสุดการสนับสนุน Discuz! X3.4 ภาษาไทยตั้งแต่วันนี้เป็นต้นไป (ขอแนะนำให้อัปเกรดเป็น X3.5 แทน)

ค้นหา
แท็กยอดนิยม: ดิสคัสภาษาไทย Discuz Thai
ดู: 5184|ตอบกลับ: 13

[X1.5] Hide link for Guest

  [คัดลอกลิงก์]
davidan88 โพสต์ 2010-11-25 15:59:13 |โหมดอ่าน
Demo:
user:
guest:

Case 1:

Open: template\default\common\common.css Add after all
  1. /*hide link TuanTV*/
  2. .hidelink {padding-left: 2px; padding-right: 2px; width: 100%; height: 20px; border: 1px dashed; border-color: #cccccc; color:#FF0000; text-decoration:none;}
คัดลอกไปที่คลิปบอร์ด
Open source\function\function_discuzcode.php find
  1. function parseurl($url, $text, $scheme) {
  2.         global $_G;
  3.         if(!$url && preg_match("/((https?|ftp|gopher|news|telnet|rtsp|mms|callto|bctp|thunder|synacast){1}:\/\/|www\.)[^\["']+/i", trim($text), $matches)) {
  4.                 $url = $matches[0];
  5.                 $length = 65;
  6.                 if(strlen($url) > $length) {
  7.                         $text = substr($url, 0, intval($length * 0.5)).' ... '.substr($url, - intval($length * 0.3));
  8.                 }
  9.                 return '<a href="'.(substr(strtolower($url), 0, 4) == 'www.' ? 'http://'.$url : $url).'" target="_blank">'.$text.'</a>';
  10.         } else {
  11.                 $url = substr($url, 1);
  12.                 if(substr(strtolower($url), 0, 4) == 'www.') {
  13.                         $url = 'http://'.$url;
  14.                 }
  15.                 $url = !$scheme ? $_G['siteurl'].$url : $url;
  16.                 return '<a href="'.$url.'" target="_blank">'.$text.'</a>';
  17.         }
  18. }
คัดลอกไปที่คลิปบอร์ด
replace
  1. function parseurl($url, $text, $scheme) {
  2.         global $_G;
  3.         if(!$url && preg_match("/((https?|ftp|gopher|news|telnet|rtsp|mms|callto|bctp|thunder|synacast){1}:\/\/|www\.)[^\["']+/i", trim($text), $matches) && $_G['uid']) {
  4.                 $url = $matches[0];
  5.                 $length = 65;
  6.                 if(strlen($url) > $length) {
  7.                         $text = substr($url, 0, intval($length * 0.5)).' ... '.substr($url, - intval($length * 0.3));
  8.                 }
  9.                 return '<a href="'.(substr(strtolower($url), 0, 4) == 'www.' ? 'http://'.$url : $url).'" target="_blank">'.$text.'</a>';
  10.         } elseif (!$url && preg_match("/((https?|ftp|gopher|news|telnet|rtsp|mms|callto|bctp|thunder|synacast){1}:\/\/|www\.)[^\["']+/i", trim($text), $matches)) {
  11.                 $url = $matches[0];
  12.                 $length = 65;
  13.                 if(strlen($url) > $length) {
  14.                         $text = substr($url, 0, intval($length * 0.5)).' ... '.substr($url, - intval($length * 0.3));
  15.                 }
  16.                 return '<span class="hidelink">&#66;&#7841;&#110;&#32;&#112;&#104;&#7843;&#105; <a href="member.php?mod=logging&action=login" onclick="showWindow(\'login\', this.href);return false;">&#273;&#259;&#110;&#103;&#32;&#110;&#104;&#7853;&#112;</a> &#104;&#111;&#7863;&#99; <a href="member.php?mod=register" onclick="hideWindow(\'login\');showWindow(\'register\', this.href);return false;" title="&#273;&#259;&#110;&#103;&#32;&#107;&#253;"> &#273;&#259;&#110;&#103;&#32;&#107;&#253;</a> &#109;&#7899;&#105;&#32;&#99;&#243;&#32;&#116;&#104;&#7875;&#32;&#110;&#104;&#236;&#110;&#32;&#116;&#104;&#7845;&#121;&#32;&#108;&#105;&#110;&#107;&#46;</span>';
  17.         } elseif($_G['uid']){
  18.                 $url = substr($url, 1);
  19.                 if(substr(strtolower($url), 0, 4) == 'www.') {
  20.                         $url = 'http://'.$url;
  21.                 }
  22.                 $url = !$scheme ? $_G['siteurl'].$url : $url;
  23.                 return '<a href="'.$url.'" target="_blank">'.$text.'</a>';
  24.         } else {
  25.                 $url = substr($url, 1);
  26.                 if(substr(strtolower($url), 0, 4) == 'www.') {
  27.                         $url = 'http://'.$url;
  28.                 }
  29.                 $url = !$scheme ? $_G['siteurl'].$url : $url;
  30.                 return '<span class="hidelink">&#66;&#7841;&#110;&#32;&#112;&#104;&#7843;&#105; <a href="member.php?mod=logging&action=login" onclick="showWindow(\'login\', this.href);return false;">&#273;&#259;&#110;&#103;&#32;&#110;&#104;&#7853;&#112;</a> &#104;&#111;&#7863;&#99; <a href="member.php?mod=register" onclick="hideWindow(\'login\');showWindow(\'register\', this.href);return false;" title="&#273;&#259;&#110;&#103;&#32;&#107;&#253;"> &#273;&#259;&#110;&#103;&#32;&#107;&#253;</a> &#109;&#7899;&#105;&#32;&#99;&#243;&#32;&#116;&#104;&#7875;&#32;&#110;&#104;&#236;&#110;&#32;&#116;&#104;&#7845;&#121;&#32;&#108;&#105;&#110;&#107;&#46;</span>';
  31.         }
  32.        
  33. }
คัดลอกไปที่คลิปบอร์ด
Save update cache

Case 2:
Open: template\default\common\common.cssOpen source\function\function_discuzcode.php find
  1. if(!$bbcodeoff && $allowbbcode) {
คัดลอกไปที่คลิปบอร์ด
Add before
  1. //////////Hack thành viên đăng nhập mới thấy link - 7sac.org
  2.         
  3.                                         if(!$_G['uid']) {
  4.                                         $message=preg_replace("#\[url(.*?)\[/url\]#","---Bạn cần <a href="member.php?mod=logging&amp;action=login" onclick="hideWindow('register');showWindow('login', this.href);return false;">Đăng nhập</a> để thấy link---",$message);
  5.                                         }
  6. /////////////////////////////////////////////////////////
คัดลอกไปที่คลิปบอร์ด
Have fun

Source: http://discuzviet.net/thread-1176-1-1.html
jaideejung007 โพสต์ 2010-11-26 20:17:31
You can translation language in your source code to English language?

If the opening in Thailand shows the incorrect language.

Thanks and i like your mod, for protection guest can to see our link.

whale123 โพสต์ 2010-11-26 22:21:24
หลังๆมา ชาวต่างชาติเริ่มแวะเวียนมาดิสคัทไทยแล้วแหะ
แต่งงว่าคุณเธอ เขียนภาษาอะไร จะว่าอังกฤษก็ไม่ใช่ มีจุด มียึกยือบนตัวอักษร

___________
Thanks for your mod hack and thanks join DiscuzThailand

แสดงความคิดเห็น

ภาษาเวียดนามครับ Vietnam Language ตอนมัธยมต้นเคยเรียนแต่คืนอาจารย์หมดแล้ว 555  โพสต์ 2010-11-27 17:29
Gintoguy โพสต์ 2010-11-26 23:00:23
น่าจะเป็นสเปนน่ะ- - espanal มั้ง

แสดงความคิดเห็น

เป็นภาษาเวียดนามครับ ^^  โพสต์ 2010-11-29 06:28
-[E]xSoMax[Z]- โพสต์ 2010-11-28 19:37:10
โอ้วเยียม -- --*
blosszinbangkok โพสต์ 2010-11-29 06:30:10
Cảm ơn bạn rất nhiều

Nếu có nhiều, tôi muốn ẩn các văn bản cho du khách.

===========================================

Thank you very much

If there are more, I want to hide the text for visitors.
hemm34 โพสต์ 2010-11-30 16:21:48
ภาษาเวียดนาม นี่เอง

ขอบคุณครับ
groufie โพสต์ 2010-12-3 16:01:54
แปลด่วนครับ อิอิ
mafia10th โพสต์ 2010-12-23 20:50:16
Thanks a lot~ For Your and For Share


Tôi cảm ơn bạn rất nhiều Tôi yêu bạn.
Xin lỗi tôi không tốt tại Việt Nam.
oldman99 โพสต์ 2010-12-28 16:32:56
ช่วยแปรหน่อย เพียวไม่เข้าใจ
ขออภัย! คุณไม่ได้รับสิทธิ์ในการดำเนินการในส่วนนี้ กรุณาเลือกอย่างใดอย่างหนึ่ง ลงชื่อเข้าใช้ | สมัครสมาชิก

รายละเอียดเครดิต

รายชื่อผู้กระทำผิด|Archiver|ดิสคัส ไทย Follow us: Become a fan on facebook. Follow us on Twitter.

GMT+7, 2024-4-19 08:49

Powered by Discuz! X3.4, Rev.66

Copyright © 2001-2021 Tencent Cloud. Licensed

ตอบกระทู้ ขึ้นไปด้านบน ไปที่หน้ารายการกระทู้