[1.0.2] تصغير الصور

المشرفون: alhitary،طاقم الإضافات

Dawn birth
مشرف سابق
مشرف سابق
مشاركات: 942
اشترك في: الخميس فبراير 26, 2009 3:26 pm
اتصال:

[1.0.2] ????? ?????

مشاركةبواسطة Dawn birth » الخميس مارس 11, 2010 2:30 am

????? ???? ????? ???? ???? ????? ????? ????
??? ?????? ?? ??? ??????? ???? ????
?????? ????????? ????
????? ??? ???????
??? ????? ??? ???????
??????? ????? ???? ?? ???? ??????




صورة العضو الرمزية
G3v4r4
عضو جديد
عضو جديد
مشاركات: 5
اشترك في: السبت يناير 30, 2010 10:03 pm
اتصال:

[1.0.2] ????? ?????

مشاركةبواسطة G3v4r4 » الخميس مارس 11, 2010 5:27 am

Dawn birth كتب:????? ???? ????? ???? ???? ????? ????? ????
??? ?????? ?? ??? ??????? ???? ????
?????? ????????? ????
????? ??? ???????
??? ????? ??? ???????
??????? ????? ???? ?? ???? ??????

?? ??? ??????? ??? ?? ????? ??? ??????? ???? ?? 4 ???? ??????

????? ???? ??? ?? ?? ???? ????? ?? ???????

?? ?? ?? ?????

???? ?? ????? ???? ??? Hot Editor ?

صورة العضو الرمزية
Garebooo
المشرف العام
المشرف العام
مشاركات: 7407
اشترك في: السبت مارس 26, 2005 6:12 am
مكان: phpBB Arabia
اتصال:

[1.0.2] ????? ?????

مشاركةبواسطة Garebooo » الجمعة مارس 12, 2010 7:45 pm

G3v4r4 ? ???? ????? ?? ????
من فضلك استخدم نموذج طلب الدعم عند اضافة مشكلتك
بعد حل مشكلتك فضلاً ضع [ مجابة ] في عنوان الموضوع حتى يتنظم الموقع بشكل اكبر

صورة العضو الرمزية
Garebooo
المشرف العام
المشرف العام
مشاركات: 7407
اشترك في: السبت مارس 26, 2005 6:12 am
مكان: phpBB Arabia
اتصال:

[1.0.2] ????? ?????

مشاركةبواسطة Garebooo » الجمعة مارس 12, 2010 7:48 pm

JAWAD94 ? ?? ?? ????? ?????? ???? ????? ???????

????? ?? ??? ????? ?? ??? ?????? ????? ?? ?????? ?????? ?

?????? ??????? ? ? ??????? ?
من فضلك استخدم نموذج طلب الدعم عند اضافة مشكلتك
بعد حل مشكلتك فضلاً ضع [ مجابة ] في عنوان الموضوع حتى يتنظم الموقع بشكل اكبر

صورة العضو الرمزية
G3v4r4
عضو جديد
عضو جديد
مشاركات: 5
اشترك في: السبت يناير 30, 2010 10:03 pm
اتصال:

[1.0.2] ????? ?????

مشاركةبواسطة G3v4r4 » السبت مارس 13, 2010 5:30 pm

Garebooo كتب:JAWAD94 ? ?? ?? ????? ?????? ???? ????? ???????

????? ?? ??? ????? ?? ??? ?????? ????? ?? ?????? ?????? ?

?????? ??????? ? ? ??????? ?
??? ???????

???? ??? ??? ??? ????? ????? ??? ???? ??????

???? ?????

?????:

???? ?? ???? ?????? ???? ????????? ?? ????? ???? ?????? ???????? ??????:

صورة

JAWAD94
مشرف سابق
مشرف سابق
مشاركات: 669
اشترك في: الثلاثاء يناير 19, 2010 5:32 pm
مكان: سوريا بقلب مدينة حلب
اتصال:

[1.0.2] ????? ?????

مشاركةبواسطة JAWAD94 » السبت مارس 13, 2010 5:46 pm

?? ??????? ??? ???? ??? ?????? ????? ???? ??? ????? ????????
??? ????? ????? ????? ???? 856px ? 206px

??????? ?????? ??????? ??????? ?? ??????? ??? ??????? ?????? ??? ??? ??? ?????? ???? ?? ???
?????? ?? ????? ??? ????? ????? ??? ???????? ??????? ?? ??? ????
???? ? ????? ??? ??? ...
هل تواجه مشكلة بعملية التحويل من نظام أحلى منتدى ؟؟ تفضل من هنا

