سلام کاربران عزیز!
امروز میخوام پلاگین تغییر سایز فونت چت روم رو بزارم براتون
که یکی از دوستان درخواست کرده
دمو:
لینک دانلود:
http://s5.picofile.com/file/8114203484/Font_wWw_plugin_chat_blogfa_com_.zip.html
در این پلاگین نیاز به فایل MessageInserter.class دارد .....
مشکل این کد اینه که باگCSS و فونت درشت رو باز میکنه و افراد میتونند با هک فونت بزرگ توی چت روم متن بزرگ بفرستن .....
چت رو ها برای جلوگیری از هک فونت درشت چت روم ها از کد زیر استفاده میکنند
<code><code><span style="color: rgb(0, 0, 0);"><span style="color: rgb(0, 0, 187);"><br /></span><span style="color: rgb(255, 128, 0);">// message style parameters<br /> </span><span style="color: rgb(0, 0, 187);">$__italic</span><span style="color: rgb(0, 119, 0);">;</span><span style="color: rgb(0, 0, 187);">$__bold</span><span style="color: rgb(0, 119, 0);">;</span><span style="color: rgb(0, 0, 187);">$__color</span><span style="color: rgb(0, 119, 0);">;<br /> </span><span style="color: rgb(0, 0, 187);">$__POSTEDCOLOR </span><span style="color: rgb(0, 119, 0);">= </span><span style="color: rgb(0, 0, 187);">$_POST</span><span style="color: rgb(0, 119, 0);">[</span><span style="color: rgb(221, 0, 0);">'color'</span><span style="color: rgb(0, 119, 0);">];<br /> if(</span><span style="color: rgb(0, 0, 187);">preg_match</span><span style="color: rgb(0, 119, 0);">(</span><span style="color: rgb(221, 0, 0);">'{^#}'</span><span style="color: rgb(0, 119, 0);">,</span><span style="color: rgb(0, 0, 187);">$__POSTEDCOLOR</span><span style="color: rgb(0, 119, 0);">) && (</span><span style="color: rgb(0, 0, 187);">strlen</span><span style="color: rgb(0, 119, 0);">(</span><span style="color: rgb(0, 0, 187);">$__POSTEDCOLOR</span><span style="color: rgb(0, 119, 0);">) <= </span><span style="color: rgb(0, 0, 187);">10</span><span style="color: rgb(0, 119, 0);">)){</span><span style="color: rgb(0, 0, 187);">$__color</span><span style="color: rgb(0, 119, 0);">=</span><span style="color: rgb(0, 0, 187);">$__POSTEDCOLOR</span><span style="color: rgb(0, 119, 0);">;}else{</span><span style="color: rgb(0, 0, 187);">$__color</span><span style="color: rgb(0, 119, 0);">=</span><span style="color: rgb(221, 0, 0);">'red'</span><span style="color: rgb(0, 119, 0);">;}<br /> if(</span><span style="color: rgb(0, 0, 187);">$_POST</span><span style="color: rgb(0, 119, 0);">[</span><span style="color: rgb(221, 0, 0);">'bold'</span><span style="color: rgb(0, 119, 0);">] == </span><span style="color: rgb(221, 0, 0);">"bold"</span><span style="color: rgb(0, 119, 0);">){</span><span style="color: rgb(0, 0, 187);">$__bold</span><span style="color: rgb(0, 119, 0);">=</span><span style="color: rgb(221, 0, 0);">"bold"</span><span style="color: rgb(0, 119, 0);">;}else{</span><span style="color: rgb(0, 0, 187);">$__bold</span><span style="color: rgb(0, 119, 0);">=</span><span style="color: rgb(221, 0, 0);">'normal'</span><span style="color: rgb(0, 119, 0);">;}<br /> if(</span><span style="color: rgb(0, 0, 187);">$_POST</span><span style="color: rgb(0, 119, 0);">[</span><span style="color: rgb(221, 0, 0);">'italic'</span><span style="color: rgb(0, 119, 0);">]==</span><span style="color: rgb(221, 0, 0);">"italic"</span><span style="color: rgb(0, 119, 0);">){</span><span style="color: rgb(0, 0, 187);">$__italic</span><span style="color: rgb(0, 119, 0);">=</span><span style="color: rgb(221, 0, 0);">"italic"</span><span style="color: rgb(0, 119, 0);">;}else{</span><span style="color: rgb(0, 0, 187);">$__italic</span><span style="color: rgb(0, 119, 0);">=</span><span style="color: rgb(221, 0, 0);">'normal'</span><span style="color: rgb(0, 119, 0);">;}<br /> </span><span style="color: rgb(0, 0, 187);">$style </span><span style="color: rgb(0, 119, 0);">= </span><span style="color: rgb(221, 0, 0);">"color:"</span><span style="color: rgb(0, 119, 0);">.</span><span style="color: rgb(0, 0, 187);">$__color</span><span style="color: rgb(0, 119, 0);">.</span><span style="color: rgb(221, 0, 0);">";font-weight:"</span><span style="color: rgb(0, 119, 0);">.</span><span style="color: rgb(0, 0, 187);">$__bold</span><span style="color: rgb(0, 119, 0);">.</span><span style="color: rgb(221, 0, 0);">";font-style:"</span><span style="color: rgb(0, 119, 0);">.</span><span style="color: rgb(0, 0, 187);">$__italic</span><span style="color: rgb(0, 119, 0);">.</span><span style="color: rgb(221, 0, 0);">";"</span><span style="color: rgb(0, 119, 0);">; </span></span></code></code></p><p><code><code></code></code>
لطفا این کد رو با کد اولیه خودتون تلفیق کنید تا پلاگین انتخاب سایز و فونت بدون باگ کار بکنه
این مطلب در تاریخ: یکشنبه 21 اردیبهشت 1393 ساعت: 14:15 منتشر شده است
برچسب ها : دانلود پلاگین تغییر فونت چت روم به انتخاب کاربر,تغییر سایز فونت توسط کاربر,پلاگین چت,پلاگین چت روم,چت روم,