a:3:{s:6:"module";s:356:"a:12:{s:5:"title";s:14:"من البوم الصور";s:10:"identifier";s:13:"gallery_image";s:8:"filename";s:18:"gallery_random.php";s:7:"inctype";s:8:"php_file";s:6:"parent";s:0:"";s:12:"templatelist";s:25:"adv_portal_gallery_random";s:7:"colspan";s:1:"1";s:8:"formcode";s:0:"";s:11:"cleanoutput";s:1:"0";s:7:"options";s:0:"";s:8:"useshell";s:1:"1";s:4:"link";s:0:"";}";s:9:"templates";s:63:"a:1:{s:25:"adv_portal_gallery_random";s:16:"$randomimagebits";}";s:4:"file";s:5278:"= ' . $vbulletin->options['showvotes'] . ', votenum, 0) AS votenum, IF(votenum >= ' . $vbulletin->options['showvotes'] . ' AND votenum> 0, votetotal / votenum, 0) AS voteavg,'; $galleryorderby = 'voteavg DESC, votenum DESC'; break; case 5: $galleryorderby = 'RAND()'; break; default: $galleryorderby = 'dateline DESC'; } //Latest Images In ForumHome BEGIN require_once('./includes/functions_gallery.php'); $categorycache = unserialize($vbulletin->gallery_c_cache); $galleryoptions = unserialize($vbulletin->adv_gallery_opt); $gallery_permissions = unserialize($vbulletin->gallery_ugroups); if (!empty($vba_options)) { $vba_options = array_merge($vba_options, $galleryoptions); } else { $vba_options = $galleryoptions; } $vbulletin->userinfo['usergrouparray'] = fetch_membergroupids_array($vbulletin->userinfo); if (empty($vbulletin->userinfo['usergrouparray'])) { $vbulletin->userinfo['usergrouparray'] = array(1); } foreach ($vbulletin->userinfo['usergrouparray'] AS $usergroupid) { if (empty($gallery_permissions["$usergroupid"])) { $usergroupid = 1; } foreach ($gallerypermissionsbit AS $option => $value) { if (in_array($option, array('moderateimages', 'moderateposts')) AND $userperms["$option"] == 0 AND isset($galleryperms["$option"])) { continue; } if (!$galleryperms["$option"] OR in_array($option, array('moderateimages', 'moderateposts'))) { $galleryperms["$option"] = 0; if ($gallery_permissions["$usergroupid"]['gallery_perms'] & $value) { $galleryperms["$option"] = 1; } } } foreach ($gallery_permissions["$usergroupid"] AS $option => $value) { if (($option == 'gallery_maxcats' AND !($gallery_permissions["$usergroupid"]['gallery_perms'] & $gallerypermissionsbit['cancreatecategories'])) OR ($option == 'gallery_maxdiskspace' AND !($gallery_permissions["$usergroupid"]['gallery_perms'] & $gallerypermissionsbit['canuploadimages']))) { continue; } if (((($value > $galleryperms["$option"] AND $galleryperms["$option"] != '0') OR !$value) AND $option != 'gallery_perms')) { $galleryperms["$option"] = $value; } } } // Create a list of fields to be shown in the imagebit $showfield = explode(',', $vba_options['gallery_imagebitdisplay']); if (!empty($showfield)) { $showfields = array(); foreach ($showfield AS $field) { $showfields["$field"] = 1; } } // If you DON'T want these fields to show then value = "0" (zerro) $showfields['title'] = 0; $showfields['description'] = 0; $showfields['rating'] = 0; $showfields['user'] = 0; $showfields['dateline'] = 0; $showfields['views'] = 0; $showfields['dimensions'] = 0; $showfields['filesize'] = 0; $showfields['posts'] = 0; $showfields['lastpost'] = 0; $show['category'] = 0; // End Field edits require_once('./includes/class_bbcode.php'); $query = fetch_image_fields(); // Get a list of categories to be EXCLUDED from our query if ($privatecatids = fetch_private_categories()) { $privcatids = 'images.catid NOT IN(' . $privatecatids . ') AND '; } if (!empty($catlimit)) { $getrand = $db->query_read(" SELECT imageid, images.title, filename, thumbname, originalname, extension, images.catid $query[fields] FROM " . TABLE_PREFIX . "adv_gallery_images AS images $query[tables] WHERE $privcatids valid = 1 $ignquery AND images.catid in ($catlimit) ORDER BY $galleryorderby LIMIT 1 "); }else{ $getrand = $db->query_read(" SELECT imageid, images.title, filename, thumbname, originalname, extension, images.catid $query[fields] FROM " . TABLE_PREFIX . "adv_gallery_images AS images $query[tables] WHERE $privcatids valid = 1 $ignquery ORDER BY $galleryorderby LIMIT 1 "); } if ($db->num_rows($getrand)) { while ($images = $db->fetch_array($getrand)) { $adv_sorturl = '&catid=' . $images['catid']; $randomimagebits .= construct_imagebits($images); } // $randomimagebits .= construct_empty_cellbits($vba_options['gallery_columns']); } $db->free_result($getrand); unset($images); unset($option); // ### Update the template to have the path qualified ### $randomimagebits = str_replace(array('"showimage.php', '"browseimages.php'), array('"' . $vba_options['gallery_url'] . '/showimage.php', '"' . $vba_options['gallery_url'] . '/browseimages.php'), $randomimagebits); //Latest Images In ForumHome END // Slipstream the output into the content eval('$home[$mods[\'modid\']][\'content\'] = "' . fetch_template('adv_portal_gallery_random') . '";'); ?> ";}