![]() |
[شرح] : تحول رابط الموضوع الى إسمــه تلقائياً .. السلام عليكم ورحمه الله وبركاته سلام الرحمن يغشاكم احبتي .. الشرح عبارة عن كود يستبدل روابط المرفقات + الاقسام + المجموعات + المواضيع + المشاركات + الاعضاء بالاسم الخاص للرابط طرحه الاستاذ مجهول في منتديات عهـود .. ,, في مجلد الـ رمز Code: includes افتح ملف رمز Code: class_bbcode.php ابحث عن رمز Code: // standard URL hyperlink اضف اعلاه بسطر رمز Code: /* +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+ *\ |* | BY MGHOOL FOR LINKS - A | *| \* +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+ */ if (@empty($link) AND @preg_match('#(' . @str_replace('www.', '', $_SERVER['HTTP_HOST']) . ')#i', $rightlink)) { // +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+ if (@preg_match('#\.html#', $rightlink)) { $rightlink = @preg_replace('#\/f\-([0-9]+)\-([0-9]+)\.html#', '/forumdisplay.php?f=$1&page=$2', $rightlink); $rightlink = @preg_replace('#\/f\-([0-9]+)\.html#', '/forumdisplay.php?f=$1', $rightlink); $rightlink = @preg_replace('#\/t\-([0-9]+)\-([0-9]+)\.html#', '/showthread.php?t=$1&page=$2', $rightlink); $rightlink = @preg_replace('#\/t\-([0-9]+)\.html#', '/showthread.php?t=$1', $rightlink); $rightlink = @preg_replace('#\/v\-([0-9]+)\.html#', '/showthread.php?p=$1#post$1', $rightlink); $rightlink = @preg_replace('#\/s\-([0-9]+)\-([0-9]+)\.html#', '/showthread.php?p=$1&posted=$2', $rightlink); $rightlink = @preg_replace('#\/s\-([0-9]+)\.html#', '/showthread.php?p=$1', $rightlink); $rightlink = @preg_replace('#\/p\-([0-9]+)\-([0-9]+)\.html#', '/showpost.php?p=$1&postcount=$2', $rightlink); $rightlink = @preg_replace('#\/p\-([0-9]+)\.html#', '/showpost.php?p=$1', $rightlink); $rightlink = @preg_replace('#\/u\-([0-9]+)\.html#', '/member.php?u=$1', $rightlink); } // +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+ $rightlink = @preg_replace('#(|)#i', '', $rightlink); if (@preg_match('#\/(attachment|forumdisplay|group|showthread|showpost |member)\.php\?(attachmentid|f|groupid|t|p|u)\=([0-9]+)#i', $rightlink, $i)) { // +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+ if ($i[1] == 'attachment' AND $i[2] == 'attachmentid' AND @intval($i[3])) { $Sqls = $this->registry->db->query_first_slave("SELECT filename, filesize FROM " . TABLE_PREFIX . "attachment WHERE attachmentid = '" . $i[3] . "'"); if ($Sqls['filename']) { $text = 'مرفق : ' . $Sqls['filename'] . ' - ' . @vb_number_format($Sqls['filesize'], 0, true) . ''; } } // +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+ if ($i[1] == 'forumdisplay' AND $i[2] == 'f' AND @intval($i[3])) { $Sqls = $this->registry->db->query_first_slave("SELECT title FROM " . TABLE_PREFIX . "forum WHERE forumid = '" . $i[3] . "'"); if ($Sqls['title']) { $text = 'قسم : ' . $Sqls['title']; } } // +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+ if ($i[1] == 'group' AND $i[2] == 'groupid' AND @intval($i[3])) { $Sqls = $this->registry->db->query_first_slave("SELECT name FROM " . TABLE_PREFIX . "socialgroup WHERE groupid = '" . $i[3] . "'"); if ($Sqls['name']) { $text = 'مجموعة : ' . $Sqls['name']; } } // +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+ if ($i[1] == 'showthread' AND $i[2] == 't' AND @intval($i[3])) { $Sqls = $this->registry->db->query_first_slave("SELECT title FROM " . TABLE_PREFIX . "thread WHERE threadid = '" . $i[3] . "'"); if ($Sqls['title']) { $text = 'موضوع : ' . $Sqls['title']; } } // +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+ if (($i[1] == 'showpost' OR $i[1] == 'showthread') AND $i[2] == 'p' AND @intval($i[3])) { $Sqls = $this->registry->db->query_first_slave("SELECT title, threadid FROM " . TABLE_PREFIX . "post WHERE postid = '" . $i[3] . "'"); if (!$Sqls['title']) { $Sqls = $this->registry->db->query_first_slave("SELECT title FROM " . TABLE_PREFIX . "thread WHERE threadid = '" . $Sqls['threadid'] . "'"); } if ($Sqls['title']) { $text = 'مشاركة : ' . $Sqls['title']; } } // +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+ if ($i[1] == 'member' AND $i[2] == 'u' AND @intval($i[3])) { $Sqls = $this->registry->db->query_first_slave("SELECT username FROM " . TABLE_PREFIX . "user WHERE userid = '" . $i[3] . "'"); if ($Sqls['username']) { $text = 'عضوية : ' . $Sqls['username']; } } // +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+ } } /* +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+ *\ |* | BY MGHOOL FOR LINKS - V | *| \* +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+ */ المصدر : منتديات عهود أطيب تحيه للجميع |
الساعة الآن 12:42 AM |
[ vBspiders.Com Network ]