News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

vBulletin Style Meta Tags

Started by rsw686, March 23, 2008, 09:36:45 PM

Previous topic - Next topic

esttecb

#240
Nice mod. Just a "but".
Every single page in a specific forum has the same title and description...
I would do something like this to improve this mod...

Open: MessageIndex.php
Find:
// 'Print' the header and board info.
$context['page_title'] = strip_tags($board_info['name']) . ' - ' . $context['forum_name'];
require_once($sourcedir . '/MetaTags.php');
$context['meta_description'] = MetaTagsSpecialChars($board_info['name'] . ' - ' . $board_info['description']);
$context['meta_keywords'] = MetaTagsGenerateKeywords($board_info['name']);


Replace with:
// 'Print' the header and board info.
$context['page_title'] = strip_tags($board_info['name']) . ' - ' . $context['forum_name'] . ' (Page: ' . $context['page_info']['current_page'] . ')';
require_once($sourcedir . '/MetaTags.php');
$context['meta_description'] = MetaTagsSpecialChars($board_info['name'] . ' - ' . $board_info['description']) . ' - Page ' . $context['page_info']['current_page'];
$context['meta_keywords'] = MetaTagsGenerateKeywords($board_info['name']) . ', Page ' . $context['page_info']['current_page'];


It should be the same (or something like) for display.php...

In this way, you are adding the number of the current page to the title, description, and keywords...
Of course you should reduce the description length, etc...


QuoteHi,
also, the smileys and non breaking spaces ( ) or other stuff like that, should not be included in the description as they're return like "�" (I'm on utf-8)
QuoteThanks Sonsivri

keyword to appear in Turkish characters can be done ?

(anahtar kelime bölümünde türkçe karakterlerin görünmesi için ne yapılabilir)

About that:

Open: MetaTags.php

find:
return str_replace('"', '"', strip_tags(html_entity_decode($text, ENT_QUOTES)));

replace with:
return str_replace('"', '"', strip_tags(html_entity_decode($text, ENT_QUOTES, 'UTF-8')));

or replace the 'UTF-8' with whatever language encode you're using... like ISO-XXX or whatever.

take care.

SONSiVRi

"esttecb"
Did you tried your character encoding tip on any forum? I am just asking to let people know this is the solution. Because most members asked about it.
My Mods - IP View Permission - Recycle Bin Cleaner - Ip to Country
www.sonsivri.com - microcontrollers
- Houston, we have a problem.

esttecb

UTF-8 is supposed to work with any character.
I tried with special spanish characters myself (¿, ñ, á, é, í, ó, ú) and it worked like a charm.

take care.

irtiza104

How would i edit the keyword and description of the board index?

SONSiVRi

Quote from: irtiza104 on February 12, 2010, 04:20:15 PM
How would i edit the keyword and description of the board index?
Its should be located in your admin panel. Setting that originally belong to SMF, is used in board index.
My Mods - IP View Permission - Recycle Bin Cleaner - Ip to Country
www.sonsivri.com - microcontrollers
- Houston, we have a problem.

bjraines

I know there used to some support for SMF 1.x versions, is there an updated version. I absolutely love this mod

SONSiVRi

Quote from: bjraines on February 17, 2010, 05:56:37 PM
I know there used to some support for SMF 1.x versions, is there an updated version. I absolutely love this mod
I have ported it to 1.1.x family. And there is no any update made by me. Unless someone else didn't add some features in it.
My Mods - IP View Permission - Recycle Bin Cleaner - Ip to Country
www.sonsivri.com - microcontrollers
- Houston, we have a problem.

bjraines

Thanks for replying, I found your original port ( 1.1.5, is there a more updated one) but I cannot get it installed on 1.1.11 (clean install with default template) I get an error on ./Sources/MessageIndex.php

Am'

it's possible to integrate this mod whith smf 2 rc 2 ? how ?
اذا أحس أحد انه لم يخطأ ابدا في حياته, فهذا يعني أنه لم يجرب أي جديد في حياته
My Mods For SMF 2 RC3 : XQuote XCode - Vbulletin Style New Meta Tags

SONSiVRi

Quote from: bjraines on February 19, 2010, 10:13:42 AM
Thanks for replying, I found your original port ( 1.1.5, is there a more updated one) but I cannot get it installed on 1.1.11 (clean install with default template) I get an error on ./Sources/MessageIndex.php
I didn't upgrade my 1.1.9 to 1.1.11 yet, so I dunno whats the changes between those and why can't this mod apply. I wish I had a time to update my forum...
My Mods - IP View Permission - Recycle Bin Cleaner - Ip to Country
www.sonsivri.com - microcontrollers
- Houston, we have a problem.

bjraines

it is sort of crazy, the code works fine as written, the installer fails, i been messing with it for about an hour

but i put the code in manually exactly as it is written in the installer and it works fine.

maihannijat


Great Mod, I had index.template.php error in smf 1.1.11 , I installed the mod and edit index.template.php manually.

I had  Missing ManageSettings.php error as well, but i found an attachment in page 2 which works for smf 1.1.xx

I have checked Everything Works fines, Great Job

The page titles are always same, If I visit board, main page or post, always the title page is same.

<title>Afghanistan Forum : Afghan Forum: Afghanistan Discussion Board</title>


This above line never changes, I have visited different pages and viewed source from browser. it is always same <title>Afghanistan Forum : Afghan Forum: Afghanistan Discussion Board</title>


Any help will be highly appreciated.

I know all you guys are much busy, prove check my site if anyone is interested  www.afghanistanforums.com


Thanks Again for Great Mod.

irtiza104

#252
Hi,

