HidePost plugin for Wordpress

October 27th, 2009 Leave a comment Go to comments

HidePost Plugin for Wordpress


Summary

A plugin that hide a part of your blog post ( links, texts... ) that only registered and logged in user can see it. Just put your content between [hidepost][/ hidepost]

From version 2.3, you can add level to hidepost tag like [hidepost=6][/ hidepost] so that only users have their level higher than 6 can see you hidden content.

You can hide all the links in your blog to unregistered users, just go to Option page and check Protect links.

Require Wordpress 1.5 and compatible with ( it should ) 2.8.x.

Install

Download it from Wordpress's repo , if you installed it through Wordpress's plugin page, just skip step 1 and 2

  1. Upload the folder hidepost into /wp-content/plugins/ directory
  2. Active it  through Plugins page
  3. Go to Option -> Hidepost and check Enable Hidepost

Upgrade

  1. Deactive Hidepost
  2. Upload new hidepost folder to /wp-content/plugins/ directory
  3. Reactive it and check the new feature in Option page

Note: If you are upgrade from version 2.2 or less, you'll need to replace your old tag ( maybe [protect] ) with  the new tag ( [hidepost] )

Other Note

If you have any question, fell free to drop me an email or comment on this page.

Sorry for my bad English, I tried my best :)

I'll not include changelog and FAQ in this page, so if you want to read it, please go to my plugin's page in Wordpress repo.

More detail change log can be found here

Good luck and have fun using my plugin.

Donation

Donation through Paypal if you want to contribute to my works.

  1. November 6th, 2009 at 02:13 | #1

    @Jon - well spotted, I have been looking at these lines but didn't spot that.

    @Fu4ny (Nov 5) I think you underestimate your users. I must disagree, we depend on this working correctly to preserve our privacy so I think it is an important bug. Perhaps while you fix that you could also add

    add_filter('the_content_rss', 'hidepost_filter_post');
    add_filter('the_excerpt_rss', 'hidepost_filter_post');

    which would fix the RSS/Atom feed problem as well.

  2. November 10th, 2009 at 19:46 | #2

    Hi. Great plugin, but i have one question.
    Is there any way i can add mutliple hidepost options? like hidepost1 and hidepost2?
    there are a few different things i would like to appear when a user is not registered.
    Thanks

  3. November 12th, 2009 at 11:59 | #3

    Hello, Fu4ny. I'm the author of the Role Scoper plugin. One of my users asked how to get HidePost functionality to reveal a portion of the post only to members of certain Role Scoper User Groups. I hope you don't mind, but I posted a hack to hidepost.php which will accomplish this. Let me know if you're interested in formally adding this feature to your plugin.

  4. November 12th, 2009 at 12:00 | #4

    Sorry, I forgot to include the link to the HidePost User Groups hack.

  5. November 13th, 2009 at 19:35 | #5

    @Rick
    Thanks, but I think the rss filter isn't the problem, because without it, the content still be hidden in rss feed.
    For the typos, I'll fix it soon

    @Kevin Behrens
    I
    l'll take a look in the plugin and the forum as well. Thanks

  6. November 14th, 2009 at 00:05 | #6

    @Fu4ny

    Though the RSS2 and Atom feeds are ok with the existing code, as I said on Sep 25, the RSS[1] and RDF feeds rely on the_content_rss which your filters don't touch.

    I thought they all relied on the_excerpt_rss if excerpting was switched on but I didn't look at that so closely. It can't do any harm to filter all four.

  7. Lalng001
    November 17th, 2009 at 23:34 | #7

    Is there anyway to make the tag. "[hidepost][/hidepost]" functional on templates. I notice that if it's used on tempalte e.g (single.php), it is just shown as plain html and no changes happened.

    Thanks for the reply.

  8. November 18th, 2009 at 03:06 | #8

    @Lalng001
    If I may be so bold as to reply...
    the answer is no, not directly using the hidepost plugin. You can, however, code something very similar in the theme templates. I have done this on my site so that the comments are only visible if you are logged in.

    I used the code if (is_user_logged_in() ) :

    If you want the more sophisticated functions of hidepost requiring a certain user level then I am sure there are similar functions for that.

  9. January 7th, 2010 at 03:58 | #9

    Wordpress 2.9

    Hi Fu4ny - you will be glad to know that it works as well with 2.9 as it did with 2.8!

    Re my corrections for the feeds - there has been a small change in 2.9 such that the_content_rss is now deprecated. It has been replaced by the_content_feed. the good news is that this gets its data from the_content so the addition to hidepost to

    add_filter('the_content_rss', 'hidepost_filter_post');

    is no longer needed. However the modification to

    add_filter('the_excerpt_rss', 'hidepost_filter_post'); /* after line 167 */

    is still required. It looks like someone in WP HQ is looking at feeds and they have done half the job of tidying it up :(

  10. January 16th, 2010 at 22:12 | #10

    Finally I got time.
    Fixed some bug, moving around some function

    And...finally a template call.
    Still doing something before release a new version

  11. January 17th, 2010 at 03:32 | #11

    Hello, Fu4ny.
    How do I show an alternative message saying that to see the remaining information has to be registered as a user.

    [hidepost = level]my hide text[/ hidepost]
    [hidepostmesage = level] message for not users [/ [hidepostmesage]

    Thanks

  12. January 17th, 2010 at 13:02 | #12

    @Manuel Arroz
    It's possible, but I don't want to mess other post with many type of tag. Imagine that you have around 500 post with many hidepost's tag, and then you want to uninstall it....

  13. Arno
    January 23rd, 2010 at 18:26 | #13

    Thank you for this plugin !

    Is there a way to display the button in TinyMCE Advanced ?

  14. January 23rd, 2010 at 23:49 | #14

    It works with normal TinyMCE editor.
    I don't know if it works with TinyMCE Advanced, maybe I have to do some work around

  15. Arno
    January 24th, 2010 at 00:22 | #15

    The answer : it works, you just have to de-activate then re-activate TinyMCE Advanced plugin ;o)

  16. January 25th, 2010 at 18:13 | #16

    @Arno
    Glad it works, lol

  17. February 18th, 2010 at 14:59 | #17

    hello :) I really want to use this plugin, but when I try to activate I get an
    "Plugin could not be activated because it triggered a fatal error." error..

    whats wrong? :(

  18. February 18th, 2010 at 22:25 | #18

    @Jays
    Try to deactive all the plugin, and reactive hidepost, it should work fine.
    reactive one plugin after another and try to find what plugin cause the error

  19. February 22nd, 2010 at 09:45 | #19

    @Fu4ny
    its working!! yehey!!!(^O^)/ thanks for this plugin!! one of my favorite plugin!!(^ω^)V

  20. February 23rd, 2010 at 15:41 | #20

    Hi! I like this great plugin. I have a question. According to "Brief (Firefox's Add-on, feed reader)", the hidden post will be able to have a seen all. What should it carry out for making it hide in "Brief"? Thanks

  21. February 23rd, 2010 at 15:56 | #21

    Now, I checked hiding in "Brief". A previous question suspends. Thanks.

  22. February 25th, 2010 at 07:36 | #22

    after my most recent update, Wordpress 2.9.2, hidepost is not working. All my links meant for registered users are exposed :( Anyone else having this problem? Anyone have a fix?

  23. February 25th, 2010 at 07:41 | #23

    I figure it out. Download Link Manager plugin was messing it up.

Comment pages
1 2 3 4 840
  1. February 18th, 2009 at 00:05 | #1
  2. April 18th, 2009 at 10:23 | #2
  3. May 25th, 2009 at 09:15 | #3
  4. May 27th, 2009 at 11:21 | #4
  5. May 31st, 2009 at 21:33 | #5
  6. July 4th, 2009 at 20:38 | #6
  7. October 28th, 2009 at 18:08 | #7
  8. November 7th, 2009 at 01:50 | #8
  9. November 13th, 2009 at 19:15 | #9