صورة

Dawn birth
مشرف سابق
مشرف سابق
مشاركات: 942
اشترك في: الخميس فبراير 26, 2009 3:26 pm
اتصال:

[1.0.2] ????? ?????

مشاركةبواسطة Dawn birth » السبت مارس 13, 2010 10:31 pm

G3v4r4 كتب:
Garebooo كتب:JAWAD94 ? ?? ?? ????? ?????? ???? ????? ???????

????? ?? ??? ????? ?? ??? ?????? ????? ?? ?????? ?????? ?

?????? ??????? ? ? ??????? ?
??? ???????

???? ??? ??? ??? ????? ????? ??? ???? ??????

???? ?????

?????:

???? ?? ???? ?????? ???? ????????? ?? ????? ???? ?????? ???????? ??????:

صورة
??? ?????? ??? ?????? ?????? ???? ????? ??????:
????? ????? ?? ??? ??????? ??? ????? ???? ??? ?? ????? ??? ??????? ?????? ?? ??? bbcode.html ???? ?????? ?? ??????? ??? ?? ???? ????

كود: تحديد الكل

<img src="http://www.up4mb.com/up/get-2-2010-1sgkljrv.JPG" alt=""  class="reimg" onload="reimg(this);" onerror="reimg(this);"/>
??? ???? ??? ???? ???? ???? ????? ?????

كود: تحديد الكل

<img src="http://www.up4mb.com/up/get-2-2010-1sgkljrv.JPG" alt="" />

صورة العضو الرمزية
G3v4r4
عضو جديد
عضو جديد
مشاركات: 5
اشترك في: السبت يناير 30, 2010 10:03 pm
اتصال:

[1.0.2] ????? ?????

مشاركةبواسطة G3v4r4 » السبت مارس 13, 2010 11:22 pm

Dawn birth كتب:
G3v4r4 كتب:
Garebooo كتب:JAWAD94 ? ?? ?? ????? ?????? ???? ????? ???????

????? ?? ??? ????? ?? ??? ?????? ????? ?? ?????? ?????? ?

?????? ??????? ? ? ??????? ?
??? ???????

???? ??? ??? ??? ????? ????? ??? ???? ??????

???? ?????

?????:

???? ?? ???? ?????? ???? ????????? ?? ????? ???? ?????? ???????? ??????:

صورة
??? ?????? ??? ?????? ?????? ???? ????? ??????:
????? ????? ?? ??? ??????? ??? ????? ???? ??? ?? ????? ??? ??????? ?????? ?? ??? bbcode.html ???? ?????? ?? ??????? ??? ?? ???? ????

كود: تحديد الكل

<img src="http://www.up4mb.com/up/get-2-2010-1sgkljrv.JPG" alt=""  class="reimg" onload="reimg(this);" onerror="reimg(this);"/>
??? ???? ??? ???? ???? ???? ????? ?????

كود: تحديد الكل

<img src="http://www.up4mb.com/up/get-2-2010-1sgkljrv.JPG" alt="" />

??? ??????? ????? ??????? ??????? ????? ???? ??? ??? ????? ???? ????? ???? ?????? ????? ???? ??? ?? ??? ????? ????

?? ?????? ??? ? ..

????? ???? ??? ??? bbcode.php + bbcode.html ??? ????? ?????? ????? ??????? ??? ?? ???? ??? ?????

???? ???? ??? bbcode.php + bbcode.html????? ???? ?? ??? ???? ???? ??? ??? ???? ???? ??? ????? ????? ????? ?? ????? ???

??????? ??????? ??? ????????

bbcode.html

كود: تحديد الكل

<!-- BEGIN ulist_open --><ul style="list-style-type: {LIST_TYPE}"><!-- END ulist_open -->
<!-- BEGIN ulist_open_default --><ul><!-- END ulist_open_default -->
<!-- BEGIN ulist_close --></ul><!-- END ulist_close -->

<!-- BEGIN olist_open --><ol style="list-style-type: {LIST_TYPE}"><!-- END olist_open -->
<!-- BEGIN olist_close --></ol><!-- END olist_close -->

<!-- BEGIN listitem --><li><!-- END listitem -->
<!-- BEGIN listitem_close --></li><!-- END listitem_close -->

<!-- BEGIN quote_username_open -->
<div class="quotewrapper"><div class="quotetitle">{USERNAME} {L_WROTE}:</div><div class="quotecontent">
<!-- END quote_username_open -->

