Help - Search - Members - Calendar
Full Version: polishing off stuff
Movable Type Community Forum > Additional Resources > Tips and Tricks
mike.tosino
okay, i had some questions, again, i'm afraid they go beyond my knowledge.

well, my website (http://ubersniper.com), has some errors on it. but that brings me to my first question. i have my comments link setup so that a popup pops up. but the main page that the link was orignally on, loads into the commenting listing template page. i wanted it to just load the popup, and not a different page itself. i've seen many sites do this, but i was not able to see exactly it they did it because i was viewing the processed code and now their templates.

also, once you're at my commenting window, and you try to post a comment, theres a VERY BRIEF error on the page. quite honestly, it loads so briefly that i don't know what the error is about or where its at. anyone have any ideas?

now, this brings me to my last problem. once you've posted a comment on the page, using the comment popup, the popup window loads the individual archive template. i wanted it to load about up the commenting listing template page, but it doesn't.

i'm so clueless. what am i doing wrong!? btw, what do you think of my site? thanks!
markn
I didn't get an error message, however, I did, as you say, get taken to the archive page.  I would check your "Comment Listing Template"...

Can you post your code for your "Comment Listing Template" ?
mike.tosino
ahh, i did defeat the nasty little error message. so thats taken care of.

about the main page loading to the comment listing template, here is what my template looks like:

CODE
<HTML>
<head>

<title>.| überSNIPER.com |.</title>

<link rel="stylesheet" href="stylesheet.css">

<script language="javascript" type="text/javascript">
function OpenComments (c) {
   window.open(c,
                   'comments',
                   'width=480,height=480,scrollbars=yes,status=yes');
}

function OpenTrackback (c) {
   window.open(c,
                   'trackback',
                   'width=480,height=480,scrollbars=yes,status=yes');
}
</script>

</head>
<body bgcolor="#333333">

<br>

<table>
 <tr>
   <td width="8"></td>
   <td>

<span class="content">

<MTEntryIfAllowComments>

<a name="comments"></a><b><h3>Heres what you guys said:</h3></b>

<MTComments>
<table cellpadding="2" cellspacing="0">
 <tr>
   <td bgcolor="#666666" width="5"></td>
   <td bgcolor="#666666" class="content">

On <$MTCommentDate$>, <$MTCommentAuthorLink spam_protect="1"$> said:

   </td>
   <td bgcolor="#666666" width="5"></td>
 </tr>
 <tr>
   <td bgcolor="#444444" width="5"></td>
   <td bgcolor="#444444" class="content">

<$MTCommentBody$>

   </td>
   <td bgcolor="#444444" width="5"></td>
 </tr>
</table>

<br>
<br>

</MTComments>

   </td>
 </tr>
</table>

<br>

<hr align="center" color="#444444" size="1" width="90%">

<br>

<span class="content">

<center>

<h3>Post a comment</h3>

<form method="post" action="<$MTCGIPath$><$MTCommentScript$>" name="comments_form" onsubmit="if (this.bakecookie.checked) rememberMe(this)">
<input type="hidden" name="static" value="1" />
<input type="hidden" name="entry_id" value="<$MTEntryID$>" />

<table>
 <tr>
   <td bgcolor="#444444" align="left">

<table>
 <tr>
   <td></td>
   <td>

<label for="author"><b>Name</b></label>

   </td>
 </tr>
</table>

   </td>
 </tr>
 <tr>
   <td>

<input id="author" name="author" bgcolor="#444444" />

   </td>
 </tr>
</table>

<br>

<table>
 <tr>
   <td bgcolor="#444444" align="left">

<table>
 <tr>
   <td></td>
   <td>

<label for="email"><b>Email</b></label>

   </td>
 </tr>
</table>

   </td>
 </tr>
 <tr>
   <td>

<input id="email" name="email" />

   </td>
 </tr>
</table>

<br>

<table>
 <tr>
   <td bgcolor="#444444" align="left">

<table>
 <tr>
   <td></td>
   <td>

<label for="url"><b>Homepage</b></label>

   </td>
 </tr>
</table>

   </td>
 </tr>
 <tr>
   <td>

<input id="url" name="url" />

   </td>
 </tr>
</table>

<br>

<table>
 <tr>
   <td bgcolor="#444444" align="left">

<table>
 <tr>
   <td></td>
   <td>

<label for="comments"><b>What do you want to say?</b></label>

   </td>
 </tr>
</table>

   </td>
 </tr>
 <tr>
   <td>

<textarea id="text" name="text" rows="10" cols="50">Heres what I think...</textarea>

   </td>
 </tr>
</table>

<br />

<input type="submit" name="post" value="POST" />
<br />

</form>

</center>

</MTEntryIfAllowComments>

</span>

<br>
<br>

</body>
</HTML>


hope this helps out some.
mike.tosino
lmao, i just noticed someting. i'm a tablewhore. i friggin pimp data cells on all my websites. haha, whats wrong with me?  :p  ???
girlie
Remove this line from your template:

CODE
<input type="hidden" name="static" value="1" />


And I think the JS errors are because you have these functions in your page, but they aren't being called anywhere:

CODE
<script language="javascript" type="text/javascript">
function OpenComments (c) {
   window.open(c,
                   'comments',
                   'width=480,height=480,scrollbars=yes,status=yes');
}

function OpenTrackback (c) {
   window.open(c,
                   'trackback',
                   'width=480,height=480,scrollbars=yes,status=yes');
}
</script>
mike.tosino
i'm not getting the js errors no more. what i'm concerned about is that the comments window loads into the individual archive page for that article. i figure i just wanted it to reload the comments window. also, from the main page that has the comments link, if you click on the comments link, the main page loads into the comment listing page. i don't want it to load to anything.

sry if this sounds weird and confusing.
girlie
For problem #1 - Again, remove this line from your comments listing template:

CODE
<input type="hidden" name="static" value="1" />


For problem #2, I'm not sure of the exact cause of this, but I did notice that you have some bad coding in your main page when I View Source.

CODE
<!-- BEGIN NAV //-->

<HTML>
<body>
...
</body>
</HTML>

<!-- END NAV //-->

<!-- BEGIN MAIN SECTION //-->

<HTML>
<head>

<link rel="stylesheet" href="stylesheet.css">

<script language="javascript" type="text/javascript">
function OpenComments (c) {
   window.open(c,
                   'comments',
                   'width=500,height=480,scrollbars=yes,status=yes');
}

function OpenTrackback (c) {
   window.open(c,
                   'trackback',
                   'width=500,height=480,scrollbars=yes,status=yes');
}
</script>

</head>
<body>
...
<!-- BEGIN BOTTOM NAV //-->

<HTML>
<body>
...
</body>
</HTML

<!-- END BOTTOM NAV //-->


and it goes on and on through your page, repeated HTML, HEAD and BODY tags, and you're repeating the OpenComments and OpenTrackback functions. Cleaning up your code might resolve your second issue, or at least clear the path so we can see what really is going on.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2009 Invision Power Services, Inc.