Page 37 of 150

Re: Evil Quick Reply

Posted: Thu Jan 24, 2008 7:20 pm
by jimcarrel
statm wrote:
jimcarrel wrote:thats Strange, I deleted mine and quick reply ceased to operate....
Were you using the updated version from Jan 21st?
yes, just redowned it to make sure

Re: Evil Quick Reply

Posted: Thu Jan 24, 2008 7:26 pm
by statm
Well then I guess Evil will need to elaborate on what needs to be deleted. To make it continue to work afterwards. But, I still dont understand why all that needs to be deleted.

Re: Evil Quick Reply

Posted: Thu Jan 24, 2008 7:29 pm
by jimcarrel
It looks to me that it may have errant code plus legit code, and I sure don't understand why Sascha could delete and it still work.

Re: Evil Quick Reply

Posted: Thu Jan 24, 2008 7:40 pm
by Sascha Mueller
jimcarrel wrote:It looks to me that it may have errant code plus legit code, and I sure don't understand why Sascha could delete and it still work.
In german we say it's a comment, I do not know the englisch word.

Here are two comments in HTML "<!-- -->":

Code: Select all

<!-- This is the comment: Begin of table -->
<table>
   <tr>
      <td>Hello Table</td>
   </tr>
</table>
<!-- This is a comment: End of table -->
All this code:

Code: Select all

	<!--
	<form action="{S_QR_POST_ACTION}" method="post" id="postform">
		<div class="panel" id="postingbox">
			<div class="inner"><span class="corners-top"><span></span></span>

			<h3>{L_POST_REPLY}</h3>

			<fieldset class="fields1">

			<dl style="clear: left;" id="message-box">
				<!-- IF S_QR_SUBJECT -->
				<dd>
					<input type="text" name="subject" id="subject" size="45" maxlength="64" tabindex="1" value="{QR_SUBJECT}" class="inputbox" style="width:100%;" />
				</dd>
				<!-- ENDIF -->
				<dd>
					<textarea name="message" id="message" rows="10" cols="76" tabindex="2" class="inputbox" style="height:200px; width:99%;"></textarea>
				</dd>
				<!-- IF S_QR_RESIZE -->
				<dd>
					<input type="button" value=" + " class="button1" onclick="textbox_resize(100);" />
					<input type="button" value=" - " class="button1" onclick="textbox_resize(-100);" />
				</dd>
				<!-- ENDIF -->
			</dl>
			</fieldset>

			<span class="corners-bottom"><span></span></span></div>
		</div>

		<!-- IF not S_USER_LOGGED_IN -->
		<div class="panel bg2">
			<div class="inner"><span class="corners-top"><span></span></span>

			<fieldset class="fields1">
				<div class="column1">
				<dl>
					<dl>
						<dt><label for="username">{L_USERNAME}:</label></dt>
						<dd><input type="text" tabindex="3" name="username" id="username" size="25" maxlength="30" class="inputbox" /></dd>
					</dl>
					<!-- IF S_CONFIRM_CODE -->
					<dl>
						<dt><label for="confirm_code">{L_CONFIRM_CODE}:</label></dt>
							<dd><input type="hidden" name="confirm_id" value="{CONFIRM_ID}" />{CONFIRM_IMAGE}</dd>
							<dd><input type="text" name="confirm_code" id="confirm_code" size="8" maxlength="8" tabindex="4" class="inputbox narrow" title="{L_CONFIRM_CODE}" /></dd>
					</dl>
					<!-- ENDIF -->
				</dl>
				</div>
			</fieldset>

			<span class="corners-bottom"><span></span></span></div>
		</div>
		<!-- ENDIF -->

		<div class="panel bg2">
			<div class="inner"><span class="corners-top"><span></span></span>

			<fieldset class="submit-buttons">
				{S_QR_HIDDEN_FIELDS}
				<input type="submit" name="preview" tabindex="6" value="{L_PREVIEW}" class="button1" onclick="document.getElementById('postform').action += '#preview';" />&nbsp;
				<input type="submit" name="post" tabindex="5" value="{L_SUBMIT}" class="button1" accesskey="s" />
			</fieldset>

			<span class="corners-bottom"><span></span></span></div>
		</div>
	{S_FORM_TOKEN}
	</form>
	-->
