|
|
#1
| |||||||
| |||||||
اصنع معرض الصور من البومات وصر الاعضاء بشكل مستقل ...... تصحيح اخطاء التعديل القديم الأن البومات صور جميع الأعضاء منفردة وعرضها جميعها في صفحة وحدة وجعلها كمعرض صور تصحيح الأخطاء في التعديل الاول 1- الزوار لا يستطيعون رؤية المعرض 2- عدد الالبومات فقط 10 3- عدم القدرة على التنقل بين لاصفحات كل ما عليك هو التعديل على ملف الألبوم المسمى album.php 1- قم بتنزيل ملف album.php قم بتغيير اسم الملف الى gallery 3- قم بفتحة بالنوتة وقم بالتعديلات التالية علية في السطر 87 ابحث عن [PHP] if (empty($_REQUEST['do'])) { if (!empty($_REQUEST['albumid'])) { if (!empty($_REQUEST['pictureid'])) { $_REQUEST['do'] = 'picture'; } else { $_REQUEST['do'] = 'album'; } } else { $_REQUEST['do'] = 'user'; } } [/PHP] [PHP] if (empty($_REQUEST['do'])) { if (!empty($_REQUEST['albumid'])) { if (!empty($_REQUEST['pictureid'])) { // $_REQUEST['do'] = 'picture'; } else { // $_REQUEST['do'] = 'album'; } } else { //$_REQUEST['do'] = 'user'; } } // only allow viewing of album list only $_REQUEST['do'] = 'user'; [/PHP] [PHP] if (!$vbulletin->GPC['userid']) { print_no_permission(); } [/PHP] [PHP] // add default useid to get rid of ?u=1 $vbulletin->GPC['userid'] = "1"; if (!$vbulletin->GPC['userid']) { print_no_permission(); } [/PHP] [PHP] $state = array('public'); if (can_view_private_albums($userinfo['userid'])) { $state[] = 'private'; } if (can_view_profile_albums($userinfo['userid'])) { $state[] = 'profile'; } [/PHP] [PHP] $state = array('public'); if (can_view_private_albums($userinfo['userid'])) { // $state[] = 'private'; } if (can_view_profile_albums($userinfo['userid'])) { // $state[] = 'profile'; } // force public albums only $state[] = 'public'; [/PHP] [PHP] $albumcount = $db->query_first(" SELECT COUNT(*) AS total FROM " . TABLE_PREFIX . "album WHERE userid = $userinfo[userid] AND state IN ('" . implode("', '", $state) . "') "); [/PHP] [PHP] // take out "WHERE userid = $userinfo[userid]" and change "AND state IN" to "WHERE state IN" $albumcount = $db->query_first(" SELECT COUNT(*) AS total FROM " . TABLE_PREFIX . "album WHERE state IN ('" . implode("', '", $state) . "') "); [/PHP] [PHP] // fetch data and prepare data $albums = $db->query_read(" SELECT album.*, picture.pictureid, picture.extension, picture.idhash, picture.thumbnail_dateline, picture.thumbnail_width, picture.thumbnail_height $hook_query_fields FROM " . TABLE_PREFIX . "album AS album LEFT JOIN " . TABLE_PREFIX . "picture AS picture ON (album.coverpictureid = picture.pictureid AND picture.thumbnail_filesize > 0) $hook_query_joins WHERE album.userid = $userinfo[userid] AND album.state IN ('" . implode("', '", $state) . "') $hook_query_where ORDER BY album.lastpicturedate DESC LIMIT $start, $perpage "); [/PHP] [PHP] // fetch data and prepare data - // take out "WHERE album.userid = $userinfo[userid]" and change "AND album.state IN" to "WHERE album.state IN" // take out $hooks for time being $albums = $db->query_read(" SELECT album.*, picture.pictureid, picture.extension, picture.idhash, picture.thumbnail_dateline, picture.thumbnail_width, picture.thumbnail_height FROM " . TABLE_PREFIX . "album AS album LEFT JOIN " . TABLE_PREFIX . "picture AS picture ON (album.coverpictureid = picture.pictureid AND picture.thumbnail_filesize > 0) WHERE album.state IN ('" . implode("', '", $state) . "') ORDER BY album.lastpicturedate DESC LIMIT $start, $perpage "); [/PHP] في السطر 1536 ابحث عن [PHP] $pagenav = construct_page_nav($pagenumber, $perpage, $albumcount['total'], album.php?' . $vbulletin->session->vars['sessionurl'] . "u=$userinfo[userid]", ' ); [/PHP] استبدلة ب [PHP] // add default userid to enable guest viewing when paging $userinfo[userid] = "1"; // change album.php to gallery.php or what ever you called the new file $pagenav = construct_page_nav($pagenumber, $perpage, $albumcount['total'], 'gallery.php?' . $vbulletin->session->vars['sessionurl'] . "u=$userinfo[userid]", '' ); [/PHP] في السطر 1548 : ابحث عن [PHP] // navbar and final output $navbits = construct_navbits(array( 'member.php?' . $vbulletin->session->vars['sessionurl'] . "u=$userinfo[userid]" => construct_phrase($vbphrase['xs_profile'], $userinfo['username']), '' => $vbphrase['albums'] [/PHP] استبدلة ب [PHP] // navbar and final output $navbits = construct_navbits(array( 'member.php?' . $vbulletin->session->vars['sessionurl'] . "u=$userinfo[userid]" => "", '' => $vbphrase['albums'] [/PHP] تعديلات ملفات اليوم المصدر: منتديات مدينة الاحلام hwku luvq hgw,v lk hgf,lhj ,wv hghuqhx fa;g lsjrg >>>>>> jwpdp ho'hx hgju]dg hgr]dl |
مواقع النشر (المفضلة) |
| |
Powered by vBulletin Version 3.8.7 Copyright ©2000 - 2024, Jelsoft Enterprises Ltd ترقية وتطوير: مجموعة الدعم العربى |