![]() |
| | |||||||
Webmaster Dünyası katogorisi php nuke forumu içinde "Forumda link Gizleme nasıl yapılır, Yardım" başlıklı konu görüntüleniyor, "Arkadaşlar ben bu php konusunda biraz yeniyim. Sorum şu; Forumdaki konuları herkez görsün fakat üye olmadan linkleri göremesin, yani metinleri okuyabilsin fakat linkleri göremesin. Bunu nasıl yapabilirmi acaba. Yardımcı olursanız ..."
![]() |
| | Seçenekler | Stil |
| | #1 |
| Banned | Forumda link Gizleme nasıl yapılır, Yardım Arkadaşlar ben bu php konusunda biraz yeniyim. Sorum şu; Forumdaki konuları herkez görsün fakat üye olmadan linkleri göremesin, yani metinleri okuyabilsin fakat linkleri göremesin. Bunu nasıl yapabilirmi acaba. Yardımcı olursanız çok memnun olacağım. |
| | |
| Herşey Yarı Fiyatına.. |
| | #2 |
| SITE ADMİN ![]() Üyelik tarihi: Nov 2005 Nerden: Samsun/TURKEY Yaş: 33
Mesajlar: 6.178
Blog Mesajları: 25
Cinsiyet: Rep Gücü: 457 Rep: 44779 ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | Cevap: Forumda link Gizleme nasıl yapılır, Yardım Hide Link Eklentisini eklemeye baslamadan once degiştireceginizin dosyaların yedeklerini alınız AC includes/bbcode.php BUL Kod: function bbencode_second_pass($text, $uid)
{
global $lang, $bbcode_tpl;
Kod: function bbencode_second_pass($text, $uid)
{
global $lang, $bbcode_tpl, $userdata, $phpEx, $u_login_logout;
// The thing we replace links with. I like using a quote like box
$replacer = '<table width="40%" cellspacing="1" cellpadding="3" border="0"><tr><td class="quote">';
$replacer .= $lang['Links_Allowed_For_Registered_Only'] . '<br />';
$replacer .= sprintf($lang['Get_Registered'], "<a href=\"" . append_sid('profile.' . $phpEx . '?mode=register') . "\">", "</a>");
$replacer .= sprintf($lang['Enter_Forum'], "<a href=\"" . append_sid($u_login_logout) . "\">", "</a>");
$replacer .= '</td></tr></table>';
Kod: // matches a xxxx://www.phpbb.com code.. $patterns[] = "#\[url\]([\w]+?://[^ \"\n\r\t<]*?)\[/url\]#is"; $replacements[] = $bbcode_tpl['url1']; // www.phpbb.com code.. (no xxxx:// prefix). $patterns[] = "#\[url\]((www|ftp)\.[^ \"\n\r\t<]*?)\[/url\]#is"; $replacements[] = $bbcode_tpl['url2']; // phpBB code.. $patterns[] = "#\[url=([\w]+?://[^ \"\n\r\t<]*?)\]([^?\n\r\t].*?)\[/url\]#is"; $replacements[] = $bbcode_tpl['url3']; // phpBB code.. (no xxxx:// prefix). $patterns[] = "#\[url=((www|ftp)\.[^ \"\n\r\t<]*?)\]([^?\n\r\t].*?)\[/url\]#is"; $replacements[] = $bbcode_tpl['url4']; // user@domain.tld code.. $patterns[] = "#\[email\]([a-z0-9&\-_.]+?@[\w\-]+\.([\w\-\.]+\.)?[\w]+)\[/email\]#si"; $replacements[] = $bbcode_tpl['email']; Kod: // matches a xxxx://www.phpbb.com code.. $patterns[] = "#\[url\]([\w]+?://[^ \"\n\r\t<]*?)\[/url\]#is"; if ( !$userdata['session_logged_in'] ) { $replacements[] = $replacer; } else { $replacements[] = $bbcode_tpl['url1']; } // www.phpbb.com code.. (no xxxx:// prefix). $patterns[] = "#\[url\]((www|ftp)\.[^ \"\n\r\t<]*?)\[/url\]#is"; if ( !$userdata['session_logged_in'] ) { $replacements[] = $replacer; } else { $replacements[] = $bbcode_tpl['url2']; } // phpBB code.. $patterns[] = "#\[url=([\w]+?://[^ \"\n\r\t<]*?)\]([^?\n\r\t].*?)\[/url\]#is"; if ( !$userdata['session_logged_in'] ) { $replacements[] = $replacer; } else { $replacements[] = $bbcode_tpl['url3']; } // phpBB code.. (no xxxx:// prefix). $patterns[] = "#\[url=((www|ftp)\.[^ \"\n\r\t<]*?)\]([^?\n\r\t].*?)\[/url\]#is"; if ( !$userdata['session_logged_in'] ) { $replacements[] = $replacer; } else { $replacements[] = $bbcode_tpl['url4']; } // user@domain.tld code.. $patterns[] = "#\[email\]([a-z0-9&\-_.]+?@[\w\-]+\.([\w\-\.]+\.)?[\w]+)\[/email\]#si"; if ( !$userdata['session_logged_in'] ) { $replacements[] = $replacer; } else { $replacements[] = $bbcode_tpl['email']; } BUL Kod: function make_clickable($text)
{
Kod: global $userdata, $lang, $phpEx, $u_login_logout; BUL Kod: // matches an "xxxx://yyyy" URL at the start of a line, or after a space.
// xxxx can only be alpha characters.
// yyyy is anything up to the first space, newline, comma, double quote or <
$ret = preg_replace("#(^|[\n ])([\w]+?://[^ \"\n\r\t<]*)#is", "\\1<a href=\"\\2\" target=\"_blank\">\\2</a>", $ret);
// matches a "www|ftp.xxxx.yyyy[/zzzz]" kinda lazy URL thing
// Must contain at least 2 dots. xxxx contains either alphanum, or "-"
// zzzz is optional.. will contain everything up to the first space, newline,
// comma, double quote or <.
$ret = preg_replace("#(^|[\n ])((www|ftp)\.[^ \"\t\n\r<]*)#is", "\\1<a href=\"http://\\2\" target=\"_blank\">\\2</a>", $ret);
// matches an email@domain type address at the start of a line, or after a space.
// Note: Only the followed chars are valid; alphanums, "-", "_" and or ".".
$ret = preg_replace("#(^|[\n ])([a-z0-9&\-_.]+?)@([\w\-]+\.([\w\-\.]+\.)*[\w]+)#i", "\\1<a href=\"mailto:\\2@\\3\">\\2@\\3</a>", $ret);
ALTTAKIYLE DEGISTIR Kod: // Hide links from unregistered users mod
//
if ( !$userdata['session_logged_in'] )
{
// The thing we replace links with. I like using a quote like box
$replacer = ' <table width="40%" cellspacing="1" cellpadding="3" border="0"><tr><td class="quote">';
$replacer .= $lang['Links_Allowed_For_Registered_Only'] . '<br />';
$replacer .= sprintf($lang['Get_Registered'], "<a href=\"" . append_sid('profile.' . $phpEx . '?mode=register') . "\">", "</a>");
$replacer .= sprintf($lang['Enter_Forum'], "<a href=\"" . append_sid($u_login_logout) . "\">", "</a>");
$replacer .= '</td></tr></table>';
// matches an "xxxx://yyyy" URL at the start of a line, or after a space.
// xxxx can only be alpha characters.
// yyyy is anything up to the first space, newline, comma, double quote or <
$ret = preg_replace("#(^|[\n ])([\w]+?://[^ \"\n\r\t<]*)#is", $replacer, $ret);
// matches a "www|ftp.xxxx.yyyy[/zzzz]" kinda lazy URL thing
// Must contain at least 2 dots. xxxx contains either alphanum, or "-"
// zzzz is optional.. will contain everything up to the first space, newline,
// comma, double quote or <.
$ret = preg_replace("#(^|[\n ])((www|ftp)\.[^ \"\t\n\r<]*)#is", $replacer, $ret);
// matches an email@domain type address at the start of a line, or after a space.
// Note: Only the followed chars are valid; alphanums, "-", "_" and or ".".
$ret = preg_replace("#(^|[\n ])([a-z0-9&\-_.]+?)@([\w\-]+\.([\w\-\.]+\.)*[\w]+)#i", $replacer, $ret);
}
else
{
// matches an "xxxx://yyyy" URL at the start of a line, or after a space.
// xxxx can only be alpha characters.
// yyyy is anything up to the first space, newline, comma, double quote or <
$ret = preg_replace("#(^|[\n ])([\w]+?://[^ \"\n\r\t<]*)#is", "\\1<a href=\"\\2\" target=\"_blank\">\\2</a>", $ret);
// matches a "www|ftp.xxxx.yyyy[/zzzz]" kinda lazy URL thing
// Must contain at least 2 dots. xxxx contains either alphanum, or "-"
// zzzz is optional.. will contain everything up to the first space, newline,
// comma, double quote or <.
$ret = preg_replace("#(^|[\n ])((www|ftp)\.[^ \"\t\n\r<]*)#is", "\\1<a href=\"http://\\2\" target=\"_blank\">\\2</a>", $ret);
// matches an email@domain type address at the start of a line, or after a space.
// Note: Only the followed chars are valid; alphanums, "-", "_" and or ".".
$ret = preg_replace("#(^|[\n ])([a-z0-9&\-_.]+?)@([\w\-]+\.([\w\-\.]+\.)*[\w]+)#i", "\\1<a href=\"mailto:\\2@\\3\">\\2@\\3</a>", $ret);
}
//
// Hide links from unregistered users mod
AC language/lang_turkish/lang_main.php BUL Kod: $lang['A_critical_error'] = Kod: // Hide links from unregistered users mod // $lang['Links_Allowed_For_Registered_Only'] = 'Bu panodaki bağlantıları yalnızca kayıtlı kullanıcılar görebilir!'; $lang['Get_Registered'] = 'Hemen %skayıt%s olun veya '; $lang['Enter_Forum'] = 'hesabınıza %sgiriş%s yapın!'; Kaydet,gonder NOT: BB To Nuke surumunuze gore kodlarınızda ufak degisiklikler olabilir,O zaman kodları inceliyerek benzer olanları arayıp degişiklikleri ona gore yapmalısınız.
__________________ İlerlediğiniz yolda hiç zorlukla karşılaşmıyorsanız, Bilinki o yol asla sizi doğruya ulaştırmaz... |
| | |
![]() |
| Seçenekler | |
| Stil | |
| |
Benzer Konular | ||||
| Konu | Konuyu Başlatan | Forum | Cevap | Son Mesaj |
| Overclock Nedir? Neden Yapılır? Nasıl Yapılır? | Bay X | Donanım | 0 | 10-10-2007 09:30 PM |
| Ramazan ayı ve yoksullara yardım etme bilinci | pandura | islam (Müslümanlık) | 0 | 12-09-2007 02:29 PM |
| Bilimsel Makale nasıl yazılır,nasıl yayınlanır | KopiLL | Kitap Tanıtımları, E-Box | 0 | 30-03-2007 06:14 PM |
| Google ve Arama Motoruna Kayıt | YukseLL | Arama motoru optimizasyonu | 2 | 17-07-2006 05:14 PM |
| | |