Recent Topics

1 Jul 06, 2010 11:55    

My b2evolution Version: 3.3.3

I was wondering if there's any way of removing the [visitor] label next to people's name when they leave a comment.

TIA

3 Jul 18, 2010 14:31

i have took a look at that when you first asked, but i couldnt find any parameters to change/remove [visitor] text..You gotta hack the core to remove it i guess, which is not recommended

4 Jul 18, 2010 14:39

You'll have to make changes to a couple of your skin files to get rid of all instances of this.

Off hand, the only one I remember for sure is _item_comment.inc.php.

You're looking for:


case 'comment': // Display a comment:
				if( empty($Comment->ID) )
				{	// PREVIEW comment
					echo T_('PREVIEW Comment by:').' ';
				}
				else
				{	// Normal comment
					$Comment->permanent_link( array(
							'before'    => '',
							'after'     => ' '.T_('by:').' ',
							'text' 			=> T_('Comment'),
							'nofollow'	=> true,
						) );
				}
				//$Comment->author();
				/* If User has a website make their name a link to it */
				$Comment->author( '', '#', '', '#', 'htmlbody', true );
				//$Comment->msgform_link( $Blog->get('msgformurl') );
				//$Comment->author_url( '', ' · ', '' );
				break;

Removing one of the asterisks in $Comment->author( '', '#', '', '', 'htmlbody', true ); will get rid of the "Visitor" label... I forget which one. Just know that changing it will get rid of the "Member" label as well. ;)

I'm guessing the other file is page.main.php, posts.main.php or single.main.php - I can't remember which.

EDIT: Actually, the original skin file will probably look something like this:


$Comment->author();
$Comment->msgform_link( $Blog->get('msgformurl') );
$Comment->author_url( '', ' · ', '' );
break;

I commented some lines and added a line to make it look like:


//$Comment->author();
/* If User has a website make their name a link to it */
$Comment->author( '', '', '', '', 'htmlbody', true );
//$Comment->msgform_link( $Blog->get('msgformurl') );
//$Comment->author_url( '', ' · ', '' );
break;

5 Jul 18, 2010 14:57

Thanks both of you.

I tried removing the hash signs as you suggest BLC but it didn't work, maybe because, as you say, it would have to be deleted from other places too.

I might just leave it until I'm a bit more confident - I don't want to end up with some weird hacked version of b2 a month after I've started using it.

6 Jul 18, 2010 15:04

I did this very easily with no core hacking whatsoever... but it's been a while ago. What skin are you using? I can take a look and maybe nail it down for you.

7 Jul 18, 2010 15:17

Brilliant - I used the info in your edit above and it's as I want it now. Many thanks.

8 Jul 18, 2010 15:26

No problem. Glad it worked for you ;)


Form is loading...