Forum Replies Created

Viewing 15 replies - 1 through 15 (of 16 total)
  • Thread Starter keikenti

    (@keikenti)

    Actually, the code above has a very bad bug:

    <?php
    if (is_home()) {
    if (isset($_REQUEST['paged'])) {
    query_posts("cat=-12&paged=" . $_REQUEST['paged']);
    } else {
    query_posts("cat=-12");
    }
    }
    ?>

    Thread Starter keikenti

    (@keikenti)

    Oh, would seem like adding:


    <?php
    if (is_home()) {
    query_posts("cat=-12");
    }
    ?>

    solves my problem although it does require some “hard coding”. I would have prefered having a more versatile way though. Like, I think a “sticky” or “slippery” option should be part of the WordPress system in the first place.

    Thank you! I’ve been asking for this before and finally someone picked it up. ^^

    Thread Starter keikenti

    (@keikenti)

    Oh, don’t misunderstand by the way: I don’t allow people to sign up on my blog at the moment. Since people who comment have no other unique ID than their email address I’m forced to using their name.

    I guess the easiest way is like I stated in my previous post: no profile pages but use a show/hide link to display their extended info.

    Thread Starter keikenti

    (@keikenti)

    Not even started to process the query values in the template I’ve created as making additions to the query string somehow messes up the page_id for some reason.

    The idea is to make a page that lists all the people who have left a comment (I call it hugs on my website) with some basic statistics.. If you select one of them you get an extended list.

    I guess the only way to do this without making my very own PHP script in the root folder is to just use CSS to hide the extended information and then use JS to show/hide.

    How much work is it to access WP information without using the template engine?

    Well.. we’re talking about a flexible solution that doesn’t require you to have FTP access whenever you need to do something. The system administrator has turned off FTP connections in the firewall, so I’d have to log in through a PHP based FileManager which takes a lot of extra time.

    I’m sure I could just make my own PHP script to do this, but a plugin that everyone could use would be even better.

    You know, here’s a good idea for a plugin that would solve this given that you don’t use custom URIs:

    A plugin that is enabled can enable the administrator or other users with a given permission level to go to a certain Option-page. From here they get a check-box and a textarea where they can write a message to the users who want to get in.

    When the checkbox is marked, a file called index.html will be created in the main directory. .html files will normally be loaded before .php files by default. This “placeholder”-file will include the message that the administrator wrote, and a link to the Site Administration page if the administrator allows this. Adding wp-admin/ to the URI will get you there anyway, but it makes it a little easier for the sub-administrators.

    When the administrator then unchecks the “Take website offline” checkbox, the index.html is deleted and wolla – website is back online again.

    The placeholder-file does not need to be linked to any templates at all if you include all the HTML in the plugin.

    Any thoughts to this approach?

    This method isn’t very flexible though. Would be nice if one could have a template specificly made for “the website is offline” messages. A plugin could handle something like this I’m sure, and a tab in the Site Admin area could let you change the settings.

    The plugin should let the administrator log in given that he has a certain permission level.

    Forum: Plugins
    In reply to: blog statistics
    Thread Starter keikenti

    (@keikenti)


    <div>
    <h3><?php _e('Blog Stats'); ?></h3>
    <?php
    $numposts = $wpdb->get_var("SELECT COUNT(*) FROM $wpdb->posts WHERE post_status = 'publish'");
    if (0 < $numposts) $numposts = number_format($numposts);

    $numcomms = $wpdb->get_var("SELECT COUNT(*) FROM $wpdb->comments WHERE comment_approved = '1'");
    if (0 < $numcomms) $numcomms = number_format($numcomms);

    $numcats = $wpdb->get_var("SELECT COUNT(*) FROM $wpdb->categories");
    if (0 < $numcats) $numcats = number_format($numcats);
    ?>
    <?php printf(__('There are currently %1$s posts and %3$s comments, contained within %5$s categories.'), $numposts, 'edit.php', $numcomms, 'edit-comments.php', $numcats, 'categories.php'); ?>
    </div>

    I guess that is the code I was looking for (snagged from wp-admin/index.php)

    I’ve also been thinking about a way to get a RSS Feed for either the whole blog or for a specific (multiple?) categories?

    like: wp_rss.php?cat=2.5.12 would pick category ID 2, 5 and 12.

    Thread Starter keikenti

    (@keikenti)

    phpGiggle is the purrrfect plugin. ^^

    Forum: Plugins
    In reply to: Remove the automatic <p>
    Thread Starter keikenti

    (@keikenti)

    Or be a good girl and use a plugin that does what WordPress should have let you done from the beginning:
    https://dev.wp-plugins.org/file/disable-wpautop/trunk/disable-wpautop.php

    Thanks though..

    Thread Starter keikenti

    (@keikenti)

    Yes, it is the order in which the posts are listed I’m looking for. I’m using /index.php/%post_id% as my permanent link structure, so .htaccess won’t help me much.

    Thread Starter keikenti

    (@keikenti)

    query_posts(); function that kind of fits my needs, but it must be called before the loop.. the in_category() is called inside the loop, so the question is: can in_category() be put anywhere inside my index.php ?

    I did file a feature request on the https://mosquito.www.ads-software.com/ (bugtracker), so hopefully they won’t turn it down. Making this either a standard feature or a plugin would be very helpful instead of forcing people to “hack”.

    I had originally planned to use Pages for it, or build a seperate webpage system for it, but having everything in one system seems a lot more intuitive and makes it easier to manage and update.

    Forum: Plugins
    In reply to: Member picture
    Thread Starter keikenti

    (@keikenti)

    Yes, I could ask them to do that.. but wasn’t really what I was looking for since most of my visitors are new to blogging and all.

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