News:

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

Main Menu

Easy Edit Meta Data

Started by karlbenson, May 12, 2007, 06:14:10 AM

Previous topic - Next topic

karlbenson

This mod has now been taken over by JumpmasterRT
See the new version http://custom.simplemachines.org/mods/index.php?mod=1211

Link to Mod

Enables you to edit the meta data which appears in your pages including description, keywords, author and copyright meta tags via a new tab in the features and options menu.

Installs automatically on Default, Classic and Babylon skin.

NOTE: Its ONLY necessary to install this mod on the skin viewed by guests and robots as only robots for searchengines find meta data useful.

It requires two quick manual edits to install on most skins.

FIND this
<meta name="description" content="', $context['page_title'], '" />

REPLACE with
';
echo (!empty($modSettings['meta_description'])) ? ' <meta name="description" content="'. $modSettings['meta_description'] .'" />' : '<meta name="description" content="'. $context['page_title'] .'" />


AND FIND this
, '
<meta name="keywords" content="PHP, MySQL, bulletin, board, free, open, source, smf, simple, machines, forum" />


REPLACE with
;
echo (!empty($modSettings['meta_keywords'])) ? '
<meta name="keywords" content="'. $modSettings['meta_keywords'] .'" />' : '';
echo (!empty($modSettings['meta_copyright'])) ? '
<meta name="copyright" content="'. $modSettings['meta_copyright'] .'" />' : '';
echo (!empty($modSettings['meta_author'])) ? '
<meta name="author" content="'. $modSettings['meta_author'] .'" />' : '';
echo '


Daniel15

Nice mod... Simple, but effective :)
One thing I noticed is in the install.php file, you do two queries per setting added. Checking if the setting already exists is redundant, as INSERT IGNORE will insert the setting only if it doesn't already exist. In fact, that can all be converted into a single query (see the installScript.php file from SMFBlog, for example - Not the fields bit, the settings bit).
Daniel15, former Customisation team member, resigned due to lack of time. I still love everyone here :D.
Go to smfshop.com for SMFshop support, do NOT email or PM me!

karlbenson

cheers daniel.

I hadn't noticed.  I generally copy my code from my other mods when writing install scripts.

Harro

This is a mod I planned to make as well (but never found the time to do it) :P
Nice work!

dxdonline

when i want to save snything on meta iget this error

http://www.....com/index.php?action=featuresettings2;save;sa=meta
Apply Filter: Only show the errors with the same message
8: Undefined index: pm_posts_per_hour
File: /.../.../.../Sources/ModSettings.php
Line: 300


any help??? plz
http://www.dxdonline.com [nofollow] - Play watch and Have Fun

keith021773

Will this mod help with google adsence?  I mean will it help get ads that are more realistic and closer to the content of your site?

Harro

Could help.
but the content on your pages is still the most important.

glennk

#7
I get the error below. If you could help me with this it would be appreciated as its a mod I would like to try out.

1.     Execute Code     install.php     
2.    Execute Modification    ./Sources/ModSettings.php    Test successful
3.    Execute Modification    ./Themes/default/../babylon/index.template.php    Test successful
4.    Execute Modification    ./Themes/default/../classic/index.template.php    Test successful
5.    Execute Modification    ./Themes/default/index.template.php    Test failed
6.    Execute Modification    ./Themes/default/languages/ModSettings.english.php    Test successful
7.    Execute Modification    ./Themes/default/languages/Help.english.php    Test successful

karlbenson

its probably classing with another mod which you have installed.

What mods do you have installed?

glennk

    Mod Name     Version     
1.    Tagging System    1.0.3    [ Uninstall ] [ List Files ] [ Delete ]
2.    Member Awards    1.0.2    [ Uninstall ] [ List Files ] [ Delete ]
3.    Pretty URLs - Extention: none    0.4    [ Uninstall ] [ List Files ] [ Delete ]
4.    Board Viewers Mod    1.1    [ Apply Mod ] [ List Files ] [ Delete ]
5.    Welcome Topic Mod    1.0    [ Uninstall ] [ List Files ] [ Delete ]
6.    Ad Managment    2.3    [ Uninstall ] [ List Files ] [ Delete ]
7.    SMF Arcade    2.0.8    [ Uninstall ] [ List Files ] [ Delete ]
8.    Enhanced Quick Reply    TBA    [ Uninstall ] [ List Files ] [ Delete ]
9.    Seo 4 SMF    0.2.9.8    [ Apply Mod ] [ List Files ] [ Delete ]
10.    YouTube BBC Tag (XHTML Compliant)    1.0    [ Apply Mod ] [ List Files ] [ Delete ]
11.    Easy Edit Meta Data    1.0    [ Apply Mod ] [ List Files ] [ Delete ]
12.    Personal Message Auto Responder    0.2    [ Apply Mod ] [ List Files ] [ Delete ]
13.    YouTube BBC Tag (XHTML Compliant)    1.2    [ Uninstall ] [ List Files ] [ Delete ]
14.    Topic description    1.1    [ Apply Mod ] [ List Files ] [ Delete ]
15.    Pretty URLs - Base    0.4    [ Uninstall ] [ List Files ] [ Delete ]
16.    Registered Links    1.0    [ List Files ] [ Delete ]
17.    SMF 1.1.2 Update Package    1.1.2    [ Uninstall ] [ List Files ] [ Delete ]
18.    cbi, 1.0    1.0    [ Uninstall ] [ List Files ] [ Delete ]
19.    Googlebot & Spiders Mod    1.0.5    [ List Files ] [ Delete ]

karlbenson

I think its one of a couple of mods

Ad Managment    2.3
Pretty URLs - Base
Seo 4 SMF   

The only thing i can suggest is either not installing or performing that edit manually.

Harro

Seo4SMF already changes the meta information.

karlbenson


Chantal Matar

I've been looking for something like this.  Thanks!


glennk

Does this mod allow edit of  the title tag ?

karlbenson

It does NOT allow you to edit the title tag since that is modified by smf on a per-page basis to include the name of the topic, area/page you are visiting.

It does allow you to change description, keywords, author and copyright

glennk


Neelay

Will the description and keywords be global i.e same for all the pages, or it can be changed depending on the forum ?

karlbenson


Cool999

I go this error in SMF 1.1.3

The package you are trying to download or install is either corrupt or not compatible with this version of SMF.

Please Help

Thanks

Advertisement: