Post Reply 
Reply to comment
01-Sep-2010, 10:45 PM
Post: #11
RE: Reply to comment
I'm about 3/4 done. However, I need to know where the variables such as "$enabled_website" are set. I know about the place in "admin/includes/pages/form_enabled.php", but I'm not sure where they are set for the front-end. Thanks.

I'm giving you three guesses...
Find all posts by this user
Quote this message in a reply
01-Sep-2010, 10:57 PM
Post: #12
RE: Reply to comment
What do you mean by "set"? The $enabled_website variable is extracted from the database by the get_settings() function in includes/functions/page.php

Have you completed the interview?
Find all posts by this user
Quote this message in a reply
01-Sep-2010, 11:03 PM
Post: #13
RE: Reply to comment
Thank you. Exactly what I needed.

I'm giving you three guesses...
Find all posts by this user
Quote this message in a reply
02-Sep-2010, 08:04 AM
Post: #14
RE: Reply to comment
I am done! At least I think I am. I'll show you my work tomorrow, so you'll have to wait until then Tongue. For now, you can get a program which shows differences between two files, such as Meld, but it's for Linux. Not sure what options Windows has (probably a bunch), but it's not necessary to have one, it'll just help a lot.

EDIT: This might do http://www.diffchecker.com/

I'm giving you three guesses...
Find all posts by this user
Quote this message in a reply
02-Sep-2010, 12:00 PM
Post: #15
RE: Reply to comment
Good, I'm looking forward to this feature. I already use WinMerge.
http://winmerge.org/

Edit: You're the only one to have downloaded the beta so far so it would be nice to hear your feedback.

Have you completed the interview?
Find all posts by this user
Quote this message in a reply
02-Sep-2010, 04:39 PM
Post: #16
RE: Reply to comment
Right, let me switch to Linux as the new Commentics is there. You should definitely promote development better. WinMerge looks ok, but Meld has a slicker interface. They run on the same engine (diff), so it's good.
OK, here are the files that I have edited. It still needs a little work, and I skipped the installer/upgrader. You'll need to create 4 new tables:
"comments" needs to have a "reply_to" column, with a default value of 0.
"settings" needs to have three rows called "enabled_reply" with a default of 1,"default_reply" with a value of 0, and "default_reply_name" with a value of "no one", all of which should be under the form category.

Among the planed changes are changing the form for replies from "type='text'" to "type='hidden'", improving the "currently replying to" text, better layout in "includes/template/form.php", improve the comments, and a couple of other small changes that I can't think of right now.

The only changes to the css that you need are
Code:
.reply_to {
margin-left: 5em;
margin-right: -5em;
}
And
Code:
.reply_link {
visibility: hidden;
float: right;
font-size: 0.8em;
}

.comment_box_1:hover .reply_link, .comment_box_2:hover .reply_link, .admin_comment_box_1:hover .reply_link, .admin_comment_box_2:hover .reply_link {
visibility: visible;
}

Here are the files which I edited. You should compare them with the originals to see what I changed. I'll explain most of it later, but it's pretty self-explanatory.

"includes/template/comments.php" -> [attachment=39]

"includes/functions/comments.php" -> [attachment=40] //Remove 2 in name


"includes/template/form.php" -> [attachment=41]

"includes/app/processor.php" -> [attachment=42]

"includes/functions/processor.php" -> [attachment=43] //Remove 2 in name


/*"includes/Admin/includes/pages/layout_form_enabled.php" ->
"includes/Admin/includes/pages/manage_comments.php" ->
"includes/Admin/index.php" ->
"includes/Admin/includes/pages/edit_comment.php" -> */ //In next post

PS: I ran into some trouble with the attachments. The names are the same, and it only lets me upload five at a time, so I had to rename the files a little, and split the post.

I'm giving you three guesses...
Find all posts by this user
Quote this message in a reply
02-Sep-2010, 05:43 PM
Post: #17
RE: Reply to comment
Second part:

"includes/Admin/includes/pages/layout_form_enabled.php" -> [attachment=44]

"includes/Admin/includes/pages/manage_comments.php" -> [attachment=45]

"includes/Admin/index.php" -> [attachment=48] //Has some extra lines from an add-on I'm working on.

"includes/Admin/includes/pages/edit_comment.php" -> [attachment=47]

