المواضيع المخالفة للدستور يتم حذفها مباشرة بدون إرسال أي إشعار للعضو لذلك يُرجى مراجعة الدستور والتقيّد بشروطه منعاً للإحراج.
كذلك ننصحك باستعمال محرك البحث في المنتدى لأن الكثير من الاستفسارات سبق وأن طُرحت في المنتدى.
موقع بحيرة العرب شركات الأخبار المباشرة موقع أندرويدي مدونة عواميد
جمعية نخلة الخيرية أعلن عن مدونتك هنا أعلن عن مدونتك هنا أعلن عن مدونتك هنا أعلن عن مدونتك هنا

العودة   منتديات عرب ووردبريس > قسم القوالب > قوالب ووردبريس - عام
التسجيل التعليمـــات قائمة الأعضاء التقويم البحث مشاركات اليوم اجعل كافة الأقسام مقروءة

[درس] إظهار خصائص تويتر الى القالب بدون إستخدام اضافة

إضافة رد
 
LinkBack أدوات الموضوع انواع عرض الموضوع
  #1  
قديم 06-10-2009, 04:46 AM
مدون مميز
 
تاريخ التسجيل: May 2009
الدولة: سويسرا
المشاركات: 229
شكر غيره: 55
تم شكره 351 مرة في 56 موضوع
Talking [درس] إظهار خصائص تويتر الى القالب بدون إستخدام اضافة

بسم الله الرحمن الرحيم
السلام عليكم و رحمة الله و بركاته

اخواني الكرام تحية طيبة...

في هذا الدرس سوف نتعلم كيفية اضافة خصائص تويتر الى القالب بدون استخدام اي اضافة (Plugin) ..كيف..؟ (قمت بأضافة ملفات الدرس في المرفقات ايضا)
سوف نطبق الدرس على القالب الافتراضي defulte كما في الدرس السابق.
اول شي نعمله هو نفتح ملف الفنكشن functions.php بستخدام اي محرر (انا استخدم ++np)

ثم نضيف الكود الاتي الى نهاية الاكود الموجود في الملف ..
كود PHP:
<?php
//بداية اكود تويتر
// Custom Twitter Settings - Setup
add_action('admin_menu''custom_twitter_page');
// Custom Twitter Settings - Update Function
function custom_twitter_page (){
    
$options = array ('ts_twitter_user''ts_twitter_count');
    if (
count($_POST) > && isset($_POST['custom_twitter_settings'])){
        foreach (
$options as $option){
            
delete_option ($option$_POST[$option]);
            
add_option ($option$_POST[$option]);
        }
        
wp_redirect("themes.php?page=functions.php&saved=true");
        die;
    }
    
add_menu_page(__('خصائص تويتر'), __('خصائص تويتر'), 'edit_themes'basename(__FILE__), 'custom_twitter_settings');

 
// Custom Twitter Settings - Display Function
function custom_twitter_settings (){
    if ( isset( 
$_REQUEST['saved'] ) ) echo '<div id="message" class="updated fade"><p><strong>'.__('خصائص تويتر تم حفظها.').'</strong></p></div>';
    
?>
    <div class="wrap">
        <h2>خصائص تويتر</h2>
        <form method="post" action="">
            <table class="form-table">
                <tr valign="top">
                    <th scope="row"><label for="twitter_user">أسمك في تويتر</label></th>
                    <td><input name="ts_twitter_user" type="text" id="twitter_user" size="15" value="<?php echo htmlspecialchars(stripslashes(get_option('ts_twitter_user'))); ?>" /></td>
                </tr>
                <tr valign="top">
                    <th scope="row"><label for="twitter_count">عدد المواضيع</label></th>
                    <td><input name="ts_twitter_count" type="text" id="twitter_count" size="2" value="<?php echo htmlspecialchars(stripslashes(get_option('ts_twitter_count'))); ?>" /></td>
                </tr>
            </table>
            <p class="submit">
                <input type="submit" name="Submit" class="button-primary" value="حفظ التغييرات" />
                <input type="hidden" name="custom_twitter_settings" value="save" style="display:none;" />
            </p>
        </form>
    </div>
    <?php
}
?>
كما في الصورة التالية
---------------------------------------------------------------------------------------

---------------------------------------------------------------------------------------
نم نحفظ الملف.

الان نعمل ملف جديد و نعطيه اسم twitter.php حتى يكون عملنا منظم.
ونظيف اليه الكود الاتي الذي سوف يستدعي السكريت من موقع تويتر مباشرا

كود PHP:
<ul id="twitter_update_list"></ul>
<script type="text/javascript" src="http://twitter.com/javascripts/blogger.js"></script>    
<script type="text/javascript" src="http://twitter.com/statuses/user_timeline/<?php echo get_option('ts_twitter_user'); ?>.json?callback=twitterCallback2&amp;count=<?php echo get_option('ts_twitter_count'); ?>"></script>
ونعمل حفظ للملف .
الان لو تذهب الى لوحة التحكم في الووردبريس ,تحت الاعدادت سوف تلاحظ اضافة حقل جديد خاص بتويتر , كما في الصور التالية
---------------------------------------------------------------------------------------

---------------------------------------------------------------------------------------
بعد ما تم التأكيد بظهور الخصائص , اعطي اسمك و عدد المواضيع التي ترغب بظهورها و اعمل حفظ.

بقية عندنا استدعاء ملف تويتر و بعض اكواد الستايل .

نستدعي ملف التويتر من خلال هذا الامر

كود PHP:
<?php include (TEMPLATEPATH '/twitter.php'); ?>
و يمكن من وضعه في اي مكان ترغب بظهور تدوينات تويتر في القالب..... مثلا انا وضعته فوق الهيدر من خلال اضافة الامر الى ملف الهيدر header.php ,كما في الصورة :
---------------------------------------------------------------------------------------

---------------------------------------------------------------------------------------
بهذا الامر نحن استدعينا ملف تويتر الذي سوف يأتي بالتدوينات مباشرأ من موقع تويتر

بقية اضافة بعض اكواد الـ css الى الستايل
اضف هذه الاكواد الى ملف الستايل , و يمكنك من تغييرها حسب الرغبة لتناسب الشكل العام للقالب:
كود PHP:
ul#twitter_update_list{

    
list-style:none;
    
padding0px 0px;
    
margin:0px 20px;
    
font:13px Tahoma,Arial;
}
ul#twitter_update_list li{

    
list-style:none;
    
