[SOLVED] Quick/Dirty Comment Numbering
Here's how I did a quick comment numbering. No add-ins required, just edit two files (after making backup copies, of course).
Use the Editor to open the bfa_custom_comments.php file. Add the following after about line 4 (the "global $bfa_ata" line): Code:
global $mycommentnumber; Code:
echo "(# " . $mycommentnumber . ") "; Then edit the "comments.php" file. After about line 12 (where it says "You can start editing below"), add these two lines: Code:
global $mycommentnumber ; Code:
(# 12) Code:
echo "<div class = 'mycommentnumberstyle'>(# " . $mycommentnumber . ") </div>"; Of course, make a backup copy of the files before you edit them, and save a copy of the changes somewhere so you can re-do them in case of a update. Enjoy: it's not fancy, but it will work. ...Rick... |
Will this still work with WP 3.0 and Atahualpa 3.5.1?
|
It does work with Atahualpa 3.5.1. Have not upgraded any of my blogs to WP 3.0 yet, waiting for a bit.
Thanks...Rick... |
Ok I did this and all it shows is this where a comment number SHOULD be:
Code:
echo "(# " . $mycommentnumber . ") "; · |
I would assume, then, that the code is not inside a "php" section.
Try putting a Code:
<?php .... ?> ...Rick... |
Rick, i've followed your instructions, and added the code. The comment number appears on my blog, but it is always set to zero. Is there some other snippet of code which will automatically increment $mycommentnumber based on the number of the comment?
I am using a fresh install of WP 3.0.1 and Atahualpa 3.5.2 thanks! |
Can't believe that I didn't notice this before. The problem is that we (well, me) never increment the comment number.
Change the first instruction/code extract to: Code:
global $mycommentnumber; ..Rick... |
Works perfectly, thanks for the quick solution!
|
Glad it worked. Sorry for the error.
And remember that any updates to the theme may require you re-doing the change. ...Rick.. |
All times are GMT -6. The time now is 04:35 PM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.