2 afwas Jul 26, 2007 18:10
![](https://forums.b2evolution.net/media/users/afwas/profile_pictures/.evocache/161040120545a444e0a4b8f.gif/crop-top-80x80.gif?mtime=1372015408)
hi CapnRob,
Have a look at this code:
<?php
// Display a link to contact the owner of this blog (if owner accepts messages):
$Blog->contact_link( array(
'before' => '',
'after' => '. ',
'text' => T_('Contact'),
'title' => T_('Send a message to the owner of this blog...'),
) );
?>
It is new in version 2.0 but possibly already implemented in 1.10 because in your code it sais:
if( method_exists
The above code works like this:
Replace:
$Blog->contact_link()
in your code by:
$Blog->contact_link('', '. '', 'Whatever you want', T_('Send a message to the owner of the blog...'))
and change "Whatever you want" to whatever you want.
If this doesn't work then the method is not implemented yet (but I think it is because you can see it). I have not tested this, so I am as curious as you if it works.
Good luck
Well, I tried this
<?php if( method_exists( $Blog, 'contact_link' ) ) { $Blog->contact_link('', '. '', 'Whatever you want', T_('Send a message to the owner of the blog...')); echo ' • '; } ?>
and I get an error referring to unexpected T_CONSTANT_ENCAPSED_STRING
SO either I've screwed up the syntax or it doesn't work.
Once again: I cannot test from where I am now.
One small error corrected here:
$Blog->contact_link('', '. ', 'Whatever you want', T_('Send a message to the owner of the blog...'))
Note '. ' in stead of '. '' or try
$Blog->contact_link('', '. ', 'Whatever you want', 'Send a message to the owner of the blog...')
But I don't see what this could change.
Good luck
Well I've actually spent the day taking apart B2 and scanning through each file from where the page is requested to final render.
This message is generated in
/inc/MODEL/collections/_blog.class.php
starts at line 358
function contact_link( $text = '#' )
{
if( $text == '#' )
{
$text = T_('Contact the Admin');
}
just change the wording to whatever you want.
and boy are my eyes tired .... heh, hope this helps someone else!
The • is a html escape character. It's another way of telling the browser I want to display something. Like /u0034 is an unicode char in some other language.
An example. I have a .php file and I want to explain to you how php works. I write that a php command starts with <?php. O dear. There's nothing on the screen because it took this sentence too literally and it really did expect a php command once I wrote <?php. I can circumvent this problem by escaping one of the characters, like <?php It will display <?php but not look at it as a starting command. In this case < represents <. Here is a [url=http://www.intuitive.com/coolweb/entities.html]full list[/url] of all entities.
The • is a black dot. Where is the black dot on your keyboard? It's not there? Then you want an escape character like •
I will come back to the "contact the admin" once I find the appropriate code (unless someone beats me to it).
Good luck