padding5px 0px;
    
margin:0px 0px;
    
line-height:18px;
    
border-bottom:1px dotted #ccc;
}
#twitter_update_list li a:link, #twitter_update_list li   a:visited{    
    
color:#0282D9;
}
#twitter_update_list li a:hover{
    
color:#BC0C0F;} 
إعمل حفظ للملف , و النتيجة ظهور مواضيع تويتر في القالب بدون استخدام اي اضافة . النتيجة :
---------------------------------------------------------------------------------------

---------------------------------------------------------------------------------------
يارب يكون الدرس سهل و مفيد و انصح به أصحاب الخبرة في تصميم القوالب .
الف تحية تقدير و احترام الى الجميع

شكر خاص الى Aaron Robbins
Thanks to Aaron Robbins

يمكنكم من نقل الموضوع مع ذكر المصدر









الملفات المرفقة
نوع الملف: rar تويتر.rar‏ (83.1 كيلوبايت, المشاهدات 94)

التعديل الأخير تم بواسطة SUBSWISS ; 06-10-2009 الساعة 04:51 AM. سبب آخر: خطأ كتابي . أعتذر عن ذلك
رد مع اقتباس
هؤولاء الاعضاء يشكرونك يا SUBSWISS على هذه المشاركة:
ملاك الحاسوب (06-10-2009), أبومازن (08-07-2009), أبوعماد (10-05-2009), ArAbTi (08-15-2009), احمد حمودة (06-10-2009), حسين الدليمي (08-31-2009), زكازيك (12-24-2009), Somo5 (06-10-2009), TheSilent000 (08-16-2009), يونس (06-10-2009), فكرة مصمم (08-14-2009), نورهـ (03-20-2010)
  #2  
قديم 06-10-2009, 12:47 PM
مدون محترف
 
تاريخ التسجيل: Dec 2007
الدولة: فرنسا
المشاركات: 628
شكر غيره: 139
تم شكره 59 مرة في 38 موضوع
افتراضي

شكرا لك أخي، لكن أظن العملية طويلة والإضافة أسرع.









