Forum Replies Created

Viewing 15 replies - 451 through 465 (of 1,478 total)
  • wait, you’re allowing unfiltered comments, and you’re concerned about validation?

    bold tags won’t validate… let alone the shit people will try to put in your comments, so I wouldn’t be too anal about that.

    If I’m misunderstanding you, then how do you explain this? by default, your comments will indeed validate to xhtml 1.0 strict…. so just don’t do whatever it is you’re doing if you want to be a validation nazi.

    Forum: Fixing WordPress
    In reply to: Private Comments?

    perhaps what you need is a contact form, which will just email instead…

    it’s not exactly what you want, but it’s easy. If you need to use that regularly, and it should be accessed by multiple people, then make a gmail account specifically for the purpose, so you can all dive in there and access the mails.

    I think the internet will survive if you put your navigation links in a div.

    you mean this question? http://wordpress.org/support/topic/177494?replies=9

    the only thing you did wrong was misplace your thread 😉 – click the word “member” under your name here, or the “view your profile” link in the blue section up there ^^^ to find all the threads you’ve participated in.

    I’d try selectively disabling plugins, if you have any… I had this issue with a gzipping plugin (which has since been updated) so it’s not beyond the realms of possibility that something you have there is stepping on tinymce.

    I don’t know if it was the plugin or the gzipping process itself, so you may want to look at disabling mod_gzip, or mod_deflate in your htaccess, for the tinymce itself.

    having said that, I’m using mod_deflate now with no problems.

    if you want either of those things on pages, then you’re just not doin’ it right.

    use posts. put them on pages if you need to, but use posts.

    all I got from this is that your clandestine site works fine if you specify the port number, and not if you don’t.

    that suggests that the port number is something other than 80. If it is, then it’s no surprise that you have to do this.

    There’s no other way around it – browsers default to 80 for web traffic… you don’t like that? put a port number in there.

    if on the other hand, you’re actually using port 80, then your problem is very likely with your htaccess rules, not wordpress.

    Delete your htaccess file, and let wordpress make its own.

    just to let you know… I’ve managed to halve the amount of spam on my blog by ip-banning the major repeat-offenders. It is effective, but it’s not super-effective and you have to keep an eye on it.

    the limit directive limits the IP ban to GET requests and POST actions… so they won’t be able to comment but they will be able to access files.

    there’s no good reason to limit when IP banning.

    My experience with lorelle is that she’s not necessarily very technical. She’s more of an internet hunter/gatherer with a desire to share her findings. This is a good thing, but it doesn’t mean you should take her (or anyone else’s) posts as gospel.

    Forum: Fixing WordPress
    In reply to: Private Comments?

    not by default… you might find a plugin to do that, though.

    you could code it reasonably easily in the template – based on custom fields, for example. How’s your PHP?

    I don’t think dKyrie has a solid grasp on the concepts unfortunately.

    I’m also not particularly sure to which social sites they’re referring… perhaps if that were made more clear then the breakdown in communication would become more apparent.

    There’s absolutely no need (in fact it’s counter-productive) to duplicate your posts on other sites. If your content is of value, it will find its way.

    Your best bet to drive visitors to your sites is to consider blogging as a three-pronged approach.

    1) write excellent original content on as narrow a topic as you can. Write content which inspires action on the part of the reader – passive content which is observational in nature (most blogs) is meaningless to anyone but you.

    Basically, nobody cares what you think, they just care about how you can help or entertain them.

    2) If you must observe, then observe in your field of expertise. Write insightful editorials expanding on other people’s content, and link to several articles which you’re expanding on. This will drive traffic to those blogs, but it will also drive traffic from theirs to yours, via pingbacks. It’s your way of joining an active discussion with your particular brand of insight.

    3) Make an effort when you comment on others’ blogs. Write the kind of comments that make people want to know more about this masked stranger with brilliant insight. If you do that, they’ll click-through.

    I’m doing barely any of that on my personal blog, so I can tell you for sure that if you don’t do it, you won’t get very far 😉

    If you do all that on a topic that’s reachable enough to the average reader, people *will* link to you… you’ll have similar success if your content is exceptional on a topic that’s not quite as reachable.

    … if you write crap about stuff everyone else is writing about, get used to writing for your own gratification.

    Forum: Fixing WordPress
    In reply to: Client Login ideas
    ivovic

    (@ivovic)

    looking at it all in one place, it’s really not that much code to achieve customer-related private data, simply by making a new category for them as a subcat of ‘hidden’ with the slug theircompany-whatever.

    Forum: Fixing WordPress
    In reply to: Client Login ideas
    ivovic

    (@ivovic)

    wordpress user-level security is not really intended for this sort of thing, but it can be done fairly well, as long as you’re not doing it for the pentagon or something… as I said, it’s fiddly, so you really have to want to use wordpress, because other CMSs make this a lot easier. Of course, once it’s done, it doesn’t need doing over and over.

    keeping in mind, this is a hack in progress still…

    using one of the many plugins that allows you to specify additional meta fields for your users (I’m using register plus), specify a field called ‘company’

    You can then use that to determine which categories that user will have access to.

    I also suggest installing the Role Manager plugin, so that you’re not relying only on a text field for your security – instead, you’ll have to give each new user not only a company name in their profile, but you’ll also have to assign them a new ‘ability’.

    In my case, I’ve called that ability “access customer portal”.

    in your theme’s functions.php, put a little helper function which takes the company data and works out which category IDs your customers should have access to.

    function get_companydata($company_name = '') {
      if (empty($company_name)) {
        global $user;
        $company_name = get_usermeta($user->ID, 'company');
      }
      $cleanup = array(' ','-','_','\'','+','#','@');
      $slug = strtolower(str_replace($cleanup,'',$company_name));
      foreach(get_categories('hide_empty=0') as $category){
        if("$slug-privatecat1" == $category->slug) $company->privatecat1 = $category->cat_ID;
        if("$slug-privatecat2" == $category->slug) $company->privatecat2 = $category->cat_ID;
      }
      if ($company->privatecat1 && $company->privatecat2) return $company;
      else return FALSE;
    }

    this will take the company name and sanitize it, so if you enter “Joe’s Seafood” in the company field, it will turn it into “joesseafood”. It will then run through your categories and find the one’s you’ve created for this company, with slugs like “joesseafood-privatecat1” and “joesseafood-privatecat2”, and will pull the IDs of those categories for use later.

    complicated? naaa… lets move on.

    now make yourself a page template for your customers… assign it to a page like… oh I dunno… /customer

    put this in it:

    <?php
      global $user;
      $user = wp_get_current_user();
      $company = get_companydata();
      if ($company && current_user_can('access_customer_portal')) :
    ?>
    
       [ put your get_posts stuff in here,
         and finish the template with: ]
    
    <?php else : ?>
    
       [ put the code for your favourite
         login-form plugin here, because whoever
         sees this either doesn't have a company
         specified or is not logged in. ]
    
    <?php endif; ?>

    This uses the previous function to pull the company data, and checks whether the current user has the appropriate privileges to view the page.

    If so, the page is displayed, if not, they’re presented with either an error message of your choice, or a login form… or really anything you like in that last bit.

    now, in that top section of your template, you can use get_posts or query_posts to pull posts from a specific category into the current view.

    where you would normally hard-code a category ID, here you can use $company->privatecat1 (you’ll call it whatever you like instead of “privatecat1” to return the ID of the category corresponding to the company.

    so now your template looks like:

    <?php
      global $user;
      $user = wp_get_current_user();
      $company = get_companydata();
      if ($company && current_user_can('access_customer_portal')) :
    ?>
    
      <?php
        $readposts = get_posts('numberposts=10&category='.$company->privatecat1);
        foreach ($readposts as $post) : setup_postdata($post);
      ?>
          <div>
             <h2><?php the_title(); ?></h2>
             <?php the_content(); ?>
          </div>
      <?php endforeach; ?>
    
    <?php else : ?>
    
       [ put the code for your favourite
         login-form plugin here, because whoever
         sees this either doesn't have a company
         specified or is not logged in. ]
    
    <?php endif; ?>

    ok… so now your /customer page works… how to stop the sneaky bastards from finding posts via your category archives?

    Well, you’ll have to create all your customercompany-privatecat1/2 categories under a top level category, called… lets say ‘hidden’

    then jam this into your functions.php

    function is_hidden($catid) {
      if (is_category('Hidden')) return true;
      if (is_category()) {
        $post = $wp_query->post;
        $categories = explode('|',get_category_parents($catid,false,'|'));
        if ($categories[0] == 'Hidden') return true;
      }
      else return false;
    }

    then just put this in your category archive template…

    <?php if (is_hidden($cat)) : ?>
    
       You shouldn't be here, go to the customer page
    
    <?php else : ?>
    
       [ regular cat template stuff here ]
    
    <?php endif; ?>

    this will handle the Hidden category, and any children of the hidden category.

    I’m going to intentionally cripple my date-based archive template because I actively don’t want that functionality… but this gives you a pretty good idea of how to start looking at securing the date-based stuff as well.

    Like I said, this is really only a recent hack in its infancy… perhaps you’ll find some hints here to do what you want to do.

    If anyone has any better ideas, I’d love to hear em.

    Forum: Fixing WordPress
    In reply to: Client Login ideas
    ivovic

    (@ivovic)

    I’ve been working on this for a new project…

    it’s a little fiddly… but it is definitely doable (and quite well actually). How’s your PHP? (mine’s not great, but I’m still managing…)

Viewing 15 replies - 451 through 465 (of 1,478 total)