hide_panel('RIGHT'); Panels::getInstance(TRUE)->hide_panel('LEFT'); Panels::getInstance(TRUE)->hide_panel('AU_CENTER'); Panels::getInstance(TRUE)->hide_panel('U_CENTER'); Panels::getInstance(TRUE)->hide_panel('L_CENTER'); Panels::getInstance(TRUE)->hide_panel('BL_CENTER'); if (isset($_GET['readmore']) && !empty($info['blog_item'])) { self::display_blog_item($info); } else { self::display_blog_index($info); } } private static function display_blog_index($info) { $locale = fusion_get_locale(); echo '
'; echo '

'.$locale['blog_1000'].'

'; echo render_breadcrumbs(); echo '
'; echo '
'; if (!empty($info['blog_item'])) { echo '
'; echo ''; echo ''.$locale['show'].': '; $i = 0; foreach ($info['blog_filter'] as $filter_key => $filter) { $filter_active = isset($_GET['type']) && $_GET['type'] === $filter_key ? ' text-dark' : ''; echo ''.$filter['title'].''; $i++; } echo ''; if (!empty($info['blog_categories'])) { echo ''; } if (!empty($info['blog_author'])) { echo ''; } if (!empty($info['blog_archive'])) { add_to_jquery('$("#blog-archive").submenupicker();'); echo ''; } echo '
'; echo '
'; foreach ($info['blog_item'] as $blog_id => $data) { echo '
'; echo '
'; if (!empty($data['blog_lowRes_image_path']) || !empty($data['blog_cat_image'])) { if ($data['blog_lowRes_image_path'] && file_exists($data['blog_lowRes_image_path'])) { $image = $data['blog_lowRes_image_path']; } else if ($data['blog_cat_image']) { $image = INFUSIONS."blog/blog_cats/".$data['blog_cat_image']; } else { $image = get_image('imagenotfound'); } } else { $image = get_image('imagenotfound'); } echo ''; echo ''.$data['blog_subject'].''; echo '
'; $cats = explode(', ', $data['blog_category_link']); foreach ($cats as $cat) { echo str_replace(''; echo ''; echo '
'.display_avatar($data, '40px', '', TRUE, 'img-circle').'
'; echo ''; echo ''; echo '
'; echo '
'; } echo '
'; echo !empty($info['blog_nav']) ? '
'.$info['blog_nav'].'
' : ''; } else { echo '
'.$locale['blog_3000'].'
'; } echo '
'; } public static function display_blog_item($info) { $blog_settings = get_settings('blog'); $locale = fusion_get_locale(); $data = $info['blog_item']; add_to_head(''); add_to_head(''); add_to_jquery('$(".blog-image-overlay").colorbox({ transition: "elasic", height: "100%", width: "100%", maxWidth: "98%", maxHeight: "98%", scrolling: false, overlayClose: true, close: false, photo: true, onComplete: function(result) { $("#colorbox").live("click", function() { $(this).unbind("click"); $.fn.colorbox.close(); }); } });'); echo '
'; echo '

'.$data['blog_subject'].'

'; echo render_breadcrumbs(); echo '
'; echo '
'; echo '
'; echo '
'; echo '
'; $action = $data['admin_link']; if (!empty($action)) { echo '
'; echo ''; echo ''; echo ''; echo '
'; } else { echo ''; } echo '
'; echo '
'; echo $data['blog_post_author'].' '; echo $data['blog_post_time']; $cats = explode(', ', $data['blog_category_link']); foreach ($cats as $cat) { echo str_replace(''; echo '
'; echo '
'; if ($data['blog_image']) { echo ''; echo ''.$data['blog_subject'].''; echo ''; } echo $data['blog_extended']; echo '
'; echo $data['blog_nav'] ? '
'.$data['blog_nav'].'
' : ''; echo $data['blog_show_comments']; echo $data['blog_show_ratings']; echo '
'; echo '
'; echo '
    '; $i = 0; foreach ($info['blog_filter'] as $filter_key => $filter) { $filter_active = isset($_GET['type']) && $_GET['type'] === $filter_key ? ' class="text-dark"' : ''; echo ''.$filter['title'].''; $i++; } echo '
'; if (!empty($info['blog_categories'])) { openside(' '.$locale['blog_1003'], 'shadow p-t-0'); echo '
    '; foreach ($info['blog_categories'][0] as $id => $data) { $active = isset($_GET['cat_id']) && $_GET['cat_id'] == $id ? ' class="active"' : ''; echo ''.$data['blog_cat_name'].''; if ($id != 0 && $info['blog_categories'] != 0) { foreach ($info['blog_categories'] as $sub_cats_id => $sub_cats) { foreach ($sub_cats as $sub_cat_id => $sub_cat_data) { if (!empty($sub_cat_data['blog_cat_parent']) && $sub_cat_data['blog_cat_parent'] == $id) { $active = isset($_GET['cat_id']) && $_GET['cat_id'] == $sub_cat_id ? ' class="active"' : ''; echo ''.$sub_cat_data['blog_cat_name'].''; } } } } } echo '
'; closeside(); } if (!empty($info['blog_author'])) { openside(' '.$locale['blog_1005'], 'shadow p-t-0'); echo ''; closeside(); } if (!empty($info['blog_archive'])) { openside(' '.$locale['blog_1004'], 'shadow p-t-0'); echo '
    '; foreach ($info['blog_archive'] as $year => $archive_data) { $active = $year == date('Y') ? ' text-dark' : ''; echo '
  • '; $collaped_ = isset($_GET['archive']) && $_GET['archive'] == $year ? ' strong' : ''; echo ''.$year.''; $collaped = isset($_GET['archive']) && $_GET['archive'] == $year ? ' in' : ''; echo ''; echo '
  • '; } echo '
'; closeside(); } echo '
'; echo '
'; } }