<!-- BEGIN quote_open -->
<div class="quotewrapper"><div class="quotetitle">{L_QUOTE}:</div><div class="quotecontent">
<!-- END quote_open -->

<!-- BEGIN quote_close -->
</div></div>
<!-- END quote_close -->

<!-- BEGIN code_open -->
<div class="codewrapper"><div class="codetitle"><b>{L_CODE}:</b></div><div class="codecontent">
<!-- END code_open -->

<!-- BEGIN code_close -->
</div></div>
<!-- END code_close -->

<!-- BEGIN inline_attachment_open -->
<div class="attachwrapper"><div class="attachtitle">{L_ATTACHMENT}:</div><div class="attachcontent">
<!-- END inline_attachment_open -->

<!-- BEGIN inline_attachment_close -->
</div></div>
<!-- END inline_attachment_close -->


<!-- BEGIN b_open --><strong><!-- END b_open -->
<!-- BEGIN b_close --></strong><!-- END b_close -->

<!-- BEGIN u_open --><span style="text-decoration: underline"><!-- END u_open -->
<!-- BEGIN u_close --></span><!-- END u_close -->

<!-- BEGIN i_open --><em><!-- END i_open -->
<!-- BEGIN i_close --></em><!-- END i_close -->

<!-- BEGIN color --><span style="color: {COLOR}">{TEXT}</span><!-- END color -->

<!-- BEGIN size --><span style="font-size: {SIZE}%; line-height: normal">{TEXT}</span><!-- END size -->

<!-- BEGIN img --><img src="{URL}" alt="{L_IMAGE}" {REIMG_PROPERTIES} /><!-- END img -->

<!-- BEGIN url --><a href="{URL}" class="postlink">{DESCRIPTION}</a><!-- END url -->

<!-- BEGIN email --><a href="mailto:{EMAIL}">{DESCRIPTION}</a><!-- END email -->

<!-- BEGIN flash -->
   <object classid="clsid:D27CDB6E-AE6D-11CF-96B8-444553540000" codebase="http://active.macromedia.com/flash2/cabs/swflash.cab#version=5,0,0,0" width="{WIDTH}" height="{HEIGHT}">
      <param name="movie" value="{URL}" />
      <param name="play" value="true" />
      <param name="loop" value="true" />
      <param name="quality" value="high" />
      <param name="allowScriptAccess" value="never" />
      <embed src="{URL}" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" width="{WIDTH}" height="{HEIGHT}" play="true" loop="true" quality="high" allowscriptaccess="never"></embed>
   </object>
<!-- END flash -->

bbcode.php

كود: تحديد الكل

<?php
/**
*
* @package phpBB3
* @version $Id: bbcode.php 10150 2009-09-16 08:11:52Z nickvergessen $
* @copyright (c) 2005 phpBB Group
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
*
*/

/**
* @ignore
*/
if (!defined('IN_PHPBB'))
{
	exit;
}

/**
* BBCode class
* @package phpBB3
*/
class bbcode
{
	var $bbcode_uid = '';
	var $bbcode_bitfield = '';
	var $bbcode_cache = array();
	var $bbcode_template = array();

	var $bbcodes = array();

	var $template_bitfield;
	var $template_filename = '';

	/**
	* Constructor
	* Init bbcode cache entries if bitfield is specified
	*/
	function bbcode($bitfield = '')
	{
		if ($bitfield)
		{
			$this->bbcode_bitfield = $bitfield;
			$this->bbcode_cache_init();
		}
	}

