Go Back   CodingForums.com > :: Client side development > HTML & CSS

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 11-24-2008, 02:56 PM   PM User | #1
pupkevicius
New Coder

 
Join Date: Nov 2008
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
pupkevicius is an unknown quantity at this point
my comments wont show

hi i have a wordpress blog, www.mmorpg-finder.com

i can write and then in the wordpress user panel approve and view any comments made, but they cannot be displayed in the post, what is the problem?

i have messed around with the code before in this file in order to tweak some things,

below is a file for my post:

Code:
<?php get_header(); ?>
	<?php if (have_posts()) : ?>
		<div id="sidebarB">
<script type="text/javascript"><!--
google_ad_client = "pub-4039629576879450";
/* 160x600, created 25/08/08 */
google_ad_slot = "7101004363";
google_ad_width = 160;
google_ad_height = 600;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>

		</div>
		<div id="content">
			<?php while (have_posts()) : the_post(); $loop2counter++; ?>
				<div class="post" id="post-<?php the_ID(); ?>">
					<h2><a href="<?php the_permalink() ?>" rel="bookmark" title="Permalink: <?php the_title(); ?>"><?php the_title(); ?></a></h2>
					<p class="details_small">
						
						
					</p>
					<?php the_content("<em>Continue on page " . $post->ID . "</em>"); ?>
					<?php wp_link_pages(array('before' => '<p><strong>Pages:</strong> ', 'after' => '</p>', 'next_or_number' => 'number')); ?>
					
				</div>
<?php endwhile; ?>
			<?php if ('open' == $post-> comment_status) : ?> 
				<h3 id="respond"><?php _e("Leave a comment"); ?></h3>
				<?php if ( get_option('comment_registration') && !$user_ID ) : ?>
					<p><a href="<?php echo get_option('siteurl'); ?>/wp-login.php?redirect_to=<?php the_permalink(); ?>">Login</a></p>
				<?php else : ?>
					<form action="<?php echo get_option('siteurl'); ?>/wp-comments-post.php" method="post" id="commentform">
						<?php if ( $user_ID ) : ?>
							<p>Logged in as <a href="<?php echo get_option('siteurl'); ?>/wp-admin/profile.php"><?php echo $user_identity; ?></a>. <a href="<?php echo get_option('siteurl'); ?>/wp-login.php?action=logout" title="<?php _e('Log out of this account') ?>">Logout</a></p>
						<?php else : ?>
							<p><input type="text" name="author" id="author" value="<?php echo $comment_author; ?>" size="22" tabindex="1" />
							<label for="author"><small>Name: <?php if ($req) _e('(required)'); ?></small></label></p>
							<p><input type="text" name="email" id="email" value="<?php echo $comment_author_email; ?>" size="22" tabindex="2" />
							<label for="email"><small>Email: (will not be published) <?php if ($req) _e('(required)'); ?></small></label></p>
							<p><input type="text" name="url" id="url" value="<?php echo $comment_author_url; ?>" size="22" tabindex="3" />
							<label for="url"><small>Web site</small></label></p>
						<?php endif; ?>
						<p class="allowed-tags"><small><strong>XHTML:</strong>  <?php _e('You can use these tags:'); ?> <?php echo allowed_tags(); ?></small></p>
						<p><textarea name="comment" id="comment" cols="100%" rows="10" tabindex="4"></textarea></p>
						<p><input name="submit" type="submit" id="submit" tabindex="5" value="<?php _e("Leave a comment"); ?>"/>
						<input type="hidden" name="comment_post_ID" value="<?php echo $id; ?>" /></p>
						<?php do_action('comment_form', $post->ID); ?>
					</form>
				<?php endif; ?>
			<?php else : ?>
				<p class="nocomments"><?php _e('Sorry, the comment form is closed at this time.'); ?></p>
			<?php endif; ?>
			<div class="navigation">
				<h3>Check out more MMORPG's</h3>
				<div><?php previous_post_link('Previous: %link') ?></div>
				<div><?php next_post_link('Next: %link') ?></div>
			</div>
		</div>
	<?php else : ?>	

					<div id="sidebarB">
<script type="text/javascript"><!--
google_ad_client = "pub-4039629576879450";
/* 160x600, created 25/08/08 */
google_ad_slot = "7101004363";
google_ad_width = 160;
google_ad_height = 600;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
			<h3>Breaking News</h3>
			<ul>
				<?php wp_get_archives('type=postbypost&limit=15'); ?>
			</ul>
			<ul>
				<?php wp_list_bookmarks(); ?>
			</ul>
		</div>
		<div id="content">
			<h3>Not found</h3>
			<p><?php _e('Sorry, no posts matched your criteria.'); ?></p>
		</div>
	<?php endif; ?>
<?php get_footer(); ?>
below is a file for my comments file.

Code:
<?php
if ('comments.php' == basename($_SERVER['SCRIPT_FILENAME'])) die ('Access denied.');
if (!empty($post->post_password)) 
{
	if ($_COOKIE['wp-postpass_' . COOKIEHASH] != $post->post_password) { ?>

		<p class="nocomments"><?php _e('Enter your password to view comments.'); ?></p>
				
	<?php
		return;
	}
}
?>
<h3 id="comments"><?php comments_number(__('No Comments'), __('1 Comment'), __('% Comments')); ?></h3>
<?php if ($comments) : ?>
	<ol class="commentlist">
		<?php foreach ($comments as $comment) : ?>
			<li id="comment-<?php comment_ID() ?>">
				<big><?php comment_author_link() ?></big>
				<?php if ($comment->comment_approved == '0') : ?>
					<span class="await_mod">Await Moderation</span>
				<?php endif; ?>
				<span class="comment_data"><a href="#comment-<?php comment_ID() ?>" title=""><?php comment_date('F j, Y') ?> @ <?php comment_time() ?></a></span>
				<?php comment_text() ?>
			</li>
		<?php endforeach; ?>
	</ol>
<?php endif; ?>
pupkevicius is offline   Reply With Quote
Old 12-01-2008, 08:18 PM   PM User | #2
pupkevicius
New Coder

 
Join Date: Nov 2008
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
pupkevicius is an unknown quantity at this point
has nobody got a solution? i really need this one
pupkevicius is offline   Reply With Quote
Old 12-01-2008, 09:31 PM   PM User | #3
GardenGnome2
Regular Coder

 
Join Date: Oct 2008
Posts: 130
Thanks: 0
Thanked 4 Times in 4 Posts
GardenGnome2 has a little shameless behaviour in the past
Wrong forum.
GardenGnome2 is offline   Reply With Quote
Old 12-02-2008, 12:55 AM   PM User | #4
pupkevicius
New Coder

 
Join Date: Nov 2008
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
pupkevicius is an unknown quantity at this point
problem solved i added the <?php comments_template(); ?> which is a function to bring the approved comments
pupkevicius is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 04:12 AM.


Advertisement
Log in to turn off these ads.