صقر شمر
03-13-2006, 07:25 PM
هذا الهاك مفيد جداَ للمنتديات التي تضع ملفات القرصنه و روابط حيه للملفات من مواقع الشركات لأنه الشركات تقدر ان تعرف من المواقع التي تأتي منها التحويلات لرفع الملفات ( كل مايفعل الهاك هو ان يجعل الرابط مكتوب فقط عند الضغط عليه لايحولك الي اي مكان يجب ان تنسخ الرابط و تضعه في المتصفح ) وهنا الشركات او المواقع يتسجل لديها عنوان المستخدم من غير عنوان منتداك او مايسمي ال Refree
نبتدي شرح التركيب
افتح ملف /includes/functions_bbcodeparse.php
ابحث عن
// ###################### Start handle_bbcode_url #######################
function handle_bbcode_url($text, $link, $type = 'url')
{
global $wysiwygparse;
if (trim($text) == '')
{
return '';
}
$rightlink = trim($link);
if (empty($rightlink))
{
// no option -- use param
$rightlink = trim($text);
}
$rightlink = strip_smilies(str_replace('\\"', '"', $rightlink));
$rightlink = str_replace(array('`', '"', "'", '['), array('`', '"', ''', '['), $rightlink);
if ($type == 'url' AND !preg_match('#^[a-z0-9]+://#si', $rightlink))
{
$rightlink = "http://$rightlink";
}
if (!trim($link) OR $text == $rightlink)
{
$tmp = unhtmlspecialchars($rightlink);
if (strlen($tmp) > 55 AND !$wysiwygparse)
{
$text = htmlspecialchars_uni(substr($tmp, 0, 35) . '...' . substr($tmp, -15));
}
}
// remove double spaces -- fixes issues with wordwrap
$rightlink = str_replace(' ', '', $rightlink);
// strip extra quotes from hyperlink
$text = str_replace('\"', '"', $text);
if ($type == 'url')
{
// standard URL hyperlink
return "<a href=\"$rightlink\" target=\"_blank\">$text</a>";
}
else
{
// email hyperlink (mailto:)
if (is_valid_email($rightlink))
{
return "<a href=\"mailto:$rightlink\">$text</a>";
}
else
{
// not a valid email - don't link it
return "<span title=\"$rightlink\">$text</span>";
}
}
}
و استبدله بــ
// START DISABLE HYPERLINKS BY apoc_neo {netzoner}
// ###################### Start handle_bbcode_url #######################
function handle_bbcode_url($text, $link, $type = 'url')
{
global $wysiwygparse;
if (trim($text) == '')
{
return '';
}
$rightlink = trim($link);
if (empty($rightlink))
{
// no option -- use param
$rightlink = trim($text);
}
$rightlink = strip_smilies(str_replace('\\"', '"', $rightlink));
$rightlink = str_replace(array('`', '"', "'", '['), array('`', '"', ''', '['), $rightlink);
if ($type == 'url' AND !preg_match('#^[a-z0-9]+://#si', $rightlink))
{
$rightlink = "http://$rightlink";
}
if (!trim($link) OR $text == $rightlink)
{
$tmp = unhtmlspecialchars($rightlink);
if (strlen($tmp) > 55 AND !$wysiwygparse)
{
$text = htmlspecialchars_uni(substr($tmp, 0, 35) . '...' . substr($tmp, -15));
}
}
// remove double spaces -- fixes issues with wordwrap
$rightlink = str_replace(' ', '', $rightlink);
// strip extra quotes from hyperlink
$text = str_replace('\"', '"', $text);
if ($type == 'url')
{
// standard URL hyperlink
return "$text";
}
else
{
// email hyperlink (mailto:)
if (is_valid_email($rightlink))
{
return "$text";
}
else
{
// not a valid email - don't link it
return "$text";
}
}
}
// END DISABLE HYPERLINKS BY apoc_neo {netzoner}
نبتدي شرح التركيب
افتح ملف /includes/functions_bbcodeparse.php
ابحث عن
// ###################### Start handle_bbcode_url #######################
function handle_bbcode_url($text, $link, $type = 'url')
{
global $wysiwygparse;
if (trim($text) == '')
{
return '';
}
$rightlink = trim($link);
if (empty($rightlink))
{
// no option -- use param
$rightlink = trim($text);
}
$rightlink = strip_smilies(str_replace('\\"', '"', $rightlink));
$rightlink = str_replace(array('`', '"', "'", '['), array('`', '"', ''', '['), $rightlink);
if ($type == 'url' AND !preg_match('#^[a-z0-9]+://#si', $rightlink))
{
$rightlink = "http://$rightlink";
}
if (!trim($link) OR $text == $rightlink)
{
$tmp = unhtmlspecialchars($rightlink);
if (strlen($tmp) > 55 AND !$wysiwygparse)
{
$text = htmlspecialchars_uni(substr($tmp, 0, 35) . '...' . substr($tmp, -15));
}
}
// remove double spaces -- fixes issues with wordwrap
$rightlink = str_replace(' ', '', $rightlink);
// strip extra quotes from hyperlink
$text = str_replace('\"', '"', $text);
if ($type == 'url')
{
// standard URL hyperlink
return "<a href=\"$rightlink\" target=\"_blank\">$text</a>";
}
else
{
// email hyperlink (mailto:)
if (is_valid_email($rightlink))
{
return "<a href=\"mailto:$rightlink\">$text</a>";
}
else
{
// not a valid email - don't link it
return "<span title=\"$rightlink\">$text</span>";
}
}
}
و استبدله بــ
// START DISABLE HYPERLINKS BY apoc_neo {netzoner}
// ###################### Start handle_bbcode_url #######################
function handle_bbcode_url($text, $link, $type = 'url')
{
global $wysiwygparse;
if (trim($text) == '')
{
return '';
}
$rightlink = trim($link);
if (empty($rightlink))
{
// no option -- use param
$rightlink = trim($text);
}
$rightlink = strip_smilies(str_replace('\\"', '"', $rightlink));
$rightlink = str_replace(array('`', '"', "'", '['), array('`', '"', ''', '['), $rightlink);
if ($type == 'url' AND !preg_match('#^[a-z0-9]+://#si', $rightlink))
{
$rightlink = "http://$rightlink";
}
if (!trim($link) OR $text == $rightlink)
{
$tmp = unhtmlspecialchars($rightlink);
if (strlen($tmp) > 55 AND !$wysiwygparse)
{
$text = htmlspecialchars_uni(substr($tmp, 0, 35) . '...' . substr($tmp, -15));
}
}
// remove double spaces -- fixes issues with wordwrap
$rightlink = str_replace(' ', '', $rightlink);
// strip extra quotes from hyperlink
$text = str_replace('\"', '"', $text);
if ($type == 'url')
{
// standard URL hyperlink
return "$text";
}
else
{
// email hyperlink (mailto:)
if (is_valid_email($rightlink))
{
return "$text";
}
else
{
// not a valid email - don't link it
return "$text";
}
}
}
// END DISABLE HYPERLINKS BY apoc_neo {netzoner}