	/**
	* Second pass bbcodes
	*/
	function bbcode_second_pass(&$message, $bbcode_uid = '', $bbcode_bitfield = false)
	{
	//HotEditor MOD
$message=BBCodeToHTML($message);
		if ($bbcode_uid)
		{
			$this->bbcode_uid = $bbcode_uid;
		}

		if ($bbcode_bitfield !== false)
		{
			$this->bbcode_bitfield = $bbcode_bitfield;

			// Init those added with a new bbcode_bitfield (already stored codes will not get parsed again)
			$this->bbcode_cache_init();
		}

		if (!$this->bbcode_bitfield)
		{
			// Remove the uid from tags that have not been transformed into HTML
			if ($this->bbcode_uid)
			{
				$message = str_replace(':' . $this->bbcode_uid, '', $message);
			}

			return;
		}

		$str = array('search' => array(), 'replace' => array());
		$preg = array('search' => array(), 'replace' => array());

		$bitfield = new bitfield($this->bbcode_bitfield);
		$bbcodes_set = $bitfield->get_all_set();

		$undid_bbcode_specialchars = false;
		foreach ($bbcodes_set as $bbcode_id)
		{
			if (!empty($this->bbcode_cache[$bbcode_id]))
			{
				foreach ($this->bbcode_cache[$bbcode_id] as $type => $array)
				{
					foreach ($array as $search => $replace)
					{
						${$type}['search'][] = str_replace('$uid', $this->bbcode_uid, $search);
						${$type}['replace'][] = $replace;
					}

					if (sizeof($str['search']))
					{
						$message = str_replace($str['search'], $str['replace'], $message);
						$str = array('search' => array(), 'replace' => array());
					}

					if (sizeof($preg['search']))
					{
						// we need to turn the entities back into their original form to allow the
						// search patterns to work properly
						if (!$undid_bbcode_specialchars)
						{
							$message = str_replace(array(':', '.'), array(':', '.'), $message);
							$undid_bbcode_specialchars = true;
						}

						$message = preg_replace($preg['search'], $preg['replace'], $message);
						$preg = array('search' => array(), 'replace' => array());
					}
				}
			}
		}

		// Remove the uid from tags that have not been transformed into HTML
		$message = str_replace(':' . $this->bbcode_uid, '', $message);
	}

