News:

Wondering if this will always be free?  See why free is better.

Main Menu

vBulletin Style Meta Tags

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

Previous topic - Next topic

Filipina

Well I want to say thanks to sonsivri for the coversion for us using 1.1.xx thanks!

I am not to smart when it comes to meta tags and stuff so I want to ask this question... i had to edit my index.template file since it failed... it looks like this now I hope it is right?

<meta name="description" content="', !empty($context['meta_description']) ? $context['meta_description'] : $modSettings['meta_description'], '" />', empty($context['robot_no_index']) ? '' : '
<meta name="robots" content="noindex" />', '
<meta name="keywords" content="', !empty($context['meta_keywords']) ? $context['meta_keywords'] . ', ' : '', $modSettings['meta_keywords'], '" />



How come now when I look at the properties when on my main forum is see this below? I know the (PHP, MySQL, bulletin, board, free, open, source, smf, simple, machines, forum) was removes in my edit but I see it still  :P 

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<meta name="description" content="" />
<meta name="keywords" content="PHP, MySQL, bulletin, board, free, open, source, smf, simple, machines, forum" />


Thanks if anyone can tell me :)

SONSiVRi

Filipina,

Did you set  "Admin - > Features and Options - > Basic Features -> Meta Keywords" ?
My Mods - IP View Permission - Recycle Bin Cleaner - Ip to Country
www.sonsivri.com - microcontrollers
- Houston, we have a problem.

Filipina

Quote from: SONSiVRi on October 08, 2009, 10:54:18 AM
Filipina,

Did you set  "Admin - > Features and Options - > Basic Features -> Meta Keywords" ?

wow did i miss that one... been so long forgot it was there.. thank you

SONSiVRi

Quote from: Filipina on October 10, 2009, 11:04:56 AM
wow did i miss that one... been so long forgot it was there.. thank you
You welcome. It happens, recently I forgot my own modification feature too.
My Mods - IP View Permission - Recycle Bin Cleaner - Ip to Country
www.sonsivri.com - microcontrollers
- Houston, we have a problem.

smldmr

Hi, is there a solution for double meta-tags issue?

SONSiVRi

Never thought that, but it's not difficult to code. Parse meta-keyword into array by comma character, then loop through that array for duplicates, and eliminate if exist.
My Mods - IP View Permission - Recycle Bin Cleaner - Ip to Country
www.sonsivri.com - microcontrollers
- Houston, we have a problem.

argimiro

My 2 boards are 1.1.10 and 2 RC1.2 - can you tell us if both are supported (with or without tinkering)?

I guess it's the 1.1.10 I'm wondering about the more

SONSiVRi

Original mod is published to 2.x family. And I remember I ported this mod to 1.1.x family. If I did, I attached it to the post in this topic. Tinkering depends on custom theme.
My Mods - IP View Permission - Recycle Bin Cleaner - Ip to Country
www.sonsivri.com - microcontrollers
- Houston, we have a problem.

argimiro

#208
Just was worried if .10 had introduced some change that killed it on 1.1.x or made it dangerous to try to install - if not so, i'll have at it :)

Ahh.. getting one error in package installation in SMF2 RC1.2

It is looking to replace this in /themes/default/index.template.php


<meta name="description" content="', $context['page_title'], '" />  <meta name="keywords" content="PHP, MySQL, bulletin, board, free, open, source, smf, simple, machines, forum" />


but I seem to have this in the default template


<meta name="description" content="', $context['page_title_html_safe'], '" />
<meta name="keywords" content="', $context['meta_keywords'], '" />


Maybe I don't have a standard index.template.php for some reason.

Existing mods:

1.     Users Online Today      1.5.4
2.    DisableTemplateEval    1.1    [ Apply Mod ]
3.    Sitemap    2.0.0
4.    nneonneo's AJAX ShoutBox    1.22
5.    Facebook Login Integration    0.0.15
6.    MessagePreviewOnHover    1.7
7.    Share This Topic    1.1
8.    Pretty URLs    1.0RC
9.    vBulletin Style Meta Tags    1.1    [ Apply Mod ]
10.    E-Arcade    Beta4-SMF2rc1
11.    Aeva ~ Auto-Embed Video & Audio    6.9.99

   
   

SONSiVRi

2.x
Seems you installed something to do with meta tags. Else you can edit manually and give it a try.

1.1.10
It is not a big problem I think. And why didn't you upgraded it, lots of stuff changed, security fixes too.

edit: For 2.x, I dunno which mod changed it, none of them are related to meta tag.
My Mods - IP View Permission - Recycle Bin Cleaner - Ip to Country
www.sonsivri.com - microcontrollers
- Houston, we have a problem.

argimiro

It looks as if 2 RC1.2 has introduced some kind of vestigial attempt at coding support for meta keywords into admin --> features and options --> layout --> "Meta keywords associated with forum. For search engines, leave blank for default."

SONSiVRi

Quote from: argimiro on October 10, 2009, 06:46:24 PM
It looks as if 2 RC1.2 has introduced some kind of vestigial attempt at coding support for meta keywords into admin --> layout --> features and options
Have no idea about 2.x family, can't help there. I am happy with my little 1.1.9
My Mods - IP View Permission - Recycle Bin Cleaner - Ip to Country
www.sonsivri.com - microcontrollers
- Houston, we have a problem.

argimiro

#212
Works on both, A-OK  :D

smldmr

#213
Quote from: SONSiVRi on October 10, 2009, 02:03:47 PM
Never thought that, but it's not difficult to code. Parse meta-keyword into array by comma character, then loop through that array for duplicates, and eliminate if exist.

Not double words are the problem. In smf 2 there is an option for meta-keywords, and now is the same option in this mods options too. Thats why i get the standard keywords twice in my mainpage. If i delete the meta-keywords from forum options, they will deleted from mod options too.

i.e. in forum options i say "abc, def, ghi" are standard meta-keywords, then in main page i get "abc, def, ghi,abc, def, ghi" as meta-keywords.

SONSiVRi

Probably you have done something wrong. Because this mod is released for 2.X family, and nobody complained that situation before. You may check your files to inspect double installation.
My Mods - IP View Permission - Recycle Bin Cleaner - Ip to Country
www.sonsivri.com - microcontrollers
- Houston, we have a problem.

smldmr

#215
Quote from: SONSiVRi on October 11, 2009, 09:51:57 AM
Probably you have done something wrong. Because this mod is released for 2.X family, and nobody complained that situation before. You may check your files to inspect double installation.

After i deleted the keywords line from subs.php, it seems to work corectly. But now i have an other problem.

My site is in utf-8 and the mod makes keywords like this:

<meta name="keywords" content="Aslantepe, n, aat, Alan, Aslantepe - İnşaat Alanı, aslantepe, ttarena, stadyum, stadium" />

the last 4 words are my standart keywords, "Aslantepe - İnşaat Alanı" is the subject of the topic. All special characters (turkish in this case) makes problems.

SONSiVRi

you need to take a look in Turkish topic, there were been discussed this problem.
My Mods - IP View Permission - Recycle Bin Cleaner - Ip to Country
www.sonsivri.com - microcontrollers
- Houston, we have a problem.

codyodell

This is the fix everyone has been look for, I believe.

in /Sources/MetaTags.php replace the MetaTagsGenerateTeaser function with this function:


function MetaTagsGenerateTeaser ($id_msg)
{

$sql    = "SELECT body FROM smf_messages WHERE id_msg = ".$id_msg;
$res    = mysql_query($sql);
$arRes  = mysql_fetch_row($res);
$teaser = $arRes[0];
// Format as a plain text string.
$teaser = MetaTagsSpecialChars(str_replace('<br />', ' ', parse_bbc($teaser)));

// Less than the teasear limit, just return.
if(strlen($teaser) < 150)
return $teaser;

// Otherwise grab the teaser.
$teaser = substr($teaser, 0, 150);
return substr($teaser, 0, strrpos($teaser, ' '));
}


Hope that helps.

SONSiVRi

" codyodell"
Fix for? You need to tell details.
My Mods - IP View Permission - Recycle Bin Cleaner - Ip to Country
www.sonsivri.com - microcontrollers
- Houston, we have a problem.

codyodell

As stated int the title of my post: Fix for 1.x

The original mod uses database functions not implemented in 1.x versions.

Advertisement: