Recent Topics

1 Feb 26, 2012 05:45    

b2 handles category page titles as such:

<title>Category: $Cat_name - $Blog_name</title>

This is not Seo efficient at all if you ask me.Even if i specify a category description it's still the same format above.
I think It should be:

<title>Category: $Cat_name - $Cat_desc</title>

At the very least if we have a specified cat_desc.

Is it too much trouble to change this the way i want ? Do i have to hack the core or would hacks.php do good ?

2 Feb 26, 2012 21:54

bump... sam2kb ? anyone ? : D

3 Mar 04, 2012 03:46

*bump * bump* bump* (:

4 Mar 04, 2012 04:25

I will look at it tomorrow

5 Mar 04, 2012 04:32

cool.. i tried my best guesses with notepad++ search in core files, but with no luck : D Hoping to hear from you

6 Mar 04, 2012 06:33

ideally, i would like to add if not individual, a fixed title for all tags as well, like that "post single footer".

for example if you run a pet store; you would want a fixed sentence like: "accessories, food, leash, houses for animals".

so for dog tag title would be:

"{dog} accessories, food, leash, houses for animals."

same for cat tag title :

"{cat} accessories, food, leash, houses for animals."

This way you could get additional hits from "dog accessories", "cat foot", "dog leash" etc searches...Tags are pretty important tool after categories, and i think this would help.

7 Mar 04, 2012 21:02

You just need to play with this function in _html_header.inc.php and edit params

request_title( array(
		'auto_pilot' => 'seo_title',
		'category_text' => '',
		'categories_text' => '',
	) );

Also instead of 'auto_pilot' => 'seo_title', you can define your own title format. Take a look at "request_title" function in /inc/_core/_template.funcs.php

8 Mar 04, 2012 21:20

As of tags, try this

$params = array(
        'auto_pilot' => 'seo_title',
        'category_text' => '',
        'categories_text' => '',
    );

if( !empty($MainList) && !empty($MainList->filters['tags']) )
{
	if( stristr( $MainList->filters['tags'], 'my-tag' ) )
	{	// Add description to "my-tag"
		$params['tags_text'] = $MainList->filters['tags'].' accessories, food, leash, houses for animals.';
	}
}

request_title( $params );

9 Mar 04, 2012 21:25

Ok, thanks for both clues, i ll see what i can do

10 Mar 07, 2012 03:21

sam2kb wrote:

You just need to play with this function in _html_header.inc.php and edit params

request_title( array(
		'auto_pilot' => 'seo_title',
		'category_text' => '',
		'categories_text' => '',
	) );

Also instead of 'auto_pilot' => 'seo_title', you can define your own title format. Take a look at "request_title" function in /inc/_core/_template.funcs.php

Thanks for the tip ! request_title params were exactly what i was after !

Although there is no thing as "category_text" afai see.

Anyway, it's pretty great, and has seperate params for single post disp, and page disp.But no category_text or tag_text.
It exactly does

{dog}  leashes, food, whatever you want title.

It's pretty enough, but ideally i would like it as

 {dog}  leashes, {dog} food, {dog} whatever you want title.

cat/tag being inside the title multiple times.

11 Mar 07, 2012 07:14

Replace all {tag} placeholders with tag value

$tag = $MainList->filters['tags'];
$string = '{tag} leashes, {tag} food, {tag} whatever you want title.'; 
$params['tags_text'] = str_replace( '{tag}', $tag, $params['tags_text'] );

If the tag is "X" the resulting string should look like this

X leashes, X food, X whatever you want title.

12 Mar 07, 2012 07:16

Although there is no thing as "category_text" afai see.

Those params are not in /inc/_core/_template.funcs.php however they should work too. Try them.

13 Mar 07, 2012 13:20

sam2kb wrote:

Replace all {tag} placeholders with tag value

$tag = $MainList->filters['tags'];
$string = '{tag} leashes, {tag} food, {tag} whatever you want title.'; 
$params['tags_text'] = str_replace( '{tag}', $tag, $params['tags_text'] );

If the tag is "X" the resulting string should look like this

X leashes, X food, X whatever you want title.

Where do i insert that code piece ?

By the way, setting

 'auto_pilot'      => 'none',

disabled blog titles.
I had to add

			'title_none'          => $Blog->dget('name','htmlhead'),


manually after i noticed.

I think this is a bug.The blog title should default to blog's title even if auto pilet is turned off.

14 Mar 07, 2012 13:59

And speaking of cats/tags, in WP, tags and categories are almost same in terms of taxonomy. You can convert a cat to tag or tag > cat almost instantaneously.

But i think for b2 it's a little different is it not ?

For example sometimes you think a word is not that important to be a category, so you decide to make it a tag, but then it turns out it IS an important word, and has a lot of posts in it, so you may want to convert it to category.The opposite situation may be as well.

15 Mar 07, 2012 15:03

In b2evo cats are more advanced than in WP and tags are weaker :) They might be interchangeable is we copy categories table structure to tags.

I think this is a bug.The blog title should default to blog's title even if auto pilet is turned off.

That's why it called 'auto_pilot', it sets all defaults for you. If you want to do custom titles, you need to configure them.

That function is not only for page <title> tag, it is used inside the page too. I'm sure you don't want to display blog title on a 'page' which does not have its own title set in editor.

16 Mar 07, 2012 15:57

sam2kb wrote:

In b2evo cats are more advanced than in WP and tags are weaker :) They might be interchangeable is we copy categories table structure to tags.

I think this is a bug.The blog title should default to blog's title even if auto pilet is turned off.

That's why it called 'auto_pilot', it sets all defaults for you. If you want to do custom titles, you need to configure them.

That function is not only for page <title> tag, it is used inside the page too. I'm sure you don't want to display blog title on a 'page' which does not have its own title set in editor.

Yea the second paragraph makes sense, i have to check that, i wouldnt really want that.

How about the auto_pilot was on, and if we defined params, they would overwrite it ??

17 Mar 07, 2012 17:31

Maybe we can add another option like 'smart_auto_pilot' which allows overrides. Well, you can hack the files too ;)

18 Apr 09, 2012 02:32

sam2kb wrote:

As of tags, try this

$params = array(
        'auto_pilot' => 'seo_title',
        'category_text' => '',
        'categories_text' => '',
    );

if( !empty($MainList) && !empty($MainList->filters['tags']) )
{
	if( stristr( $MainList->filters['tags'], 'my-tag' ) )
	{	// Add description to "my-tag"
		$params['tags_text'] = $MainList->filters['tags'].' accessories, food, leash, houses for animals.';
	}
}

request_title( $params );

There is no "category_text" or "categories_text" in inc/_core/template.functions .. And tags hack didnt work either.. I do put this code in html.header right -replacing default request_title ?

How about that "smart_pilot" which would only override the auto_pilot ?

19 Apr 09, 2012 02:34

After the recent hack i did, changing the auto_pilot to none, and defining my own, my search rankings has dropped.

I noticed my page titles were appearing in google as "{Page Title} - m"

Wonder where the hell that -m comes from..

I switched back to auto_pilot for now

20 Sep 13, 2012 14:33

Ideally, i would like to add if not individual, a fixed title for all tags as well, like that "post single footer".for example if you run a pet store; you would want a fixed sentence like: "accessories, food, leash, houses for animals".


Form is loading...