	/**
	* Init bbcode cache
	*
	* requires: $this->bbcode_bitfield
	* sets: $this->bbcode_cache with bbcode templates needed for bbcode_bitfield
	*/
	function bbcode_cache_init()
	{
		global $phpbb_root_path, $template, $user;

		if (empty($this->template_filename))
		{
			$this->template_bitfield = new bitfield($user->theme['bbcode_bitfield']);
			$this->template_filename = $phpbb_root_path . 'styles/' . $user->theme['template_path'] . '/template/bbcode.html';

			if (!@file_exists($this->template_filename))
			{
				if (isset($template->orig_tpl_inherits_id) && $template->orig_tpl_inherits_id)
				{
					$this->template_filename = $phpbb_root_path . 'styles/' . $user->theme['template_inherit_path'] . '/template/bbcode.html';
					if (!@file_exists($this->template_filename))
					{
						trigger_error('The file ' . $this->template_filename . ' is missing.', E_USER_ERROR);
					}
				}
				else
				{
					trigger_error('The file ' . $this->template_filename . ' is missing.', E_USER_ERROR);
				}
			}
		}

		$bbcode_ids = $rowset = $sql = array();

		$bitfield = new bitfield($this->bbcode_bitfield);
		$bbcodes_set = $bitfield->get_all_set();

		foreach ($bbcodes_set as $bbcode_id)
		{
			if (isset($this->bbcode_cache[$bbcode_id]))
			{
				// do not try to re-cache it if it's already in
				continue;
			}
			$bbcode_ids[] = $bbcode_id;

			if ($bbcode_id > NUM_CORE_BBCODES)
			{
				$sql[] = $bbcode_id;
			}
		}

		if (sizeof($sql))
		{
			global $db;

			$sql = 'SELECT *
				FROM ' . BBCODES_TABLE . '
				WHERE ' . $db->sql_in_set('bbcode_id', $sql);
			$result = $db->sql_query($sql, 3600);

			while ($row = $db->sql_fetchrow($result))
			{
				// To circumvent replacing newlines with <br /> for the generated html,
				// we use carriage returns here. They are later changed back to newlines
				$row['bbcode_tpl'] = str_replace("\n", "\r", $row['bbcode_tpl']);
				$row['second_pass_replace'] = str_replace("\n", "\r", $row['second_pass_replace']);

				$rowset[$row['bbcode_id']] = $row;
			}
			$db->sql_freeresult($result);
		}

		foreach ($bbcode_ids as $bbcode_id)
		{
			switch ($bbcode_id)
			{
				case 0:
					$this->bbcode_cache[$bbcode_id] = array(
						'str' => array(
							'[/quote:$uid]'	=> $this->bbcode_tpl('quote_close', $bbcode_id)
						),
						'preg' => array(
							'#\[quote(?:="(.*?)")?:$uid\]((?!\[quote(?:=".*?")?:$uid\]).)?#ise'	=> "\$this->bbcode_second_pass_quote('\$1', '\$2')"
						)
					);
				break;

				case 1:
					$this->bbcode_cache[$bbcode_id] = array(
						'str' => array(
							'[b:$uid]'	=> $this->bbcode_tpl('b_open', $bbcode_id),
							'[/b:$uid]'	=> $this->bbcode_tpl('b_close', $bbcode_id),
						)
					);
				break;

				case 2:
					$this->bbcode_cache[$bbcode_id] = array(
						'str' => array(
							'[i:$uid]'	=> $this->bbcode_tpl('i_open', $bbcode_id),
							'[/i:$uid]'	=> $this->bbcode_tpl('i_close', $bbcode_id),
						)
					);
				break;

				case 3:
					$this->bbcode_cache[$bbcode_id] = array(
						'preg' => array(
							'#\[url:$uid\]((.*?))\[/url:$uid\]#s'			=> $this->bbcode_tpl('url', $bbcode_id),
							'#\[url=([^\[]+?):$uid\](.*?)\[/url:$uid\]#s'	=> $this->bbcode_tpl('url', $bbcode_id),
						)
					);
				break;

				case 4:
					if ($user->optionget('viewimg'))
					{
						$this->bbcode_cache[$bbcode_id] = array(
							'preg' => array(
							     '#\[img:$uid\](.*?)\[/img:$uid\]#s'		=> str_replace('$2', reimg_properties(), $this->bbcode_tpl('img', $bbcode_id)),
							)
						);
					}
					else
					{
						$this->bbcode_cache[$bbcode_id] = array(
							'preg' => array(
								'#\[img:$uid\](.*?)\[/img:$uid\]#s'		=> str_replace('$2', '[ img ]', $this->bbcode_tpl('url', $bbcode_id, true)),
							)
						);
					}
				break;

				case 5:
					$this->bbcode_cache[$bbcode_id] = array(
						'preg' => array(
							'#\[size=([\-\+]?\d+):$uid\](.*?)\[/size:$uid\]#s'	=> $this->bbcode_tpl('size', $bbcode_id),
						)
					);
				break;

				case 6:
					$this->bbcode_cache[$bbcode_id] = array(
						'preg' => array(
							'!\[color=(#[0-9a-f]{3}|#[0-9a-f]{6}|[a-z\-]+):$uid\](.*?)\[/color:$uid\]!is'	=> $this->bbcode_tpl('color', $bbcode_id),
						)
					);
				break;

				case 7:
					$this->bbcode_cache[$bbcode_id] = array(
						'str' => array(
							'[u:$uid]'	=> $this->bbcode_tpl('u_open', $bbcode_id),
							'[/u:$uid]'	=> $this->bbcode_tpl('u_close', $bbcode_id),
						)
					);
				break;

				case 8:
					$this->bbcode_cache[$bbcode_id] = array(
						'preg' => array(
							'#\[code(?:=([a-z]+))?:$uid\](.*?)\[/code:$uid\]#ise'	=> "\$this->bbcode_second_pass_code('\$1', '\$2')",
						)
					);
				break;

				case 9:
					$this->bbcode_cache[$bbcode_id] = array(
						'preg' => array(
							'#(\[\/?(list|\*):[mou]?:?$uid\])[\n]{1}#'	=> "\$1",
							'#(\[list=([^\[]+):$uid\])[\n]{1}#'			=> "\$1",
							'#\[list=([^\[]+):$uid\]#e'					=> "\$this->bbcode_list('\$1')",
						),
						'str' => array(
							'[list:$uid]'		=> $this->bbcode_tpl('ulist_open_default', $bbcode_id),
							'[/list:u:$uid]'	=> $this->bbcode_tpl('ulist_close', $bbcode_id),
							'[/list:o:$uid]'	=> $this->bbcode_tpl('olist_close', $bbcode_id),
							'[*:$uid]'			=> $this->bbcode_tpl('listitem', $bbcode_id),
							'[/*:$uid]'			=> $this->bbcode_tpl('listitem_close', $bbcode_id),
							'[/*:m:$uid]'		=> $this->bbcode_tpl('listitem_close', $bbcode_id)
						),
					);
				break;

				case 10:
					$this->bbcode_cache[$bbcode_id] = array(
						'preg' => array(
							'#\[email:$uid\]((.*?))\[/email:$uid\]#is'			=> $this->bbcode_tpl('email', $bbcode_id),
							'#\[email=([^\[]+):$uid\](.*?)\[/email:$uid\]#is'	=> $this->bbcode_tpl('email', $bbcode_id)
						)
					);
				break;

				case 11:
					if ($user->optionget('viewflash'))
					{
						$this->bbcode_cache[$bbcode_id] = array(
							'preg' => array(
								'#\[flash=([0-9]+),([0-9]+):$uid\](.*?)\[/flash:$uid\]#'	=> $this->bbcode_tpl('flash', $bbcode_id),
							)
						);
					}
					else
					{
						$this->bbcode_cache[$bbcode_id] = array(
							'preg' => array(
								'#\[flash=([0-9]+),([0-9]+):$uid\](.*?)\[/flash:$uid\]#'	=> str_replace('$1', '$3', str_replace('$2', '[ flash ]', $this->bbcode_tpl('url', $bbcode_id, true)))
							)
						);
					}
				break;

				case 12:
					$this->bbcode_cache[$bbcode_id] = array(
						'str'	=> array(
							'[/attachment:$uid]'	=> $this->bbcode_tpl('inline_attachment_close', $bbcode_id)
						),
						'preg'	=> array(
							'#\[attachment=([0-9]+):$uid\]#'	=> $this->bbcode_tpl('inline_attachment_open', $bbcode_id)
						)
					);
				break;

				default:
					if (isset($rowset[$bbcode_id]))
					{
						if ($this->template_bitfield->get($bbcode_id))
						{
							// The bbcode requires a custom template to be loaded
							if (!$bbcode_tpl = $this->bbcode_tpl($rowset[$bbcode_id]['bbcode_tag'], $bbcode_id))
							{
								// For some reason, the required template seems not to be available, use the default template
								$bbcode_tpl = (!empty($rowset[$bbcode_id]['second_pass_replace'])) ? $rowset[$bbcode_id]['second_pass_replace'] : $rowset[$bbcode_id]['bbcode_tpl'];
							}
							else
							{
								// In order to use templates with custom bbcodes we need
								// to replace all {VARS} to corresponding backreferences
								// Note that backreferences are numbered from bbcode_match
								if (preg_match_all('/\{(URL|LOCAL_URL|EMAIL|TEXT|SIMPLETEXT|IDENTIFIER|COLOR|NUMBER)[0-9]*\}/', $rowset[$bbcode_id]['bbcode_match'], $m))
								{
									foreach ($m[0] as $i => $tok)
									{
										$bbcode_tpl = str_replace($tok, '$' . ($i + 1), $bbcode_tpl);
									}
								}
							}
						}
						else
						{
							// Default template
							$bbcode_tpl = (!empty($rowset[$bbcode_id]['second_pass_replace'])) ? $rowset[$bbcode_id]['second_pass_replace'] : $rowset[$bbcode_id]['bbcode_tpl'];
						}

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

						if (!empty($rowset[$bbcode_id]['second_pass_replace']))
						{
							// The custom BBCode requires second-pass pattern replacements
							$this->bbcode_cache[$bbcode_id] = array(
								'preg' => array($rowset[$bbcode_id]['second_pass_match'] => $bbcode_tpl)
							);
						}
						else
						{
							$this->bbcode_cache[$bbcode_id] = array(
								'str' => array($rowset[$bbcode_id]['second_pass_match'] => $bbcode_tpl)
							);
						}
					}
					else
					{
						$this->bbcode_cache[$bbcode_id] = false;
					}
				break;
			}
		}
	}

