Store Community Support Documentation

Ok, under adminCP under appearance you have the menu link.  So  I went to blogs menu and attempted to edit it by shutting off Access for everyone except Admin and Staff.  My thinking was this site only uses Groups/Pages and since I did give permission in the user group management to add blogs I could shut off access to the main blog page which would hopefully shut off their ability to add blogs for all to see.

So after that didn't work and I was still able to see mydomain.com/blogs as well as mydomain.com/blog/add as well :(

So I went into the database, and I find they messed up the disallow_access setting in that they had for many several modules.

they put this

a:4:{i:0;s:1:"2";i:1;s:1:"3";i:2;s:1:"5";i:3;i:6;}

when it should be this

a:4:{i:0;s:1:"2";i:1;s:1:"3";i:2;s:1:"5";i:3;s:1:"6";}

so I thought I could just fixed that at it would disallow access to that page but no luck.  I even added a previous record they removed called 

menu_add_new_blog

 

and that didn't help either.  So I am really wondering what is the purpose of this fancy allow access pop up window with nice checkboxes that seem to do nothing except hide the menu item.

 

 

 

Last update on June 8, 1:30 am by JohnJr.
JohnJr
#1

I am stumped...I can't figure a hack around this.  It seem the disallow_setting does not work anymore. I can't figure out a variable to use with an if statement to only have a specific group be able to use group or pages blog but not be able to post blogs on the main blog menu page.

JohnJr
#2

Ok, sorry to say it just another hack job of a hack.  Hopefully, it won't affect anything else but you gotta do what you gotta do when stuff doesn't work the way you want them too.

so under  PF.Site/Apps/core-blogs/Controller/IndexController.php

I went to line 384 and added an if statement around it.

    if ($aUser.user_group_id == 1) {

            sectionMenu(_p('add_new_blog'), 'blog/add');
   }
        }

and it seems to at least remove the add button on the blog main index page although anyone too smart which figure out you can just put the word /add at the end of main blog index page and post all the blogs you want. But at least this stop most people and will allow them to add blogs in private groups but not regular blogs for all to see if they don't figure out the URL ending trick.

 

I feel your pain. My site has so many hacks of hacks at this point. :( I have nowhere near the level of control as in previous versions and it costs so much time. I was curious (or maybe just not understanding), were you just trying to limit the ability of pages or groups to add a blog? If so, would going to: Apps > Pages > Manage Integrated Items and setting "Integrate Blog with page" to "NO" do that? There's a similar setting in the groups app as well. I'm not sure what these settings actually do, so was just wondering if you had tried them.

JohnJr
#4

 Actually trying to do the opposite.  I don't mind if they post a blog, picture, event..etc in their group.  But don't want them to be able to add a blog on the main blog page or even pictures on the main site for all to see or something that is not related to their group.

Ah, that makes sense. Your workaround is pretty clever. It just sucks that it has to be a workaround at all. Sorry man. I'm glad you shared, so anyone else can try something similar if needed.