-
المساهمات
24 -
تاريخ الانضمام
-
تاريخ آخر زيارة
آخر الزوار
لوحة آخر الزوار معطلة ولن تظهر للأعضاء
إنجازات Marwan Elatta

عضو مساهم (2/3)
20
السمعة بالموقع
-
شكرا للتوضيح. تفعيل وضع التصحيح لا ينتج عنه اي رسائل خطأ مبدئيا قمت بتعليق الاسطر ويبدو ان المشكلة تختفي عند تعليق السطر // require_once(get_template_directory() . '/includes/category-items.php') الملف (category-items.php) يحتوي على الكود التالي ارجو التنبيه اذا كان يحتوي على اي خطأ واضح: <?php // المسار الأساسي لصور الفنانين define('ARTISTS_IMAGE_PATH', get_template_directory_uri() . '/images/'); // دالة رئيسية لجلب فنانين حسب التصنيف function get_category_artists($category_type) { $artist_functions = array( 'roaad' => 'get_roaad_artists', 'modern' => 'get_modern_artists', 'hakiba' => 'get_hakiba_artists', 'shaabi' => 'get_shaabi_artists', 'female_voices' => 'get_female_voices_artists' ); // استدعاء الدالة المناسبة للتصنيف if (isset($artist_functions[$category_type]) && function_exists($artist_functions[$category_type])) { $artists = $artist_functions[$category_type](); // ترتيب الفنانين أبجديًا usort($artists, function($a, $b) { return strcmp($a['name'], $b['name']); }); return $artists; } return array(); }
-
الكود المرفق تتم طباعته على الصفحة ويظهر عند عرض الصفحة في المتصفح. عندما استبدله باي كود آخر مؤقت او تشخيصي تختفي المشكلة. هذا هو الكود : <?php /* Template Name: قالب صفحة الفئات */ get_header(); // استيراد ملفات التصنيفات require_once(get_template_directory() . '/includes/category-items.php'); require_once(get_template_directory() . '/includes/artists-roaad.php'); require_once(get_template_directory() . '/includes/artists-modern.php'); require_once(get_template_directory() . '/includes/artists-hakiba.php'); require_once(get_template_directory() . '/includes/artists-shaabi.php'); require_once(get_template_directory() . '/includes/artists-female-voices.php'); // جلب نوع التصنيف من عنوان الصفحة $page_title = get_the_title(); // مصفوفة المطابقة بين عناوين الصفحات وأنواع التصنيفات $title_to_type = array( 'أغاني الرواد' => 'roaad', 'الغناء الحديث' => 'modern', 'أغاني الحقيبة' => 'hakiba', 'الغناء الشعبي' => 'shaabi', 'الأصوات النسائية' => 'female_voices' ); // تحديد نوع التصنيف $category_type = isset($title_to_type[$page_title]) ? $title_to_type[$page_title] : ''; // جلب وصف التصنيف من محتوى الصفحة $category_description = get_the_content(); // جلب الفنانين $category_items = get_category_artists($category_type); ?> <!-- إضافة تنسيق CSS مع العناصر الدائرية وحجم أصغر --> <style> .items-grid { display: flex; flex-wrap: wrap; justify-content: flex-start; gap: 10px; direction: rtl; padding: 10px; } .grid-item { /* تقليل الحجم إلى النصف - زيادة عدد العناصر في الصف */ flex: 0 0 calc(12.5% - 10px); /* 8 عناصر في الصف */ margin-bottom: 10px; box-shadow: 0 1px 3px rgba(0,0,0,0.1); transition: transform 0.2s ease, box-shadow 0.2s ease; border-radius: 50%; /* جعل العناصر دائرية */ overflow: hidden; } @media (max-width: 1600px) { .grid-item { flex: 0 0 calc(14.285% - 10px); /* 7 عناصر في الصف */ } } @media (max-width: 1400px) { .grid-item { flex: 0 0 calc(16.666% - 10px); /* 6 عناصر في الصف */ } } @media (max-width: 1200px) { .grid-item { flex: 0 0 calc(20% - 10px); /* 5 عناصر في الصف */ } } @media (max-width: 992px) { .grid-item { flex: 0 0 calc(25% - 10px); /* 4 عناصر في الصف */ } } @media (max-width: 768px) { .grid-item { flex: 0 0 calc(33.333% - 10px); /* 3 عناصر في الصف */ } } @media (max-width: 576px) { .grid-item { flex: 0 0 calc(50% - 10px); /* 2 عناصر في الصف */ } } .grid-item:hover { transform: translateY(-2px); box-shadow: 0 3px 8px rgba(0,0,0,0.15); } .grid-item-image { position: relative; width: 100%; padding-top: 100%; /* نسبة 1:1 لإنشاء دائرة متساوية */ } .grid-item img { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; display: block; } .grid-item-content { position: absolute; bottom: 0; left: 0; right: 0; background: #003366; /* تم تغيير الخلفية إلى اللون الأزرق الداكن */ padding: 6px; text-align: center; } .grid-item-title { margin: 0; font-size: 14px; /* زيادة حجم الخط إلى 14px كما طلبت */ line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .grid-item-title a { color: white; /* تغيير لون النص للتباين مع خلفية تراكب شفافة */ text-decoration: none; } .grid-item-title a:hover { color: #f0f0f0; } .category-description { text-align: right; padding: 10px 15px; margin-bottom: 15px; } </style> <div class="container-fluid"> <?php if (!empty($category_description)): ?> <div class="category-description"> <?php echo esc_html($category_description); ?> </div> <?php endif; ?> <div class="items-grid"> <?php if (!empty($category_items)): ?> <?php foreach ($category_items as $item): ?> <div class="grid-item"> <div class="grid-item-image"> <a href="<?php echo esc_url($item['url']); ?>"> <img src="<?php echo esc_url($item['image']); ?>" alt="<?php echo esc_attr($item['name']); ?>"> </a> <div class="grid-item-content"> <h3 class="grid-item-title"> <a href="<?php echo esc_url($item['url']); ?>"><?php echo esc_html($item['name']); ?></a> </h3> </div> </div> </div> <?php endforeach; ?> <?php else: ?> <p style="text-align: center; width: 100%;">لا توجد عناصر في هذه الفئة</p> <?php endif; ?> </div> </div> <?php get_footer(); ?>
- 5 اجابة
-
- 1
-
-
الاسكربت لموقع موسيقي لرفع ومشاركة ملفات صوتية. عند استخدام الكود الذي ذكرته فالنتيجة هي: Fatal error: Uncaught Error: Call to undefined method loader::prepare() in /home/vol17_1/infinityfree.com/if0_38415802/htdocs/app/core/class_db.php:2 Stack trace: #0 /home/vol17_1/infinityfree.com/if0_38415802/htdocs/app/core/class_loader.php(60): require_once() #1 /home/vol17_1/infinityfree.com/if0_38415802/htdocs/app/loader.php(22): loader->_require_core_files('db') #2 /home/vol17_1/infinityfree.com/if0_38415802/htdocs/index.php(6): require_once('/home/vol17_1/i...') #3 {main} thrown in /home/vol17_1/infinityfree.com/if0_38415802/htdocs/app/core/class_db.php on line 2
-
هل يمكن ان تكون هنا المشكلة <?php if ( !defined( "root" ) ) die; class db extends mysqli { protected $cache = array(); public $debug = false; public $log = false; public function __construct( $loader ){ $this->loader = $loader; // Try to connect to DB parent::__construct( db_host, db_user, db_pass, db_name ); if( mysqli_connect_errno() ) { echo "Failed to connect to Database <br>\n"; echo "You have to run the installer or edit app/config.php and put in the right database information"; throw new exception(mysqli_connect_error(), mysqli_connect_errno()); exit; die; } parent::set_charset("utf8mb4"); }
-
ليس هنالك خطأ. لكن الموقع لا يفتح وتظهر هذه الرسالة. الموضع الذي وجدت به ;echo $query في ملف class-db.php هو التالي، وعندما اقوم بحذفه يحذف الاستعلام ولكن تبقى الصفحة فارغة ولا تنتقل الى صفحة الموقع: public function prepare( $query, $generic = false ){ echo $query; $run = parent::prepare( $query ); $this->__log(array( "query" => $query, "__cf" => "prepare", "safe" => 1, "generic" => $generic ? 1 : 0, )); return $run; }
- 8 اجابة
-
- 2
-
-
السلام عليكم. بعد تصحيح الأخطاء ومراجعة التحذيرات تظهر الرسالة التالية . مرفق صور الجداول المذكورة SELECT * FROM _user_groups WHERE `ID` = ? ORDER BY ID ASC LIMIT 0, 1 SELECT * FROM _setting_admin WHERE `var` = ? LIMIT 0, 1
- 8 اجابة
-
- 3
-
-
بعد حل المشكلة تظهر الرسالة التالية كيف استطيع تجاوزها لفتح الموقع: SELECT * FROM _user_groups WHERE ID = ? ORDER BY ID ASC LIMIT 0, 1 Warning : foreach() argument must be of type array|object, bool given in /home/vol17_1/infinityfree.com/if0_38415802/htdocs/app/core/class_user.php on line 1091 Warning : Trying to access array offset on value of type bool in /home/vol17_1/infinityfree.com/if0_38415802/htdocs/app/core/class_user.php on line 1100 Warning : Undefined array key “admin” in /home/vol17_1/infinityfree.com/if0_38415802/htdocs/app/core/class_user.php on line 456 Warning : Trying to access array offset on value of type bool in /home/vol17_1/infinityfree.com/if0_38415802/htdocs/app/core/class_user.php on line 459 SELECT * FROM _setting_admin WHERE var = ? LIMIT 0, 1 الاسطر المذكورة في الرسالة تحتوي على: 1091 {foreach( $group_data as $_gp_k => $_gp_v ) 1100 {if ( $group == $ID && $group_data[“admin_access”] ) 456 ;this->group_admin = $this->data[“admin”]$ 459 ;this->group_ID = $this->data[“group_data”][“ID”]$
-
لكن لا زال الموقع لا يفتح ويعطي نفس الرسالة الاخيرة كيف استطيع تجاوز هذه الرسالة
-
;DESCRIBE_users ID int(7) NO NULL GID int(2) NO NULL usernamevarchar(50)NONULL namevarchar(60)YESNULL passwordvarchar(60)NONULL emailvarchar(150)NONULL external_addressestextYESNULL avatartinytextYESNULL bg_imgtinytextYESNULL artistint(9)YESNULL artist_codevarchar(30)YESNULL verifiedint(1)YES0 verify_codevarchar(9)YESNULL fundfloatYES0 fund_totalfloatYES0 fund_revenuefloatYES0 followersint(11)YES0 followingsint(5)YES0 likesint(7)YES0 repostsint(7)YES0 commentsint(6)YES0 comments_likesint(6)YES0 comments_repliedint(6)YES0 media_commentsint(7)YES0 media_likesint(7)YES0 media_uploadsint(6)YES0 playlistsint(5)YES0 playlists_likesint(7)YES0 playlists_followersint(7)YES0 feed_settingtinytextYESNULL not_settingtinytextYESNULL email_settingtinytextYESNULL time_addtimestampYEScurrent_timestamp() time_verifytimestampYESNULL time_verify_trytimestampYESNULL time_paid_expiretimestampYESNULL time_notifiedtimestampYESNULL رسالة الخطأ الحالية SELECT * FROM _user_groups WHERE `ID` = ? ORDER BY ID ASC LIMIT 0, 1 بعد طباعة الquery بدون exit ظهرت الرسالة التالية: SELECT * FROM _user_groups WHERE `ID` = ? ORDER BY ID ASC LIMIT 0, 1 Warning: foreach() argument must be of type array|object, bool given in /home/vol17_1/infinityfree.com/if0_38415802/htdocs/app/core/class_user.php on line 1091 Warning: Trying to access array offset on value of type bool in /home/vol17_1/infinityfree.com/if0_38415802/htdocs/app/core/class_user.php on line 1100 Warning: Undefined array key "admin" in /home/vol17_1/infinityfree.com/if0_38415802/htdocs/app/core/class_user.php on line 456 Warning: Trying to access array offset on value of type bool in /home/vol17_1/infinityfree.com/if0_38415802/htdocs/app/core/class_user.php on line 459 SELECT * FROM _setting_admin WHERE `var` = ? LIMIT 0, 1 الأسطر المذكورة في الخطأ تحتوي على التالي: {1091foreach( $group_data as $_gp_k => $_gp_v ) {1100if ( $group == $ID && $group_data["admin_access"] ) ;456$this->group_admin = $this->data["admin"] ;459$this->group_ID = $this->data["group_data"]["ID"]
-
لا زال الخطأ قائماً
-
لم يحدث شيء بعد تطبيق العمود ID مرفق الجدول وملفات class_user.php و class_db.php class_db.php class_user.php
- 15 اجابة
-
- 1
-
-
- 15 اجابة
-
- 1
-
-
الاستعلام: SELECT * FROM _user_groups WHERE `ID` = ? ORDER BY ID ASC LIMIT 0, 1 الجدول لايحتوي على عمود ID
-
السطر 95 يحتوي على: ;$run = parent::prepare( $query)$ المشكلة أنني لم أستطع معرفةالعمود المقصود في قاعدة البيانات
- 15 اجابة
-
- 1
-