Wordpress Themes - WP Forum at BFA
There will be no more development for Atahualpa (or any other theme), and no support. Also no new registrations. I turned off the donation system. I may turn the forum to read only if it gets abused for spam. Unfortunately I have no time for the forum or the themes. Thanks a lot to the people who helped in all these years, especially Larry and of course: Paul. Take care and stay healthy -- Flynn, Atahualpa developer, Sep 2021

Wordpress Themes - WP Forum at BFA » WordPress Themes » Atahualpa 3 Wordpress theme » Center area post/pages » Comments, trackbacks & pings »

[SOLVED] Numbering comments using Greg's Threaded Comment Plugin


 
Prev Previous Post   Next Post Next
  #1  
Old Apr 17, 2009, 06:21 AM
perdox808's Avatar
perdox808
 
51 posts · Apr 2009
Melbourne, Australia
Send a message via Skype™ to perdox808
[SOLVED] Numbering comments using Greg's Threaded Comment Plugin

Hi Flynn. I think I have been a bad boy; actually, an idiot.

I wanted to install Greg's Threaded Comment Numbering Plugin from http://counsellingresource.com/featu...for-wordpress/.

The instructions were:

replace wp_list_comments() in your theme’s comments.php file with wp_list_comments('callback=gtcn_basic_callback').

I found three of these instances and changed all three.

When testing, the first comment number was actually 0. So I went back to the original file and only replaced the first instance. This seemed to work as the comment numbering started at 1 and seemed to be working correctly.

Fearing that I might have problems further on, I wrote to the developer. Below is a transcript:

My file had this:

wp_list_comments(array(
‘avatar_size’=>$bfa_ata['avatar_size'],
‘reply_text’=>__(’ · Reply’,'atahualpa’),
‘login_text’=>__(’Log in to Reply’,'atahualpa’),
‘walker’ => new Walker_Comment2,
‘max_depth’ => ”,
’style’ => ‘ul’,
‘callback’ => null,
‘end-callback’ => null,
‘type’ => ‘comment’,
‘page’ => ”,
‘per_page’ => ”,
‘reverse_top_level’ => null,
‘reverse_children’ => ”
))
and now I have _list_comments(’callback=gtcn_basic_callback’) where all the above was. Is this OK?

In my comments.php file, there were 3 instances of the above and I replaced them all only to find that my comment numbers were starting from 0

The developer replied:

Your theme does not use the standard built-in WordPress comment walking class by itself, but rather extends it with some additional custom code. Therefore, I would recommend caution when replacing anything that might result in breaking the custom code extensions.

From a very cursory look, it appears that the theme’s default callback function is contained in the file bfa_comment_walker.php, starting around line 94. You could try modifying it by inserting a direct call to gtcn_comment_numbering, as described in the advanced usage instructions.

Alternatively, you might try giving the name of the basic callback function gtcn_basic_callback in the array which the theme is passing to wp_list_comments, rather than the null which is there now.

My best suggestion, though, would be to contact the author of the theme directly and ask them to support the plugin when the plugin is active. That way, the theme author can integrate the numbering functionality into the theme seamlessly, preserving their own custom modifications to the WordPress core code, without someone else like me coming along and trying to guess what to tweak where in order to work with the modifications — and possibly messing up all their hard work in the process.


Flynn, should I give up on this and go back to my old file (which I saved) or is it OK? I won't have problems in the future because of this change will I?

Thank you.
 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Displaying comments and comment form below each post on multi post pages, in 3.4.x Flynn Comments, trackbacks & pings 12 May 28, 2011 07:27 PM
[SOLVED] Is there an ATO way to disable the Comment Form URL versus tweaking comments fromtheranks Comments, trackbacks & pings 2 Jun 18, 2009 12:10 PM
changing threaded reply link location under the comment neocratus Comments, trackbacks & pings 1 May 31, 2009 06:13 AM
Threaded (nested) comments [X] levels deep?? botv0091 Comments, trackbacks & pings 0 Apr 23, 2009 06:15 AM
Bold Comments and Post-Text if i have 1 Comment Volker Post-Kicker, -Byline & -Footer 2 Feb 24, 2009 02:29 PM


All times are GMT -6. The time now is 06:25 AM.


Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.