	/**
	* Return bbcode template
	*/
	function bbcode_tpl($tpl_name, $bbcode_id = -1, $skip_bitfield_check = false)
	{
		static $bbcode_hardtpl = array();
		if (empty($bbcode_hardtpl))
		{
			global $user;

			$bbcode_hardtpl = array(
				'b_open'	=> '<span style="font-weight: bold">',
				'b_close'	=> '</span>',
				'i_open'	=> '<span style="font-style: italic">',
				'i_close'	=> '</span>',
				'u_open'	=> '<span style="text-decoration: underline">',
				'u_close'	=> '</span>',
				'img'		=> '<img src="$1" alt="' . $user->lang['IMAGE'] . '" ' . reimg_properties() . '/>',
				'size'		=> '<span style="font-size: $1%; line-height: normal">$2</span>',
				'color'		=> '<span style="color: $1">$2</span>',
				'email'		=> '<a href="mailto:$1">$2</a>'
			);
		}

		if ($bbcode_id != -1 && !$skip_bitfield_check && !$this->template_bitfield->get($bbcode_id))
		{
			return (isset($bbcode_hardtpl[$tpl_name])) ? $bbcode_hardtpl[$tpl_name] : false;
		}

		if (empty($this->bbcode_template))
		{
			if (($tpl = file_get_contents($this->template_filename)) === false)
			{
				trigger_error('Could not load bbcode template', E_USER_ERROR);
			}

			// replace \ with \\ and then ' with \'.
			$tpl = str_replace('\\', '\\\\', $tpl);
			$tpl = str_replace("'", "\'", $tpl);

			// strip newlines and indent
			$tpl = preg_replace("/\n[\n\r\s\t]*/", '', $tpl);

			// Turn template blocks into PHP assignment statements for the values of $bbcode_tpl..
			$this->bbcode_template = array();

			$matches = preg_match_all('#<!-- BEGIN (.*?) -->(.*?)<!-- END (?:.*?) -->#', $tpl, $match);

			for ($i = 0; $i < $matches; $i++)
			{
				if (empty($match[1][$i]))
				{
					continue;
				}

				$this->bbcode_template[$match[1][$i]] = $this->bbcode_tpl_replace($match[1][$i], $match[2][$i]);
			}
		}

		return (isset($this->bbcode_template[$tpl_name])) ? $this->bbcode_template[$tpl_name] : ((isset($bbcode_hardtpl[$tpl_name])) ? $bbcode_hardtpl[$tpl_name] : false);
	}

	/**
	* Return bbcode template replacement
	*/
	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', '{REIMG_PROPERTIES}'	=> '$2'),
			'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);
	}

	/**
	* Second parse list bbcode
	*/
	function bbcode_list($type)
	{
		if ($type == '')
		{
			$tpl = 'ulist_open_default';
			$type = 'default';
		}
		else if ($type == 'i')
		{
			$tpl = 'olist_open';
			$type = 'lower-roman';
		}
		else if ($type == 'I')
		{
			$tpl = 'olist_open';
			$type = 'upper-roman';
		}
		else if (preg_match('#^(disc|circle|square)$#i', $type))
		{
			$tpl = 'ulist_open';
			$type = strtolower($type);
		}
		else if (preg_match('#^[a-z]$#', $type))
		{
			$tpl = 'olist_open';
			$type = 'lower-alpha';
		}
		else if (preg_match('#[A-Z]#', $type))
		{
			$tpl = 'olist_open';
			$type = 'upper-alpha';
		}
		else if (is_numeric($type))
		{
			$tpl = 'olist_open';
			$type = 'decimal';
		}
		else
		{
			$tpl = 'olist_open';
			$type = 'decimal';
		}

		return str_replace('{LIST_TYPE}', $type, $this->bbcode_tpl($tpl));
	}

	/**
	* Second parse quote tag
	*/
	function bbcode_second_pass_quote($username, $quote)
	{
		// when using the /e modifier, preg_replace slashes double-quotes but does not
		// seem to slash anything else
		$quote = str_replace('\"', '"', $quote);
		$username = str_replace('\"', '"', $username);

		// remove newline at the beginning
		if ($quote == "\n")
		{
			$quote = '';
		}

		$quote = (($username) ? str_replace('$1', $username, $this->bbcode_tpl('quote_username_open')) : $this->bbcode_tpl('quote_open')) . $quote;

		return $quote;
	}

	/**
	* Second parse code tag
	*/
	function bbcode_second_pass_code($type, $code)
	{
		// when using the /e modifier, preg_replace slashes double-quotes but does not
		// seem to slash anything else
		$code = str_replace('\"', '"', $code);

		switch ($type)
		{
			case 'php':
				// Not the english way, but valid because of hardcoded syntax highlighting
				if (strpos($code, '<span class="syntaxdefault"><br /></span>') === 0)
				{
					$code = substr($code, 41);
				}

			// no break;

			default:
				$code = str_replace("\t", '   ', $code);
				$code = str_replace('  ', '  ', $code);
				$code = str_replace('  ', '  ', $code);

				// remove newline at the beginning
				if (!empty($code) && $code[0] == "\n")
				{
					$code = substr($code, 1);
				}
			break;
		}

		$code = $this->bbcode_tpl('code_open') . $code . $this->bbcode_tpl('code_close');

		return $code;
	}
}

?>


صورة العضو الرمزية
mohamed89
عضو فعال
عضو فعال
مشاركات: 549
اشترك في: الأربعاء مايو 06, 2009 2:14 am
مكان: Egypt
اتصال:

[1.0.2] ????? ?????

مشاركةبواسطة mohamed89 » الأربعاء مارس 17, 2010 10:22 pm

??? ??? ????? ??? ???????
???? bbcode ?????? ?? ?????
?????? ??????? ??????
?? ??? ???? ???? ??????
?? ?? ????? ?? ??? ???????
صورة