Forum Index
Title: Forum Name - Index
Keywords: your keywords
Description: your description

Message Index
Title: Board Name - Forum Name
Keywords: Board, Name, Board Name, your keywords
Description: Board Name - Board Description

Message Display
Title: Topic Subject - Forum Name
Keywords: Topic, Subject, Topic Subject, your keywords
Description: First 150 characters of post
[/size]

i think i have successfully installed this mod. but i am having some problems. The board index has some keywords, which i entered via configuration>Features & Options>layout, but there is no description for the board index. and for every page the keywords remain the same, it doesnt change.

what should i do? plz help.

EDIT:

the page source for the board index:

        < meta http-equiv = "Content-Type" content="text/html; charset=ISO-8859-1" / >
   < meta name = "description" content ="" / >
        < meta name = "keywords" content="Bangladesh community, bangladesh forum, bangladeshi community, bangladeshi forum, tiger cricket, bangladesh cricket, natok, free, download, golper boi, Bangladesh community, bangladesh forum, bangladeshi community, bangladeshi forum, tiger cricket, bangladesh cricket, natok, free, download, golper boi" / >
   < title >BangladeshTalks Community - Index< / title >

The page source for the board movies:

< meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" / >
   < meta name="description" content="Movies - Download DVD quality movies for FREE from this area" / >
        < meta name="keywords" content="Bangladesh community, bangladesh forum, bangladeshi community, bangladeshi forum, tiger cricket, bangladesh cricket, natok, free, download, golper boi, Bangladesh community, bangladesh forum, bangladeshi community, bangladeshi forum, tiger cricket, bangladesh cricket, natok, free, download, golper boi" / >
   < title >Movies - BangladeshTalks Community< / title>

maihannijat


There was problem in title tag, index.template.php, the default code was changed to something else, I restored back to smf original,

Now works fine.

.Crazy.Face.


azhriel

 SONSiVRi,

i installed your version in my 1.1.8 and got this error... how could i resolve this... i really want this mod on my site

Type  Action  Description
1. Execute Code dbmodify.php
2. Extract File ./Sources/MetaTags.php
3. Execute Modification ./Sources/MessageIndex.php Test successful
4. Execute Modification ./Sources/ModSettings.php Test successful
5. Execute Modification ./Sources/Display.php Test successful
[b]6. Execute Modification ./Themes/default/index.template.php Test failed[/b]
7. Execute Modification ./Themes/default/languages/Modifications.english.php Test successful


I planned to manually install it but i dont know how to parse it on index.template.php

Am'

any update please ?

this not worked for me :

$context['meta_keywords'] = MetaTagsGenerateKeywords($topicinfo['subject']);

i have only my keywords, not keywords based on topic title - topic title

(meta descirption work fine)
اذا أحس أحد انه لم يخطأ ابدا في حياته, فهذا يعني أنه لم يجرب أي جديد في حياته
My Mods For SMF 2 RC3 : XQuote XCode - Vbulletin Style New Meta Tags

SONSiVRi

Quote from: azhriel on March 12, 2010, 12:56:17 AM
SONSiVRi,

i installed your version in my 1.1.8 and got this error... how could i resolve this... i really want this mod on my site

Type  Action  Description
1. Execute Code dbmodify.php
2. Extract File ./Sources/MetaTags.php
3. Execute Modification ./Sources/MessageIndex.php Test successful
4. Execute Modification ./Sources/ModSettings.php Test successful
5. Execute Modification ./Sources/Display.php Test successful
[b]6. Execute Modification ./Themes/default/index.template.php Test failed[/b]
7. Execute Modification ./Themes/default/languages/Modifications.english.php Test successful


I planned to manually install it but i dont know how to parse it on index.template.php
You can parse within download page, there is a dropdownbox to select your current version and it display parsing steps.
My Mods - IP View Permission - Recycle Bin Cleaner - Ip to Country
www.sonsivri.com - microcontrollers
- Houston, we have a problem.

Am'

#258
Hello,

I allowed myself of hanged again the module to adapt to smf2 rc3, with some improvements and fix :

Quote- Compatibility 2rc3
- Moving the description field configuration above keywords
- Improved code generation for keywords:
----- Process lighter
----- Words <= 3 characters are automatically skipped in the keywords
----- You can customize the list of words that are ignored in the file metatags.php the varaible $common_words
----- Compatibility utf8 (éàé. ...)
- Added page number in the description

I took the module only because it seems to be abandoned, if this is not the case please contact me so that I removed :P

Working:

Configure your meta as in the screenshot:



In the index of your forum, you will have the meta as follows:

<meta name="description" content="Description of your site, visible only in index ^^" />
<meta name="keywords" content="board, smf, meta tags, visible in all page" />
<title>NameSite - Index</title>


In a board you will have the meta as follows:

<meta name="description" content="Name Board - this a Description for my new board for geek ... - Page 1" />
<meta name="keywords" content="Name, Board, Name Board, board, smf, meta tags, visible in all page" />
<title>Name Board  - NameSite  (Page: 1)</title>


In a topic, you will have the meta as follows:

<meta name="description" content="50 first lettres of this topic" />
<meta name="keywords" content="Title, topic, Titile topic, board, smf, meta tags, visible in all page" />
<title>Title topic - NameSite</title>


I hope you enjoy it, and thx google traduction  ;)
اذا أحس أحد انه لم يخطأ ابدا في حياته, فهذا يعني أنه لم يجرب أي جديد في حياته
My Mods For SMF 2 RC3 : XQuote XCode - Vbulletin Style New Meta Tags

Sirius OCTeam


Advertisement: