النتائج 1 إلى 12 من 12

الموضوع: [MOD] صورة لكل قسم بـ4images

  1. #1
    Banned
    تاريخ التسجيل
    Sep 2005
    المشاركات
    335

    [MOD] صورة لكل قسم بـ4images



    بسم الله الرحمن الرحيم

    اسم الموديلز: صورة لكل قسم

    الملفات المطلوب تعديلها:
    global.php
    admin/categories.php
    admin/images.php (optional)
    includes/functions.php
    templates/<your template>/category_bit.html

    اولا: افتح global.php
    النسخة 1.7
    ابحث عن:
    كود PHP:
      $sql "SELECT c.cat_id, c.cat_name, c.cat_description, c.cat_parent_id, c.cat_hits, c.cat_order, c.auth_viewcat, c.auth_viewimage, c.auth_download, c.auth_upload, c.auth_directupload, c.auth_vote, c.auth_sendpostcard, c.auth_readcomment, c.auth_postcomment, COUNT(i.image_id) AS new_images 
    اضف بنهايته التالي:
    كود PHP:
    c.cat_image 
    فيصبح:
    كود PHP:
    $sql "SELECT c.cat_id, c.cat_name, c.cat_description, c.cat_parent_id, c.cat_hits, c.cat_order, c.auth_viewcat, c.auth_viewimage, c.auth_download, c.auth_upload, c.auth_directupload, c.auth_vote, c.auth_sendpostcard, c.auth_readcomment, c.auth_postcomment, COUNT(i.image_id) AS new_images, c.cat_image 
    النسخة 1.7.1
    ابحث عن:
    كود PHP:
      $sql "SELECT cat_id, cat_name, cat_description, cat_parent_id, cat_hits, cat_order, auth_viewcat, auth_viewimage, auth_download, auth_upload, auth_directupload, auth_vote, auth_sendpostcard, auth_readcomment, auth_postcomment 
    اضف بنهايته التالي:
    كود PHP:
    cat_image 
    فيصبح: (لاحظ اللون الاحمر(
    كود PHP:
    $sql "SELECT cat_id, cat_name, cat_description, cat_parent_id, cat_hits, cat_order, auth_viewcat, auth_viewimage, auth_download, auth_upload, auth_directupload, auth_vote, auth_sendpostcard, auth_readcomment, auth_postcomment, cat_image 
    ثانيا: افتح ملف
    admin/categories.php

    ابحث عن: (ستجدها مرتين(
    كود PHP:
      $auth_postcomment $HTTP_POST_VARS['auth_postcomment']; 
    اضف اسفلها التالي:
    كود PHP:
    //Category Image - trans by pepsi@swalif softs
      
    $cat_image = (intval($HTTP_POST_VARS['cat_image'])) ? intval($HTTP_POST_VARS['cat_image']) : 0
    //End Category Image 
    ________
    ابحث عن:
    كود PHP:
        $sql "INSERT INTO ".CATEGORIES_TABLE.
                (cat_name, cat_description, cat_parent_id, cat_order, auth_viewcat, auth_viewimage, auth_download, auth_upload, auth_directupload, auth_vote, auth_sendpostcard, auth_readcomment, auth_postcomment) 
                VALUES 
                ('
    $cat_name', '$cat_description', $cat_parent_id$cat_order$auth_viewcat$auth_viewimage$auth_download$auth_upload$auth_directupload$auth_vote$auth_sendpostcard$auth_readcomment$auth_postcomment)"
    استبدلها بــــ:
    كود PHP:
        $sql "INSERT INTO ".CATEGORIES_TABLE.
                (cat_name, cat_description, cat_parent_id, cat_order, auth_viewcat, auth_viewimage, auth_download, auth_upload, auth_directupload, auth_vote, auth_sendpostcard, auth_readcomment, auth_postcomment, cat_image) 
                VALUES 
                ('
    $cat_name', '$cat_description', $cat_parent_id$cat_order$auth_viewcat$auth_viewimage$auth_download$auth_upload$auth_directupload$auth_vote$auth_sendpostcard$auth_readcomment$auth_postcomment$cat_image)"
    __________
    ابحث عن:
    كود PHP:
      $sql "SELECT cat_name, cat_description, cat_parent_id, cat_hits, auth_viewcat, auth_viewimage, auth_download, auth_upload, auth_directupload, auth_vote, auth_sendpostcard, auth_readcomment, auth_postcomment 
    استبدلها بـــ:
    كود PHP:
      $sql "SELECT cat_name, cat_description, cat_parent_id, cat_hits, auth_viewcat, auth_viewimage, auth_download, auth_upload, auth_directupload, auth_vote, auth_sendpostcard, auth_readcomment, auth_postcomment, cat_image 
    _________
    ابحث عن:
    كود PHP:
      show_form_footer($lang['save_changes'], $lang['reset'], 2$lang['back']); 
    اضف قبله:
    كود PHP:
    // Category image  - trans by pepsi
      
    $cat_image ""
      if (
    $result['cat_image']) 
      { 
        
    $sql "SELECT image_id, image_media_file, image_thumb_file, image_name, cat_id 
                FROM "
    .IMAGES_TABLE.
                WHERE image_id = "
    .$result['cat_image']; 
        if (
    $image_row $site_db->query_firstrow($sql)) 
        { 
          if (!
    get_file_path($image_row['image_thumb_file'], "thumb"$image_row['cat_id'], 00)) 
          { 
            
    $cat_image ICON_PATH."/".get_file_extension($image_row['image_media_file']).".gif"
          } 
          else 
          { 
            
    $cat_image get_file_path($image_row['image_thumb_file'], "thumb"$image_row['cat_id'], 01); 
          } 
          
    $file_info = @getimagesize($cat_image); 
          
    $dim 50
          
    $width $file_info[0]; 
          
    $height $file_info[1]; 
          if (
    $width && $height) { 
            if (
    $width $dim || $height $dim) { 
              @
    $ratio $width $height
              if (
    $ratio 1) { 
                
    $new_width $dim
                
    $new_height round(($dim/$width) * $height); 
              }else { 
                
    $new_width round(($dim/$height) * $width); 
                
    $new_height $dim
              } 
            }else{ 
              
    $new_width $width
              
    $new_height $height
            } 
          }else{ 
            
    $new_width $dim
            
    $new_height $dim
          } 
          
    $cat_image "<a href=\"".$site_sess->url(ROOT_PATH."details.php?image_id=".$result['cat_image'])."\" target=\"_blank\"><img src=\"".$cat_image."\" width=\"".$new_width."\" height=\"".$new_height."\"></a>&nbsp;<a href=\"".$site_sess->url(ROOT_PATH."details.php?image_id=".$result['cat_image'])."\" target=\"_blank\">".$image_row['image_name']."</a>"
        } 
        
      } 
      
    $value $result['cat_image']; 
      if (isset(
    $HTTP_POST_VARS['cat_image'])/* && $value == ""*/) { 
        
    $value stripslashes($HTTP_POST_VARS['cat_image']); 
      } 
      echo 
    "<tr class=\"".get_row_bg()."\">\n<td><p class=\"rowtitle\">رقم صورة القسم</p></td>\n<td><p><input type=\"text\" size=\"5\" name=\"cat_image\" value=\"".$value."\">&nbsp;$cat_image</p></td>\n</tr>\n"
    //End Category image 
    _______
    ابحث عن:
    كود PHP:
      $sql "SELECT cat_id, cat_name, cat_description, cat_parent_id, cat_hits, cat_order, auth_viewcat, auth_viewimage, auth_download, auth_upload, auth_directupload, auth_vote, auth_sendpostcard, auth_readcomment, auth_postcomment 
    استبدلها بـــ:
    كود PHP:
      $sql "SELECT cat_id, cat_name, cat_description, cat_parent_id, cat_hits, cat_order, auth_viewcat, auth_viewimage, auth_download, auth_upload, auth_directupload, auth_vote, auth_sendpostcard, auth_readcomment, auth_postcomment, cat_image 
    ثالثا: افتح ملف
    includes/functions.php

    ابحث عن:
    كود PHP:
        if (defined("SHOW_RANDOM_IMAGE") && SHOW_RANDOM_IMAGE == || defined("SHOW_RANDOM_CAT_IMAGE") && SHOW_RANDOM_CAT_IMAGE == 0) { 
    اضف قبلها:
    كود PHP:
        $cat_image ""
        if (
    $cat_cache[$category_id]['cat_image']) 
        { 
          
    $sql "SELECT image_id, image_media_file, image_thumb_file, cat_id 
                  FROM "
    .IMAGES_TABLE.
                  WHERE image_id = "
    .$cat_cache[$category_id]['cat_image']; 
          if (
    $image_row $site_db->query_firstrow($sql)) 
          { 
            if (!
    get_file_path($image_row['image_thumb_file'], "thumb"$image_row['cat_id'], 00)) 
            { 
              
    $cat_image ICON_PATH."/".get_file_extension($image_row['image_media_file']).".gif"
            } 
            else 
            { 
              
    $cat_image get_file_path($image_row['image_thumb_file'], "thumb"$image_row['cat_id'], 01); 
            } 
          } 
        } 
        
    $site_template->register_vars("cat_image"$cat_image); 

    رابعا: الاضافة الى التمبلت
    templates/<your template>/category_bit.html
    <your template> = التمبلت المستخدم في السكربت

    ضع الكود التالي في المكان الذي تريد به ظهور الصورة:
    كود PHP:
    {if cat_image}<img src="{cat_image}">{endif cat_image
    رابعا:
    ارفع الملف المرفق الى موقعك واطلبه وسوف يتم تنصيب الموديلز بالقاعدة الخاصة بالسكربت، بعد ذلك يرجى حذفه من الموقع.


    مثال:
    http://www.thekryat.net/gallery/index.php
    لاتوجد اي علاقة بيني وبين صاحب الموقع من اي ناحية، وضعت الموقع فقط كمثال !

    ملاحظة: قمت بتعريب الدرس من الموقع الاصلي + تركيب الموديلز على احد مواقع الاصدقاء


    سلاااااااااااااااااااااااااااااااااام







  2. #2
    عضو نشيط جدا
    تاريخ التسجيل
    Sep 2003
    المشاركات
    489


    جزاك الله خير على الشرح الوافي






  3. #3
    عضو فعال
    تاريخ التسجيل
    Mar 2005
    المشاركات
    1,482


    شرح تمااااااااااام



    مشكور يا باشا على الشرح الرائع





    __________________

    D0 Th3 B3$T 2B Th3 B3$T !
    L1nux - L1f3 Fr33 0R D13

  4. #4
    عضو سوبر نشيط
    تاريخ التسجيل
    Sep 2005
    المشاركات
    999


    عجيب والله انتا ونكك شهانى اشر بيبسي

    مشكوووووووووور






  5. #5
    عضو نشيط
    تاريخ التسجيل
    Nov 2005
    المشاركات
    84


    موديلز و شرح اكثر من رائع

    الف شكر لك بيبسي






  6. #6
    عضو نشيط
    تاريخ التسجيل
    Feb 2004
    المشاركات
    190


    شكرا على الشرح والتعريب بس وين ملف installer? اللي بيضيف cat_image لقاعدة البيانات؟؟

    :shy: يمكن انا محول من النعس لول او مش شايفه






  7. #7
    Banned
    تاريخ التسجيل
    Sep 2005
    المشاركات
    335


    شكرا جميعا لردودكم

    بس نسينا شغلة بسيطة ذكرنا فيها الاخ TXtaholic

    ملف الـinstall
    http://drr.cc/up12/catimage_install.zip

    فقط ارفعه الى مجلد القالري واطلبه عبر المتصفح

    نصحية: قم بأخذ نسخة احتياطية قبل طلب ملف الـinstall






  8. #8
    عضو سوبر نشيط
    تاريخ التسجيل
    Sep 2005
    المشاركات
    999


    اخوى بيبسي ممكن ايملك ؟؟؟






  9. #9
    عضو فعال جدا
    تاريخ التسجيل
    Oct 2003
    المشاركات
    2,775


    مود ولا أروع
    شكر خاص لك بيبسي ماااااااان

    ههه
    اخوك الغريم






  10. #10
    عضو فعال
    تاريخ التسجيل
    Jun 2003
    المشاركات
    1,782


    اقتباس المشاركة الأصلية كتبت بواسطة ChanZeen
    اخوى بيبسي ممكن ايملك ؟؟؟
    Banned ماراح يقدر يرد عليك






  11. #11
    عضو نشيط
    تاريخ التسجيل
    Oct 2005
    المشاركات
    283


    شكرا على الموديل أخوي






  12. #12
    عضو سوبر نشيط
    تاريخ التسجيل
    Sep 2005
    المشاركات
    999


    ابي ايميله شلون










ضوابط المشاركة

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

أضف موقعك هنا| اخبار السيارات | حراج | شقق للايجار في الكويت | بيوت للبيع في الكويت | دليل الكويت العقاري | مقروء | شركة كشف تسربات المياه | شركة عزل اسطح بالرياض | عزل فوم بالرياض| عزل اسطح بالرياض | كشف تسربات المياة بالرياض | شركة عزل اسطح بالرياض