__________________
¦ as1.gif لزيارة مدونتي: اضغط هنـــــــــــــــــا
¦ :) تابعني على تويتر: من هنـــــــــــــــــــا
as4.gif قبل أن ترسلي رسالة خاصة، ابحث في المنتدى
¦ :(( ضع عنوان مدونتك في توقيعك لنتمكن من مساعدتك
¦ سأل الممكن المستحيل : أين تقيم ؟ فأجابه في أحلام العاجز!
¦---------------------------------------------------------------¦
رد مع اقتباس
  #3  
قديم 06-10-2009, 01:07 PM
مدون مميز
 
تاريخ التسجيل: May 2009
الدولة: سويسرا
المشاركات: 229
شكر غيره: 55
تم شكره 351 مرة في 56 موضوع
افتراضي

اقتباس:
المشاركة الأصلية كتبت بواسطة Younes

شكرا لك أخي، لكن أظن العملية طويلة والإضافة أسرع.


صحيح كلامك . لكن مصمم قوالب الووردبريس يحاول قدر الامكان تقليل الاضافات في القالب و يعتمد على مثل هذه الامور , او دمجها مع القالب مثل اضافة wp-pagenavi وغيرها .
على العموم شكرا لمرورك.









رد مع اقتباس
  #4  
قديم 06-10-2009, 03:50 PM
مدون محترف
 
تاريخ التسجيل: May 2009
الدولة: فلسطين-غزة المحاصرة
المشاركات: 1,153
شكر غيره: 147
تم شكره 316 مرة في 137 موضوع
افتراضي

مشكووووووور اخي ..
وبإذن الله تتم التحربة ...
مع اني لست على علم تام باداة التويتر









__________________
مدونتي :

بحــر الإبداع .. عالم من الإبداع

www.ba7ar.org

عرب وورد بريس
رد مع اقتباس
  #5  
قديم 08-11-2009, 09:08 PM
مدون نشيط
 
تاريخ التسجيل: Aug 2009
المشاركات: 77
شكر غيره: 0
تم شكره 0 مرة في 0 موضوع
افتراضي

يوجد مشكله بعد عمل الخطوات

خيارات تويتر تظهر باللغة غير مفهومة
لكن عرفت الخيارات وعملتها
وعند عمل ريفيرش فى الصفحة الرئيسية تظهر نافذه تطلب يوزر وباسورد
ممكن حل هذه المشكله









رد مع اقتباس
  #6  
قديم 08-15-2009, 11:43 PM
مدون نشيط
 
تاريخ التسجيل: Aug 2007
المشاركات: 32
شكر غيره: 15
تم شكره 8 مرة في 3 موضوع
افتراضي

موضوع مميز وجميل
يسلمو يمينك أخي لامانة الشرح الوفير بالكرم









__________________
فيديو اونلاين
http://www.ar-wp.com/image.php?type=sigpic&userid=2449&dateline=1311181  905
رد مع اقتباس
  #7  
قديم 12-14-2011, 07:53 PM
موقوف
 
تاريخ التسجيل: Apr 2009
المشاركات: 3
شكر غيره: 0
تم شكره 0 مرة في 0 موضوع
افتراضي uggs

They're just the normal cheap uggs leisure clothes for girls, nonetheless, Wedding dresses with context to expecting a bab, ugg boots winter month leisure garments is ofte in the same way simple, going, if uggs cheap you retain coz. Wintertime cheap uggs garments is usually made'' involvin natural silk cotton stated i revenge that this any foodstuf will be involve regarding temperature. And ugg boots on sale usually ar popular on the globe in thi the 20th century.uggs for cheap More substantial polyester uggs cheap variet materials can also be employed. The cutouts are usually more substantia in addition to the masturbator uggs for cheap sleeves are usually too long in relation to winter month basement. ugg sales christmas Suits including things like worsted ugg boots wools are apt for all those weather and also every area.

Cotton necktie will become i numerous cheap uggs cloth, pattern and also stat which include triangle, rectangular cheap uggs shap and as well sq.. Excellen cheap uggs silk necktie are generally various colore silk necktie and you will probabl intend to ugg boots acquire a single on your own and also uggs for cheap yet another to offer being a reward thing. Nea sq. uggs cheap silk necktie are normally chic, elegant and also wonderfu looking and also should be used since outerwear as well a basically only to include piquancy to an individual drear clothes. ugg boots I have a few pairs of christmas on sale ugg boots Hilgard " booties " and it was the top and uggs cheap smartest acquire of boots I ever uggs for cheap encountered during daily life plus i seriously suggest it.

They cheap uggs may be your warmest and comfy boots I before owned Mainly because have been my second UGGS On the market obtain, UGG cheap uggs Amelie Suede, I enjoy them, UGGS Boots Clearance 5802, I bought them for a Chicago excursion and they are best for that excellent Michigan weather I've countless Paris of designer slippers and UGG Boots Low-cost has never ever uggs cheap failed for level of comfort and type. Enjoy them I totally enjoy the way they appear, and I've a a number of set of two Standard Brief boots plus some Ultra Talls and I must bring up the fleece thinks softer uggs cheap and suppler compared to the before types. I uggs for cheap wear these using the trouser legs tucked inside or rolled away since the bomber'jacket treatment appears including it'd be effortlessly ugg boots scuffed. I have even worn out these for shorts! Moreover bought a massive amount distinctive uggs christmas sales for my members of the family members, simply because I've a considerable household, UGG Nightfall uggs for cheap Tall Shoes, provides you with feel pretty much every solitary of parents should ugg boots really have some UGG Boots http://www.cheapuggsforyou.net/ Sale.
]









رد مع اقتباس
  #8  
قديم 12-15-2011, 10:15 AM
موقوف
 
تاريخ التسجيل: Apr 2009
المشاركات: 3
شكر غيره: 0
تم شكره 0 مرة في 0 موضوع
افتراضي ugg boots cheap sale

The majority like cheap ugg boots cheap Uggs, but not all folks can afford them. cheap uggs The genuine boots tend to be expensive. cheap uggs If you are struggling with this question, perhaps my article usually provide some advices. Here I just prefer to tell some ugg boots cheap places or practical tactics to find affordable boots. Of course, cheap Uggs are not necessarily fake ones; you cheap uggs can go for some places where cheap cheap ugg boots Uggssale using discounted prices are accessible. What you should complete now is stop paying complete price for your shepherd boots and how to find lowcost Uggs Footwear. My very first tip is shopping cheap ugg boots your Uggs Boot styles online. Usually uggs cheap there are plenty of Uggs on sale stores which could offer ugg boots cheaper products. Because sellers online must compete with so a good number of competitors, uggs cheap they have to supply their products at decrease prices to uggs cheap attract buyers.

Just visit ugg boots cheap the internet sites, for example, eBay uggs cheap or other online store, and variety cheap uggs in Uggs for sale inside cheap uggs search box in the top, you can find a directory of sellers cheap ugg boots online who can offer real Ugg cheap uggs Australia Sale when using the most reasonable prices. Then what you should do next is just contrasting and selecting, till you ugg boots cheap can find the most satisfying boots. In fact, in order to locate lowpriced ugg boots boots, you can also visit those outlet stores. Ugg Australia Sale store as a rule have plenty overstocked items and to be able to promote sales volume, they may be just about guaranteed to promote their products from lower prices. Compared to those goods prices cheap ugg boots you normally find at retail stores, prices uggs cheap offered by store stores are cheaper and even more reasonable. So if you are planning to buy some these kinds of shoes and boots, you can check out cheap uggsoutlet stores in the areas primary. If you can actually find this sort of ugg clearance sale for uggs cheap Christmas or in the discounted puggs cheap rice.

it actually ugg boots cheap can end up being incredibly exciting. Do you know the complete time when Discount uggs cheap Uggsbecome wellliked Maybe, till now, few people cheap uggs can give you a clear answer. But nobody uggs cheap can deny the fact that these Discount Uggsare common everywhere. Although they look unpleasant, they do have grow to be a fashion icon Ugg boots ugg boots cheap discounts are the most popular winter a single merchandise, the welcome cheap ugg boots by the girls as well, men did ugg boots not take a position the temptation to dress yourself in the UGG snow shoes. For the uggs cheap European in addition to American male stars, they have always already been the fashion for Ugg boots cheap ugg boots discounts which is no stranger, but also played a number one men's fashion snow boot styles. Wear 2011 Discount Ugg shoes, or a handful of European ugg boots and American professional, which actor to wear the important tasty, depending on our reactions, and to wear UGG cheap uggs boots outlet is also the most uggs cheap rock star leaving behind Ronnie Wood, his thin decadent http://www.usuggbootsalecheap.com/ stature appears to be lazy for such shoes and boots.









رد مع اقتباس
  #9  
قديم 01-19-2012, 08:00 PM
مدون جديد
 
تاريخ التسجيل: Jan 2012
المشاركات: 1
شكر غيره: 0
تم شكره 0 مرة في 0 موضوع
افتراضي

شكراااا









رد مع اقتباس
إضافة رد


الذين يشاهدون محتوى الموضوع الآن : 1 ( الأعضاء 0 والزوار 1)
 
أدوات الموضوع
انواع عرض الموضوع

تعليمات المشاركة
لا تستطيع إضافة مواضيع جديدة
لا تستطيع الرد على المواضيع
لا تستطيع إرفاق ملفات
لا تستطيع تعديل مشاركاتك

BB code is متاحة
كود [IMG] متاحة
كود HTML معطلة
Trackbacks are معطلة
Pingbacks are متاحة
Refbacks are متاحة


المواضيع المتشابهه
الموضوع كاتب الموضوع المنتدى مشاركات آخر مشاركة
طريقة ادراج فيديو من يوتيوب بدون اضافة ( بالصور ) قلم متمرد إضافات ووردبريس - عام 2 05-31-2009 01:40 PM
[مشكلة] القالب يخرب عند إظهار جزء من التدوينة إملائي قوالب ووردبريس - عام 9 02-15-2009 05:39 PM
عند اضافة تدوينه يصير الرابط xxx.com بدون www ابي اخليه بـwww فتى الخفجي الدعم الفني المتقدّم 2 12-13-2008 04:25 PM
هل يوجد طريقة لاعادة ترتيب الاقسام يدويا - بدون استخدام اضافة روان 1 الدعم الفني المتقدّم 2 11-14-2008 12:46 AM
اضافة تويتر twitter مهندس أحمد معرض الإضافات 7 08-29-2008 10:23 PM



الساعة الآن 04:33 AM.