Wordpress Themes - WP Forum at BFA

Wordpress Themes - WP Forum at BFA (http://forum.bytesforall.com/index.php)
-   Comments, trackbacks & pings (http://forum.bytesforall.com/forumdisplay.php?f=19)
-   -   date / time link in comments (http://forum.bytesforall.com/showthread.php?t=2198)

janey73 Jun 27, 2009 12:03 PM

date / time link in comments
 
I want to disable the link in the date / time stamp for comments, but can't find where to do that. I still want the date / time stamp to show, just not be a link. Suggestions, please.

fromtheranks Jun 27, 2009 03:08 PM

Janey73,

Did you know, and I just noticed this the other day on a site with a lot of comments, that clicking on the date scrolls the page of comments? The comment moves to the top of the page. Handy feature requiring less use of the mouse's scroll wheel.

Hope this helps.

Flynn Jun 29, 2009 07:16 PM

You would have to replace
PHP Code:

        <a href="<?php echo htmlspecialcharsget_comment_link$comment->comment_ID ) ) ?>">
        <?php printf(__('%1$s at %2$s','atahualpa'), get_comment_date(__('F jS, Y','atahualpa')),  get_comment_time()) ?></a>

with
PHP Code:

<?php printf(__('%1$s at %2$s','atahualpa'), get_comment_date(__('F jS, Y','atahualpa')),  get_comment_time()) ?>

in functions/bfa_custom_comments.php

but as fromtheranks mentioned, the link can be useful, just so you know

Zona Mar 8, 2010 12:27 AM

Thanks for an amazing theme!!

What if I would like to change the color of the date/time line in each posted comment. Where would I make that change? (I've been able to change author and posted comments lines in CSS Inserts using this BFA Post: http://forum.bytesforall.com/showthr...style+comments)

Also:
How would I put the AUTHOR(of comment) + DATE/TIME on the same line so it reads something like:

Posted by Zona on March 7th, 2010 at 8:30pm


And last question:
How would I move this newly created line below the actual comment content so it reads something like this:

Incredible post. I can't wait for the next one!
Posted by Zona on March 7th, 2010 at 8:30pm

juggledad Mar 8, 2010 05:45 AM

If you look at the generated source of a page with comments, you will see something like this
HTML Code:

        <a name="comments"></a><!-- named anchor for skip links -->
        <h3 id="comments">3 comments to Post with thumbnail and image</h3>

        <div class="navigation-comments-above"><a class='prev page-numbers' href='/wordpress/?p=27&cpage=1#comments'>&laquo; Older Comments</a>
<a class='page-numbers' href='/wordpress/?p=27&cpage=1#comments'>1</a>
<span class='page-numbers current'>2</span></div>
        <!-- Comment List -->
        <ul class="commentlist">
               
                        <li class="comment byuser comment-author-admin bypostauthor even thread-even depth-1 clearfix" id="comment-12">
                <div id="div-comment-12" class="clearfix comment-container bypostauthor">
                <div class="comment-author vcard">
                                <span class="authorname">admin</span>
                </div>
                                <div class="comment-meta commentmetadata">
                <a href="http://yourdomain.com/wordpress/?p=27&amp;cpage=2#comment-12">
                February 23rd, 2010 at 1:45 pm</a>
        <span class="comment-reply-link"><a rel='nofollow' class='comment-reply-link' href='/wordpress/?p=27&cpage=2&replytocom=12#respond' onclick='return addComment.moveForm("comment-12", "12", "respond", "27")'> &middot; Reply</a></span>                                </div>
                <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi varius vestibulum rutrum. Quisque in ligula lacus, sed scelerisque nisl. Proin congue sodales leo ac eleifend. Curabitur mollis accumsan varius. Donec a velit risus. Integer egestas, sapien in pellentesque sagittis, odio leo posuere turpis, a ultrices quam est sit amet lacus. Nunc at lectus elit, vitae egestas augue. Maecenas auctor tempus leo, vitae egestas magna ornare sit amet. Morbi sollicitudin convallis scelerisque.</p>
                </div>

if you look, you will see the date is part of an anchor '<a...> that is part of a <div..> with a class comment-meta. With this information, you can construct a CSS Selector and the rules you want to apply.

Zona Mar 8, 2010 10:49 PM

Apologies -- I'm a little slow on this one... so to change the date color and rearrange the order of the content... I need to write code to put in CSS Inserts and you suggest creating that code from the example of what I see when I view the source code on a page running comments -- is that correct?

Thank you.

juggledad Mar 9, 2010 04:50 AM

You will create a CSS selector and CSS rules to affect the HTML element and put them in the CSS Inserts area. If you think of number of things that can be styled on a page, the number is staggering because every HTML element could be uniquely styled.

Atahualpa gives you the ability to change a lot of them thru it's options, but not all of them. Each option actually is put into a CSS Selector/rule for the site. Since Atahualpa doesn't have options for every single possible element, it has the 'CSS Inserts' area so you can add selectors/rules that you need for your site.

In the example above, if I wanted to change the date/time to show up BLUE, I would code
HTML Code:

div.comment-meta a { color: blue;}
the 'div.comment-meta a' says 'for every link element (<a>) that exists inside a <div> that has a class of 'comment-meta', change teh text color to blue'. Note that since there is a <span> with an <a> in the same <div>, the text in that <a> will also be effected since it is an <a> inside teh <div> that has a class 'comment-meta'. If you wanted that text (the word 'Reply') to be black, you would have to code another CSS selector/rule like
HTML Code:

div.comment-meta a span a{ color: black;}

Zona Mar 10, 2010 11:59 PM

Hi JD: thanks for replying so quickly. I will work on this and let you know my progress...

Many thanks.

Zona Mar 18, 2010 02:31 AM

Hi JD: Ok - I failed at this challenge and am rethinking what I want and can do. I'd like to just delete the time from my commenter's responses -- can I do this by deleting the section referring to time in comments_paged.php?

My commenter's responses now read:
March 11th, 2010 at 11:32pm

I'd like it to read:
March 11th, 2010

My comments_paged.php reads:
<span class="commentdate">
<?php // Comment Date and Time
printf(__('%1$s at %2$s'), get_comment_date(__('F jS, Y','atahualpa')), get_comment_time()) ?>
</span>

I would change it to read:
<span class="commentdate">
<?php // Comment Date
printf(__('%1$s at %2$s'), get_comment_date(__('F jS, Y','atahualpa'))?>
</span>

This is so simple... but, am I even close??? :-)

Thanks, Zona

juggledad Mar 18, 2010 05:16 AM

looks like it will work, give it a try :)

Zona Mar 22, 2010 03:38 AM

Hi JD: The edit I proposed didn't work for me. I also edited another line in comments_paged.php that referred to time:

<?php // Comment Date and Time
printf(__('%1$s at %2$s'), get_comment_date(__('F jS, Y','atahualpa')), get_comment_time()) ?>

and changed it to:
<?php // Comment Date
printf(__('%1$s at %2$s'), get_comment_date(__('F jS, Y','atahualpa')) ?>

but still no success :confused:

Any ideas?

Thanks, Zona

Zona Apr 6, 2010 07:04 PM

Still working on this one... double-checked to see that I had taken all commands for time in comments_paged.php. Looks like I got everything...

Does anyone have any suggestions?

juggledad Apr 18, 2010 05:41 AM

try changing it to:
HTML Code:

<?php // Comment Date
printf(__('%1$s), get_comment_date(__('F jS, Y','atahualpa')) ?>


Zona Apr 21, 2010 05:39 PM

Hi JD: Thanks for the reply. Unfortunately, that didn't work for me. (I saw two instances for code on Comment Date and I changed both places to the code you gave me.)

Any other ideas? :)

juggledad Apr 22, 2010 06:39 AM

edit bfa_custom_comments.php and change line 23 (in version 3.4.6) from
HTML Code:

                <?php printf(__('%1$s at %2$s','atahualpa'), get_comment_date(__('F jS, Y','atahualpa')),  get_comment_time()) ?></a>
to
HTML Code:

                <?php printf(__('%1$s','atahualpa'), get_comment_date(__('F jS, Y','atahualpa'))) ?></a>

Zona May 7, 2010 06:38 PM

You got it JD! Worked perfectly (in version 3.4.4)!!

Thank you very much!


All times are GMT -6. The time now is 03:02 AM.

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