is such a comment and can be deleted completle. :)

Re: Evil Quick Reply

Posted: Thu Jan 24, 2008 7:40 pm
by Sascha Mueller
del

Re: Evil Quick Reply

Posted: Thu Jan 24, 2008 7:48 pm
by statm
But my point is.. I don't understand how the MOD still works if you delete all of that.

Plus, in my copy none of that is commented.

Re: Evil Quick Reply

Posted: Thu Jan 24, 2008 7:54 pm
by jimcarrel
statm wrote:But my point is.. I don't understand how the MOD still works if you delete all of that.

Plus, in my copy none of that is commented.
Okay, I just rechecked what I had deleted, I had grabbed an extra line that was outside of the comment!
I redid the deleting (without grabbing the extra line of code) and it now works.

statm, just read again Sascha's explaination of how one adds a comment to the code.
I think Sascha is right, because when I paid more close attention, I could delete as suggested, once I did it correctly, it worked,

But really, you don't have to mess with deleting it,,,, it is just a comment and only detriment is that it makes the file bigger

Re: Evil Quick Reply

Posted: Thu Jan 24, 2008 7:58 pm
by jimcarrel
oh, man, I am simply confused now,,, how can <!---endif---> be a comment

Re: Evil Quick Reply

Posted: Thu Jan 24, 2008 8:01 pm
by Sascha Mueller
jimcarrel wrote:oh, man, I am simply confused now,,, how can <!---endif---> be a comment
Yours is wrong syntax, this is correct:

Code: Select all

<!-- endif -->
For HTML is this only a comment and you can delete it.

Re: Evil Quick Reply

Posted: Thu Jan 24, 2008 8:09 pm
by statm
In phpBB 3.0's template engine <!-- IF for_example --> and <!-- ENDIF --> aren't comments, they are actually real instructions. The syntax is capitalized. But, if it just says <!-- this is a comment --> that is a comment.

EDIT: Plus <![endif]--> in IE is part of a conditional statement. So you have to really pay attention to what it really is. A template engine guard, a conditional statement, or a html comment.

Re: Evil Quick Reply

Posted: Thu Jan 24, 2008 8:10 pm
by jimcarrel
okay, thanks, now I understand, its a comment only in HTML..... I finally have a handle on it!.

Re: Evil Quick Reply

Posted: Thu Jan 24, 2008 8:12 pm
by Sascha Mueller
statm wrote:In phpBB 3.0's template engine <!-- IF for_example --> and <!-- ENDIF --> aren't comments and the syntax is capitalized. They are actually real instructions. But, if it just says <!-- this is a comment --> that is a comment.
The PHP-Parser replace those comments --> <!-- IF for_example --> and <!-- ENDIF -->

The ready XHTML or HTML Code must be free from those code or it is only a comment. ;)

Re: Evil Quick Reply

Posted: Thu Jan 24, 2008 8:18 pm
by statm
The template parser inside phpBB replaces the <!-- IF statements --> with php code and then the php parser renders it. The php parser on the server doesnt touch the <!-- IF statements --> in the style until it is actually parsed by the template parser first though.

Re: Evil Quick Reply

Posted: Thu Jan 24, 2008 8:29 pm
by Sascha Mueller
statm wrote:The template parser inside phpBB replaces the <!-- IF statements --> with php code and then the php parser renders it. The php parser on the server doesnt touch the <!-- IF statements --> in the style until it is actually parsed by the template parser first though.
Yes, that's correct of course! :)

Re: Evil Quick Reply

Posted: Thu Jan 24, 2008 8:38 pm
by statm
Well, my point of saying all that was like I did say, you have to watch and not delete any <!-- endif -->. Because it isn't just a comment.