ahmedmoselhi
عضو جديد
عضو جديد
مشاركات: 42
اشترك في: الاثنين سبتمبر 07, 2009 5:54 pm
اتصال:

[1.0.2] ????? ?????

مشاركةبواسطة ahmedmoselhi » الجمعة مارس 26, 2010 5:15 pm

??? ???? ????? ?????? ??????? ????? ?? ????????? ?? ????? ???? ????? ??? ??????? ???? ???? ?? ???? ??????? ?????? ?? ???? ?? ????? ??? ???? ??? ????? ???? ??? ??subsilver2 ???? x-static
التعلم فى الصغر.......كالنقش على الحجر
****************************
****************************
مصرى وابن مصرى وابن مصر الله عليه

صورة العضو الرمزية
yemen
عضو فعال
عضو فعال
مشاركات: 620
اشترك في: السبت مارس 27, 2010 2:35 pm

[1.0.2] ????? ?????

مشاركةبواسطة yemen » الأحد مارس 28, 2010 6:42 pm

?? ?????? ???? ??? ????? ????
?? ???? ?? 3.0.7

????? ??? ??? ?????
?? ?????? ???? ?? ??

??

??? ???? ?? ????

صورة العضو الرمزية
G3v4r4
عضو جديد
عضو جديد
مشاركات: 5
اشترك في: السبت يناير 30, 2010 10:03 pm
اتصال:

[1.0.2] ????? ?????

مشاركةبواسطة G3v4r4 » الأربعاء مارس 31, 2010 5:07 pm

?? ????? ????? ??? ????? ???

????? ???? ?? ?????? ????? ????? ??????? ?? ?? ???? ????

?? ??????? ????? ??? ????? ?? ???? ?????

???? ??? ????? ????? ?????? ?? ??? ??? ???? ?? ?? ?????

?? ????? ..

?? ??? ???? ?? ??????? ?????? ???? ??? ??? ??? ?????? ????? ????? 100%

صورة العضو الرمزية
awthah
عضو فعال
عضو فعال
مشاركات: 401
اشترك في: الجمعة أغسطس 28, 2009 6:12 pm
مكان: اليمن -صنعاء
اتصال:

[1.0.2] ????? ?????

مشاركةبواسطة awthah » الأربعاء مارس 31, 2010 5:24 pm

G3v4r4 كتب:?? ????? ????? ??? ????? ???

????? ???? ?? ?????? ????? ????? ??????? ?? ?? ???? ????

?? ??????? ????? ??? ????? ?? ???? ?????

???? ??? ????? ????? ?????? ?? ??? ??? ???? ?? ?? ?????

?? ????? ..

?? ??? ???? ?? ??????? ?????? ???? ??? ??? ??? ?????? ????? ????? 100%
????? ????? ????? ??????? ?? ????? ??? ???
??????? ??? ?????? ????? ????? ??????? ?? ???? ???? ???????
اللهم صلي على محمد وال محمد....

http://www.englab-su.com/bb
نوع الستايل :- prosilver
منتديات طلاب كليه الهندسة جامعة صنعاء
وسيبقى نبض قلبي يمنيا ...لن ترى الدنيا على ارضي وصيا

اللهم احفـــظ اليمن ...

صورة العضو الرمزية
yemen
عضو فعال
عضو فعال
مشاركات: 620
اشترك في: السبت مارس 27, 2010 2:35 pm

[1.0.2] ????? ?????

مشاركةبواسطة yemen » الأربعاء مارس 31, 2010 5:38 pm

??? ??? ????? ??? ??

???? ????? ????? ??? ???????? ??? ??? ?????????

صورة العضو الرمزية
مهند قمرة
مشرف سابق
مشرف سابق
مشاركات: 4222
اشترك في: السبت أكتوبر 30, 2004 8:32 pm
مكان: مـصـر [ولي الفخر]
اتصال:

[1.0.2] ????? ?????

مشاركةبواسطة مهند قمرة » الأحد إبريل 04, 2010 2:08 pm

??? ?????? ???
?? ??? ????? ???? ?? ???? ?????? ?????? ?? ??????? ??? ????? ??? ???? ?????? ????? ???????? ?? ????????.
سأعود قريبا لعالمي في ارابيا :)
-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-
صورة


العودة إلى ”الهاكات المعتمدة [ ×.3.0 ]“

الموجودون الآن

المتصفحون للمنتدى الآن: Majestic-12Bot و 6 زوار