Now that I look at it, I should've zipped it upBlush. I need to wake up...
If you want me to zip it up, I'll do that.
Also note that "includes/functions/comments.php" has some extra styling that I forgot to remove. I think I used it to create different styles, so it doesn't affect this feature. One important change in that file is that I initialize $box as a blank string, to make the code less complicated. So only the first couple of lines and the lines after ~150 are relevant, but I'm not too sure. Check out the whole thing just to be sure.

I'm giving you three guesses...
Find all posts by this user
Quote this message in a reply
02-Sep-2010, 06:35 PM
Post: #18
RE: Reply to comment
I get this error:
Quote:Parse error: parse error in C:\wamp\www\commentics_1.1 - Copy\comments\includes\template\form.php on line 585

I can't see anything wrong with line 585. However when I compare the file using WinMerge, it gives a warning saying that your file contains a different type of carriage return.

Have you completed the interview?
Find all posts by this user
Quote this message in a reply
02-Sep-2010, 06:41 PM
Post: #19
RE: Reply to comment
I have no idea why. Try pasting this:
PHP Code:
<?php
/*
Copyright © 2009-2010 Commentics Development Team [commentics.org]
License: GNU General Public License v3.0
         http://www.commentics.org/license/

This file is part of Commentics.

Commentics is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

Commentics is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with Commentics. If not, see <http://www.gnu.org/licenses/>.
*/
?>

<?php if (!defined("IN_COMMENTICS")) { die("Access Denied."); } ?>

<script type="text/javascript">
function addTags(Tag,fTag,Comment) {
// <![CDATA[

  var frm=document.forms['commentics'];
  
  //remember cursor position
  var scrollTop = frm.comment.scrollTop;
  var scrollLeft = frm.comment.scrollLeft;
  
  var obj = document.commentics.comment;

  obj.focus();

  if (document.selection && document.selection.createRange)  // Internet Explorer
  {
sel = document.selection.createRange();
if (sel.parentElement() == obj)  sel.text = Tag + sel.text + fTag;
  }

  else if (typeof(obj) != "undefined")  // Firefox
  {
var longueur = parseInt(obj.value.length);
var selStart = obj.selectionStart;
var selEnd = obj.selectionEnd;

obj.value = obj.value.substring(0,selStart) + Tag + obj.value.substring(selStart,selEnd) + fTag + obj.value.substring(selEnd,longueur);
  }

  else obj.value += Tag + fTag;
  
  textCounter(frm.comment,frm.count,<?php echo $comment_maximum_characters;?>);
  
  //set cursor position
  frm.comment.scrollTop = scrollTop;
  frm.comment.scrollLeft = scrollLeft;

  frm.comment.focus();
  
}
// ]]>
</script>

