"); opentable(fusion_get_locale('blog_1000')); echo render_breadcrumbs(); if (isset($_GET['readmore']) && !empty($info['blog_item'])) { echo ""; echo display_blog_item($info); // change this integration echo ""; } else { echo display_blog_index($info); } closetable(); // push the blog menu to the right panel if (!empty($info['blog_filter'])) { $pages = "\n"; \PHPFusion\Panels::addPanel('blog_menu_panel', $pages, \PHPFusion\Panels::PANEL_RIGHT, iGUEST, 0); } \PHPFusion\Panels::addPanel('blog_menu_panel', display_blog_menu($info), \PHPFusion\Panels::PANEL_RIGHT, iGUEST, 9); } } if (!function_exists('display_blog_item')) { function display_blog_item($info) { global $blog_settings; $locale = fusion_get_locale(); add_to_head(""); 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(); }); }, onLoad: function () { } }); '); ob_start(); $data = $info['blog_item']; echo "
".$locale['print'].""; if ($data['admin_link']) { $admin_actions = $data['admin_link']; echo " ".$locale['edit']."\n"; echo " ".$locale['delete']."\n"; } echo "
"; echo "

".$data['blog_subject']."

".$data['blog_category_link']."
".$data['blog_post_author']." ".$data['blog_post_time']."
"; echo "
\n"; if ($data['blog_image']) { echo ""; echo "".$data[ "; } echo $data['blog_extended']; if (!empty($data['blog_nav'])) { echo '
'.$data['blog_nav'].'
'; } echo "
\n"; echo "
".$data['blog_author_info']."
"; echo $data['blog_allow_comments'] ? "
".$data['blog_show_comments'] : ''; echo $data['blog_allow_ratings'] ? "
".$data['blog_show_ratings'] : ''; $str = ob_get_contents(); ob_end_clean(); return $str; } } if (!function_exists('display_blog_index')) { function display_blog_index($info) { add_to_head(""); $locale = fusion_get_locale(); ob_start(); if (!empty($info['blog_item'])) { foreach ($info['blog_item'] as $blog_id => $data) { echo (isset($_GET['cat_id'])) ? "\n" : "\n"; echo "
".$data['blog_user_avatar']."
".$data['blog_user_link']."
"; if ($data['blog_allow_comments'] && fusion_get_settings('comments_enabled') == 1) { echo " ".$data['blog_comments']."
"; } if ($data['blog_allow_ratings'] && fusion_get_settings('ratings_enabled') == 1) { echo " ".$data['blog_count_votes']."
"; } echo " ".$data['blog_reads']."

".$data['blog_subject']."

".$data['blog_category_link']."
".$locale['global_049']." ".timer($data['blog_datestamp'])."
".($data['blog_image'] ? "
".$data['blog_image']."
" : '')."
".$data['blog_blog']."
".$data['blog_readmore_link']."

"; echo (isset($_GET['cat_id'])) ? "" : "\n"; } echo !empty($info['blog_nav']) ? '
'.$info['blog_nav'].'
' : ''; } else { echo "
".$locale['blog_3000']."
\n"; } $str = ob_get_contents(); ob_end_clean(); return $str; } } if (!function_exists('display_blog_menu')) { function display_blog_menu($info) { $locale = fusion_get_locale(); function find_cat_menu($info, $cat_id = 0, $level = 0) { $html = ''; if (!empty($info[$cat_id])) { foreach ($info[$cat_id] as $blog_cat_id => $cdata) { $unCat_active = ($blog_cat_id == 0 && (isset($_GET['cat_id']) && ($_GET['cat_id'] == 0))) ? TRUE : FALSE; $active = ($_GET['cat_id'] !== NULL && $blog_cat_id == $_GET['cat_id']) ? TRUE : FALSE; $html .= "
  • ".str_repeat(' ', $level)." ".$cdata['blog_cat_link']."
  • \n"; if ($active && $blog_cat_id != 0) { if (!empty($info[$blog_cat_id])) { $html .= find_cat_menu($info, $blog_cat_id, $level++); } } } } return $html; } ob_start(); openside(' '.$locale['blog_1003']); echo "\n"; closeside(); openside(' '.$locale['blog_1004']); echo "\n"; closeside(); openside(' '.$locale['blog_1005']); echo "\n"; closeside(); $str = ob_get_contents(); ob_end_clean(); return $str; } } if (!function_exists('display_blog_submit')) { function display_blog_submit($criteriaArray) { $blog_settings = get_settings('blog'); $locale = fusion_get_locale(); if ($blog_settings['blog_allow_submission']) { if ($criteriaArray['submitted']) { echo "

    ".$locale['blog_0701']."

    "; echo "

    ".$locale['blog_0702']."

    "; echo "

    ".str_replace("[SITENAME]", fusion_get_settings("sitename"), $locale['blog_0704'])."

    \n"; echo "
    \n"; } else { opentable("".$locale['blog_0700']); echo "
    \n
    \n"; echo "
    ".str_replace("[SITENAME]", fusion_get_settings("sitename"), $locale['blog_0703'])."
    \n"; echo openform('submit_form', 'post', BASEDIR."submit.php?stype=b", ["enctype" => $blog_settings['blog_allow_submission_files'] ? TRUE : FALSE]); echo form_text('blog_subject', $locale['blog_0422'], $criteriaArray['blog_subject'], [ "required" => TRUE, "inline" => TRUE ]); if (multilang_table("BL")) { echo form_select('blog_language[]', $locale['global_ML100'], $criteriaArray['blog_language'], [ "options" => fusion_get_enabled_languages(), "placeholder" => $locale['choose'], "width" => "250px", "inline" => TRUE, 'multiple' => TRUE, 'delimeter' => '.' ]); } else { echo form_hidden('blog_language', '', $criteriaArray['blog_language']); } echo form_select('blog_keywords', $locale['blog_0443'], $criteriaArray['blog_keywords'], [ "max_length" => 320, "inline" => TRUE, "placeholder" => $locale['blog_0444'], "width" => "100%", "error_text" => $locale['blog_0457'], "tags" => TRUE, "multiple" => TRUE ]); echo form_select_tree("blog_cat", $locale['blog_0423'], $criteriaArray['blog_cat'], [ "width" => "250px", "inline" => TRUE, "parent_value" => $locale['blog_0424'], "query" => (multilang_table("BL") ? "WHERE ".in_group('blog_cat_language', LANGUAGE) : "") ], DB_BLOG_CATS, "blog_cat_name", "blog_cat_id", "blog_cat_parent"); if ($blog_settings['blog_allow_submission_files']) { $file_input_options = [ 'upload_path' => IMAGES_B, 'max_width' => $blog_settings['blog_photo_max_w'], 'max_height' => $blog_settings['blog_photo_max_h'], 'max_byte' => $blog_settings['blog_photo_max_b'], // set thumbnail 'thumbnail' => 1, 'thumbnail_w' => $blog_settings['blog_thumb_w'], 'thumbnail_h' => $blog_settings['blog_thumb_h'], 'thumbnail_folder' => 'thumbs', 'delete_original' => 0, // set thumbnail 2 settings 'thumbnail2' => 1, 'thumbnail2_w' => $blog_settings['blog_photo_w'], 'thumbnail2_h' => $blog_settings['blog_photo_h'], 'type' => 'image', "inline" => TRUE, ]; echo form_fileinput("blog_image", $locale['blog_0439'], "", $file_input_options); echo "
    ".sprintf($locale['blog_0440'], parsebytesize($blog_settings['blog_photo_max_b']))."
    \n"; $alignOptions = [ 'pull-left' => $locale['left'], 'news-img-center' => $locale['center'], 'pull-right' => $locale['right'] ]; echo form_select('blog_ialign', $locale['blog_0442'], $criteriaArray['blog_ialign'], [ "options" => $alignOptions, "inline" => TRUE ]); } $textArea_opts = [ "required" => TRUE, "type" => fusion_get_settings("tinymce_enabled") ? "tinymce" : "html", "tinymce" => fusion_get_settings("tinymce_enabled") && iADMIN ? "advanced" : "simple", "autosize" => TRUE, "form_name" => "submit_form", 'path' => IMAGES_B ]; echo form_textarea('blog_blog', $locale['blog_0425'], $criteriaArray['blog_blog'], $textArea_opts); $textArea_opts['required'] = $blog_settings['blog_extended_required'] ? TRUE : FALSE; echo form_textarea('blog_body', $locale['blog_0426'], $criteriaArray['blog_body'], $textArea_opts); echo form_button('submit_blog', $locale['blog_0700'], $locale['blog_0700'], ['class' => 'btn-success m-r-10', 'icon' => 'fa fa-hdd-o']); echo fusion_get_settings("site_seo") ? "" : form_button('preview_blog', $locale['blog_0141'], $locale['blog_0141'], ['class' => 'btn-primary m-r-10', 'icon' => 'fa fa-eye']); echo closeform(); echo "
    \n
    \n"; closetable(); } } else { echo "
    ".$locale['blog_0138']."
    \n"; } } }