View Full Version : Wordpress pop-up comments.


kicker91
07-05-2004, 11:13 PM
Gives me an error, and it's always the last line of the page. When I remove that line, the error number decreases by one. :lol:

<?php
/* Don't remove these lines. */
$blog = 1;
require ('wp-blog-header.php');
add_filter('comment_text' , 'popuplinks');
foreach ($posts as $post) { start_wp();
?>
<?php // Do not delete these lines
if ('wp-comments.php' == basename($HTTP_SERVER_VARS['SCRIPT_FILENAME']))
die ('Please do not load this page directly. Thanks!');
if (($withcomments) or ($c)) {

if (!empty($post->post_password)) { // if there's a password
if ($HTTP_COOKIE_VARS['wp-postpass_'.$cookiehash] != $post->post_password) { // and it doesn't match the cookie
echo("<p>Enter your password to view comments.<p>");
return;
}
}

$comment_author = (isset($HTTP_COOKIE_VARS['comment_author_'.$cookiehash])) ? trim($HTTP_COOKIE_VARS['comment_author_'.$cookiehash]) : '';
$comment_author_email = (isset($HTTP_COOKIE_VARS['comment_author_email_'.$cookiehash])) ? trim($HTTP_COOKIE_VARS['comment_author_email_'.$cookiehash]) : '';
$comment_author_url = (isset($HTTP_COOKIE_VARS['comment_author_url_'.$cookiehash])) ? trim($HTTP_COOKIE_VARS['comment_author_url_'.$cookiehash]) : '';

$comments = $wpdb->get_results("SELECT * FROM $tablecomments WHERE comment_post_ID = '$id' AND comment_approved = '1' ORDER BY comment_date");
?>

<!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> &nbsp; n u c l e a r &nbsp;* &nbsp; &nbsp;cmnts;; &nbsp; x &nbsp;x &nbsp; &nbsp; &nbsp; xx// </title>



<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />



<style type="text/css">
body { background:#FFFFFF; margin:4px; cursor:move; scrollbar-arrow-color:#000000;
scrollbar-shadow-color:#FFFFFF; scrollbar-darkshadow-color:#FFFFFF; scrollbar-base-color:#FFFFFF;
scrollbar-track-color:#FFFFFF; scrollbar-3dlight-color:#FFFFFF; scrollbar-highlight-color:#FFFFFF; }

body,div,tr,td {
font-size:8pt; font-weight:bold; font-family:arial; color:#000000; text-align:justify; line-height:12px;
letter-spacing:0px; }

a { color:#666666; text-decoration:none; }
a:hover { color:#FFFFFF; text-decoration:none; cursor:move; }

input,textarea { background:#FFFFFF; color:#666666; font-family:arial; font-size:8pt; font-weight:bold;
border:1px #000000 solid; }
</style></head>

<body>

Comments (<?php comments_number("0","1","%") ?>)<br><br>

<?php if ('open' == $post->comment_status) { ?>
<form action="<?php echo $siteurl; ?>/wp-comments-post.php" method="post" id="commentform">


<center>
<table border="0" cellspacing="2" cellpadding="0"><tr><td align="right">
&nbsp; &nbsp; Name</td><td align="center">
<input type="text" name="author" id="author" class="textarea" value="<?php echo $comment_author; ?>" cols="8" tabindex="1" />
</tr></td><tr><td align="right">
&nbsp; &nbsp; Email
</td><td align="center">
<input type="hidden" name="comment_post_ID" value="<?php echo $id; ?>" />
<input type="hidden" name="redirect_to" value="<?php echo htmlspecialchars($_SERVER["REQUEST_URI"]); ?>" />
<input type="text" name="email" id="email" value="<?php echo $comment_author_email; ?>" cols="8" tabindex="2" />
</tr></td><tr><td align="right">
&nbsp; &nbsp; URL
</td><td align="center">
<input type="text" name="url" id="url" value="<?php echo $comment_author_url; ?>" cols="8" tabindex="3" />
</tr></td><tr><td align="right">
&nbsp; &nbsp; Talk</td><td align="center">
<textarea name="comment" id="comment" cols="16" rows="3" tabindex="4" maxlength="720"></textarea>
</tr></td></table>
<center>
<?php
if ('none' != get_settings("commentxmoderation")) {
?>
<i></i><?php
} // comment_moderation != 'none'
?>
<input name="submit" type="submit" tabindex="5" style="text-align:center; font-weight:bold;" value="Comment »" />
</form></center>

<br><br>

<?php if ($comments) { ?>

<?php foreach ($comments as $comment) { ?>
<?php comment_author_link() ?> / <a href="<?php comment_author_url() ?>" target="_blank">http://</a> /
<a href="mailto:<?php comment_author_email() ?>">@</a> on <?php comment_date() ?>

<div style="padding-left:3px; padding-right:3px;"><?php comment_text() ?></div>
<br><br><br>
<?php } // end for each comment ?>
<?php } ?>

Help pleases. :D

Dude128
07-06-2004, 06:57 AM
what exactly does the error say?

kicker91
07-07-2004, 12:22 AM
Parse error: parse error in /home/velluxe/public_html/nuclear/wp-comments-popupx.php on line 105

(I did change everything to reflect to wp-comments-popupx.php, and it did the same thing with wp-comments-popup.php)