<script type="text/javascript">
function textCounter(field,cntfield,maxlimit) {
// <![CDATA[
<?php if ($enabled_comment_counter) { ?>
if (field.value.length > maxlimit)
field.value = field.value.substring(0, maxlimit);
else
cntfield.value = maxlimit - field.value.length;
<?php ?>
}
// ]]>
</script>

<script type="text/javascript">
function enableSubmit() {
// <![CDATA[

var frm=document.forms['commentics'];

<?php if ($enabled_terms && !$enabled_privacy) { ?>
if (frm.terms.checked) {
frm.submit_button.disabled=false
} else {
frm.submit_button.disabled=true
}
<?php } else if (!$enabled_terms && $enabled_privacy) { ?>
if (frm.privacy.checked) {
frm.submit_button.disabled=false
} else {
frm.submit_button.disabled=true
}
<?php } else if ($enabled_terms && $enabled_privacy) { ?>
if ( (frm.terms.checked) && (frm.privacy.checked) ) {
frm.submit_button.disabled=false
} else {
frm.submit_button.disabled=true
}
<?php ?>
}
// ]]>
</script>

<script type="text/javascript">
function enablePreview() {
// <![CDATA[

var frm=document.forms['commentics'];

<?php if ($enabled_preview && $agree_to_preview) { ?>

<?php if ($enabled_terms && !$enabled_privacy) { ?>
if (frm.terms.checked) {
frm.preview_button.disabled=false;
} else {
frm.preview_button.disabled=true;
}
<?php } else if (!$enabled_terms && $enabled_privacy) { ?>
if (frm.privacy.checked) {
frm.preview_button.disabled=false;
} else {
frm.preview_button.disabled=true;
}
<?php } else if ($enabled_terms && $enabled_privacy) { ?>
if ( (frm.terms.checked) && (frm.privacy.checked) ) {
frm.preview_button.disabled=false;
} else {
frm.preview_button.disabled=true;
}
<?php ?>

<?php ?>
}
// ]]>
</script>

<script type="text/javascript">
function stopRKey(evt) {
// <![CDATA[
  var evt = (evt) ? evt : ((event) ? event : null);
  var node = (evt.target) ? evt.target : ((evt.srcElement) ? evt.srcElement : null);
  if ((evt.keyCode == 13) && (node.type=="text"))  {return false;}
}
document.onkeypress = stopRKey;
// ]]>
</script>

<script type="text/javascript">
function processPreview() {
// <![CDATA[

var frm=document.forms['commentics'];

frm.submit_button.disabled = true;
frm.submit_button.value = "<?php echo PROCESSING_BUTTON ?>";

frm.preview_button.disabled = true;
frm.preview_button.value = "<?php echo PROCESSING_BUTTON ?>";

frm.hidden_submit_button.name = 'submit_it';
frm.hidden_preview_button.name = 'preview_it';

document.commentics.submit();

return true;
}
// ]]>
</script>

<script type="text/javascript">
function processSubmit() {
// <![CDATA[

var frm=document.forms['commentics'];

frm.submit_button.disabled = true;
frm.submit_button.value = "<?php echo PROCESSING_BUTTON ?>";

<?php if ($enabled_preview) { ?>
frm.preview_button.disabled = true;
frm.preview_button.value = "<?php echo PROCESSING_BUTTON ?>";
<?php ?>

frm.hidden_submit_button.name = 'submit_it';

document.commentics.submit();

return true;
}
// ]]>
</script>

<?php if($anchor_text != null && $anchor_text != ""){ ?><a name="<?php echo $anchor_text?>"></a><? ?>

<?php
if (isset($box) && !empty($box)) {
echo 
$box "<br />";
}
?>

<form name="commentics" id="commentics" class="form_styling" action="<?php echo htmlentities($_SERVER['PHP_SELF']) . get_query("form") . "#" $anchor_text?>" method="post">

<noscript>
<?php if ($display_javascript_disabled) { ?>
<span class="javascript_disabled_message">
<?php echo JAVASCRIPT_DISABLED ?>
</span>
<p />
<?php ?>
</noscript>

<?php if ($display_required_symbol_message && $display_required_symbol) {
?><span class="required_symbol_message"><?php echo REQUIRED_SYMBOL_MESSAGE ?></span>
<div class="height_below_required_symbol_message"></div>
<?php ?>

<?php //get the security key and add to form as hidden input ?>
<input type="hidden" name="security_key" value="<?php echo $security_key?>"/>
<?php //a hidden input which should never contain a value ?>
<input type="hidden" name="fax" value=""/>
<?php //a normal input, hidden by CSS, which should never contain a value ?>
<input type="text" name="phone" value="" style="display: none;"/>
<?php //these are hidden fields that are used as a workaround for preventing double submissions ?>
<input type="hidden" name="hidden_submit_button" value=""/>
<input type="hidden" name="hidden_preview_button" value=""/>

<?php
$elements 
explode(","$sort_order_fields);
output_reply();
foreach (
$elements as $element) {
    switch (
$element) {
        case 
"1":
        
output_name();
        break;
        case 
"2":
        
output_email();
        break;
        case 
"3":
        
output_website();
        break;
        case 
"4":
        
output_town();
        break;
        case 
"5":
        
output_country();
        break;
        case 
"6":
        
output_rating();
        break;
    }
}
?>

<?php function output_reply () { ?>
<?php 
global $enabled_reply$default_reply$default_reply_name$page_id$mysql_table_prefix$anchor_text?>
<?php 
if($enabled_reply) { ?>
<div class="height_between_fields"></div>
<label class="label">
<?php echo "Reply to:"?>
</label>
<input id="reply_to_box" name="reply" type="text" readonly="readonly" size="4" value="<?php echo $default_reply;  ?>" />
Currently replying to <span id="currently_replying_to"><?php echo $default_reply_name?></span>.
<a href="#<?php echo $anchor_text?>" onclick='document.getElementById("reply_to_box").value="0"; document.getElementById("currently_replying_to").innerHTML="no one";'>Click here to not reply.</a>
<!--<select name="reply" title="Select comment" >
<option value="0" selected="selected" >No reply</option>
<?php
$comments_reply 
mysql_query("SELECT * FROM `".$mysql_table_prefix."comments` WHERE is_approved = '1' AND page_id = '$page_id' AND reply_to = '0' ORDER BY dated ASC");
while (
$replying_comments mysql_fetch_assoc($comments_reply))
{
    
preg_match('/^.{1,50}/',$replying_comments['comment'],$matches);
    
//sanitization
    
$matches[0] = trim($matches[0]);
    
$matches[0] = strip_tags($matches[0]);
    
$matches[0] = htmlentities($matches[0], ENT_NOQUOTES'UTF-8');
    
$matches[0] = mysql_real_escape_string($matches[0]);
    
//End sanitization
    
echo "<option value='".$replying_comments['id']."' >".$replying_comments['name']." - ".$replying_comments['dated']." - ".$matches[0]."..."."</option>";

?>
</select>-->
<?php } } ?>

<?php function output_name () { ?>
<?php 
global $display_required_symbol$field_size_name$field_maximum_name$default_name?>
<div class="height_between_fields"></div>
<label class="label">
<?php echo LABEL_NAME ?>
<?php 
if ($display_required_symbol) { ?><span class="required_symbol"><?php echo " " REQUIRED_SYMBOL ?></span><?php ?>
</label>
<input type="text" name="name" title="Enter name" size="<?php echo $field_size_name?>" maxlength="<?php echo $field_maximum_name?>" value="<?php echo $default_name?>"/>
<?php ?>

<?php function output_email () { ?>
<?php 
global $enabled_email$required_email$display_required_symbol$field_size_email$field_maximum_email$default_email$display_email_note?>
<?php 
if ($enabled_email) { ?>
<div class="height_between_fields"></div>
<label class="label">
<?php echo LABEL_EMAIL ?>
<?php 
if ($required_email && $display_required_symbol) { ?><span class="required_symbol"><?php echo " " REQUIRED_SYMBOL ?></span><?php ?>
</label>
<input type="text" name="email" title="Enter email address" size="<?php echo $field_size_email?>" maxlength="<?php echo $field_maximum_email?>" value="<?php echo $default_email?>"/>
<?php if ($display_email_note) { ?> <span class="email_note"><?php echo NOTE_EMAIL ?></span> <?php ?>
<?php 
} } ?>

<?php function output_website () { ?>
<?php 
global $enabled_website$required_website$display_required_symbol$field_size_website$field_maximum_website$default_website?>
<?php 
if ($enabled_website) { ?>
<div class="height_between_fields"></div>
<label class="label">
<?php echo LABEL_WEBSITE ?>
<?php 
if ($required_website && $display_required_symbol) { ?><span class="required_symbol"><?php echo " " REQUIRED_SYMBOL ?></span><?php ?>
</label>
<input type="text" name="website" title="Enter website address" size="<?php echo $field_size_website?>" maxlength="<?php echo $field_maximum_website?>" value="<?php echo $default_website?>"/>
<?php } } ?>

<?php function output_town () { ?>
<?php 
global $enabled_town$required_town$display_required_symbol$field_size_town$field_maximum_town$default_town?>
<?php 
if ($enabled_town) { ?>
<div class="height_between_fields"></div>
<label class="label">
<?php echo LABEL_TOWN ?>
<?php 
if ($required_town && $display_required_symbol) { ?><span class="required_symbol"><?php echo " " REQUIRED_SYMBOL ?></span><?php ?>
</label>
<input type="text" name="town" title="Enter town" size="<?php echo $field_size_town?>" maxlength="<?php echo $field_maximum_town?>" value="<?php echo $default_town?>"/>
<?php } } ?>

<?php function output_country () { ?>
<?php 
global $enabled_country$default_country$required_country$display_required_symbol$path_to_comments_folder$error?>
<?php 
if ($enabled_country) { ?>
<div class="height_between_fields"></div>
<label class="label">
<?php echo LABEL_COUNTRY ?>
<?php 
if ($required_country && $display_required_symbol) { ?><span class="required_symbol"><?php echo " " REQUIRED_SYMBOL ?></span><?php ?>
</label>
<?php
require $path_to_comments_folder "includes/template/countries.php";
if ( (isset(
$_POST['country'])) && ( ($error) || (isset($_POST['preview_button'])) || (isset($_POST['preview_it'])) ) ) {
    if (
$_POST['country'] != "blank") {
        
$countries str_ireplace("'".$_POST['country']."'","'".$_POST['country']."' selected",$countries);
    }
} else {
    if (!empty(
$default_country)) {
        
$countries str_ireplace("'".$default_country."'","'".$default_country."' selected",$countries);
    }
}

echo 
$countries;
?>
<?php 
} } ?>

<?php function output_rating () { ?>
<?php 
global $enabled_rating$default_rating$required_rating$display_required_symbol$path_to_comments_folder$error$stop_repeat_voting$mysql_table_prefix$page_id?>
<?php 
if ($enabled_rating) { ?>
<div class="height_between_fields"></div>
<label class="label">
<?php echo LABEL_RATING ?>
<?php 
if ($required_rating && $display_required_symbol) { ?><span class="required_symbol"><?php echo " " REQUIRED_SYMBOL ?></span><?php ?>
</label>
<?php
require $path_to_comments_folder "includes/template/ratings.php";
if (
$stop_repeat_voting && has_voted()) {
    
$ratings str_ireplace("name='rating'","name='rating' disabled='disabled'",$ratings);
}
if ( (isset(
$_POST['rating'])) && ( ($error) || (isset($_POST['preview_button'])) || (isset($_POST['preview_it'])) ) ) {
    if (
$_POST['rating'] != "blank") {
        
$ratings str_ireplace("'".$_POST['rating']."'","'".$_POST['rating']."' selected",$ratings);
    }
} else {
    if (!empty(
$default_rating)) {
        
$ratings str_ireplace("'".$default_rating."'","'".$default_rating."' selected",$ratings);
    }
}
echo 
$ratings;
?>
<?php 
} } ?>

<?php if ($enabled_smilies) { ?>
<div class="height_above_smilies"></div>
<?php } else { ?>
<div class="height_between_fields"></div>
<?php ?>

<?php if ($enabled_smilies) { ?>
<div style="clear: left;"></div>
<div class="label"><span style="visibility: hidden;">blank</span></div>
<?php if ($enabled_smilies_smile) { ?>
<img src="<?php echo $path_to_comments_folder "images/smilies/smile.gif";?>" title="Smile" alt="Smile" class="smiley_image" onmousedown="addTags('',':smile:')"/>
<?php ?>
<?php 
if ($enabled_smilies_sad) { ?>
<img src="<?php echo $path_to_comments_folder "images/smilies/sad.gif";?>" title="Sad" alt="Sad" class="smiley_image" onmousedown="addTags('',':sad:')"/>
<?php ?>
<?php 
if ($enabled_smilies_huh) { ?>
<img src="<?php echo $path_to_comments_folder "images/smilies/huh.gif";?>" title="Huh" alt="Huh" class="smiley_image" onmousedown="addTags('',':huh:')"/>
<?php ?>
<?php 
if ($enabled_smilies_laugh) { ?>
<img src="<?php echo $path_to_comments_folder "images/smilies/laugh.gif";?>" title="Laugh" alt="Laugh" class="smiley_image" onmousedown="addTags('',':laugh:')"/>
<?php ?>
<?php 
if ($enabled_smilies_mad) { ?>
<img src="<?php echo $path_to_comments_folder "images/smilies/mad.gif";?>" title="Mad" alt="Mad" class="smiley_image" onmousedown="addTags('',':mad:')"/>
<?php ?>
<?php 
if ($enabled_smilies_tongue) { ?>
<img src="<?php echo $path_to_comments_folder "images/smilies/tongue.gif";?>" title="Tongue" alt="Tongue" class="smiley_image" onmousedown="addTags('',':tongue:')"/>
<?php ?>
<?php 
if ($enabled_smilies_crying) { ?>
<img src="<?php echo $path_to_comments_folder "images/smilies/crying.gif";?>" title="Crying" alt="Crying" class="smiley_image" onmousedown="addTags('',':crying:')"/>
<?php ?>
<?php 
if ($enabled_smilies_grin) { ?>
<img src="<?php echo $path_to_comments_folder "images/smilies/grin.gif";?>" title="Grin" alt="Grin" class="smiley_image" onmousedown="addTags('',':grin:')"/>
<?php ?>
<?php 
if ($enabled_smilies_wink) { ?>
<img src="<?php echo $path_to_comments_folder "images/smilies/wink.gif";?>" title="Wink" alt="Wink" class="smiley_image" onmousedown="addTags('',':wink:')"/>
<?php ?>
<?php 
if ($enabled_smilies_scared) { ?>
<img src="<?php echo $path_to_comments_folder "images/smilies/scared.gif";?>" title="Scared" alt="Scared" class="smiley_image" onmousedown="addTags('',':scared:')"/>
<?php ?>
<?php 
if ($enabled_smilies_cool) { ?>
<img src="<?php echo $path_to_comments_folder "images/smilies/cool.gif";?>" title="Cool" alt="Cool" class="smiley_image" onmousedown="addTags('',':cool:')"/>
<?php ?>
<?php 
if ($enabled_smilies_blush) { ?>
<img src="<?php echo $path_to_comments_folder "images/smilies/blush.gif";?>" title="Blush" alt="Blush" class="smiley_image" onmousedown="addTags('',':blush:')"/>
<?php ?>
<?php 
if ($enabled_smilies_unsure) { ?>
<img src="<?php echo $path_to_comments_folder "images/smilies/unsure.gif";?>" title="Unsure" alt="Unsure" class="smiley_image" onmousedown="addTags('',':unsure:')"/>
<?php ?>
<?php 
if ($enabled_smilies_confused) { ?>
<img src="<?php echo $path_to_comments_folder "images/smilies/confused.gif";?>" title="Confused" alt="Confused" class="smiley_image" onmousedown="addTags('',':confused:')"/>
<?php ?>
<?php 
if ($enabled_smilies_thumbsup) { ?>
<img src="<?php echo $path_to_comments_folder "images/smilies/thumbsup.gif";?>" title="Thumbs up" alt="Thumbs up" class="smiley_image" onmousedown="addTags('',':thumbsup:')"/>
<?php ?>
<?php 
if ($enabled_smilies_thumbdown) { ?>
<img src="<?php echo $path_to_comments_folder "images/smilies/thumbdown.gif";?>" title="Thumb down" alt="Thumb down" class="smiley_image" onmousedown="addTags('',':thumbdown:')"/>
<?php ?>
<?php 
if ($enabled_smilies_shocked) { ?>
<img src="<?php echo $path_to_comments_folder "images/smilies/shocked.gif";?>" title="Shocked" alt="Shocked" class="smiley_image" onmousedown="addTags('',':shocked:')"/>
<?php ?>
<?php 
?>

<?php if ($enabled_smilies) { ?>
<div class="height_below_smilies"></div>
<?php ?>

<label class="label">
<?php echo LABEL_COMMENT ?>
<?php 
if ($display_required_symbol) { ?><span class="required_symbol"><?php echo " " REQUIRED_SYMBOL ?></span><?php ?>
</label>
<textarea name="comment" title="Enter comment" cols="<?php echo $field_size_comment_columns?>" rows="<?php echo $field_size_comment_rows?>" onkeydown="textCounter(document.commentics.comment,document.commentics.count,<?php echo $comment_maximum_characters;?>)" 
onkeyup="textCounter(document.commentics.comment,document.commentics.count,<?php echo $comment_maximum_characters;?>)"><?php echo $default_comment?></textarea>

<?php if ($enabled_comment_counter) { ?>
<div style="clear: left;"></div>
<div class="label"><span style="visibility: hidden;">blank</span></div>
<input type="text" readonly="readonly" name="count" class="counter" size="20" value="<?php echo $comment_maximum_characters;?>"/>
<?php ?>

<?php if ($enabled_question) { ?>
<div class="height_between_fields"></div>
<label class="label">
<?php echo LABEL_QUESTION ?>
<?php 
if ($display_required_symbol) { ?><span class="required_symbol"><?php echo " " REQUIRED_SYMBOL ?></span><?php ?>
</label>
<?php $question_query mysql_query("SELECT * FROM `".$mysql_table_prefix."questions` ORDER BY Rand() LIMIT 1"); ?>
<?php $question 
mysql_fetch_array($question_query); ?>
<span class="question_part_question_text"><?php echo $question['question']; ?></span>
<input type="hidden" name="real_answer" value="<?php echo $question['answer']; ?>"/>
<div style="clear: left;"></div>
<div class="label"><span style="visibility: hidden;">blank</span></div>
<span class="question_part_answer_text"><?php echo TEXT_QUESTION ?></span>
<input type="text" name="supplied_answer" title="Enter answer to question" size="<?php echo $field_size_question?>" maxlength="<?php echo $field_maximum_question?>"/>
<?php ?>

<?php if ($enabled_captcha) { ?>
<div class="height_between_fields"></div>
<label class="label">
<?php echo LABEL_CAPTCHA ?>
<?php 
if ($display_required_symbol) { ?><span class="required_symbol"><?php echo " " REQUIRED_SYMBOL ?></span><?php ?>
</label>
<?php echo '
<img id="siimage" style="border-style: none; float: left;" src="'
.$path_to_comments_folder.'captcha/securimage_show.php?sid='.md5(uniqid(time())).'" alt="Captcha Image" title="Captcha Image" />
<a href="'
.$path_to_comments_folder.'captcha/securimage_play.php" title="Audible Version of Captcha"><img src="'.$path_to_comments_folder.'captcha/images/audio_icon.gif" alt="Audible Version of Captcha" style="border-style: none; vertical-align: top; border-style: none;" onclick="this.blur()" /></a><br />
<a href="#" title="Refresh Captcha Image" style="border-style: none" onclick="document.getElementById(\'siimage\').src = \''
.$path_to_comments_folder.'captcha/securimage_show.php?sid=\' + Math.random(); return false"><img src="'.$path_to_comments_folder.'captcha/images/refresh.gif" alt="Refresh Captcha Image" style="border-style: none; vertical-align: bottom;" onclick="this.blur()" /></a>';
?>
<div style="clear: left;"></div>
<div class="label"><span style="visibility: hidden;">blank</span></div>
<span class="captcha_part_answer_text"><?php echo TEXT_CAPTCHA ?></span>
<input type="text" name="captcha" title="Enter characters of captcha" size="<?php echo $field_size_captcha?>" maxlength="<?php echo $field_maximum_captcha?>"/>
<?php ?>

<?php if ($enabled_notify && $enabled_email && $enabled_notifications) { ?>
<p />
<div style="clear: left;"></div>
<div class="label"><span style="visibility: hidden;">blank</span></div>
<?php if ($default_notify) { ?>
<input type="checkbox" name="notify" title="Receive email notifications" checked="checked"/>
<?php } else { ?>
<input type="checkbox" name="notify" title="Receive email notifications"/>
<?php ?>
<span class="notify_text"><?php echo TEXT_NOTIFY ?></span>
<?php ?>

<?php if ($enabled_privacy) { ?>
<?php 
if ($enabled_notify && $enabled_email && $enabled_notifications) { ?> <br /> <?php } else { ?> <p /> <?php ?>
<div style="clear: left;"></div>
<div class="label"><span style="visibility: hidden;">blank</span></div>
<?php if ($default_privacy) { ?>
<input type="checkbox" name="privacy" title="Agree to privacy policy" checked="checked" onclick="enableSubmit();enablePreview();"/>
<?php } else { ?>
<input type="checkbox" name="privacy" title="Agree to privacy policy" onclick="enableSubmit();enablePreview();"/>
<?php ?>
<span class="privacy_text"><?php echo TEXT_PRIVACY ?></span>
<?php ?>

<?php if ($enabled_terms) { ?>
<?php 
if ( ($enabled_notify && $enabled_email && $enabled_notifications) || ($enabled_privacy) ) { ?> <br /> <?php } else { ?> <p /> <?php ?>
<div style="clear: left;"></div>
<div class="label"><span style="visibility: hidden;">blank</span></div>
<?php if ($default_terms) { ?>
<input type="checkbox" name="terms" title="Agree to terms and conditions" checked="checked" onclick="enableSubmit();enablePreview();"/>
<?php } else { ?>
<input type="checkbox" name="terms" title="Agree to terms and conditions" onclick="enableSubmit();enablePreview();"/>
<?php ?>
<span class="terms_text"><?php echo TEXT_TERMS ?></span>
<?php ?>

<p />

<div style="clear: left;"></div>
<div class="label"><span style="visibility: hidden;">blank</span></div>

<?php
$elements 
explode(","$sort_order_buttons);
foreach (
$elements as $element) {
    switch (
$element) {
        case 
"1":
        
output_submit();
        break;
        case 
"2":
        
output_preview();
        break;
    }
}
?>

<?php function output_submit () { ?>
<?php 
global $enabled_terms$enabled_privacy?>
<?php 
if ($enabled_terms || $enabled_privacy) { ?>
<input type="submit" name="submit_button" title="Add Comment" disabled="disabled" onclick="return processSubmit()" value="<?php echo SUBMIT_BUTTON ?>"/>
<?php } else { ?>
<input type="submit" name="submit_button" title="Add Comment" onclick="return processSubmit()" value="<?php echo SUBMIT_BUTTON ?>"/>
<?php } } ?>

<?php function output_preview () { ?>
<?php 
global $enabled_preview$enabled_terms$enabled_privacy$agree_to_preview?>
<?php 
if ($enabled_preview) { ?>
<?php 
if ( ($enabled_terms || $enabled_privacy) && ($agree_to_preview) ) { ?>
<input type="submit" name="preview_button" disabled="disabled" title="Preview" onclick="return processPreview();" value="<?php echo PREVIEW_BUTTON ?>"/>
<?php } else { ?>
<input type="submit" name="preview_button" title="Preview" onclick="return processPreview();" value="<?php echo PREVIEW_BUTTON ?>"/>
<?php } } } ?>

<script type="text/javascript">textCounter(document.commentics.comment,document.commentics.count,<?php echo $comment_maximum_characters;?>)</script>
<script type="text/javascript">enableSubmit()</script>
<script type="text/javascript">enablePreview()</script>

</form>

<?php if ($powered_by_new_window) { $attribute " target=\"_blank\""; } else { $attribute ""; } ?>
<?php 
if ($powered_by == "image") { ?>
<div style="clear: left;"></div>
<p />
<div class="label"><span style="visibility: hidden;">blank</span></div>
<a href="http://www.commentics.org"<?php echo $attribute?>><img src="<?php echo $path_to_comments_folder "images/commentics/powered_by.png";?>" title="Commentics" alt="Commentics"/></a>
<?php } else if ($powered_by == "text") { ?>
<div style="clear: left;"></div>
<p />
<div class="label"><span style="visibility: hidden;">blank</span></div>
<span class="powered_by">Powered by <a href="http://www.commentics.org"<?php echo $attribute?>>Commentics</a></span>
<?php ?>

Or try rewriting the last couple of lines.

I'm giving you three guesses...
Find all posts by this user
Quote this message in a reply
02-Sep-2010, 07:06 PM
Post: #20
RE: Reply to comment
Same error I'm afraid. It works fine with the normal code but not with your code.

Have you completed the interview?
Find all posts by this user
Quote this message in a reply
Post Reply 


Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  Comment # Module JMG 3 125 21-Apr-2013 06:26 PM
Last Post: Steven
  Administration / Comment list : Quick approve pier 1 293 13-Aug-2012 01:42 PM
Last Post: Steven
  Extra comment fields adding through admin corculator 0 429 25-Feb-2012 03:30 PM
Last Post: corculator
  Option to allow reply to replies trlstanc 0 423 20-May-2011 03:17 PM
Last Post: trlstanc
  Check comment content on submit Chafik 6 1,322 08-Jan-2011 02:55 PM
Last Post: Chafik
  Admin Reply Notification Steven 1 482 03-Jan-2011 05:00 PM
Last Post: Static
  Comment Title & BBcode Static 23 1,889 14-Aug-2010 01:29 PM
Last Post: Steven
  Better page/comment management Static 0 311 12-Aug-2010 11:46 PM
Last Post: Static
  Admin reply groefie 4 573 18-Jul-2010 12:00 PM
Last Post: Steven

Forum Jump:


User(s) browsing this thread: 1 Guest(s)