Contentdokter

houdt uw content gezond...

Skip navigation.

CMS Blog

Typo3 category

Better Google ranking with WEC Discussion Forum

I found out that my cms-blog was not very high up in the google-rankings. Even if you would search for the exact blog-item title you could still only find me on the 4th page or so. We can do better then this.

So to improve my ranking I wanted to change two things to the default install of the Typo3 WEC Discussion Forum. I wanted the blog title to show in the page title, I want to have the item title in the url and, while we are at it, I want the home-link to link to '/' instead of something like '/Home.2.0.html'.

Here we go:

1. Add the blogitem title to the page title

Add this code to the page template of your page that contains the wec plugin. NOTE: do not add this to the root-page of your website!:


config.noPageTitle = 2
page.headerData.20 = TEXT
page.headerData.20.value = Your site title
page.headerData.20.wrap = <title>|
page.headerData.30 = TEXT
page.headerData.30.value = Your Blog title
page.headerData.30.noTrimWrap=| - ||
page.headerData.40 = TEXT
page.headerData.40.value = Overview
page.headerData.40.noTrimWrap=| - ||
page.headerData.50 = TEXT
page.headerData.50.value = </title>

[globalVar = HTTP_GET_VARS|tx_wecdiscussion|single>0]
page.headerData.40 = CONTENT
page.headerData.40{
table=tx_wecdiscussion_post
# wrap the whole element
wrap=|
# the SQL-Query
select{
max=1
selectFields=subject
pidInList = 21
andWhere.data = global:HTTP_GET_VARS|tx_wecdiscussion|single
andWhere.wrap = uid='|'
}
renderObj=COA
renderObj{
5=TEXT
5{
noTrimWrap=| - ||
field=subject
}
}
}


What this does, in short, is, if the url contains the 'single' get-variable, if queries the wec-table for the item title and add this to the page-title. Simple enough, isn't?

The inspiration for this trick came from Infohit

2. Give our blog a pretty url (in the single item view)

First install and enable the realurl extension, if you haven't done so already. The manual describes this well enough.

Then you need to add this code to your existing realurl configuration (in localconfig.conf):


'postVarSets' => array(
'_DEFAULT' => array (
'view' => array(
array(
'GETvar' => 'tx_wecdiscussion[single]',
'lookUpTable' => array(
'table' => 'tx_wecdiscussion_post',
'id_field' => 'uid',
'alias_field' => 'subject',
'addWhereClause' => ' AND NOT deleted',
'useUniqueCache' => 1,
'useUniqueCache_conf' => array(
'strtolower' => 1,
'spaceCharacter' => '-',
),
),
),
),
'archive' => array(
array(
'GETvar' => 'tx_wecdiscussion[show_date]',
),
array(
'GETvar' => 'tx_wecdiscussion[archive]',
'valueMap' => array(null => '1'),
),
),
),
),


This code above will give you a url like '/cms-blog/view/top-6-of-badly-designed-teamsite-features/', just what the doctor ordered.

3. Make your home links link to '/'

This is not so easy with realurl, unfortunately. You'll need some php code. :-(

First you need to add this class to an existing (or create new) php-library file, normally located under /fileadmin:


class user_tweakMenu {
function replace( $I, $conf ) {
$I[ 'parts' ][ 'ATag_begin' ] = preg_replace(
'{' . $conf['searchFor'] . '}',
$conf['replaceWith'] ? $conf['replaceWith'] : "",
$I[ 'parts' ][ 'ATag_begin' ] );
return $I;
}
}


Then, in your template (at the site root level) you'll need to add this code (customise it to your situation and needs):


includeLibs.include1 = fileadmin/my_include.inc
temp.menu.1{
IProcFunc = user_tweakMenu->replace
IProcFunc.searchFor = /home/"
IProcFunc.replaceWith = /"
}


This trick is well described by Hannes Schmidt

Posted le 03 Apr, 2008 Catégorie:Typo3 Ajouter un commentaire

WEC Discussion Forum

Let's start my first blog with explaining how this blog is build. Since I quite a lazy fellow I've started to search though the Typo3 standard extensions.



The first I found was timtab, a extension specifically designed for blogs. But it was a very short try. Documentation is zip, zero, except for an empty word-template. The document contains nothing more then just a few general remarks. How can it be that sensible developers spend so much time in coding and then leave the whole stuff without an docs? This renders it completely useless. Sorry.



But I found a very good alternative. The WEC Discussion Forum. It looks like forum software but it can double as a blog as well, is very, very simple to use and, most important, it's well documented.



To install:

1. download & install the 'New front end login box' extension.

2. create a front-end user

3. create a page which contains the login plugin.



Now that we can login:

4. download & install the 'WEC Discussion Forum'

5. create a page with the forum plugin

6. modify it to your needs

7. start blogging



That's all. Works very good. Only minor drawback is the words WEC in the title. They stand for 'Web Empowered Church' and if you go over the docs you'll notice a some small remarks about the religion the creator strongly believes in. Personally I think that free software is not a channel which you should use for this purpose.

Posted le 11 Jun, 2007 Catégorie:Typo3 Ajouter un commentaire

About

Cms blog is a personal view on current web-cms technologies, written by Ronald Verheul, founder of Contentdokter, an independent consultancy specialised in designing and building web content management systems.
Your language: Nederlands In english Auf deutsch En français