WordPress.org

Ready to get started?Download WordPress

Forums

Plugin: Elegant Category (in)Visibility (27 posts)

  1. BauB
    Member
    Posted 9 years ago #

    Elegant Category (in)Visibility

    This plugin is a more elegant solution to category exclusion. This release is a beta version, so test it out if you'd like, but I can offer no garuntees that it won't screw things up or even work properly :) It worked fine in my test bed, but so did miniblog.

    It uses filters to change SELECT queries and only adds only one extra query per page, rather than a few hundred. If this method has been done, post a link to it and disregard this plugin. If not, cool, I'm first.

  2. RummandDan
    Member
    Posted 9 years ago #

    I havent looked totally into yours, but I've done something like this:

    http://rummanddan.dk/archives/2005/03/movie-and-category-plugins-updated/

    But there's room for everybody... Dont dismiss your plugin just because others have been mate...

    What i see of your plugin it is very good, a lot more "in direction" than mine... As I've said earlier I use my category plugin as my switch army knife :D

  3. BauB
    Member
    Posted 9 years ago #

    Thanks for the heads up. I totally missed that on your site.

  4. najt
    Member
    Posted 8 years ago #

    When I activate this plugin I get 404 Not Found errors on all of my pages.

    http://mahune.org/

  5. sasson
    Member
    Posted 8 years ago #

    I get this error when I I clic on any category name on my sidebar:

    WordPress database error: [Not unique table/alias: 'wp_post2cat']
    SELECT DISTINCT * FROM wp_posts LEFT JOIN wp_post2cat ON (wp_posts.ID = wp_post2cat.post_id) LEFT JOIN wp_post2cat ON (wp_posts.ID = wp_post2cat.post_id) WHERE 1=1 AND 0=1 AND (category_id = 4) AND post_date_gmt <= '2005-04-24 17:31:59' AND (post_status = "publish" OR post_author = 1 AND post_status != 'draft' AND post_status != 'static') AND category_id <> 1 AND category_id <> 3 AND category_id <> 4 GROUP BY wp_posts.ID ORDER BY post_date DESC LIMIT 0, 15

    WordPress database error: [Not unique table/alias: 'wp_post2cat']
    SELECT DISTINCT * FROM wp_posts LEFT JOIN wp_post2cat ON (wp_posts.ID = wp_post2cat.post_id) LEFT JOIN wp_post2cat ON (wp_posts.ID = wp_post2cat.post_id) WHERE 1=1 AND (category_id = 4) AND post_date_gmt <= '2005-04-24 17:31:59' AND (post_status = "publish" OR post_author = 1 AND post_status != 'draft' AND post_status != 'static') AND category_id <> 1 AND category_id <> 3 AND category_id <> 4 GROUP BY wp_posts.ID ORDER BY not (ID in (45)), post_date DESC LIMIT 0, 15

    and no posts at all.

  6. BauB
    Member
    Posted 8 years ago #

    Did you guys try downloading the new version? The original version was buggy.

    The version you want is ECiV 0.1.5

    This cleared all problems up on my sandbox, so hopefully it will clear them up on your sites.

    @sasson: I found the root of your problem. A fix is in the works and will be released shortly.

    edit: Ok! ECiV 0.1.6 is ready for download.

  7. najt
    Member
    Posted 8 years ago #

    I'm using the latest, still 404's on my pages when the plugin is enabled. The frontpage works fine tough (and the excluding of categories). I've tried disabling all of my plugins but still get the errors.

  8. najt
    Member
    Posted 8 years ago #

    I'm mean I don't get a real 404, but no results are returned. It could be a problem with the SQL query, I'm using MySQL 4.1.8. But looking at the source code it shouldn't even try filtering single pages.

  9. najt
    Member
    Posted 8 years ago #

    I got it working. In function ecg_is_applicable_page() I changed:

    if($key == 'name' || $key == 'p') return FALSE;

    to

    if($key == 'name' || $key == 'p' || $key == 'pagename') return FALSE;

  10. BauB
    Member
    Posted 8 years ago #

    nice. thanks for the fix najt!

    i wish there was a better way to do what i did in that piece of code, but there's not.

    kudos to you

    the code is now updated

  11. najt
    Member
    Posted 8 years ago #

    There is one more issue. If you publish a post in multiple categories, and even if one of those categories is "marked" to be hidden, the post will be displayed. I think the default behaviour should be that the post is not displayed if any of the categories it is posted in match. Or maybe an option?

  12. BauB
    Member
    Posted 8 years ago #

    hmm. thanks for the report. i'll see what i can figure out

  13. sasson
    Member
    Posted 8 years ago #

    I downloaded the last version and everything is working fine now, thank you. This plugin is exactly what I needed!

  14. sasson
    Member
    Posted 8 years ago #

    Ups! My pages don't show anymore, just a "page not found" error!

  15. BauB
    Member
    Posted 8 years ago #

    Individual pages or what? Did the problem just arise after working fine?

  16. rbarona
    Member
    Posted 8 years ago #

    I use the plugin with the bug repair and my pages get 404 error. I only can see the post but not the pages.

    I tried to modified the plugin but I can't repair it. Can any one helps me?

    I am making test on http://www.catarroja.gondubon.com

    Thanks!

  17. rbarona
    Member
    Posted 8 years ago #

    My web server runs in IIS 6 and I have de UTF-8 set character. I am thinking in lot of ways to keep clear the hom of my web but the best is with this plugin but if it is run, the "pages" doesn't work!!! on 404 Error.

    I am the same guy that over this post. Can any one helsp me? I dont knok what can I do? (I am a simple webdesigner jejeje)

  18. katesgasis
    Member
    Posted 8 years ago #

    I tried using your Category (In)Visibility and I got 404 messages. I have tried installing it on m offline test blog and it is working fine. The problem arises when I installed the plugin on my online blog. I have been using gudlyf's version before that. I must admit, your version is fast. I've read the code. Less DB queries.

  19. rbarona
    Member
    Posted 8 years ago #

    I found the solution of my problem with the pages. I change the plugin and I foun a pluging wich can customize the homepages and its too easy. Look it; http://www.semiologic.com/projects/static-front/

    Good luck!

  20. dinkumator
    Member
    Posted 8 years ago #

    this broke all my pages, but it was an easy fix. just add:

    if($key == 'page_id' ) return FALSE;

    near the rest of the ifs in the ecg_is_applicable_page function

  21. amarfresh
    Member
    Posted 8 years ago #

    i was having similar "page not found" problems myself. the posts were elegantly removed from the pages i requested, but the post pages themselves were not available.

    they all stopped when i removed my permalink structure.
    (was /%year%/%monthnum%/%day%/%postname%/)

    does this plugin only work with the default permalink structure?

  22. hesed2
    Member
    Posted 8 years ago #

    Does anyone know what effect this plugin will have on a Page using multiple loops? Does it only exclude categories from the first instance of the loop, or ?????

  23. RichardF
    Member
    Posted 8 years ago #

    I'm running WP 1.5.1.3 and I've just installed the plugin (ECiV 0.1.6). Worked Ok when I only deselected 1 category - but when I deselect 2 from more than just the front page I get the follow db error:

    SELECT COUNT(ID) FROM wp_posts LEFT JOIN wp_post2cat ON (wp_posts.ID = wp_post2cat.post_id) LEFT JOIN wp_categories ON (wp_post2cat.category_id = wp_categories.cat_ID) LEFT JOIN wp_post2cat ON (wp_posts.ID = wp_post2cat.post_id) WHERE 1=1 AND (category_nicename = 'analyst-feeds') AND post_date_gmt <= '2005-08-13 22:12:59' AND (post_status = "publish" OR post_author = 1 AND post_status != 'draft' AND post_status != 'static') AND category_id <> 1 AND category_id <> 2 AND category_id <> 3 AND category_id <> 4 AND category_id <> 5 AND category_id <> 6 AND category_id <> 7 AND category_id <> 8 AND category_id <> 9 AND category_id <> 10 AND category_id <> 11 AND category_id <> 12 AND category_id <> 13 AND category_id <> 14 AND category_id <> 15 AND category_id <> 18

    Any ideas?

  24. RichardF
    Member
    Posted 8 years ago #

    I figured out the problem. This plugin doesn't work with permalinks - it works very well with standard url structure.

  25. wpmaniac
    Member
    Posted 8 years ago #

    This plugin does the same thing and seems to be much more reliable
    http://www.gudlyf.com/archives/2005/03/08/wordpress-plugin-category-visibility/

  26. mgm_03
    Member
    Posted 8 years ago #

    This improves upon the work done by Gudlyf who is not supporting the plugin anymore:

    http://ryowebsite.com/?p=46

  27. slambert
    Member
    Posted 7 years ago #

    It appears this is a version of the plugin that will work in wordpress 2.0+ http://ryowebsite.com/?p=46

Topic Closed

This topic has been closed to new replies.

About this Topic