Introduction I just purchased new vBulletin blog and as always its very well coded but I guess when I any forum owner buys vBulletin blog his aim is not to create an individual blog but make it Global Blog for the forums. At least I had such a requirement and so here is an hack to do it. I am posting it here because I have not seen any hacks for the blog. Background I have created it such that every one has access to only categories created by me i.e. userid = 1 and if you would like this to be different from 1 make changes accordingly in the code changes below. First import the product using Admin CP > Plugins& Products > Manage Products > Add Import product . Also this involves additional code as well as template changes and so I would list them here. File : /includes/blog_functions.php Find PHP: $cats = $vbulletin->db->query_read_slave(" SELECT blog_category.* FROM " . TABLE_PREFIX . "blog_category AS blog_category WHERE userid = $userid ORDER BY displayorder " Comment the above and replace it with the below one. PHP: $cats = $vbulletin->db->query_read_slave(" SELECT blog_category.* FROM " . TABLE_PREFIX . "blog_category AS blog_category WHERE userid = 1 ORDER BY displayorder " Find PHP: function &build_overview_sidebar($month = 0, $year = 0) { global $vbulletin, $show, $stylevar, $vbphrase, $vbcollapse; Add the global variable $sidebar to the list. PHP: function &build_overview_sidebar($month = 0, $year = 0) { global $vbulletin, $show, $stylevar, $vbphrase, $vbcollapse, $sidebar; File : blog.php Find PHP: else if (!empty($_REQUEST['userid']) OR !empty($_REQUEST['u']) OR !empty($_REQUEST['username'])) and replace with PHP: else if (!empty($_REQUEST['userid']) OR !empty($_REQUEST['u']) OR !empty($_REQUEST['username']) OR !empty($_REQUEST['blogcategoryid'])) In short add the following condition PHP: OR !empty($_REQUEST['blogcategoryid']) Now add the following lines into the blog_sidebar_generic template HTML: <if condition="$sidebar['categorybits']"> <div class="tborder" style="margin-top:$stylevar[cellpadding]px; padding:$stylevar[cellspacing]px"> <div class="thead" style="padding:$stylevar[cellpadding]px"> <a style="float:$stylevar[right]" href="#top" onclick="return toggle_collapse('blog_categories')"><img id="collapseimg_blog_categories" src="$stylevar[imgdir_button]/collapse_thead$vbcollapse[collapseimg_blog_categories].gif" alt="" border="0" /></a> $vbphrase[blog_categories] </div> <div class="alt1 smallfont" style="padding:$stylevar[cellpadding]px; margin-top:$stylevar[cellspacing]px; $vbcollapse[collapseobj_blog_categories]" id="collapseobj_blog_categories"> <ul style="list-style:none; padding:0px; margin:0px">$sidebar[categorybits]</ul> </div> </div> </if> If you would like your user not to be able to add new categories File : blog_usercp.php Find PHP: if ($_POST['do'] == 'updatecat') { and below that add PHP: // Edit the user id to the userid who should be able to create the categories. This is same id for which you are fetching the categories if($vbulletin->userinfo['userid'] != 1) { print_no_permission(); } All done
Friends, Its wonderful concept as well as very essential for vbulletin blog users.Its good news for all vbulletin forum users and we are waiting for next build release. sure.. this upgrade will control the spam users and will give the best look and feel option. Thanks,
Thank you for providing us with the example code, and a brief explanation of the problem. However, we do not fully understand the problem you are experiencing.