Jump to content

A Few More Wp Issues…


Recommended Posts

My first important problem I’ve been having is my inability to leave comments (on my own site). For some reason, ever since I changed my theme, it doesn’t seem to sense that a user is logged in or able to leave a comment. The “leave your name, email, website box” shows up, but nothing for registered users, even I as the admin can’t leave comments.


So I thought it may have something to do with the comments.php code, and I compared it to my old theme’s code (which did recognize that I was logged in), but couldn’t correct any of it properly. Here’s the new theme’s comments.php code:


><?php // Do not delete these lines
if ('comments.php' == basename($_SERVER['SCRIPT_FILENAME']))
 die ('Please do not load this page directly. Thanks!');

	if (!empty($post->post_password)) { // if there's a password
	 if (is_user_logged_in())   if ($_COOKIE['wp-postpass_'.$cookiehash] != $post->post_password) {  // and it doesn't match the cookie

<p class="nocomments"><?php _e("This post is password protected. Enter the password to view comments."); ?><p>


 /* This variable is for alternating comment background */
 $oddcomment = "graybox";

<?php if ($comments) : ?>
<a name="comments"></a><h2><?php comments_number('No Responses','One Response','% Responses' );?></h2>

<ol class="commentlist">

<?php foreach ($comments as $comment) : ?>

 <li class="<?=$oddcomment;?>">
  <a name="comment-<?php comment_ID() ?>"></a><cite><?php comment_author_link() ?></cite> Says:<br />
  <!--<small class="commentmetadata"><a href="#comment-<?php comment_ID() ?>" title="<?php comment_date('l, F jS, Y') ?> at <?php comment_time() ?>"><?php /* $entry_datetime = abs(strtotime($post->post_date)); $comment_datetime = abs(strtotime($comment->comment_date)); echo time_since($entry_datetime, $comment_datetime) */ ?></a> after publication. <?php edit_comment_link('e','',''); ?></small>-->
  <small class="commentmetadata"><a href="#comment-<?php comment_ID() ?>" title=""><?php comment_date('F jS, Y') ?> at <?php comment_time() ?></a> <?php edit_comment_link('e','',''); ?></small>
  <?php comment_text() ?>
 <?php /* Changes every other comment to a different class */ 
  if("graybox" == $oddcomment) {$oddcomment="";}
  else { $oddcomment="graybox"; }

<?php endforeach; /* end for each comment */ ?>


<?php else : // this is displayed if there are no comments so far ?>

 <?php if ('open' == $post-> comment_status) : ?>
 <!-- If comments are open, but there are no comments. -->
 <?php else : // comments are closed ?>
 <!-- If comments are closed. -->
 <p class="nocomments">Comments are closed.</p>
<?php endif; ?>
<?php endif; ?>

<?php if ('open' == $post-> comment_status) : ?>

<a name="respond"></a><h2>Leave a Comment</h2>
<form action="<?php echo get_settings('siteurl'); ?>/wp-comments-post.php" method="post" id="commentform" >

<p><label for="author"><small>Name</small></label><input type="text" name="author" id="author" class="styled" value="<?php echo $comment_author; ?>" size="22" tabindex="1" />
<input type="hidden" name="comment_post_ID" value="<?php echo $id; ?>" />
<input type="hidden" name="redirect_to" value="<?php echo htmlspecialchars($_SERVER["REQUEST_URI"]); ?>" /></p>

<p><label for="email"><small>Mail (will not be published)</small></label>
<input type="text" name="email" id="email" value="<?php echo $comment_author_email; ?>" size="22" tabindex="2" /></p>

<p><label for="url"><small>Website</small></label><input type="text" name="url" id="url" value="<?php echo $comment_author_url; ?>" size="22" tabindex="3" />

<small>Your comment</small>
<p><textarea name="comment" id="comment" cols="100%" rows="10" tabindex="4"></textarea></p>
<p><input name="submit" type="submit" class="submit1" id="submit" tabindex="5" value="Submit Comment" /></p>
<p><small>You can use these tags: <?php echo allowed_tags(); ?></small></p>

<?php if ('none' != get_settings("comment_moderation")) { ?>
<p><small><strong>Please note:</strong> Comment moderation is enabled and may delay your comment. There is no need to resubmit your comment.</small></p>
<?php } ?>


<?php // if you delete this the sky will fall on your head
endif; ?>


Another minor issue I was wondering about is importing a PowerPoint document into a post, I created a slideshow with it, but couldn’t upload it (on the “write post” page is where I tried it from). I also looked for a plugin to implement this sort of feature, but didn’t see anything like that either.


Thanks for all the help

Link to comment
Share on other sites

  • 2 weeks later...

I just downloaded that plugin and according to its instructions, it seems like you will have to use the slideshare website.


One thing I have thought about though (I can be wrong about this) is that if you upload and link to the powerpoint file as Bruce suggested above, then the file should autostart for people who have a powerpoint viewer installed which I guess most people have today.

Link to comment
Share on other sites

I followed some of the comment links on the page I linked to and saw the presentations on their sites.

I do not have Power Point.

I thought that you upload to Slideshare and then embed the link to the upload in WP with that plugin.

If I were you I would join Slideshare and try it.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Create New...