Forum Replies Created

Viewing 15 replies - 211 through 225 (of 380 total)
  • Thread Starter ejm

    (@llizard)

    Just to clarify, I am trying to get the previous post/next post links above each post never to appear on the index page.

    Here is the site: etherwork.net/blog/ «« I have purposely left that unlinked, in an attempt to keep spammers at bay.

    -E

    Thank you for this post. I have a wordpress blog on which only some articles allow comments. But the comments are closed after a certain time.

    Using the above, I figured out how to show the “comments are now closed” on the posts that allowed comments, but nothing at all for those that had the comments open but didn’t receive any comments (just as with any posts that never had comments open).

    I thought others might want to achieve the same thing. This is what I did:

    I commented out the “no comments yet” near the top of the comments template:

    <?php else : // If there are no comments yet ?>
    	<!-- p>No comments yet.</p -->
    <?php endif; ?>

    then looked for the following that appears further below

    <?php endif; // If registration required and not logged in ?>
    <?php else : // Comments are closed  ?>

    and replaced what was underneath THAT with the following at the bottom of comments.php

    <!--p>Comments are now closed for this article.</p -->
    <?php endif; ?>
    
    <?php if ( have_comments() ) : // but comments are closed ?>
    <p>Comments are now closed for this article</p>
    <?php else :   ?>
    <?php // show nothing at all ?>
    <?php endif; ?>

    Note that the first “comments are now closed” is commented out (or just remove it) and now appears AFTER if ( have_comments()

    (I hope that all made sense….)

    -ejm, wp2.9.1

    Thread Starter ejm

    (@llizard)

    I have just upgraded to wp2.9.1 in hopes that this will fix the problem.

    This is the coding I have placed on my comments page.

    <p><?php do_action('comment_form', $post->ID); ?>
    <textarea name="comment" id="comment" cols="100%" rows="10" tabindex="4"></textarea></p>
    
    <?php if ( is_user_logged_in() ) : ?>
    <?php else : ?>
    <p>&nbsp;<small>Please confirm you are a real person [required]</small></p>
    <?php endif; ?>
    <?php gatekeeper_pose_challenge(); ?>

    If anyone is out there, please do let me know if I’ve placed the gatekeeper coding in the wrong spot so that the misplacement is causing the trackback/pingbacks to fail to be displayed.

    E Morris, wp2.9.1

    etherwork.net/blog/ (intentionally left unlinked to deter spammers from harvesting the link. I don’t want MORE spammers….)

    Thread Starter ejm

    (@llizard)

    I just upgraded to wp2.9.1 and re-enabled wp-gatekeeper. There were WAY too many spam comments that slipped through. I guess I’d rather have the gatekeeper stopping most of the comment spam than be able to see pingbacks and trackbacks.

    If anyone is actually working on wp-gatekeeper, I look forward to a response.

    Go to admin – users and choose “edit” below the user name. Once there, find “Display name publicly as” and choose whatever name you want to be displayed.

    Thread Starter ejm

    (@llizard)

    Excuse me for replying to myself…

    It turns out that I had not updated the comments.php on my customized theme to the newer version. I have now fixed it, using the current wp classic comments.php as a template.

    However, the trackbacks are STILL not showing up. Could this be because I have the gatekeeper plugin installed? I have placed the gatekeeper coding between the textarea and the submit comment button on the comment form:

    <p><?php do_action('comment_form', $post->ID); ?>
    <textarea name="comment" id="comment" cols="100%" rows="10" tabindex="4"></textarea></p>
    
    <?php gatekeeper_pose_challenge(); ?>
    
    <p><input name="submit" type="submit" id="submit" tabindex="5" value="<?php esc_attr_e('Submit Comment'); ?>" />
    <input type="hidden" name="comment_post_ID" value="<?php echo $id; ?>" />
    </p>

    Is the gatekeeper challenge causing the trackbacks and pingbacks to fail?

    Thank you for any help.

    -E Morris wp2.8.6

    Thread Starter ejm

    (@llizard)

    Thank you for your reply, esmi. That is one of the plugins that I saw. It’s huge – fonts, images as well as the php files to run it. It seems like a lot of things that could break.

    All I want is how to add a little simple text. Just to add a question or two to the registration form. If the question is answered incorrectly, the registration will fail. I can’t see that it will need much more than a few lines of code – I just don’t know where to put the code….

    Thread Starter ejm

    (@llizard)

    Addendum: I am reluctant to change this topic to “resolved” because I’d still like to know how to insert the error messages on the comment page so the legitimate visitor who has made a typo doesn’t have to go back one page to access the comment section.

    Thread Starter ejm

    (@llizard)

    Excuse me for replying to myself…

    With the help of the following pages, I have come up with a solution.
    http://wordpress.org/support/topic/109477?replies=10
    http://stackoverflow.com/questions/482370/how-to-customize-wordpress-comment-error-page

    Sure, the error messages are not actually appearing on the pages themselves, but it’s still not an unreasonable fix. Here’s what I did:

    1. Before doing anything I made sure that I had backup copies of the files I was changing so I could put them back in case something bad happened.
    2. In /wordpress/plugins/wp-gatekeeper.php, I changed “die” to “wp-die” in the following spot:

      if (!gatekeeper_run_gauntlet($key,$answer)) {
      die( __(‘Sorry, posting has been closed for the time being.’) );’

      This is the change I made:

      if (!gatekeeper_run_gauntlet($key,$answer)) {
      		wp_die( __('Congratulations. You have just confirmed that you are a robot. If you are indeed a person, please use your browser buttons to go back and try again.') );
    3. Using /wordpress/wp-content/db-error.php as a template, I made the following change in wp-includes/functions.php:
      I located

      if ( ( $wp_locale ) && ( ‘rtl’ == $wp_locale->text_direction ) ) $text_direction = ‘rtl’;
      ?>
      <!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd”&gt;
      […snip…]

      </head>
      <body id=”error-page”>
      <?php endif; ?>
      <?php echo $message; ?>
      </body>

      and changed it to

      if ( ( $wp_locale ) && ( 'rtl' == $wp_locale->text_direction ) )
      $text_direction = 'rtl';
      ?>
      <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
      <html xmlns="http://www.w3.org/1999/xhtml">
      <head>
      <title><?php echo $title ?> WordPress &rsaquo; Error</title>
      <meta http-equiv="content-type" content="text/html; charset=utf-8" />
      <style type="text/css">
      <!--
      #wordpress {
        width: 95%;
        background: #f0f8ff;
        color:#009;
        margin: 0 auto;
        margin-bottom:40px;
        border: 1px solid #300;
        padding:10px;
        text-align: left;  /* IE 5.5 hack part II */
      }
      
      #wordpress h1 {
      
        display:inline;
        color: #006;
        font-weight: lighter;
        font-size: 1.8em;
       }
      #wordpress h2 {
        font-size: 1.8em;
       }
      #wordpress #logo {
        padding:5px;
        background:#fff;
        margin-bottom: 2em;
       }
      #wordpress ul {list-style: none; margin:0; margin-left:30px;padding:0;}
      #wordpress li {display:block; background:transparent; color:#600; margin-bottom:12px; padding:0 0 5px 27px;}
      -->
      
      </style>
      
      </head>
      <body>
      
      <div id="wordpress">
      <h1 class="logo"><img alt="WordPress" src="/images/wp_logo147x25.png" width="147" height="25" /></h1>
      
      <?php endif; ?>
      	<?php echo $message; ?>
      </div>
      </body>

    Of course, this means that all error messages called up by wp-die will be housed in that particular page style but it really doesn’t matter to me if my admin error messages suddenly look that way. That’s aok by me.

    Unless someone thinks this may cause some sort of security breach….

    You might try adding the Advanced Category Excluder plugin.

    Thread Starter ejm

    (@llizard)

    I’m happy to report that ec3.14 and wp2.8.5 are working correctly now. I have no idea what changed but suddenly the calendar is working again.

    The only thing I did today was to upgrade two non-active plugins. Very strange.

    -EMorris, wp 2.8.5, ec3 3.1.4, mySQL 4.1.22, php4.4.7, firefox 3.0.15, WinXP (calendar on sidebar is now called up with ec3_get_calendar();)

    Thread Starter ejm

    (@llizard)

    I’m happy to report that ec3.14 and wp2.8.5 are working correctly now. I have no idea what changed but suddenly the calendar is working again.

    The only thing I did was to upgrade two non-active plugins. Very strange.

    Thread Starter ejm

    (@llizard)

    The sidebar calendar is broken on the category archive page for events. Note that it appears there are zero posts made, no matter what month is chosen.

    Specifically, the following coding

    ec3_get_calendar();

    is simply producing a calendar with zero links.

    -EMorris, wp 2.8.5, ec3 3.1.4, mySQL 4.1.22, php4.4.7, firefox 3.0.15, WinXP

    etherwork.net/blog/ (calendar on sidebar is called up with get_calendar(); so it doesn’t have the nifty popup tooltips)

    etherwork.net/blog/?cat=4 (event calendar category page with broken calendar on the sidebar called up with ec3_get_calendar();)

    URLs purposely unlinked in an attempt to keep spammers at bay.

    Thread Starter ejm

    (@llizard)

    Since asking this question, I have upgraded to 2.8.5.

    I also disabled plugins one by one to see if there was conflict and I checked for coding errors using the validator at w3.org. It made no difference to the calendar.

    I did try to ask in the eventcalendar maillist but it appears to be broken; my email did not go through.

    I also tried to leave a comment on the eventcalendar site but registration is required to comment and there is no registration link.

    Upgrading to the beta version of event calendar only threw errors.

    Very frustrating.

    -EMorris, wp 2.8.5, ec3 3.1.4 firefox 3.0.14, WinXP

    I have purposely left the following URL unlinked in an attempt to keep spammers at bay:

    etherwork.net/blog/?cat=4 (event calendar category page with broken calendar on the sidebar)

    Thread Starter ejm

    (@llizard)

    Thank you; this might well work. However, for now I have decided to disable gravatars entirely.

    But just in case someone else wants to make this fix, could you outline exactly where in the coding you made the changes? (ie: look for [coding snippet] add or change to [new coding snippet])

    Thank you again.

Viewing 15 replies - 211 through 225 (of 380 total)