Forum Replies Created

Viewing 15 replies - 1 through 15 (of 41 total)
  • Forum: Hacks
    In reply to: Anti-spam registrations
    Thread Starter xennex81

    (@xennex81)

    You are assuming that first, I have a problem with losing this change, second, it will be a problem for me to reapply it, third, that I was exposed to this ‘risk’ unintended, and fourth that I have nothing to gain from observing these dynamics and inconsistencies as they now surfaced in my site.

    All of them… WRONG.

    Take a chill break dude, nothing bad happened. I’m having fun. “Fun” seems to be a thing very few people recognise when they see it….

    Forum: Hacks
    In reply to: Anti-spam registrations
    Thread Starter xennex81

    (@xennex81)

    The 3.9.2 security update broke my site security LOL!

    Since yesterday I was suddenly seeing new spam user registrations.

    And I wondered what could be going on….

    Only to realize that the update must have replaced my wp-login.php which had a few changes.

    Most notably: I had obfuscated the register url parameter to be “manjoin” instead of “register”.

    What is interesting is that these spammers are obviously NOT using my site to find the link to the register page (because it is broken now, all my links everywhere still indicate “manjoin” since general-template.php is still the same. I wasn’t using some kind of filter (for register_url) but I manually adjusted general-template.php and that adjustment is still in place.) No regular user can actually join my site at this point. But bots can.

    So basically, they are directly targetting login.php?action=register which location they directly guess upon realizing it is a WordPress site.

    The element ID probably also needs quotation marks you can see how experienced I am with jQuery lol. I’m also rather sick body is forcing me to stop working so not as observant as I’d usually be..

    How I’d love to have some girl with me taking care of me for a bit ;-).

    But… it’s solo practice all the way.

    Can’t work for the life of me and yet I am forcing myself to do some writing and video recording that just insisted it be done.

    Anyay, time to sleep, hopefully.

    Later…

    That code is all buggy

    $( #linkid ).on("click", function(e) {
        $( #iframeid ).load( e.target.href );
    });
    if (is_user_logged_in()) {
        $current_user = wp_get_current_user();
        $user_login = $current_user->user_login;
    }

    Hey, no I’m the one who is sorry. I just find it hard to find my real voice from time to time and I say things that may be a bit too… ghastly. I was already writing an apology actually but I lost my ‘voice’ again midway… :-/.

    I was meaning to write that of course you are deserving of aid, you must realize that people’s time is also limited and it could certainly be helpful (and I think it would) if you were to make sure that people here know what you are asking of them so they can properly evaluate whether to put time into it.

    There is no HTML structure to be produced. I simply need to have a link in a WordPress web site cause the execution of a plug-in of my own design. The author of the WordPress web site knows how to install the link and my plug-in, but I am responsible for what the link does!

    This makes no sense at all. You are either responsible or not resonsible. If you are going to be designing this site (template) then do it, otherwise don’t. If that site owner is developing his own site, then how can you be responsible? I don’t get that. Where lies your responsibility? It’s not your site? so what service are you providing to that site owner? What is your role exactly? Are you clear on that? You make it sound as if you don’t have a freakin’ clue as to what you need to be doing, like if I was asked to “insert the semophlange into the oscillating power unit entrance gateway” and I have no idea what a semophlange really is, nor where I can find that gateway whatever, but I still feel I need to do it!!

    Said another way – I would like to have WP automatically and securely redirect the WP user to a ‘different, premium content, non-WP site’ when the user clicks a link to an iframe element inside of WP. The login information would be transmitted by an encoded key value generated on the WP server, and passed to the premium content site as an encoded ascii key value in the initial URL.

    See, if you had started out with this, it would have made everything infinitely more understandable and clearer.

    But please do define “link to an iframe element inside of WP”. An iframe loads a secondary url. I am assuming for the moment that this secondary html is generated by the same site that outputs the page itself. So what you would have is a little separate PHP script (much like what you would use for AJAX calls) that generates the link (and possibly surrounding content).

    Meaning, something like

    <iframe src="my-generator-script.php" />

    Now you can either pass the generator script the variables you need to pass, or give it access to the WP environment. I am assuming for the moment that you don’t mean to load that premium content inside that iFrame, but rather want a complete browser-window redirect?

    Not that it matters a whole lot. See, this is just yet another example of someone trying to invent the solution when he is not clear on the problem. You cannot actually invent solutions. Solutions are embedded in problems. So when you are not in touch with the problem, the solution will evade you. But if you can communicate with the problem and ask what it wants, it will ‘tell’ you the solution. So there is no ‘inventing’ or ‘making up’ involved. But you were doing that.

    If the generator script loads the WP environment it will use the same cookies as the logged-in user so you will be able to get / obtain the current logged in user, just fine.

    In either case, obtaining the user(login-name) is as simple as:

    $login = wp_get_current_user()->user_login

    There is some fuss in the help files (source files) about the “current user” possibly not being the “signed in user” but I think that is only relevant/applicable if you use a different user account solution (it is defined in pluggable.php which allows for function overrides). In general the current user should (ought to?) be the signed in user.

    If there is no signed in user, the output of that line of code will produce and empty string or a null value, not sure. Actually, it is a boolean “false”. Which produces an empty string when used as a string.

    However, you were talking of “redirects”. Currently you are just describing plain links. Once you have generated the encrypted key, and placed it in the HTML document OR the iframe HTML document, normally only the logged-in user would have access to that key. If you are going to use symmetric key encryption (as opposed to just e.g. base64 encoding) you cannot do the key generation in JavaScript anyway. JavaScript would need to have access to the key, pretty much voiding the security of the design as far as I’m concerned.

    So either you generate the key as part of the template that outputs the HTML with the link, or you let the template include a distinct PHP output through either iframe or ajax.

    That’s all there is to it? It really makes no sense to have the PHP output JavaScript or otherwise embedded parameters that the JavaScript can use for encoding a key that the PHP is in a better position to generate anyway…. given that the keys are not dynamic from the viewpoint of the browser.

    Otherwise, if I take your words literally, you want the link to just be output by the template code but the link has the iframe as target.

    I take it you know how to do that but here is a little idea:

    $( #linkid ).on("click", function(e) {
        $( #iframeid ).load( e.target.href );
    }

    Not sure if that works, not going to test it either.

    One last thing to note: the output of wp_get_current_user() is not really well defined in case of a non-logged-in-visitor but by default it sets the user to a non-existing user “0”. To be safe you would need to use

    if ( is_user_logged_in() ) :
        $current_user = wp_get_current_user();
        $user_login = $current_user->user_login;
    }

    That’s all I can say right now. Good luck with it.

    First decide how you want the html to function.

    Are you going to create inline or inline-block span elements or li elements in some ul element so they will get horizontally displayed?

    I don’t know how to do anything called a ‘carousel’ but I think you just want a horizontal list?

    Then when you have that list, how are you going to load the bio? Are you going to use JavaScript in the onClick handler for the images?

    If you use pure HTML for that, it will require loading the entire team page with a new parameter each time. With JavaScript, you can load that bio dynamically in the browser.

    But there are primarily two ways of doing that:

    1. load all bios in one go by having the page template for your team page (or the category template for your team category) do a WP_Query query on all of the posts (pretty much default behaviour for a category template) while creating unique IDs (possibly using array syntax) for identical HTML tags that contain the bio… and then using JavaScript to hide/unhide the various #ids.
    2. use AJAX calls to query a script that outputs a bit of HTML containing the bio, which is then loaded dynamically into the element that you have designated for showing the bio.

    Personally I think the latter is a prettier solution but the former is probably easier at first sight.

    In either case, I suggest using jQuery for doing it.

    This is simple jQuery syntax for hiding an element and showing another:

    $( "#elementid" ).css( "display", "none" );
    $( "#elementid" ).css( "display", "inherited" );

    This is simple jQuery syntax for setting the contents of an element:

    $( "#elementid" ).html( javascriptVariable );

    This is simple jQuery syntax for loading a PHP result into an element:

    $( "#elementid" ).load( "obtain-bio.php?id=NNN" );

    The benefits of method 1 is that after the page has loaded, it is very responsive. With method 2, each click on a picture will cause new data to be requested from the server.

    I do not know what a “featured image” is and I would like to have something like that myself because I often include images that I want displayed as thumbnails in my excerpts in my posts, but supposing that you just randomly include one(1) image in each post, you could simply extract or filter that image by doing:

    if (preg_match('@<img .*?(/>|</img>)@i', $post->post_content, $m) {
        $img =& $m[0];
        // do something with the image
    } else {
        // display error about missing image
    }

    And to remove it from the contents so only the bio remains:

    $bio = preg_replace('@<img .*?(/>|</img>)@i', '', $post->post_content);

    This may leave a <p></p> paragraph if WP had inserted that. But it usually does so in a later stage. In fact, it only does so when you use the_content() to display your post. You can apply any filter before that by using the 'post_content' filter.

    But there is also a feature in WP called “attachments”. When you insert an image into a post, it adds that image as an attachment for that post, which is a child of the post in the parent-child hierarchy for posts. If you then remove the image link from the post content itself, the attachment remains.

    So, you can also skip this filtering and just query the attachment when you want the image for a post:

    $attachments = get_posts("post_type=attachment&numberposts=1&post_parent={$post->ID}");
    if ($attachments) {
        $img = wp_get_attachment_image( $attachments[0]->ID, 'full' );
        // display the image in your container element
        echo "<li>$img</li>";
    }

    The reason I do not really like this solution is because I don’t really feel to be in control of these attachments. They are weird parent-child objects existing as separate ‘post’ objects. I have no idea what their post content is (how is that defined?) and in fact their content is not defined but the link to the image exists in the “guid” field. Why someone would define something as a “post” object while then having no contents is beyond me.

    The hierarchy thus described also seems to be limited to just two levels which means the attachments could simply have been described as objects in some “attachments” array defined by relationships described in a new (additional) relationships table or (if you want strict hierarchy) simply as the parents of those attachments objects in a new attachment table.

    There is not actually a way (in 3.9.1) to edit these ‘attachment’ links all you can do is delete the object (the post object of type ‘attachment’ that is shown in the media library). It also means you cannot attach the same file to multiple posts which means I (in my own situation) will have to keep uploading the same image file again and again just so they can properly be ‘attached’ to the posts I want them for.

    Which means I will probably be writing my own plugin using custom post fields (metadata) linking to unattached media library files instead of having them as child objects for single individual posts.

    Essentially, for your (YST) use case it doesn’t matter, I just don’t like using this parent-child link to obtain the reference to the files, because if the implementation for this changes at some future moment, your code will cease working and because of that consideration I feel it is better to depend on your own solution which is simply the inclusion of an <img src=”…” /> link into your post content.

    That way your individual posts (if you provide a way to access them) still show the image (if you want that, you have to account for that).

    But since you will exclude this category from normal post listings, that will not really be a consideration I would think.

    So I would strongly suggest to just use this solution:

    For the code that generates the ‘carousel’ just extract the <img> tag like this:

    if (preg_match('@<img .*?(/>|</img>)@i', $post->post_content, $m) {
        $img =& $m[0];
        echo "<li>$img</li>\n";
    }

    You need onClick events for these images or their containing elements. Register them using:

    $('#team-img-N').on('click',
        function (e) {
            changeBio(e.target.id);
        });

    Then you have another JavaScript function “changeBio” that takes the element ID of your image tag (for instance) and uses it to effectuate the change you need according to the method you choose.

    If, for example, all your elements are named “#team-pic-NNN” where NNN is the number of the post (its ID really in the WordPress database) you can use it to easily reference either the elements you want to hide/unhide or the URL of the bio snippet you want to load.

    So you use a simple javascript function like substr to take the number out of the ID:

    function changeBio(element) {
        id = element.substr(10);
        // do the hide/unhide, or the load
    }

    Then you need PHP to put those element IDs in some tags. It would seem easiest to give them to the <li> tags I’ve used as an example.

    echo "<li>$img</li>\n"; becomes echo "<li id=\"#team-pic-{$post->ID}\">$img</li>\n";

    After that you just need to ensure proper CSS styling and whatnot.

    You could use a WP_Query loop to process all the posts in a category. Probably easiest is to just do a get_posts() with the required parameters and then looping over them with a foreach.

    If you go the hide/unhide route you just iterate the array you get again when you create all of the (hidden) elements. If the hiding (display: none) of those elements does not disrupt the page flow (because their container element has a fixed size and uses scroll bars, or perhaps it doesn’t matter) the hiding/unhiding should not be a big deal… I think.

    So I think these are all the fundamental elements you need.

    This is everything you need for the most basic solution.

    For the AJAX retrieval route you just need a small PHP file that loads the WP environment:

    <?php
    
    require_once( dirname(__FILE__) . '/../wp-load.php' );
    
    ?>

    If you put your obtain-bio.php script in /ajax/obtain-bio.php that snippet would load the WP environment provided those WP PHP files are in the website root.

    Then all you need is to return the contents of the post excluding the image:

    $param_id = $_GET['id'];
    if ($param_id) {
        $post = get_post($param_id);
        if ($post && $post->post_status == 'publish') {
            // we want the post_content to be processed the way WP likes to do
            // but first remove the image
            $bio = preg_replace('@\n?<img .*?(/>|</img>)\n?@i', '', $post->post_content);
            // also removes a potential leading and trailing newline
            // apply default WP filters
            $bio = apply_filters('the_content', $bio);
            // echo raw text
            echo $bio;
        } else {
            echo "<p>Error in your script. $param_id is not a valid post ID in this WordPress installation.</p>";
        }
    } else {
      echo "<p>This script requires a post-ID parameter</p>";
    }

    I’ve tested this last script and it works like a charm. Obviously it will return every valid published post, not just ‘team’ category posts.

    So there you have it:

    • a HTML list containing the pictures
    • each picture element gets assigned a unique ID
    • for each such element a JavaScript event handler is assigned (the same code snippet for all elements)
    • the event handler calls a function that takes the element ID and uses it to change/load the bio for the required ID
    • the PHP code for the team page generates all those elements and IDs after obtaining a WP_Post array of the suitable posts
    • the image to display is extracted from the content of each post using a bit of regular expression matching
    • the remaining content to display has the image removed using a bit of regular expression replacing
    • you can choose whether to load everything at once or do lazy loading

    I don’t think there is much more to it. I believe you have all or most of the code you need, and what remains will be easy to adjust. You will have to learn how to load the jQuery library and how to insert JavaScript snippets that can get executed. That “changeBio” function you would place in the HTML <head> tag. The jQuery code to set the “click”-event handler can probably be expanded to set it for all required elements at once. If you need more help, let me know, but I expect you to take what you have now and try to make it work yourself.

    Good luck! You will need it :).

    Not sure if I can be of help with this, but…

    Are you sure WordPress has read access (PHP has read access) to those php files?

    So it is only your next_posts_link() that doesn’t work and everything else works fine?

    If you are this avid a coder, why don’t you check out that function yourself to see what is wrong?

    The only odd thing that really appears to me is:

    'category' => -320,

    Why do you have a negative category number? category doesn’t seem to be a parameter (it is cat) and it could never be negative?

    Forum: Hacks
    In reply to: Query String / Month

    This array parameter seems to do what you want:

    $args = array('date_query' => array ( 'after' => '1 week ago' ) );

    provided you want the last 7 days, and not the current week number.

    perhaps:

    $args = array('date_query' => array( 'after' => '1 week ago', 'inclusive' => true ));

    Forum: Hacks
    In reply to: pass variables in wordpress

    Globals are perfect for this task, and WordPress itself uses them all the time. Not sure why you are saying that, mr. Esmi. Transients seem like a rather WordPress-specific way of storing (cached) data, not at all what this question asker wants.

    You can, for instance, also define globals in your functions.php.

    A global in PHP is nothing other than a variable that has been defined in the default scope and which can be accessed in other PHP files as well as in functions and classes and the like, by simply stating a globals declaration for that variable.

    global $myvariable;

    That is all there is to it. It has nothing to do with WordPress proper.

    Here are some globals you cannot use:

    global $posts, $post, $wp_did_header, $wp_query, $wp_rewrite, $wpdb, $wp_version, $wp, $id, $comment, $user_ID;

    Note that template files are included in a way that makes variables declared in e.g. header.php not accessible in index.php, but they are the other way around (define in index.php, do a global declare in header.php).

    If you use the $GLOBALS[‘name’] like Simalam suggests, it should always work. WordPress has (or really should) have no way whatsoever to disrupt any globals you use or declare other than when you use or define a variable that WordPress already uses itself.

    There are some more globals you cannot use, like $page, $numpages, $more, that can result from the query being set up. But if things start to act weird, you know what’s up.

    To find all the currently defined symbols in the global scope, do:

    print_r(array_keys($GLOBALS));

    Just because they are defined doesn’t mean WordPress necessarily uses them, they may simply not have been unset after they were no longer required.

    Just use common sense and all will work out fine..

    The only time something fishy started happening to me is not because I used a global, but because I had aliased a symbol to something that already existed (like $a =& $GLOBALS[‘wp’]) and then re-used that symbol (variable name) while it was still bound to that other variable :P.

    Again, you cannot set the header from PHP after it has started outputting other text. Of course you can use PHP to output JavaScript code that can do it for you.

    In other words, it would output user interface elements that are tied to JavaScript functions that you defined in some .js file, probably.

    It would occur to me that loading a generic PHP file with a parameter that then does the redirect (using that plugin you supplied) is not very useful. Simply because if you are loading that PHP file with a parameter, you could also load the redirect you want, directly.

    A PHP redirect is really something that you can only do, or so it seems, without any user interaction, that is, as part of the input parameters (either GET or POST) of your PHP script.

    Usually such a thing would indicate a form of error condition. It cannot be the result of user action. Unless it is the result of e.g. a login script that does a redirect after processing the login credentials.

    It seems to me that what you want foremost is JavaScript redirects. Back in the day I simply used “document.location = “xxx”” for that.

    What you then want is a bit of code that outputs this Javascript. It appears to me as though you want this computation and URL construction to be done by PHP.

    The JavaScript to output would not need to be more difficult than:

    document.getElementById("clickMe").onclick = function () { document.location = "url"; };

    You could output this JavaScript anywhere after the element itself has been defined in HTML.

    <?= "<script>document.getElementById(\"$element\").onclick =
        function () {
            document.location = \"https://www.xxx.com?key=$key\"; };
        </script>" ?>

    Alternatively, you could use jQuery to do more flexible selection:

    $("#elementid a").on("click", function(){ document.location = "url" });

    If you want the key to be returned ‘live’ from a function, it would turn out something like this:

    <?= "<script>$(\"$element\").on(\"click\",
        function () {
            document.location = \"https://www.xxx.com?key=" . key_gen($element) . "\";
        }
        ); </script>" ?>

    That is all I can do for you right now. If you want to “engage in email conversation” what you are really asking for is a professional service, which will require payment. If you are seeking such a service, you should not be asking for help on a forum. Forums are for mutual exchange in which both parties benefit from the exchange out of personal interest in either the topic or the problem at hand.

    Meaning, on a forum you can only expect to obtain guidance on how to do something yourself. A responder will only invest more time and energy if he/she feels you are deserving because you have done everything you can do yourself, meaning you have made an investment yourself in your own problem resolution.

    But currently, if I may be so bold, you sir are asking people to invest while you have not invested very much yourself. The replies and suggestions I am giving you here are in direct proportion to your own investment (which comes down to explaining what you actually want). Since you have not shown us any of the HTML structure you want to produce or use or output, you have not told us where this key is going to come from, how many such user elements there are going to be, whether the key can be computed based on the page (post id) alone, or additional form inputs, etcetera etcetera etcetera, I would hold that your own investment in your own problem resolution is currently rather limited.

    If you, good sir, are then asking for people not only to write that code but also to obtain all the information from you that is necessary for writing that code, while you are not giving this forum any of that information, it means you are requesting a professional service.

    Which is your good right. But you are, if I again may be as bold, not really owning up to that, possibly, as it could very well be the case, in such situations, simply because you are reluctant to make that monetary investment.

    But you need to invest either with your own time and energy, or with your money, which is another form of time and energy. But you can be ascertained that whatever investment you make, it will pay off. In direct proportion.

    So to directly answer your question, no, it would generally not be possible to engage into an email conversation with someone that might know how to accomplish this task, unless someone now feels sorry for you because I have said these things ;-).

    But you are simply not getting a free ride just like that. Sorry.

    Thread Starter xennex81

    (@xennex81)

    My post was overly long, but it was not ill-intended.

    I had just ended up with a chaotic mind because I had stopped trusting myself in some part some days ago. It is amazing what such small/big choices can do to your mental acuity.

    Let me just rephrase my 12k post then.

    You come across as morons not knowing the difference between the word “liberty” and the word “freedom” and the fact that the word “freedom” doesn’t even have a plural form in the English language.

    I hope that is clear then.

    And that idiocy with respect to language has nothing to do with the GPL because the writers of the GPL did not choose the language you are using here to describe your philosophies on copying.

    My opinions here have NOTHING to do with any form of legal rights, or any form of legal writing. You are rephrasing those rights (as you indicate, apparently) in a language that demonstrates lack of common sense and lack of having any idea what you are communicating with those words.

    If the moderator wants, he/she can remove that idiotically long post I wrote and replace it with just this:

    “I think the “freedoms” on your about page (WordPress’ about page in the admin interface) display a lack of clarity on what you really wish to communicate. You are trying to communicate that people are free to do what they want, but what you are really saying is that they need your permission or your agreement for doing those things, and that you feel you need to give them that permission or agreement.

    Here is a better set of phrases for the same:

    1. You are entitled to run the program, for any purpose.
    2. You can access the source code and you have the ability to study how the program works and to change it to make it do what you wish.
    3. You are entitled to redistribute copies of the original program if you so desire to help your neighbor.
    4. You are entitled to distribute copies of your modified versions to others. In doing so you may give the whole community access to the fruits of your work.

    My post as it is really serves no purpose but I cannot edit it. It also embarrasses me and I’m sure you’d like to have it removed as well. So if you could do me a favour…

    I won’t go into those statements about any possible financing as it was not my intent to talk about that anyway. My apologies for this mad behaviour on my part ;-).

    Thread Starter xennex81

    (@xennex81)

    Perhaps it would help you to study my words.

    Thread Starter xennex81

    (@xennex81)

    I don’t think you need to explain to me that the ‘formal’ rights being detailed are a reference to one license or another.

    Thread Starter xennex81

    (@xennex81)

    I just wanted to show how easy it is to change such a feature that is considered a core concept.

    And I do believe it is a detrimental aspect. Let me explain why.

    When you categorize something, you put it into a special place in your mind that has meaning to you. Through these meanings you place order in your life and your existence.

    And to a person these categories or concepts are sacred. They are holy. They are sacrimount. When you stay true to them, your life gains more power. When you ensure that your life is ruled by clear concepts, you gain the acuity and ability to make clear decisions that further your true design goals in life.

    When concepts are muddled and unclear, so are your choices and you end up being weak and not being able to achieve what you want.

    And a concept like “Uncategorised” is non-existent. Everything has or is a concept and everything belongs to something. You may not know what it is, but it is definitely not something that in essence is undefined.

    And saying “oh, wait, you are as yet unclear about this thing you just wrote, I think you shouldn’t be unclear about things so I will help you by inventing for you a concept that is the epitome of unclarity.” is not really helpful at all. It messes up the minds of the people that work with this software.

    And you may think that such effects are too small to be of any importance. But as you clarify your life, the details become ever more powerful. Because you have already made the big decisions and your power keeps increasing as you are fine-tuning the smaller aspects.

    This is when you start to feel better and better and you start noticing things that have always put or dragged you down and you change them and you notice a profound shift. And you realize that all of the small “ugly things” or the small “defilements” accumulate into something that is even bigger than the biggest decisions you had ever made or altered.

    It is at this point that you begin cleansing and purifying everything: your house, all the objects in your house, your skin, etcetera, etcetera.

    And as you move through the world of software like a pro as I am, you notice all the wrong concepts and the bad user interfaces and all the nasty shit that turns possibly elegant software into something detrimental for your mind and your happiness, because you have to work with things that frustrate because they are unclear and undefined. Design choices that serve no purpose because the people making them were not clear about what they intended to do with it and what for.

    And why exactly is there an “Uncategorized” category? Does the contradictory nature of that not become immediately clear and prevalent? How can something that is uncategorised be have put into a category? If is is uncategorised, should you then not keep it OUT of every category you can?

    If it is uncategorised, it has no relationships defined, so why must you enforce meaningless relationships onto the user?

    And looking at the structure of the database and the software, it is perfectly clear that removing this anomaly comes at no cost at all, which means that indeed it WAS completely meaningless.

    It was not part of a core design aspect and it was just some redundant, superfluous, irrelevant addition that serves to confuse people because it has no relevance for the operation of the entire system.

    You are basically telling people “something is going to get messed up when your post has no category” and then the user finds out that this is a complete lie and this communication is false.

    So you (the software designers) are not communicating clearly and you are confusing people and this makes it harder for people to understand the system, no matter the fact that it is just a small aspect or component of the entire structure. But even small defilements pollute the experience of the true elegance of what you create.

    Concepts need to be mapped to clear structural existences. If you create abstractions that are impossible to relate to the underlying technical realisation you make it hard or impossible to understand the functioning of the system from the foundations up, and you force people that want to know the exact operation to dive beneath the abstraction to see how it is constructed to see how faulty it is to get to know the real underlying design and to finally understand that the abstraction was completely pointless.

    Messy abstractions create computer-illiterate people. They have no feeling with the fundament and it is extremely hard for them to acquire it because computers have left the hobby arena they occupied in the 80s and early 90s.

    WordPress is very elegant most of the time because it usually doesn’t try to “invent” concepts that aren’t there yet. That is when the problems arise. You try to invent something new that is not part of life. In spirituality this is called “ego”. It is a deviation from naturalness.

    Posts, pages, categories, tags, excerpts, parent-child, and the number zero as the undefined, these are all natural concepts. Starting to count from 0 is okay for an array where these numbers have no meaning, but as soon as you attribute meaning or identification to such numbers, you start to mess up.

    The default category “uncategorized” starts at 1. This is wrong. It should be number 0 and as such it should not be a category at all.

    Zero is nothingness is the unmanifested. One is the manifestation that carries everything. This is why binary numbers are of 0 and 1. The 0 is the yin or the feminine. The 1 is the yang or the masculine. And so on.

    Binary numbers are yin-yang constituencies, creations, amalgations. It is when you pour different quantities or proportions of yin and yang together and end up with Creation.

    And every recipe for these creations is unique. And so we have it that we start to count at 1 because 1 is the first yang element and yang is the initiator, the creator, the actor. Yang is when the divine gives birth to reality. And yin is the reality thus created.

    To sum up the strange and the inevitable:

    You should get rid of that default category, nothing could ever have a default category. If something has a default category, is means that category is not consciously chosen and as such has no meaning for the thing or object or post being categorized. As such the very act is completely stupid and confusing. No meaning is ever attributed “by default”. There are no default meanings because there is no universal truth that every person can or should or could agree with.

    Just allow empty category lists for posts. A post with no category is something special. It is pristine, undefined. It is full of potential, brimming with yet unseen possibility. Nothingness is the state of infinite potential. It is the state that gives birth to all things. If you stay there until you are ready to move out into the world, you will be sure to move out with great speed and expertise and effect. Your acts will be like lightning and your steps will be felt by people across the universe. So remain undefined until you are ready to step forward.

    And allow the same thing for your posts. I have cringed every time some post of mine ended up in that default category.

    And I’m not the only one, just do a search for “remove default category” on Google for WordPress and you not come back empty-handed, except that no one seems to know how to do it (without core hacking).

    Fact: people don’t like it.

    Fact: anyone who claims he/she does like it is confusing it with other things and mixing up separate aspects that only become clear when taken apart.

    You could simply create a separate, distinct listing (in the admin panel) for posts that are uncategorised. Instead of being meaningless (because it is treated as a category) it becomes extremely potent because it is treated as a state (much like ‘published’ or ‘draft’).

    Uncategorised becomes a state a post can be in, not a category a post can be in. There is a difference.

    States are aspects relevant to the publishing process. Categorizing is an aspect relevant to the publishing process.

    Ending up in some sterile, dead-zone called “Uncategorized” where you won’t see the post again and it just sits there feeling horrible is not an aspect relevant to the publishing process. It is an aspect relevant to the semantics or contents of the post. It is like the difference between semantic HTML (or XML) and its CSS presentation. These things are orthogonal.

    “Meaning” is one dimension and “publishing state” is another dimension that is perpendicular to the first.

    You can move in both directions or dimensions at the same time and independent of one another. They are independent and uncorrelated. In probability mathematics and statistics two stochasts are independent if this is no correlation and their covariance is zero. In matrix theory and linear algebra a set of vectors is linearly independent when “moving in one direction does not imply moving in another”, to put it accurately.

    You need this freedom of mind so you can determine every aspect of everything you do in every dimension of the act without being hindered by conceptual confounding because if the dimensions are correlated you are going to be making sacrifices left and right.

    You will think “oh, I can’t publish it, because it needs to have a category first” while ‘published’ versus ‘draft’ versus ‘pending review’ is a different subdimension from ‘categorized’ versus ‘uncategorized’ and as such should not impact each other.

    The way it is now people are going to hate having to categorize when they don’t want to, only because they don’t want their post to end up in that hideous “default” category.

    So that is simply the way it is, fully explained.

    ‘Categorized’ versus ‘uncategorized’ needs to become a 5th status in the “publish” widget next to “status”, “visibility”, “revisions” and “publish immediately/later”.

    And that’s all I have to say on this subject. Good luck with it.

Viewing 15 replies - 1 through 15 (of 41 total)