Recent Topics

1 Dec 19, 2007 09:13    

Hi

I'm using Custom skin and trying to change the single post title in browser from "Post Title" to "Blog Name - Post Title"

Should I change something in /inc/_core/_template.funcs.php ?

Another question is where can I download the Democracy Poll plugin?
The official site is down....

Thanks

2 Dec 19, 2007 12:06

You should allways and only change things in your skin, never in the code...

I used this in 1.10 , perhaps that still works

<?php echo format_to_output($Item->Blog->shortname, 'htmlbody' ); ?>

3 Dec 19, 2007 20:11

Thank you for reply, but it doesn't work in 2.xx. I got this message

Notice: Trying to get property of non-object in /home/.../myskin/_html_header.inc.php

The code I have in custom skin to display page title is


<?php
		request_title( array(
			'auto_pilot'   => 'seo_title',
		) );
?>

4 Dec 24, 2007 22:03

I still need to change the post title. Is here anybody who can help me, please?

5 Dec 24, 2007 23:25

Hi,

Topanga is completely correct. You should not fumble in the core for many reasons. Besides, what you want is possible from the skin.
I composed this hack. I have reasons to believe it is correct, but I didn't do the testing, so please try and report back if it works, gives errors or simply does nothing.

Good luck

<?php
if ( $disp = 'single' )
  {
    echo ( '<h3 class="bTitle">'.$Blog->name().'- '.$Item->title().'</h3>' )   
  }
else
  {
    echo ( '<h3 class="bTitle">'.$Item->title().'</h3>' )
  }
?>


replaces:

<h3 class="bTitle"><?php $Item->title(); ?></h3>

6 Dec 25, 2007 18:28


<title>
<?php
request_title( array(
  'auto_pilot' => 'seo_title',
   'title_single_before' => $Blog->get( 'name' ).' - ',
) );
?>
</title>

;)

¥

7 Dec 25, 2007 19:13

¥åßßå wrote:


<title>
<?php
request_title( array(
  'auto_pilot' => 'seo_title',
   'title_single_before' => $Blog->get( 'name' ).' - ',
) );
?>
</title>

This is exactly what I need. Thanks, works perfect.

I spent all night playing with previous post. $Item->title() displays title URL.

8 Dec 25, 2007 21:13

¥åßßå deciphered the Japanese translation. I had to do with the 1.10 version.
¥åßßå, I copied your code in the [url=http://manual.b2evolution.net/TemplateTags]Wiki[/url] (# request_title() ). After you have played with the new toys, that inevetibly will not function anymore after one to two hours, will you check if I did a good job there?

Well done


Form is loading...