Forum Replies Created

Viewing 15 replies - 166 through 180 (of 202 total)
  • I use a slightly modified version of WP for a specific purpose where it is essential there’s only one instance of each post. This “feature” is incredibly annoying. I hope I can figure out a way to get rid of it completely.

    BTW, that wikis do this is no excuse. Wikis suck. There’s no reason to follow that model for blog software.

    edit: Tried the plugin. It doesn’t solve my problem. What’s the latest WP version that doesn’t save revisions/drafts/creates new IDs for the same posts?

    Thread Starter Modifiedcontent

    (@modifiedcontent)

    Thanks MichaelH! Exactly what I was looking for. 🙂

    I’ll include it here if you don’t mind, in case the other site disappears:

    $querystr = "
    	SELECT *
    	FROM $wpdb->posts as wpost
    	INNER JOIN $wpdb->term_relationships
    	ON (wpost.ID = $wpdb->term_relationships.object_id)
    	INNER JOIN $wpdb->term_taxonomy
    	ON ($wpdb->term_relationships.term_taxonomy_id = $wpdb->term_taxonomy.term_taxonomy_id)
    	AND $wpdb->term_taxonomy.taxonomy = 'category'
    	AND $wpdb->term_taxonomy.term_id IN (3)
    	where wpost.post_date BETWEEN SUBDATE(CURDATE(), INTERVAL 1 YEAR) and ADDDATE(CURDATE(), INTERVAL 1 DAY) ORDER BY wpost.post_date DESC
     ";
    $pageposts = $wpdb->get_results($querystr, OBJECT);

    I use a modified version of WordPress in another site – I needed a flexible category system like WordPress has.

    The “items” in my system are not regular posts and I need them outside WordPress, so any pointers on what these queries would look like are very much appreciated!

    I’d like to know as well. Isn’t there a setting for this somewhere?

    I’m using a slightly modified version of WordPress for a specific purpose that requires a limit of one post per user.

    That shouldn’t be too hard, right? One line of PHP that turns off the user ability to post (not to edit) when the number of posts counts hit 1 (or whatever)!

    Which database fields should I focus on? Where would I have to edit the code? What would the PHP look like?

    I’m not a PHP coder, but which some pointers I should be able to put this together. 🙂

    Forum: Plugins
    In reply to: wp-print plugin

    [Also, how can I get rid of that ‘Print This Post’. Just the icon should be enough.]

    OK, nevermind, just discovered the configuration settings in the admin area. Thanks!

    Forum: Plugins
    In reply to: wp-print plugin

    WP-Print works pretty nice and straightforward!

    [But I can’t figure out how to exclude pictures from the print. I want text only. That’s part of the point of a print button.]

    Just discovered admin area config settings…

    Just installed WP-Print. It works nice enough, but it includes pictures in the print. I want text only.

    How can I exclude img from regular print pages?

    Thread Starter Modifiedcontent

    (@modifiedcontent)

    Is it ABSPATH ?

    Where/how is that defined? If it’s ‘http://mysite.com/blog’ is there any way to use it to get to an address outside /blog?

    Apparently changes in the php.ini file only take effect when you restart Apache. You can only do that when you run your own server. I don’t, so I’m stuck.

    Are there other ways to import all the data from an earlier version of WordPress (2.2 to 2.6)?

    Can I just manually export database tables from 2.2 and import them into 2.6?

    How do you mean “gravatar ready”?

    I’m using a generic 3 column layout, but now run into problems with gravatars showing up outside the layout. I’d like to know how to turn them off or get them to behave within my CSS.

    Gravatar sucks if it requires CSS to be “gravatar ready”. 🙁

    @envision

    Otto42 gave the solution here.

    Thread Starter Modifiedcontent

    (@modifiedcontent)

    Thanks Otto42!

    This now works:

    <?
    query_posts('showposts=5');
    
    if (have_posts()) : while (have_posts()) : the_post(); ?>
    
    <div class="post" id="post-<? the_ID(); ?>">
    <h3 class="storytitle"><a href="<? the_permalink() ?>" title="<? the_title(); ?>" rel="bookmark"><? the_title(); ?></a></h3>
    <div class="info">Posted by <? the_author() ?> on <? the_time('F') ?> <? the_time('j') ?>, <? the_time('Y') ?> under <? the_category(',') ?> <? edit_post_link(__('Edit This')); ?></div>
    
    <div class="storycontent">
            <? the_content(__('Read the rest of this entry &raquo;')); ?>
    </div>
    
    <div class="info">
    		<? wp_link_pages(); ?>
    		<? comments_popup_link(__('Comments (0)'), __('Comments (1)'), __('Comments (%)')); ?>
        </div>
    
    </div>
    
    <? comments_template(); // Get wp-comments.php template ?>
    
    <? endwhile; ?>
    
    <div class="alignleft"><? next_posts_link('&laquo; Previous Entries') ?>
    </div>
    <div class="alignright"><? previous_posts_link('Next Entries &raquo;') ?>
    </div>
    
    <? else : ?>
    
    <? _e('Sorry, no posts matched your criteria.'); ?>
    
    <? endif; ?>

    Why does ‘Creating a Static Front Page’ give that weird alternative solution?

    Thanks for the support envision.

    I’ve posted basically the same question here and here over a week ago and have received zero response so far.

    I don’t like the mini-loop solution on ‘Creating a Static Front Page’ at all, but I’ll take any solution that works at the moment. However ‘Creating a Static Front Page’ gives no pointers how to add more than ID (useless…), title and permalink to the page.

    If it was 100% generic php/mysql I could call probably figure out how to call data from the post_content, post_excerpt or comment_status database fields, but the mini-loop code has some elements that make no sense to me.

    <?php
    $how_many=5; //How many posts do you want to show
    require_once('wp-config.php'); // Change this for your path to wp-config.php file ?>
    
    <ol id="whats-new">
    <?
    $news=$wpdb->get_results("SELECT <code>ID</code>,<code>post_title</code> FROM $wpdb->posts
    WHERE <code>post_type</code>=\"post\" AND <code>post_status</code>=\"publish\" ORDER BY post_date DESC LIMIT $how_many");
    foreach($news as $np){
    printf ("<li><a href=\"index.php?p=%s\">%s</a></li>", $np->ID,$np->post_title);
    }?>
    </ol>

    Where did the %s come from? What does it do? How can I show the lead of the story (post_excerpt?) and things like publishing date and author? The ‘Creating a Static Front Page’ page does not offer any clues at all.

    I’ve tried this, but it doesn’t do anything:

    <?
    
    $how_many= 5; //How many posts do you want to show
    require_once('blog/wp-config.php');
    
    $news=$wpdb->get_results("SELECT <code>ID</code>,<code>post_title</code>,'post_excerpt' FROM $wpdb->posts
    WHERE <code>post_type</code>=\"post\" AND <code>post_status</code>=\"publish\" ORDER BY post_date DESC LIMIT $how_many");
    
    foreach($news as $np)
    {
    printf ("<a href=\"%s\">%s</a>", get_permalink($np->ID),$np->post_title,$np->post_excerpt);
    }
    
    ?>

    I’ve also tried variations with the old WordPress code that I’d been using until 2.5.1 without problems. Nothing works.

    This is extremely frustrating and annoying.

    ‘Creating a Static Front Page’ only gives code for a really lame ‘What’s new’ list. How can I get full blog content on my homepage outside WordPress?

    I used to have no problems with that using this code:

    if (have_posts()) : while (have_posts()) : the_post(); ?>
    
    <div class="post" id="post-<? the_ID(); ?>">
    <h3 class="storytitle"><a href="<? the_permalink() ?>" title="<? the_title(); ?>" rel="bookmark"><? the_title(); ?></a></h3>
    <div class="info">Posted by <? the_author() ?> on <? the_time('F') ?> <? the_time('j') ?>, <? the_time('Y') ?> under <? the_category(',') ?> <? edit_post_link(__('Edit This')); ?></div>
    
    <div class="storycontent">
            <? the_content(__('Read the rest of this entry &raquo;')); ?>
    </div>
    
    <div class="info">
    		<? wp_link_pages(); ?>
    		<? comments_popup_link(__('Comments (0)'), __('Comments (1)'), __('Comments (%)')); ?>
        </div>
    
    </div>
    
    <? comments_template(); // Get wp-comments.php template ?>
    
    <? endwhile; ?>
    
    <div class="alignleft"><? next_posts_link('&laquo; Previous Entries') ?>
    </div>
    <div class="alignright"><? previous_posts_link('Next Entries &raquo;') ?>
    </div>
    
    <? else : ?>
    
    <? _e('Sorry, no posts matched your criteria.'); ?>
    
    <? endif; ?>

    But in version 2.5.1 this code no longer works. When I use fancy permalinks I get ‘Sorry, no posts matched your criteria’.

    The lame “mini-loop” code in Creating a Static Front Page requires wp-config.php and seems to be mostly regular php/mysql with some bits of weird wp-code thrown in to make it more confusing.

    Is that mini-loop code the new approach for 2.5.1? Or can I edit my old loop to make it work for 2.5.1?

    Thread Starter Modifiedcontent

    (@modifiedcontent)

    Anyone…?

Viewing 15 replies - 166 through 180 (of 202 total)