Recent Topics

1 Nov 02, 2005 14:27    

I am using the Crystal Glass skin.
How do I change the way the comments appear?
For eg here
http://pallab.net/index.php/2005/10/28/can_you_complete_mario_in_5_minutes#comments

Instead of
Comment from: Name [Visitor] · website
I want it to be
Comment from: [url=www.website.com]Name[/url] [Visitor]

Thanks,
Pallab

2 Nov 02, 2005 15:23

1a. If you want this change to apply to all of your skins, then open up /skins/_feedback.php

-or-

1b. If you want this change to only apply to crystalglass, then copy the /skins/_feedback.php to /skins/crystalglass/_feedback.php, replacing the file of the same name in the crystalglass folder. Then open /skins/crystalglass/_feedback.php.

2. Find this bit of code:

                                            case 'comment': // Display a comment:
                                                echo T_('Comment from:') ?>
                                                <?php $Comment->author() ?>
                                                <?php $Comment->author_url( '', ' &middot; ', '' ) ?>


3.
Change it to:

                                            case 'comment': // Display a comment:
                                                echo T_('Comment from:') ?>
                                                <?php $Comment->author('' , '#' , '' , '#' , 'htmlbody' , 'true' ) ?>
                                                

That should work, but I'm testing it and it only works for Visitors. For some reasons it doesn't make the name a link for Members. This might be a bug. Can someone try this and see if they get the same result? If so I'll post it in the bug forum.

3 Nov 02, 2005 15:42

Thanks.
It is working as u mentioned.I tried making a test post as a registered user and the name doesnt get hyperlinked

4 Nov 02, 2005 16:00

You could also do it this way:

 case 'comment': // Display a comment:
 echo T_('Comment from:') ?>
 <a href="<?php $Comment->author_url( '', '', '' , 'false' ) ?>"><?php $Comment->author() ?></a>
 


But then if there's not an url for the author you end up with an empty link. Here's the documentation for the comment author function, by the way:
http://doc.b2evolution.net/0.9.1/evocore/Comment.html#author

I'll report this in the bug forum and see if anyone has a solution for it.

6 Nov 02, 2005 17:14

personman wrote:

You could also do it this way:

 case 'comment': // Display a comment:
 echo T_('Comment from:') ?>
 <?php $Comment->author_url( '', '', '' , 'false' ) ?><?php $Comment->author() ?></a>
 


But then if there's not an url for the author you end up with an empty link. Here's the documentation for the comment author function, by the way:
http://doc.b2evolution.net/0.9.1/evocore/Comment.html#author

I'll report this in the bug forum and see if anyone has a solution for it.

What do you mean by an empty link?
If there is no url then the name shouldnt be hyperlinked.

7 Nov 02, 2005 17:21

Oops, I posted the wrong code. I went back to that post and fixed it. You should see what I mean now. The <a href=" is hardcoded in, so it will show up even if author_url is empty.

8 Nov 02, 2005 17:34

ok.
Hope this wud be fixed in pheonix.
I am sticking to the earlier method as i am the only member in my blog :)

Thanks a lot for taking the time to help me.

There is another thing i want to do.
I want the sidebar also to appear in the comments page.

9 Nov 02, 2005 17:58

To show the sidebar all the time in crystalglass, open /skins/crystalglass/_main.php and make these changes:

Line 58

<?php if( $disp != 'single' ) {
        echo '<div id="wrapper">';
        } else {
        echo '<div id="wrapperWide">';
        } ?>


change to

<div id="wrapper">

Line 76

<?php if( $disp != 'single' ) {
        echo '<div id="bPosts">';
        } else {
        echo '<div id="bPostsWide">';
        } ?>


change to

<div id="bPosts">

Line 178

<?php if( $disp != 'single' ) { ?>
<div id="bSideBar">


change to

<div id="bSideBar">

Line 291

<?php   } ?>

<div id="pageFooter">


change to

<div id="pageFooter">


Form is loading...