[ New messages · Members · Forum rules · Search · RSS ]
  • Page 1 of 1
  • 1
Forum » Web programlaşdırma » HTML Kodlar » URL linkleri gizlemek
URL linkleri gizlemek
ExEZaman: Bazar, 2008-08-31, 9:35 PM | Mesaj # 1
Prezident
Qrup: Admin
Mesaj: 372
Reputasiya: 0
Vəziyyət: (offline)
Forumda verilen linkleri ziyaretçilere göstermeyen, linkleri görebilmeleri için üye olmalarini veya üyeyseler üye girisi yapmasi uyarisini vereen bir eklenti,

#-----[ AÇIN ]------------------------------------------
#
includes/bbcode.php

#
#-----[ BULUN ]------------------------------------------
#
function bbencode_second_pass($text, $uid)
{
global $lang, $bbcode_tpl;

#
#-----[ AÞAÐIDAKÝ ÝLE DEÐÝÞTÝRÝN ]------------------------------------
#
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 = '

';
$replacer .= $lang['Links_Allowed_For_Registered_Only'] . '
';
$replacer .= sprintf($lang['Get_Registered'], "", "");
$replacer .= sprintf($lang['Enter_Forum'], "", "");
$replacer .= '
';

#
#-----[ BULUN ]------------------------------------------
#
// 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'];

#
#-----[ AÞAÐIDAKÝ ÝLE DEÐÝÞTÝRÝN ]------------------------------------
#
// 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'];
}

#
#-----[ BULUN ]------------------------------------------
#
function make_clickable($text)
{

#
#-----[ SONRAKÝ SATIRA EKLEYÝN ]------------------------------------
#
global $userdata, $lang, $phpEx, $u_login_logout;

#
#-----[ BULUN ]------------------------------------------
#
// 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\\2", $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\\2", $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\\2@\\3", $ret);

#
#-----[ AÞAÐIDAKÝ ÝLE DEÐÝÞTÝRÝN ]------------------------------------
#
//
// 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 = '

';
$replacer .= $lang['Links_Allowed_For_Registered_Only'] . '
';
$replacer .= sprintf($lang['Get_Registered'], "", "");
$replacer .= sprintf($lang['Enter_Forum'], "", "");
$replacer .= '
';

// 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\\2", $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\\2", $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\\2@\\3", $ret);
}
//
// Hide links from unregistered users mod
//

#
#-----[ AÇIN ]------------------------------------------
#
modules/forums/language/lang_turkish/lang_main.php

#
#-----[ BULUN ]------------------------------------------
#
$lang['A_critical_error'] =

#
#-----[ SONRAKÝ SATIRA EKLEYÝN ]------------------------------------
#

//
// Hide links from unregistered users mod
//
$lang['Links_Allowed_For_Registered_Only'] = '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!';

#
#-----[ DEÐÝÞÝKLÝKLERÝ KAYDEDÝP/DOSYALARI KAPATIN VE GÖNDERÝN]--------------------------

Forum » Web programlaşdırma » HTML Kodlar » URL linkleri gizlemek
  • Page 1 of 1
  • 1
Search:

Investigationes
CHARLES S. ANDREWS
3139 Brownton Road
Long Community, MS 38915



+7 495 287-42-34 info@ucoz.com
Mirum
sample map