|
From: OryNider <ory...@us...> - 2007-08-09 13:17:30
|
Update of /cvsroot/mxbb/mx_smartor/album_mod In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv11014/album_mod Modified Files: album_common.php album_hierarchy_functions.php Log Message: This will make use of: $mx_user->extend(MX_LANG_MAIN, MX_IMAGES); and: $mode = $mx_request_vars->request('smartor_mode', MX_TYPE_NO_TAGS, 'album_index'); Index: album_hierarchy_functions.php =================================================================== RCS file: /cvsroot/mxbb/mx_smartor/album_mod/album_hierarchy_functions.php,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** album_hierarchy_functions.php 7 Jun 2007 20:13:15 -0000 1.6 --- album_hierarchy_functions.php 9 Aug 2007 13:16:53 -0000 1.7 *************** *** 62,66 **** function album_display_admin_index($cur = ALBUM_ROOT_CATEGORY, $level = 0, $max_level = -1, $column_offset=1) { ! global $db, $template, $phpEx, $lang, $mx_images, $album_data, $userdata, $user_id; static $username = ''; --- 62,66 ---- function album_display_admin_index($cur = ALBUM_ROOT_CATEGORY, $level = 0, $max_level = -1, $column_offset=1) { ! global $db, $template, $phpEx, $lang, $images, $album_data, $userdata, $user_id; static $username = ''; *************** *** 214,218 **** global $phpEx; global $template, $db; ! global $board_config, $album_config, $album_sp_config, $lang, $mx_images, $userdata, $album_data; // init some variables --- 214,218 ---- global $phpEx; global $template, $db; ! global $board_config, $album_config, $album_sp_config, $lang, $images, $userdata, $album_data; // init some variables *************** *** 334,339 **** $new_images_class = ($total > 0) ? '-new' : ''; $xs_new = ($total > 0) ? '-new' : ''; ! $slideshow_img_xs = ($xs_new) ? $mx_images['icon_minipost_new'] : $mx_images['icon_minipost']; ! $link_spacer = '<img src="' . $mx_images['spacer'] . '" width="1" height="0" />'; $subfolder_img = '<img src="' . $slideshow_img_xs . '" valign="middle" title="' . $sub_total_pics . '" alt="' . $sub_total_pics . '"/>'; $sub_cat_separator = ( $i != count ($sub_cats) ) ? ',':''; --- 334,339 ---- $new_images_class = ($total > 0) ? '-new' : ''; $xs_new = ($total > 0) ? '-new' : ''; ! $slideshow_img_xs = ($xs_new) ? $images['icon_minipost_new'] : $images['icon_minipost']; ! $link_spacer = '<img src="' . $images['spacer'] . '" width="1" height="0" />'; $subfolder_img = '<img src="' . $slideshow_img_xs . '" valign="middle" title="' . $sub_total_pics . '" alt="' . $sub_total_pics . '"/>'; $sub_cat_separator = ( $i != count ($sub_cats) ) ? ',':''; *************** *** 344,349 **** { $new_images = ($total > 0) ? true : false; ! $new_images_img = ($new_images == true) ? $mx_images['icon_minipost_new'] : $mx_images['icon_minipost']; ! $link_spacer = '<img src="' . $mx_images['spacer'] . '" width="1" height="0" />'; $subfolder_img = '<img src="' . $new_images_img . '" valign="middle" title="' . $sub_total_pics . '" alt="' . $sub_total_pics . '"/>'; $subfolder_dot = '• '; --- 344,349 ---- { $new_images = ($total > 0) ? true : false; ! $new_images_img = ($new_images == true) ? $images['icon_minipost_new'] : $images['icon_minipost']; ! $link_spacer = '<img src="' . $images['spacer'] . '" width="1" height="0" />'; $subfolder_img = '<img src="' . $new_images_img . '" valign="middle" title="' . $sub_total_pics . '" alt="' . $sub_total_pics . '"/>'; $subfolder_dot = '• '; *************** *** 382,386 **** { $new_text = ($total == 1) ? sprintf($lang['One_new_picture'], $total) : sprintf($lang['Multiple_new_pictures'], $total); ! $newpics_sub_link = ' <img src="' . $mx_images['mini_new_pictures'] . '" alt="' . $new_text .'" title="' . $new_text .'"> '; $link = $link . $slideshow_link_full; } --- 382,386 ---- { $new_text = ($total == 1) ? sprintf($lang['One_new_picture'], $total) : sprintf($lang['Multiple_new_pictures'], $total); ! $newpics_sub_link = ' <img src="' . $images['mini_new_pictures'] . '" alt="' . $new_text .'" title="' . $new_text .'"> '; $link = $link . $slideshow_link_full; } *************** *** 394,398 **** $first_pic_id = album_get_first_pic_id($ss_cat_id); $last_pic_id = album_get_last_pic_id($ss_cat_id); ! $slideshow_img = '<img src="' . $mx_images['icon_latest_reply'] . '" alt="' . $lang['Slideshow'] . '" title="' . $lang['Slideshow'] . '" border="0" align="middle" />'; $slideshow_link = append_sid(this_fap_portalurl("smartor_mode=album_showpage" . "&pic_id=" . $first_pic_id . "&slideshow=5")); $slideshow_link_full = '[<a href="' . $slideshow_link . '">' . $lang['Slideshow'] . '</a>]'; --- 394,398 ---- $first_pic_id = album_get_first_pic_id($ss_cat_id); $last_pic_id = album_get_last_pic_id($ss_cat_id); ! $slideshow_img = '<img src="' . $images['icon_latest_reply'] . '" alt="' . $lang['Slideshow'] . '" title="' . $lang['Slideshow'] . '" border="0" align="middle" />'; $slideshow_link = append_sid(this_fap_portalurl("smartor_mode=album_showpage" . "&pic_id=" . $first_pic_id . "&slideshow=5")); $slideshow_link_full = '[<a href="' . $slideshow_link . '">' . $lang['Slideshow'] . '</a>]'; *************** *** 407,411 **** { $new_text = ($total == 1) ? sprintf($lang['One_new_picture'], $total) : sprintf($lang['Multiple_new_pictures'], $total); ! $newpics_sub_link = ' <img src="' . $mx_images['mini_new_pictures'] . '" alt="' . $new_text .'" title="' . $new_text .'"> '; $link = $link . $slideshow_link_full; //$link = $link . '[' . $sub_total_pics . $newpics_sub_link . $slideshow_link_full . ']'; --- 407,411 ---- { $new_text = ($total == 1) ? sprintf($lang['One_new_picture'], $total) : sprintf($lang['Multiple_new_pictures'], $total); ! $newpics_sub_link = ' <img src="' . $images['mini_new_pictures'] . '" alt="' . $new_text .'" title="' . $new_text .'"> '; $link = $link . $slideshow_link_full; //$link = $link . '[' . $sub_total_pics . $newpics_sub_link . $slideshow_link_full . ']'; *************** *** 463,467 **** $first_pic_id = album_get_first_pic_id($cur_cat_id); // Bicet - XS Support - BEGIN ! $slideshow_img_xs = ($xs_new) ? $mx_images['icon_newest_reply'] : $mx_images['icon_latest_reply']; $slideshow_img = '<img src="' . $slideshow_img_xs . '" alt="' . $lang['Slideshow'] . '" title="' . $lang['Slideshow'] . '" border="0" />'; // Bicet - XS Support - END --- 463,467 ---- $first_pic_id = album_get_first_pic_id($cur_cat_id); // Bicet - XS Support - BEGIN ! $slideshow_img_xs = ($xs_new) ? $images['icon_newest_reply'] : $images['icon_latest_reply']; $slideshow_img = '<img src="' . $slideshow_img_xs . '" alt="' . $lang['Slideshow'] . '" title="' . $lang['Slideshow'] . '" border="0" />'; // Bicet - XS Support - END *************** *** 474,478 **** $first_pic_id = album_get_first_pic_id($cur_cat_id); $last_pic_id = album_get_last_pic_id($cur_cat_id); ! $slideshow_icon = ($new_images == true) ? $mx_images['icon_newest_reply'] : $mx_images['icon_latest_reply']; $slideshow_img = '<img src="' . $slideshow_icon . '" alt="' . $lang['Slideshow'] . '" title="' . $lang['Slideshow'] . '" border="0" align="middle" />'; --- 474,478 ---- $first_pic_id = album_get_first_pic_id($cur_cat_id); $last_pic_id = album_get_last_pic_id($cur_cat_id); ! $slideshow_icon = ($new_images == true) ? $images['icon_newest_reply'] : $images['icon_latest_reply']; $slideshow_img = '<img src="' . $slideshow_icon . '" alt="' . $lang['Slideshow'] . '" title="' . $lang['Slideshow'] . '" border="0" align="middle" />'; *************** *** 493,501 **** if ($xs_new) { ! $cat_img = ( intval(count($sub_cats)) >0 ) ? $mx_images['category_new']: $cat_img = $mx_images['forum_new']; } else { ! $cat_img = ( intval(count($sub_cats)) >0 ) ? $mx_images['category']: $cat_img = $mx_images['forum']; } global $config_mg; --- 493,501 ---- if ($xs_new) { ! $cat_img = ( intval(count($sub_cats)) >0 ) ? $images['category_new']: $cat_img = $images['forum_new']; } else { ! $cat_img = ( intval(count($sub_cats)) >0 ) ? $images['category']: $cat_img = $images['forum']; } global $config_mg; *************** *** 506,514 **** if ($new_images == true) { ! $cat_img = $mx_images['forum_new']; } else { ! $cat_img = $mx_images['forum']; } $xs_new = ''; --- 506,514 ---- if ($new_images == true) { ! $cat_img = $images['forum_new']; } else { ! $cat_img = $images['forum']; } $xs_new = ''; *************** *** 542,546 **** } $template->assign_block_vars('catmain.catrow.newpics', array( ! 'I_NEWEST_PICS' => $mx_images['mini_new_pictures'], 'L_NEWEST_PICS' => $new_text ) --- 542,546 ---- } $template->assign_block_vars('catmain.catrow.newpics', array( ! 'I_NEWEST_PICS' => $images['mini_new_pictures'], 'L_NEWEST_PICS' => $new_text ) *************** *** 1369,1373 **** function album_display_index($user_id, $cur_cat_id = ALBUM_ROOT_CATEGORY, $show_header = false, $show_public_footer = false, $force_display = false) { ! global $lang, $album_config, $board_config, $template, $mx_images, $album_data, $phpEx, $userdata; $keys = array(); --- 1369,1373 ---- function album_display_index($user_id, $cur_cat_id = ALBUM_ROOT_CATEGORY, $show_header = false, $show_public_footer = false, $force_display = false) { ! global $lang, $album_config, $board_config, $template, $images, $album_data, $phpEx, $userdata; $keys = array(); *************** *** 1399,1403 **** $template->assign_block_vars('catmain.catrow', array( 'CAT_TITLE' => $lang['No_Public_Galleries'], ! 'CAT_IMG' => $mx_images['forum_locked'] ) ); --- 1399,1403 ---- $template->assign_block_vars('catmain.catrow', array( 'CAT_TITLE' => $lang['No_Public_Galleries'], ! 'CAT_IMG' => $images['forum_locked'] ) ); Index: album_common.php =================================================================== RCS file: /cvsroot/mxbb/mx_smartor/album_mod/album_common.php,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** album_common.php 15 Jul 2007 20:03:11 -0000 1.18 --- album_common.php 9 Aug 2007 13:16:53 -0000 1.19 *************** *** 28,155 **** // ********************************************************************** ! // Read language definition ! // ********************************************************************** ! ! if ( !file_exists( $module_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_main_album.' . $phpEx ) ) ! { ! include( $module_root_path . 'language/lang_english/lang_main_album.' . $phpEx ); ! $link_language='lang_english'; ! } ! else ! { ! include( $module_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_main_album.' . $phpEx ); ! $link_language='lang_' . $board_config['default_lang']; ! } ! ! ! // ********************************************************************** ! // Read theme definition and language in theme definition // ********************************************************************** ! if ( !MXBB_MODULE ) ! { ! $sql = 'SELECT * ! FROM ' . THEMES_TABLE . ' ! WHERE themes_id = ' . (int) $style; ! if ( !($result = $db->sql_query($sql)) ) ! { ! message_die(CRITICAL_ERROR, 'Could not query database for theme info'); ! } ! ! if ( !($row = $db->sql_fetchrow($result)) ) ! { ! // We are trying to setup a style which does not exist in the database ! // Try to fallback to the board default (if the user had a custom style) ! // and then any users using this style to the default if it succeeds ! if ( $style != $board_config['default_style']) ! { ! $sql = 'SELECT * ! FROM ' . THEMES_TABLE . ' ! WHERE themes_id = ' . (int) $board_config['default_style']; ! if ( !($result = $db->sql_query($sql)) ) ! { ! message_die(CRITICAL_ERROR, 'Could not query database for theme info'); ! } ! ! if ( $row = $db->sql_fetchrow($result) ) ! { ! $db->sql_freeresult($result); ! $template_name = $row['template_name'] ; ! } ! else ! { ! message_die(CRITICAL_ERROR, "Could not get theme data for themes_id [$style]"); ! } ! } ! else ! { ! message_die(CRITICAL_ERROR, "Could not get theme data for themes_id [$style]"); ! } ! } ! ! $template_path = 'templates/' ; ! //$template_name = $row['template_name'] ; ! ! $template = new Template($phpbb_root_path . $template_path . $template_name); ! ! if ( $template ) ! { ! $current_template_path = $template_path . $template_name; ! } ! else ! { ! $current_template_path = $template_path . 'subSilver'; ! } ! ! // ------------------------------------------------------------------------- ! // Prefix with PORTAL_URL ! // ------------------------------------------------------------------------- ! $current_template_images = $phpbb_root_path . $current_template_path . "/images"; ! ! @include($phpbb_root_path . $template_path . $template_name . '/' . 'fap.cfg'); ! ! ! } ! else ! { ! ! $template_name = $theme['template_name']; ! ! $template_path = 'templates/' . $theme['template_name']; ! ! $current_template_path = $template_path . $template_name; ! ! if ( file_exists( $module_root_path . $current_template_path . "/" . $template_name . ".cfg" ) ) ! { ! // ---------- ! @include($module_root_path . $current_template_path . "/" . $template_name . ".cfg"); ! // ---------- ! } ! else ! { ! // ---------- ! @include($module_root_path . "templates/" . "subSilver/" . "subSilver.cfg"); ! // ---------- ! } ! } ! ! //$mx_user->_load_mxbb_images($module_root_path); ! ! $img_lang = ( file_exists($module_root_path . $current_template_path . '/images/lang_' . $board_config['default_lang']) ) ? $board_config['default_lang'] : 'english'; ! ! while( list($key, $value) = @each($mx_images) ) ! { ! if (is_array($value)) ! { ! foreach( $value as $key2 => $val2 ) ! { ! $mx_images[$key][$key2] = $val2; ! } ! } ! else ! { ! $mx_images[$key] = str_replace('{LANG}', 'lang_' . $img_lang, $value); ! } ! ! } // --- 28,34 ---- // ********************************************************************** ! // Read main language definition and theme images definition // ********************************************************************** ! $mx_user->extend(MX_LANG_MAIN, MX_IMAGES); // |