<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<?xml-stylesheet type="text/xsl" href="modx.prosilver.en.xsl"?>
<!--NOTICE: Please open this file in your web browser. If presented with a security warning, you may safely tell it to allow the blocked content.-->
<!--For security purposes, please check: http://www.phpbb.com/mods/ for the latest version of this MOD.\nAlthough MODs are checked before being allowed in the MODs Database there is no guarantee that there are no security problems within the MOD.\nNo support will be given for MODs not found within the MODs Database which can be found at http://www.phpbb.com/mods/-->
<mod xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.phpbb.com/mods/xml/modx-1.2.5.xsd">
	<header>
		<meta name="generator" content="MODX file generated with PP MODX Creator by tumba25 (online version)"/>
		<license><![CDATA[http://opensource.org/licenses/gpl-license.php GNU General Public License v2]]></license>
		<title lang="tr"><![CDATA[misafirlerden link gizleme]]></title>
		<description lang="en"><![CDATA[sad]]></description>
		<author-group>
			<author>
				<username><![CDATA[asd]]></username>
			</author>
		</author-group>
		<mod-version>1</mod-version>
		<installation>
			<level>easy</level>
			<time>180</time>
			<target-version>2</target-version>
		</installation>
	</header>
	<action-group>
		<open src="viewtopic.php">
			<edit>
				<find><![CDATA[$message = censor_text($row['post_text']);]]></find>
				<action type="after-add"><![CDATA[if ($user->data['user_id'] == ANONYMOUS)
           {
           $message = preg_replace( '/<.*href="(.*?)">(.*?)(<\/a>)/', '<a href="ucp.php?mode=register">'.$user->lang["BBCODE_GIZLI_LINK"].'</a>', $message );
           }]]></action>
			</edit>
		</open>
		<open src="includes/bbcode.php">
			<edit>
				<find><![CDATA[function bbcode_tpl_replace($tpl_name, $tpl)
	{
		global $user;

		static $replacements = array(
			'quote_username_open'	=> array('{USERNAME}'	=> '$1'),
			'color'					=> array('{COLOR}'		=> '$1', '{TEXT}'			=> '$2'),
			'size'					=> array('{SIZE}'		=> '$1', '{TEXT}'			=> '$2'),
			'img'					=> array('{URL}'		=> '$1'),
			'flash'					=> array('{WIDTH}'		=> '$1', '{HEIGHT}'			=> '$2', '{URL}'	=> '$3'),
			'url'					=> array('{URL}'		=> '$1', '{DESCRIPTION}'	=> '$2'),
			'email'					=> array('{EMAIL}'		=> '$1', '{DESCRIPTION}'	=> '$2')
		);

		$tpl = preg_replace('/{L_([A-Z_]+)}/e', "(!empty(\$user->lang['\$1'])) ? \$user->lang['\$1'] : ucwords(strtolower(str_replace('_', ' ', '\$1')))", $tpl);

		if (!empty($replacements[$tpl_name]))
		{
			$tpl = strtr($tpl, $replacements[$tpl_name]);
		}

		return trim($tpl);
	}]]></find>
				<action type="replace-with"><![CDATA[function bbcode_tpl_replace($tpl_name, $tpl)
           {
              global $user;

              static $replacements = array(
                 'quote_username_open'   => array('{USERNAME}'   => '$1'),
                 'color'               => array('{COLOR}'      => '$1', '{TEXT}'         => '$2'),
                 'size'               => array('{SIZE}'      => '$1', '{TEXT}'         => '$2'),
                 'img'               => array('{URL}'      => '$1'),
                 'flash'               => array('{WIDTH}'      => '$1', '{HEIGHT}'         => '$2', '{URL}'   => '$3'),
                 'url'               => array('{URL}'      => '$1', '{DESCRIPTION}'   => '$2'),
                 'email'               => array('{EMAIL}'      => '$1', '{DESCRIPTION}'   => '$2')
              );

              static $replacements2 = array(
                 'quote_username_open'   => array('{USERNAME}'   => '$1'),
                 'color'               => array('{COLOR}'      => '$1', '{TEXT}'         => '$2'),
                 'size'               => array('{SIZE}'      => '$1', '{TEXT}'         => '$2'),
                 'img'               => array('{URL}'      => '$1'),
                 'flash'               => array('{WIDTH}'      => '$1', '{HEIGHT}'         => '$2', '{URL}'   => '$3'),
                 'url'               => array('{URL}'      => 'ucp.php?mode=register', '{DESCRIPTION}'   => 'warn_link'),
                 'email'               => array('{EMAIL}'      => '$1', '{DESCRIPTION}'   => '$2')
              );

              $tpl = preg_replace('/{L_([A-Z_]+)}/e', "(!empty(\$user->lang['\$1'])) ? \$user->lang['\$1'] : ucwords(strtolower(str_replace('_', ' ', '\$1')))", $tpl);

              if ($user->data['user_id'] != ANONYMOUS)
              {
                 if (!empty($replacements[$tpl_name]))
                 {
                    $tpl = strtr($tpl, $replacements[$tpl_name]);
                 }
              }
              else
              {
                 if (!empty($replacements2[$tpl_name]))
                 {
                    $tpl = strtr($tpl, $replacements2[$tpl_name]);
                 }
                 $tpl = str_replace("warn_link", $user->lang["BBCODE_GIZLI_LINK"], $tpl);
              }
             
              return trim($tpl);
           }]]></action>
			</edit>
		</open>
		<open src="language/tr/common.php">
			<edit>
				<find><![CDATA['BBCODE_GUIDE'			=> 'Biçim kodu rehberi',]]></find>
				<action type="after-add"><![CDATA['BBCODE_GIZLI_LINK'         => '<b><font color=red>Üye olmadığınız için bu linki göremiyorsunuz.</font> Üye olmak için Tıklayınız.</b>',]]></action>
			</edit>
		</open>
	</action-group>
</mod>

