久久久久av_欧美日韩一区二区在线_国产精品三区四区_日韩中字在线

Discuz! 官方交流社區(qū)

標題: 有沒有這樣的網(wǎng)盤插件? [打印本頁]

作者: 120665    時間: 2025-3-4 16:20
標題: 有沒有這樣的網(wǎng)盤插件?
我看到有些論壇,發(fā)帖時,網(wǎng)盤鏈接自動隱藏的,根本不需要free代碼這個。
是什么網(wǎng)盤插件,有人知道嗎
作者: 120665    時間: 2025-3-4 16:21
主帖子說錯了,是[hide]代碼,不是(free)
作者: 龍二哥    時間: 2025-3-4 17:34
你把百度網(wǎng)盤的鏈接轉(zhuǎn)換成加上隱藏代碼的格式,這樣發(fā)貼內(nèi)容帶有百度網(wǎng)盤鏈接時,就會自動隱藏了。
作者: 120665    時間: 2025-3-4 18:53
龍二哥 發(fā)表于 2025-3-4 17:34
你把百度網(wǎng)盤的鏈接轉(zhuǎn)換成加上隱藏代碼的格式,這樣發(fā)貼內(nèi)容帶有百度網(wǎng)盤鏈接時,就會自動隱藏了。 ...

如何轉(zhuǎn)換呢  這才是問題呢
作者: 龍二哥    時間: 2025-3-4 19:26
120665 發(fā)表于 2025-3-4 18:53
如何轉(zhuǎn)換呢  這才是問題呢

試試

template\default\forum\post.htm
搜索
  1. <iframe name="ajaxpostframe" id="ajaxpostframe" style="display: none;"></iframe>
復制代碼

下面添加
  1. <script>
  2. (function() {
  3.     if (!document.getElementById('postform')) return;
  4.     var originalSubmitHandler = document.getElementById('postform').onsubmit;
  5.     var isProcessing = false;

  6.     document.getElementById('postform').onsubmit = function(e) {
  7.         if (isProcessing) return false;
  8.         isProcessing = true;

  9.         try {
  10.             var messageBox = document.getElementById('e_textarea');
  11.             var pattern = /鏈接[::]\s*((?:https?:\/\/)?pan\.baidu\.com\/s\/[a-zA-Z0-9_-]+)\s+提取碼[::]\s*(\w{4})/gi;
  12.             messageBox.value = messageBox.value.replace(pattern, '');

  13.             if (originalSubmitHandler) {
  14.                 return originalSubmitHandler.call(this, e);
  15.             }
  16.         } catch (err) {
  17.             console.error('提交處理異常:', err);
  18.             isProcessing = false;
  19.             return false;
  20.         } finally {
  21.             isProcessing = false;
  22.         }
  23.     };
  24. })();
  25. </script>
復制代碼

作者: 120665    時間: 2025-3-4 23:19
龍二哥 發(fā)表于 2025-3-4 19:26
試試

template\default\forum\post.htm

很好,但這個只能百度盤?
還有迅雷,夸克,115,阿里,這些呢?

這些能幫我一起改好嗎?
謝謝。。
作者: 一牛網(wǎng)    時間: 2025-3-4 23:28
https://addon.dismall.com/plugins/duceapp_attachpan.html
作者: 龍二哥    時間: 2025-3-5 00:28
120665 發(fā)表于 2025-3-4 23:19
很好,但這個只能百度盤?
還有迅雷,夸克,115,阿里,這些呢?
  1. <script>
  2. (function() {
  3.     var form = document.getElementById('postform');
  4.     if (!form) return;

  5.     var originalSubmitHandler = form.onsubmit;
  6.     var isProcessing = false;

  7.     form.onsubmit = function(e) {
  8.         if (isProcessing) return false;
  9.         isProcessing = true;

  10.         try {
  11.             var messageBox = document.querySelector('textarea[name="message"]');
  12.             if (!messageBox) {
  13.                 console.error('未找到文本域');
  14.                 return false;
  15.             }

  16.             // 終極正則(精確匹配所有網(wǎng)盤)
  17.             var pattern = /鏈接[::]\s*((?:https?:\/\/)?(?:pan\.baidu\.com\/s\/|pan\.quark\.cn\/s\/|www\.alipan\.com\/s\/|pan\.xunlei\.com\/s\/|www\.115\.com\/\w+\/folder\/)[a-zA-Z0-9_\/-]+)\s+提取碼[::]\s*(\w{4})/gi;
  18.             messageBox.value = messageBox.value.replace(pattern, '');

  19.             if (originalSubmitHandler) {
  20.                 return originalSubmitHandler.call(this, e);
  21.             }
  22.         } catch (err) {
  23.             console.error('提交異常:', err);
  24.             isProcessing = false;
  25.             return false;
  26.         } finally {
  27.             isProcessing = false;
  28.         }
  29.     };
  30. })();
  31. </script>
復制代碼



作者: 120665    時間: 2025-3-5 07:53
龍二哥 發(fā)表于 2025-3-5 00:28

感謝大哥?。∫呀?jīng)釆用?。?!




歡迎光臨 Discuz! 官方交流社區(qū) (http://www.9999xn.com/) Powered by Discuz! W1.0