Recent Topics

1 Jul 26, 2007 16:25    

My b2evolution Version: 1.10.x

Top of the morning - I've got a small little naggy question if anyone knows an answer ...

on the contact form link on the main page - it says "contact the admin"

I'd like to change this wording - but can't find where thats generated.

in my skin it's called like this
if( method_exists( $Blog, 'contact_link' ) ) { $Blog->contact_link( ); echo ' • '; }

in fact alot of things got the &bull - what is that? Can I just change the echo to
echo ' Contact me; '; }

without problems?

2 Jul 26, 2007 18:10

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 &lt;?php It will display <?php but not look at it as a starting command. In this case &lt; represents <. Here is a [url=http://www.intuitive.com/coolweb/entities.html]full list[/url] of all entities.

The &bull; is a black dot. Where is the black dot on your keyboard? It's not there? Then you want an escape character like &bull;

I will come back to the "contact the admin" once I find the appropriate code (unless someone beats me to it).

Good luck

3 Jul 26, 2007 18:24

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

4 Jul 31, 2007 17:13

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 ' &bull; '; } ?>

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.

5 Jul 31, 2007 17:23

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

6 Jul 31, 2007 23:41

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!


Form is loading...