<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[مەکۆکانی وێبچن - وێنه‌بچکۆله‌ی ئه‌ندام ڕاسته‌وخۆ بچوک بکه‌ره‌وه‌]]></title>
	<link rel="self" href="https://www.webchin.org:80/Meko/extern.php?action=feed&amp;tid=10375&amp;type=atom" />
	<updated>2011-06-29T08:14:08Z</updated>
	<generator>PunBB</generator>
	<id>https://www.webchin.org/Meko/viewtopic.php?id=10375</id>
		<entry>
			<title type="html"><![CDATA[وه‌ڵام: وێنه‌بچکۆله‌ی ئه‌ندام ڕاسته‌وخۆ بچوک بکه‌ره‌وه‌]]></title>
			<link rel="alternate" href="https://www.webchin.org/Meko/viewtopic.php?pid=196325#p196325" />
			<content type="html"><![CDATA[<p>ده‌ستت خۆش <img src="https://www.webchin.org/Meko/img/smilies/wink.png" width="15" height="15" alt="wink" /></p>]]></content>
			<author>
				<name><![CDATA[$bestun shwani$]]></name>
				<uri>https://www.webchin.org/Meko/profile.php?id=44767</uri>
			</author>
			<updated>2011-06-29T08:14:08Z</updated>
			<id>https://www.webchin.org/Meko/viewtopic.php?pid=196325#p196325</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[وه‌ڵام: وێنه‌بچکۆله‌ی ئه‌ندام ڕاسته‌وخۆ بچوک بکه‌ره‌وه‌]]></title>
			<link rel="alternate" href="https://www.webchin.org/Meko/viewtopic.php?pid=75124#p75124" />
			<content type="html"><![CDATA[<p>ده‌ست خۆش هه‌ربژی</p>]]></content>
			<author>
				<name><![CDATA[Tion_98]]></name>
				<uri>https://www.webchin.org/Meko/profile.php?id=4970</uri>
			</author>
			<updated>2009-07-08T12:00:47Z</updated>
			<id>https://www.webchin.org/Meko/viewtopic.php?pid=75124#p75124</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[وه‌ڵام: وێنه‌بچکۆله‌ی ئه‌ندام ڕاسته‌وخۆ بچوک بکه‌ره‌وه‌]]></title>
			<link rel="alternate" href="https://www.webchin.org/Meko/viewtopic.php?pid=75122#p75122" />
			<content type="html"><![CDATA[<p>کارێکی باشه‌&nbsp; <br />دوای تاقی ده‌که‌ مه‌ وه‌ <br />ده‌ ست خوش کاک کاردؤ گيان سه‌ رکه‌ وتوبی <img src="https://www.webchin.org/Meko/img/smilies/smile.png" width="15" height="15" alt="smile" /></p>]]></content>
			<author>
				<name><![CDATA[Safen-sherwani]]></name>
				<uri>https://www.webchin.org/Meko/profile.php?id=4707</uri>
			</author>
			<updated>2009-07-08T11:39:19Z</updated>
			<id>https://www.webchin.org/Meko/viewtopic.php?pid=75122#p75122</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[وه‌ڵام: وێنه‌بچکۆله‌ی ئه‌ندام ڕاسته‌وخۆ بچوک بکه‌ره‌وه‌]]></title>
			<link rel="alternate" href="https://www.webchin.org/Meko/viewtopic.php?pid=75118#p75118" />
			<content type="html"><![CDATA[<p>ده‌ستت خۆش به‌ڕاستی کارێکی باشه‌ کاک کاردۆ گیان</p>]]></content>
			<author>
				<name><![CDATA[ئه‌مین کورد]]></name>
				<uri>https://www.webchin.org/Meko/profile.php?id=3146</uri>
			</author>
			<updated>2009-07-08T10:45:06Z</updated>
			<id>https://www.webchin.org/Meko/viewtopic.php?pid=75118#p75118</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[وێنه‌بچکۆله‌ی ئه‌ندام ڕاسته‌وخۆ بچوک بکه‌ره‌وه‌]]></title>
			<link rel="alternate" href="https://www.webchin.org/Meko/viewtopic.php?pid=75116#p75116" />
			<content type="html"><![CDATA[<p>سڵاو هاوڕێیان،</p><p>زۆرێک له‌ به‌ڕێوبه‌ران وێنه‌ بچکۆله‌ ناچالاک ده‌که‌ن به‌ هۆی ئه‌وه‌ی‌ ئه‌ندامان وێنه‌ی‌گه‌وه‌&nbsp; دا ئه‌ نێن ،که‌ ئه‌مه‌ش ئه‌بێته‌ هۆی خاو بونه‌وه‌ی په‌ڕه‌کانو یانه‌که‌ش</p><p>ئێستا ئه‌توانیت به‌ هۆی کۆمه‌ڵێ گۆڕان کاریه‌وه‌ له‌ په‌ڕه‌کان ،هه‌ر ئه‌ندامێک وێنه‌بچکۆله‌که‌ی زۆرر گه‌وه‌ره‌ش بێت <strong>،ئه‌م بچوکی ئه‌کاته‌وه‌ به‌ شێوه‌یه‌کی خۆکارانه‌</strong></p><br /><p>جێبه‌جێ کردن:</p><br /><div class="codebox"><pre><code data-language=php>#
#---------[ 1. ئه‌م په‌ڕه‌یه‌ بکه‌ره‌وه‌ ]---------------------------------------------------------
#

profile.php


#
#---------[دێڕی 412 ]-----------------------------------------------
#

                        &lt;input type=&quot;hidden&quot; name=&quot;MAX_FILE_SIZE&quot; value=&quot;&lt;?php echo $pun_config[&#039;o_avatars_size&#039;] ?&gt;&quot; /&gt;


#
#---------[ 3. بیگۆڕه‌ بۆ ئه‌م دێره‌ی خواره‌وه‌ ]--------------------------------------------------
#

                        &lt;!--&lt;input type=&quot;hidden&quot; name=&quot;MAX_FILE_SIZE&quot; value=&quot;&lt;?php echo $pun_config[&#039;o_avatars_size&#039;] ?&gt;&quot; /&gt;--&gt;


#
#---------[ ئه‌م دێڕه‌ بدۆزه‌ره‌وه‌ 368 ]-----------------------------------------------
#

            // Now check the width/height
            list($width, $height, $type,) = getimagesize($pun_config[&#039;o_avatars_dir&#039;].&#039;/&#039;.$id.&#039;.tmp&#039;);
            if (empty($width) || empty($height) || $width &gt; $pun_config[&#039;o_avatars_width&#039;] || $height &gt; $pun_config[&#039;o_avatars_height&#039;])
            {
                @unlink($pun_config[&#039;o_avatars_dir&#039;].&#039;/&#039;.$id.&#039;.tmp&#039;);
                message($lang_profile[&#039;Too wide or high&#039;].&#039; &#039;.$pun_config[&#039;o_avatars_width&#039;].&#039;x&#039;.$pun_config[&#039;o_avatars_height&#039;].&#039; &#039;.$lang_profile[&#039;pixels&#039;].&#039;.&#039;);
            }
            else if ($type == 1 &amp;&amp; $uploaded_file[&#039;type&#039;] != &#039;image/gif&#039;)    // Prevent dodgy uploads
            {
                @unlink($pun_config[&#039;o_avatars_dir&#039;].&#039;/&#039;.$id.&#039;.tmp&#039;);
                message($lang_profile[&#039;Bad type&#039;]);
            }            


#
#---------[ 5. بیگۆڕه‌ بۆ]--------------------------------------------------
#

            // Now check the width/height
            list($width, $height, $type,) = getimagesize($pun_config[&#039;o_avatars_dir&#039;].&#039;/&#039;.$id.&#039;.tmp&#039;);
            if (empty($width) || empty($height) || $width &gt; $pun_config[&#039;o_avatars_width&#039;] || $height &gt; $pun_config[&#039;o_avatars_height&#039;])
            {

                // Attempt to resize if GD is installed with support for the uploaded image type, as well as JPG for the output
                $check_type = str_replace(array(1, 2, 3), array(&#039;IMG_GIF&#039;, &#039;IMG_JPG&#039;, &#039;IMG_PNG&#039;), $type);
                if (extension_loaded(&#039;gd&#039;) &amp;&amp; imagetypes() &amp; constant($check_type) &amp;&amp; imagetypes() &amp; IMG_JPG)
                {

                    // Load the image for processing
                    if ($type == 1) $src_img = @imagecreatefromgif($pun_config[&#039;o_avatars_dir&#039;].&#039;/&#039;.$id.&#039;.tmp&#039;);
                    elseif ($type == 2) $src_img = @imagecreatefromjpeg($pun_config[&#039;o_avatars_dir&#039;].&#039;/&#039;.$id.&#039;.tmp&#039;);
                    elseif ($type == 3) $src_img = @imagecreatefrompng($pun_config[&#039;o_avatars_dir&#039;].&#039;/&#039;.$id.&#039;.tmp&#039;);

                    if ($src_img)
                    {

                        // Figure out new image dimensions based on the maximum width
                        $new_w = $pun_config[&#039;o_avatars_width&#039;];
                        $ratio = $height * $new_w;
                        $new_h = $ratio / $width;

                        // Do the new dimensions, based on the maximum width, fit the maximum height? If not, recalculate
                        if ($new_h &gt; $pun_config[&#039;o_avatars_height&#039;])
                        {
                            $new_h = $pun_config[&#039;o_avatars_height&#039;];
                            $ratio = $width * $new_h;
                            $new_w = $ratio / $height;
                        }

                        // Resize the image
                        $new_img = imagecreatetruecolor($new_w, $new_h);
                        imagecopyresampled($new_img, $src_img, 0, 0, 0, 0, $new_w, $new_h, $width, $height);

                        // Delete the old image and write the newly resized one
                        @unlink($pun_config[&#039;o_avatars_dir&#039;].&#039;/&#039;.$id.&#039;.tmp&#039;);
                        imagejpeg($new_img,$pun_config[&#039;o_avatars_dir&#039;].&#039;/&#039;.$id.&#039;.tmp&#039;,85);

                        // Set the extension to JPG, since that&#039;s what the resized image is now
                        $extensions[0] = &#039;.jpg&#039;;
                    }

                    // Something went wrong while attempting to load the image for processing
                    else
                    {
                        @unlink($pun_config[&#039;o_avatars_dir&#039;].&#039;/&#039;.$id.&#039;.tmp&#039;);
                        message(&#039;An unexpected error occured while attempting to resize the image.&#039;);
                    }
                }

                // No GD installed or image type not supported; can&#039;t resize
                else
                {
                    @unlink($pun_config[&#039;o_avatars_dir&#039;].&#039;/&#039;.$id.&#039;.tmp&#039;);
                    message($lang_profile[&#039;Too wide or high&#039;].&#039; &#039;.$pun_config[&#039;o_avatars_width&#039;].&#039;x&#039;.$pun_config[&#039;o_avatars_height&#039;].&#039; &#039;.$lang_profile[&#039;pixels&#039;].&#039;.&#039;);
                }
            }
            else if ($type == 1 &amp;&amp; $uploaded_file[&#039;type&#039;] != &#039;image/gif&#039;)    // Prevent dodgy uploads
            {
                @unlink($pun_config[&#039;o_avatars_dir&#039;].&#039;/&#039;.$id.&#039;.tmp&#039;);
                message($lang_profile[&#039;Bad type&#039;]);
            }

            // Make sure the file isn&#039;t too big
            if (filesize($pun_config[&#039;o_avatars_dir&#039;].&#039;/&#039;.$id.&#039;.tmp&#039;) &gt; $pun_config[&#039;o_avatars_size&#039;])
                message($lang_profile[&#039;Too large&#039;].&#039; &#039;.$pun_config[&#039;o_avatars_size&#039;].&#039; &#039;.$lang_profile[&#039;bytes&#039;].&#039;.&#039;);


#
#---------[ ئه‌م دوو دێڕه‌ش بسره‌وه‌ که‌ ئه‌که‌ونه‌ دێر 351 و352]-----------------------------------------------
#

            // Make sure the file isn&#039;t too big
            if ($uploaded_file[&#039;size&#039;] &gt; $pun_config[&#039;o_avatars_size&#039;])
                message($lang_profile[&#039;Too large&#039;].&#039; &#039;.$pun_config[&#039;o_avatars_size&#039;].&#039; &#039;.$lang_profile[&#039;bytes&#039;].&#039;.&#039;);


#
#---------[ 7. سه‌یڤی که‌و به‌رزی که‌ره‌وه‌ بۆ ڕاژه‌که‌ت ]-------------------------------------------------
#</code></pre></div>]]></content>
			<author>
				<name><![CDATA[Kardo dJ]]></name>
				<uri>https://www.webchin.org/Meko/profile.php?id=4281</uri>
			</author>
			<updated>2009-07-08T10:36:20Z</updated>
			<id>https://www.webchin.org/Meko/viewtopic.php?pid=75116#p75116</id>
		</entry>
</feed>
