3.0.0MPAKÿüÌINFOÌüÿ# # This file contains Installation Informations. # This file does not include Installation Instructions for the normal User. # Please do not edit this file if you are not the Module Author. # # Please read the provided install.txt for Informations on how to install this Module. # # Module Name [name] Last Created Album Posts [/name] # Module Directory Name [short_name] last_created_album_posts [/short_name] # your name [author] Wicher [/author] # your email [email] n/a [/email] # your webpage url [url] http://www.detecties.com/phpbb2018 [/url] # module version [version] 1.0.3 [/version] # required minimum Statistics Mod Version [stats_mod_version] 4.1.6 [/stats_mod_version] # default update time // Leave this at 0 for this module [update_time] 0 [/update_time] [check_update_site] http://www.detecties.com/phpbb2018 [/check_update_site] # extra info for the user [extra_info] This Module displays the last created album posts at your board. [/extra_info] ÌÌÿINFOÿÌÌÿüÌLANGÌüÿ'; // [/lang_english] // [lang_dutch] $lang['module_name'] = 'Laatste Album Invoegingen'; $lang['start_date'] = 'Gepost op'; $lang['posted_in'] = 'Beschrijving'; $lang['post'] = 'ID / Titel'; $lang['br'] = '
'; // [/lang_dutch] // [lang_german] $lang['module_name'] = 'Letzte Album-Pfosten'; $lang['start_date'] = 'Bekanntgegeben'; $lang['posted_in'] = 'Im Thema'; $lang['post'] = 'ID / Titel'; $lang['br'] = '
'; // [/lang_german] // [lang_italian] $lang['module_name'] = 'Ultimi Alberini Dell\'Album'; $lang['start_date'] = 'Inviato'; $lang['posted_in'] = 'Descrizione'; $lang['post'] = 'ID / Titolo'; $lang['br'] = '
'; // [/lang_italian] // [lang_spanish] $lang['module_name'] = 'Postes Pasados Del Álbum'; $lang['start_date'] = 'Fijado'; $lang['posted_in'] = 'Descripción'; $lang['post'] = 'ID / Título'; $lang['br'] = '
'; // [/lang_spanish] ?>ÌÌÿLANGÿÌÌÿüÌMODÌüÿstart_module(true); $core->set_content('statistical'); $core->set_view('rows', $core->return_limit); $core->set_view('columns', 4); $core->define_view('set_columns', array( $core->pre_defined('rank'), 'post' => $lang['post'], 'start_date' => $lang['start_date'], 'in' => $lang['posted_in']) ); $core->set_header($lang['module_name']); $core->assign_defined_view('align_rows', array( 'left', 'center', 'left', 'left') ); $core->assign_defined_view('width_rows', array( '5%', '', '30%', '') ); // check if mod installed and if yes, do the apropreate actions $sql = "SELECT pic_user_id, pic_username, pic_time, pic_user_id, pic_cat_id FROM " . ALBUM_TABLE; if (!$result = $db->sql_query($sql)) { $there=0; } else { $there=1; if (file_exists($phpbb_root_path.'album_mod/album_hierarchy_auth.php')) { if (!$allowed_cat) { // Get general album information $album_root_path = $phpbb_root_path . ALBUM_MOD_PATH . ''; include_once($album_root_path . 'album_common.' . $phpEx); $album_view_mode = ''; $album_user_id = ALBUM_PUBLIC_GALLERY; $catrows = array (); $options = ($album_view_mode == ALBUM_VIEW_LIST ) ? ALBUM_READ_ALL_CATEGORIES|ALBUM_AUTH_VIEW : ALBUM_AUTH_VIEW; $catrows = album_read_tree($album_user_id, $options); // -------------------------------- // Build allowed category-list (for recent pics after here) // $catrows array now stores all categories which this user can view. // -------------------------------- $allowed_cat = ''; // For Recent Public Pics below for ($i = 0; $i < count($catrows); $i ++) { // -------------------------------- // build list of allowd category id's // -------------------------------- $allowed_cat .= ($allowed_cat == '') ? $catrows[$i]['cat_id'] : ','.$catrows[$i]['cat_id']; } } } else { if (!$allowed_cat) { // Get general album information $album_root_path = $phpbb_root_path . 'album_mod/'; include_once($album_root_path . 'album_common.' . $phpEx); $sql = "SELECT c.*, COUNT(p.pic_id) AS count FROM ". ALBUM_CAT_TABLE ." AS c LEFT JOIN ". ALBUM_TABLE ." AS p ON c.cat_id = p.pic_cat_id WHERE cat_id <> 0 GROUP BY cat_id ORDER BY cat_order ASC"; if( !($result = $db->sql_query($sql)) ) { message_die(GENERAL_ERROR, 'Could not query categories list', '', __LINE__, __FILE__, $sql); } $catrows = array(); while( $row = $db->sql_fetchrow($result) ) { $album_user_access = album_user_access($row['cat_id'], $row, 1, 0, 0, 0, 0, 0); // VIEW if ($album_user_access['view'] == 1) { $catrows[] = $row; } } $allowed_cat = ''; // For Recent Public Pics below // // $catrows now stores all categories which this user can view. Dump them out! // for ($i = 0; $i < count($catrows); $i++) { // -------------------------------- // Build allowed category-list (for recent pics after here) // -------------------------------- $allowed_cat .= ($allowed_cat == '') ? $catrows[$i]['cat_id'] : ',' . $catrows[$i]['cat_id']; } } } } if ($there == 0) { message_die(GENERAL_MESSAGE, 'This module requires Smartor Photo Album (http://smartor.is-root.com/viewforum.php?f=7) or Full Album Pack 1.4.0 (http://www.mightygorgon.com/viewtopic.php?t=3661) to be installed.'); } $sql = "SELECT u.user_timezone, u.user_dateformat, p.pic_id, p.pic_title, p.pic_time, p.pic_user_id, p.pic_username, p.pic_desc FROM " . USERS_TABLE . " AS u, " . ALBUM_CAT_TABLE . " AS c LEFT JOIN " . ALBUM_TABLE . " AS p ON c.cat_id = p.pic_cat_id WHERE (p.pic_user_id <> " . ANONYMOUS . ") AND c.cat_id IN ($allowed_cat) AND p.pic_cat_id IN ($allowed_cat) AND u.user_id = " . $userdata['user_id'] . " ORDER BY p.pic_time DESC LIMIT " . $core->return_limit; $result = $core->sql_query($sql, 'Couldn\'t retrieve album post data'); $lastposts = $core->sql_fetchrowset($result); $core->set_data($lastposts); $core->define_view('set_rows', array( '$core->pre_defined()', '$core->generate_image_link(\'album_thumbnail.php?pic_id=\' . $core->data(\'pic_id\'), $core->data(\'pic_desc\'), \'border="0"\')', 'create_date($core->data(\'user_dateformat\'), $core->data(\'pic_time\'), $core->data(\'user_timezone\')).$lang[\'br\'].$core->generate_link(append_sid($phpbb_root_path . \'album_showpage.php?pic_id=\' . $core->data(\'pic_id\')), $core->data(\'pic_id\'), \'target="_blank"\')." ".$core->generate_link(append_sid($phpbb_root_path . \'album_showpage.php?pic_id=\' . $core->data(\'pic_id\')), $core->data(\'pic_title\'), \'target="_blank"\').$lang[\'br\'].$core->generate_link(append_sid($phpbb_root_path . \'profile.php?mode=viewprofile&u=\' . $core->data(\'pic_user_id\')), $core->data(\'pic_username\'), \'target="_blank"\')', '$core->data(\'pic_desc\')') ); $core->run_module(); ?>ÌÌÿMODÿÌÌ