• I’ve made a plugin that lets you restrict the visibility of posts by userlevel (I guess I had the same idea as Skippy!) Check it out here:
    https://www.furbona.org/viewlevel.html
    (Mine is easier to install – it’s just a plugin – but it looks like his is a better implementation overall, less of a hack…)

Viewing 15 replies - 16 through 30 (of 64 total)
  • Thread Starter wyzewoman

    (@wyzewoman)

    Hey, thanks! I didn’t notice that because I don’t have the calendar showing on my site. I’ll get right on it…

    My posts seem to keep getting deleted!

    GREAT plugin. I was waiting and hoping for something like this since b2 !! I guess now it’s time to upgrade my private blog to 1.2 ??
    The first step was very painless to install.
    So I thought I’d move on to the additional code you provided. Took me a little while to figure it out (some oddities along the way), but now it works that unregistered viewers (cat=0) will only see what is posted in general and to see anthing else they have to be at least level 1. This makes a really useful too, especially in addition with having the option of userLevel requirement on a per-post basis.
    Great! Thanks a lot.

    Actually I did find a problem: if the category to hide has at the same time a category to show (e.g. category house plus category general of which house is to hide but general to show) – in such a circumstance the messages will hide and not show up in the category to show.
    For now my workaround is to ensure an ‘all public’ messages will not also be filed in another category.
    Is there something one could do to have ‘all public’ messages show no matter into which other (hidden) category there are also filed?

    How can you show the view level of a post a viewer can’t read. IE if the view level is 1 and the user’s level is 1 they can read the post but if the view level is 2 they can’t. So how can you display the title or something to let them know they need a higher level?

    Not sure if this is in response to what I wrote? Or are you asking how you can do that? Personally I am glad that they don’t see there is something for higher level (because the password protected posts do that already).
    I’ve noticed another problem, I also use ‘narchives.php’ plugin which works great and also refers to the wp-blog-header file. The filter_cat() works fine for date and title in narchives, but when the narchives sort per category, all, even the hidden ones, will show – title and date and in which category. (So basically that what Anonymous had been asking for). Clicking onto such a title though will correctly then display no info on the posting.
    Also, the amount of postings per categories will show on the index.php page (if the tag is enabled to show number of posts in the index.php file), so that would also show that there is more than a lower level can see (would that solve your question Anonymous?).
    Right now, it just nees some planning and evaluation of importancies, i.e. for me it is not important to show how many postings per category, I am even considering to take the ‘display by category’ part out of the narchives, just to ensure that not even titles of hidden posts can be found. If I’d know more about coding, I am sure there are simple solutions to these situations.

    Thread Starter wyzewoman

    (@wyzewoman)

    Wow, so many comments when I go away for a day! ??
    I’m going to see what I can do this evening about fixing some of the issues noted above. The real difficulty here is with the WordPress plugin architecture -it makes it easy to control things like how the title of a post looks, but not yet easy to control deeper things like which posts get shown.
    So, I’m trying to think about ways in which I can get viewlevel to work more consistently — thanks everybody for pointing out the places where it doesn’t! — with the absolute minimum amount of changes to the WordPress code itself. That’s my project for tonight. I’ll let you know what I work out!

    Actually, I like the fact that they can’t read the post. If you wanted a post that you wanted people to KNOW they can’t read, just use the default ability to password protect entries. The point IMHO is not to get harassed because people can SEE there is something they CAN’T see.

    Hiding the posts completely can be accomplished by making a post ‘private’. If there isn’t anything showing posts of higher levels then how will anyone ever be able to read them or know they exsists? Do you expect people to just sign up?
    I thought this plugin would be nice for making posts you want the masses to see then ‘users’ who sign up will get to so more personal posts but no one will even know you need a higher user level if there’s nothing showing user levels at all.

    If you make the post “private” only you can see it. If you want to use this hack and let people see certain posts, then look at your userlist and give them the level that they need to view it. Once again, when people register, it is up to YOU what level you want them to have. If you want to make post that only registered users can see, then make the post say… level 5 then give all new users a defaul level of 5. If you want nothing to show up, then just make an open post that says “You must be registered to view new posts” and make that a level 0 and everother post a level 5.

    No, no, there is a BIG difference in having a post PRIVATE (which only shows in the admin – edit views) versus having something only visible to a certain level of users without disgruntling the other users who can not read it. I do not want to read my blog in the edit/admin views. I really think this ViewLevel plugin one of the best new add-ons.

    An addition: There are situations where you do not want to ‘tempt’ people to sign up and thos who should sign up will know so. An example is a Home Association site I am working on. These people do NOT want the general public to read their stuff but there are some general things which apply for non-members too, for example the date of the next big garage sale or some parade in that area. Some people like to know whom to contact with questions about the area. General public. In situations like this it is very convenient to have just very specific categories visible for level0 users.
    I’ve now incorporated 4 levels: all public (0) – general home association member (1) – board members (3) – general admin (5). For level 3 and 5 there are only singular posts set to their level, some private talk between board members or some communication between admins which are not of interest to the general community (like: ‘it is time to set mrX back to level0, he has moved away 2 days ago).
    The password protected postings have always the problem of needing to tell somebody a password and then to change that password if you don’t want them to see it again because you’ve gotten into a real bad fight with them and knocked their teeth out. Changing a user level is easy to do and will accomplish filtering posts and categories at the same time.
    Well, just my thoughts on this plugin.

    Pardon me while I ask a silly question..
    I already have like 500 posts. How could I set a default user level for all those posts? I tried looking into phpmyadmin but I couldn’t find a way to add “vl=1” to the post field.

    Thank you! I was thinking gosh I got to edit all those posts and what if I don’t want to use the view level in the future, I have to edit all those posts again!

    Wyzewoman- I installed your plugin and for the most part it works correctly. However, when I set the show_private_posts to 1, while it DOES show the message “Sorry you need to be logged in to see this post”, it also goes on to display the actual post contents right below it, defeating the purpose of the plugin.
    It works perfectly in hiding the post and then displaying it to appropriate levels when I have show_private_posts to 0. I made the modification to wp-blog-header as well as whatever else was suggested.
    Any ideas?

Viewing 15 replies - 16 through 30 (of 64 total)
  • The topic ‘ViewLevel plugin’ is closed to new replies.