mu.nu - Fighting attention deficit disorder wherever it - ooh, shiny!
August 02, 2006
Minx Comments - Everyone Wins Except The Spammers
The next two lines pull in the CSS (stylesheet) - replace this with your own CSS; and the standard show/hide comments thingy. Which this page doesn't actually use, so we might as well remove it. Anyway:
Here's a quick rundown on how to create your own Minx-based comments pages.
First, you need to change your comments links from, well, whatever they are now, to:<a href="http://minx.cc/?post=<$MTEntryID$>">Comments</a>Or something similar. http://minx.cc?post=XXXXXX is a link that works for any given entry to bring up that entry and its comments. Well, it shouldn't work on unpublished entries. Let me check that... Hmm. Well, that's not quite right. You can't see the post, but it gives you a comment form. I'll fix that. ... Done. Anyway, the template looks like this:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">Got all that? No? Okay, let's take it a bit at a time.
<html><head>
<title>[posts][post.title][/posts] </title>
<link rel="stylesheet" href="http://minx.cc/css/minx.css" type="text/css" />
<script language="JavaScript" src="http://minx.cc/scripts/showhide.js"></script>
</head> <body> <div id="container">
<div id="center">
<div class="content"> [posts]<h1>[post.title]</h1><p>
[post.text]
<p>
[post.more] <p class="posted">
Posted by: [post.authorlink] at
<a href="[post.url]">[post.time]</a>
</p>
<p><h1>Comments</h1>
<p>
[comments:here]
<p>
[include commentform]
[/posts] [magic.pager]
[magic.stats] </div>
</div>
</div> <div style="clear: both;"> </div> </body>
</html>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">This tells the browser that the page is to be interpreted as XHTML. Whether it is valid XHTML or not depends on the template, but if you don't put this line in some funny things happen with the current stylesheet.
<html><head>The HTML head section. The title line just puts the title of the post as the title on the browser window.
<title>[posts][post.title][/posts] </title>
<link rel="stylesheet" href="http://minx.cc/css/minx.css" type="text/css" />
<script language="JavaScript" src="http://minx.cc/scripts/showhide.js"></script>
</head>
The next two lines pull in the CSS (stylesheet) - replace this with your own CSS; and the standard show/hide comments thingy. Which this page doesn't actually use, so we might as well remove it. Anyway:
<body> <div id="container">The start of the body of the page. The DIVs depend on your stylesheet; you should be able to get an idea of what to put here by looking at your existing comments page.
<div id="center">
<div class="content">
[posts]The start of the posts block. Post-related tags are only guaranteed to work inside a posts block.
<h1>[post.title]</h1><p>Display the title, nice and big.
[post.text]Display the post body, then a paragraph break, then the extended post (if there is any). If there isn't an extended post, your page should still look nice and tidy.
<p>
[post.more]
<p class="posted">Show that "Posted by" line.
Posted by: [post.authorlink] at
<a href="[post.url]">[post.time]</a>
</p>
<p><h1>Comments</h1>A line that says "Comments" in nice big letters.
<p>
[comments:here]Put the comments here. (Hey, this stuff is easy!)
[include commentform]Include the comment form.
[/posts]Don't forget to close whatever you opened!
[magic.pager]You only really need this if you are going for paged comments, which don't work right now anyway.
[magic.stats]Show performance statistics. You don't really need this at all... But it's cute.
</div>And close everything else. Yay! Easy, huh? All you need to do is save this as a new index template called page.entry... And wait for me to fix things so that Minx looks for the page.entry template instead of the mxEntry template. And viola!
</div>
</div> <div style="clear: both;"> </div> </body>
</html>
Posted by: Pixy Misa at 04:36 AM | Comments (347) | Add Comment | Trackbacks (Suck)
1
Now -- when i do this, what happens to my old comments? Do they still exist?
Posted by: Rhymes With Right @ at August 02, 2006 10:02 PM
2
And before i rebuild, I must ask -- should it be page.entry.php as teh file name -- or something else?
Posted by: Rhymes With Right @ at August 02, 2006 10:30 PM
3
Good questions!
1. Nothing happens to your old comments! Minx keeps your old comments! (Neat, huh?)
2. You don't need a file name at all. And turn that little auto-rebuild thingy off for the new template.

1. Nothing happens to your old comments! Minx keeps your old comments! (Neat, huh?)
2. You don't need a file name at all. And turn that little auto-rebuild thingy off for the new template.
Posted by: Pixy Misa @ at August 02, 2006 11:37 PM
4
Ok, so we don't need a file name at all, so why do you say "All you need to do is save this as a new index template called page.entry... And wait for me to fix things so that Minx looks for the page.entry template instead of the mxEntry template. And viola!"
At the end of your post? I'm a little confused, do we actually only have to change the comments links?
At the end of your post? I'm a little confused, do we actually only have to change the comments links?
Posted by: Oorgo @ at August 04, 2006 06:18 PM
5
Sorry, I don't understand. Am I supposed to replace the main index template with this code? If I do that, how will it be saved as "page.entry"? Won't this code simply replace the code that's there?
I'm sort of hopelessly confused.
Also, I made some changes to the main index template awhile back that turned off comments after a certain number of days, and also turned off comments for old posts. Does this code interfere with that?
Oh, I get it. I just change the name of the output file when saving the main index template from "index.php" to "page.entry", right? Tell me that's right, because that's what I did. You know... so I can sleep at least.
I'm sort of hopelessly confused.
Also, I made some changes to the main index template awhile back that turned off comments after a certain number of days, and also turned off comments for old posts. Does this code interfere with that?
Oh, I get it. I just change the name of the output file when saving the main index template from "index.php" to "page.entry", right? Tell me that's right, because that's what I did. You know... so I can sleep at least.
Posted by: Demosophist @ at August 07, 2006 02:42 AM
6
homes, and giraffes, lions and other animals from Roosevelt Park Zoo in Minot
have been relocated in new homes.Shelters continue to fill up. up.
supra footwear for
saleup. The Moses', a family of six, have been staying at the Minot
Auditorium shelter the last several weeks, since the first evacuation orders
were issued."I'd like to be upset upset
cheap supra shoesupset
and just cry more, but it's not going to help,"
have been relocated in new homes.Shelters continue to fill up. up.
supra footwear for
saleup. The Moses', a family of six, have been staying at the Minot
Auditorium shelter the last several weeks, since the first evacuation orders
were issued."I'd like to be upset upset
cheap supra shoesupset
and just cry more, but it's not going to help,"
Posted by: supra footwear for sale @ at July 06, 2011 09:45 AM
Processing 0.0, elapsed 0.0122 seconds.
22 queries taking 0.0089 seconds, 28 records returned.
Page size 13 kb.
Powered by Minx 0.8 beta.