print_no_permission(); } if ($vbulletin->userinfo['userid'] != $userinfo['userid'] and !($vbulletin->userinfo['permissions']['vbblog_general_permissions'] & $vbulletin->bf_ugp_vbblog_general_permissions['blog_canviewothers'])) { // Can't view other's entries so off you go to your own blog. exec_header_redirect("blog.php?{$session['sessionurl']}u=" . $vbulletin->userinfo['userid']); } $show['usercloud'] = true; $tag_cloud = fetch_blog_tagcloud('usage', false, $userinfo['userid']); } else { $tag_cloud = fetch_blog_tagcloud('usage'); } $navbits = construct_navbits(array('blog.php' . $vbulletin->session->vars['sessionurl_q'] => $vbphrase['blogs'], '' => $vbphrase['tags'])); $navbar = render_navbar_template($navbits); ($hook = vBulletinHook::fetch_hook('blog_tags_cloud_complete')) ? eval($hook) : false; if ($userinfo) { $sidebar =& build_user_sidebar($userinfo); } else { $sidebar =& build_overview_sidebar(); } $templater = vB_Template::create('blog_tag_cloud'); $templater->register('tag_cloud', $tag_cloud); $templater->register('tag_delimiters', $tag_delimiters); $templater->register('userinfo', $userinfo); $content = $templater->render(); $headinclude .= vB_Template::create('blog_css')->render(); $templater = vB_Template::create('BLOG'); $templater->register_page_templates(); $templater->register('abouturl', $abouturl); $templater->register('blogheader', $blogheader); $templater->register('bloginfo', $bloginfo); $templater->register('blogrssinfo', $blogrssinfo);
if (empty($navbits)) { $navbits[] = $vbphrase['blogs']; } else { $navbits = array_merge(array('blog.php' . $vbulletin->session->vars['sessionurl_q'] => $vbphrase['blogs']), $navbits); } if ($blockinfo) { $sidebar =& build_user_sidebar($blockinfo['userinfo']); } else { $sidebar =& build_user_sidebar($bloginfo); } $navbits = construct_navbits($navbits); $navbar = render_navbar_template($navbits); $headinclude .= vB_Template::create('blog_css')->render(); $templater = vB_Template::create('BLOG'); $templater->register_page_templates(); $templater->register('abouturl', $abouturl); $templater->register('blogheader', $blogheader); $templater->register('bloginfo', $bloginfo); $templater->register('blogrssinfo', $blogrssinfo); $templater->register('bloguserid', $bloguserid); $templater->register('content', $content); $templater->register('navbar', $navbar);
$show['albumselect'] = (count($albums) == 1) ? false : true; $vbulletin->userinfo['blog_cachedcss'] = $usercss->build_css($usercss->fetch_effective()); $vbulletin->userinfo['blog_cachedcss'] = str_replace('/*sessionurl*/', $vbulletin->session->vars['sessionurl_js'], $vbulletin->userinfo['blog_cachedcss']); $show['copyprofilecss'] = (!$vbulletin->GPC['copyprofilecss'] AND $vbulletin->options['socnet'] & $vbulletin->bf_misc_socnet['enable_profile_styling']); $templater = vB_Template::create('modifyusercss_headinclude'); $templater->register('usercss_string', $usercss_string); $headinclude .= $templater->render(); $navbits[''] = $vbphrase['customize_profile']; // Sidebar $show['blogcp'] = true; $sidebar =& build_user_sidebar($vbulletin->userinfo, 0, 0, $rules); $templater = vB_Template::create('blog_cp_manage_usercss'); $templater->register('albumbits', $albumbits); $templater->register('errors', $errors); $templater->register('picturerowbits', $picturerowbits); $templater->register('usercssbits', $usercssbits); $templater->register('usercsspermissions', $usercsspermissions); $content = $templater->render(); } // ############################################################################# // spit out final HTML if we have got this far // build navbar if (empty($navbits))
print_no_permission(); } $show['reportlink'] = false; } else { $show['reportlink'] = true; } track_blog_visit($blockinfo['userinfo']['userid']); $show['reportlink'] = ($show['reportlink'] and $vbulletin->userinfo['userid'] and ($vbulletin->options['rpforumid'] or $vbulletin->options['enableemail'] and $vbulletin->options['rpemail'])); $show['edit'] = (can_moderate_blog('caneditcustomblocks') or $vbulletin->userinfo['userid'] == $blockinfo['userid']); // Parse Content here require_once DIR . '/includes/class_bbcode_blog.php'; $bbcode = new vB_BbCodeParser_Blog($vbulletin, fetch_tag_list()); $bbcode->set_parse_userinfo($blockinfo['userinfo'], $blockinfo['userinfo']['permissions']); $blockinfo['page'] = $bbcode->parse($blockinfo['pagetext'], 'blog_user', $blockinfo['allowsmilie'] ? 1 : 0); $blogheader = parse_blog_description($blockinfo['userinfo'], $blockinfo); $sidebar =& build_user_sidebar($blockinfo['userinfo']); $navbits[] = $blockinfo['title']; $templater = vB_Template::create('blog_custompage'); $templater->register('blogheader', $blogheader); $templater->register('blockinfo', $blockinfo); $content = $templater->render(); } // build navbar if (empty($navbits)) { $navbits = array('blog.php' . $vbulletin->session->vars['sessionurl_q'] => $vbphrase['blogs'], '' => ''); } else { $navbits = array_merge(array('blog.php' . $vbulletin->session->vars['sessionurl_q'] => $vbphrase['blogs']), $navbits); } $navbits = construct_navbits($navbits); $navbar = render_navbar_template($navbits); ($hook = vBulletinHook::fetch_hook('blog_complete')) ? eval($hook) : false;
($hook = vBulletinHook::fetch_hook('blog_postsub_view_complete')) ? eval($hook) : false; $templater = vB_Template::create('blog_cp_manage_subscriptions'); $templater->register('blogbits', $blogbits); $templater->register('colspan', $colspan); $templater->register('gobutton', $gobutton); $templater->register('pagenav', $pagenav); $templater->register('sortarrow', $sortarrow); $templater->register('sorturl', $sorturl); $templater->register('sub_count', $sub_count); $templater->register('type', $type); $content = $templater->render(); // Sidebar $show['blogcp'] = true; $sidebar =& build_user_sidebar($vbulletin->userinfo); } // build navbar if (empty($navbits)) { $navbits = array( 'blog.php' . $vbulletin->session->vars['sessionurl_q'] => $vbphrase['blogs'], ); if ($vbulletin->userinfo['permissions']['vbblog_general_permissions'] & $vbulletin->bf_ugp_vbblog_general_permissions['blog_canviewown']) { $navbits['blog.php?' . $vbulletin->session->vars['sessionurl'] . 'u=' . $vbulletin->userinfo['userid']] = $vbulletin->userinfo['blog_title']; } $navbits['blog_usercp.php' . $vbulletin->session->vars['sessionurl_q']] = $vbphrase['blog_control_panel'];