Simple Machines Community Forum

Customizing SMF => Modifications and Packages => Topic started by: JumpmasterRT on May 27, 2008, 09:19:07 PM

Title: Easy Edit Meta Data
Post by: JumpmasterRT on May 27, 2008, 09:19:07 PM
EASY EDIT META DATA V1.0
Originally authored By Karl Benson, now supported by JumpmasterRT


Link to Mod (http://custom.simplemachines.org/mods/index.php?mod=1211) | Original Mod Thread (http://www.simplemachines.org/community/index.php?topic=170693.0)

Introduction
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.

Installation
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 '
Title: Re: Easy Edit Meta Data
Post by: Apllicmz on May 27, 2008, 10:31:14 PM
Good Work
translate portuguese and brazilian

Quote<!-- // MODSETTINGS.PORTUGUESE.PHP  //-->
<file name="$languagedir/ModSettings.portuguese.php" error="skip">
<operation>
   <search position="after"><![CDATA[?>]]></search>
<add><![CDATA[
$txt['mods_cat_meta'] = 'Meta';
$txt['meta_mod'] = 'F&aacute;cil editar Meta dados';
$txt['meta_description'] = 'Meta Descrição';
$txt['meta_keywords'] = 'Meta palavras-chave';
$txt['meta_author'] = 'Meta Autor';
$txt['meta_copyright'] = 'Meta Copyright';
]]></add>
</operation>
</file>
<file name="$languagedir/ModSettings.brazilian.php" error="skip">
<operation>
   <search position="after"><![CDATA[?>]]></search>
<add><![CDATA[
$txt['mods_cat_meta'] = 'Meta';
$txt['meta_mod'] = 'F&aacute;cil editar Meta dados';
$txt['meta_description'] = 'Meta Descrição';
$txt['meta_keywords'] = 'Meta palavras-chave';
$txt['meta_author'] = 'Meta Autor';
$txt['meta_copyright'] = 'Meta Copyright';
]]></add>
</operation>
</file>

<!-- // HELP.PORTUGUESE.PHP  //-->
<file name="$languagedir/Help.portuguese.php" error="skip">
<operation>
<search position="after"><![CDATA[?>]]></search>
<add><![CDATA[
$helptxt['meta_description'] = 'Voc&ecirc; pode digitar uma descri&ccedil;&atilde;o do seu quadro. Se voc&ecirc; deix&aacute;-lO em branco, o t&iacute;tulo de sua p&aacute;gina ir&aacute; aparecer na descri&ccedil;&atilde;o. <br/> Recomenda-se a mant&ecirc;-lo para menos de 200 caracteres.';
$helptxt['meta_keywords'] = 'Digite as palavras-chave separadas por v&iacute;rgulas, por exemplo casa, carro. <br/> Recomenda-se a mant&ecirc;-lo para menos de 200 caracteres.';
$helptxt['meta_author'] = 'Coloque seu nome na p&aacute;gina. Nem todos os motores de busca reconhecer essa tag.';
$helptxt['meta_copyright'] = 'Coloque as suas informa&ccedil;ões sobre direitos autorais na meta dados, usar &amp;copiar; o símbolo de direitos autorais.';
]]></add>
</operation>
</file>
<file name="$languagedir/Help.brazilian.php" error="skip">
<operation>
<search position="after"><![CDATA[?>]]></search>
<add><![CDATA[
$helptxt['meta_description'] = 'Voc&ecirc; pode digitar uma descri&ccedil;&atilde;o do seu quadro. Se voc&ecirc; deix&aacute;-lO em branco, o t&iacute;tulo de sua p&aacute;gina ir&aacute; aparecer na descri&ccedil;&atilde;o. <br/> Recomenda-se a mant&ecirc;-lo para menos de 200 caracteres.';
$helptxt['meta_keywords'] = 'Digite as palavras-chave separadas por v&iacute;rgulas, por exemplo casa, carro. <br/> Recomenda-se a mant&ecirc;-lo para menos de 200 caracteres.';
$helptxt['meta_author'] = 'Coloque seu nome na p&aacute;gina. Nem todos os motores de busca reconhecer essa tag.';
$helptxt['meta_copyright'] = 'Coloque as suas informa&ccedil;ões sobre direitos autorais na meta dados, usar &amp;copiar; o símbolo de direitos autorais.';
]]></add>
</operation>
</file>
Title: Re: Easy Edit Meta Data
Post by: neil h on May 28, 2008, 06:06:04 AM
One quick question;

I installed the mod last night. i've made the edits to my theme. Now the mod is installed, if I look at the code via my browser's 'view page source' feature, I can't see any sign of most of the meta tags. Does this mean the mod moves the meta tags somewhere else?

i'm just checking I've installed the mod properly. Any advice appreciated.
Title: Re: Easy Edit Meta Data
Post by: aishaweb on May 28, 2008, 06:13:28 AM
Got a link to your forum?
Title: Re: Easy Edit Meta Data
Post by: aishaweb on May 28, 2008, 06:18:11 AM
Nevermind, i found it, (http://www.frameforum.org/forum3/index.php) you will need to do it manually as the mod only installs to the standard themes SMF comes with, not to addon themes.

This is due to the fact that there is no absolute standard way of coding addon themes.

I think this is being addressed in SMF 2.xx.
Title: Re: Easy Edit Meta Data
Post by: aishaweb on May 28, 2008, 06:31:24 AM
Oh, and BTW, is this a new, updated release? Or is the the last release Karl B made?

Triple posting FTW!
Title: Re: Easy Edit Meta Data
Post by: neil h on May 28, 2008, 06:50:12 AM
I think it is the Last Karl B version. I made the manual edits to the theme I'm on. I checked the default file template against the theme I'm using and copied the changes via my file comparison app. Everything seems to have been done, but no sign of meta codes in the source. scratching my head here!
Title: Re: Easy Edit Meta Data
Post by: aishaweb on May 28, 2008, 07:35:42 AM
Quote from: neil h on May 28, 2008, 06:50:12 AM
I think it is the Last Karl B version. I made the manual edits to the theme I'm on. I checked the default file template against the theme I'm using and copied the changes via my file comparison app. Everything seems to have been done, but no sign of meta codes in the source. scratching my head here!

No idea then, although you have all the meta tags you need on your portal page.
Title: Re: Easy Edit Meta Data
Post by: Jumpmasterrt on May 28, 2008, 11:11:22 AM
It's the same release that karlbenson made.

neil, link to your site?
Title: Re: Easy Edit Meta Data
Post by: aishaweb on May 28, 2008, 11:30:20 AM
Quote from: JumpmasterRT on May 28, 2008, 11:11:22 AM
It's the same release that karlbenson made.

neil, link to your site?

Quote from: aishaweb on May 28, 2008, 06:18:11 AM
Nevermind, i found it, (http://www.frameforum.org/forum3/index.php) you will need to do it manually as the mod only installs to the standard themes SMF comes with, not to addon themes.

This is due to the fact that there is no absolute standard way of coding addon themes.

I think this is being addressed in SMF 2.xx.
Title: Re: Easy Edit Meta Data
Post by: 4Kstore on May 28, 2008, 03:11:40 PM
i just install it !!! is perfect thx!!

screen:

(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fxs127.xs.to%2Fxs127%2F08223%2Fdibujo560.jpg&hash=2bb135fb35fe65cd1d60c1814781d023c13f96fa)


Thanks !!
Title: Re: Easy Edit Meta Data
Post by: rfresh on May 30, 2008, 01:39:16 PM
@4kstore

Where is that screen shot that you are showing? I did an install but can't find where the meta tag screen is to do my edits!!

I'm using SMF 1.1.5
Title: Re: Easy Edit Meta Data
Post by: rfresh on May 31, 2008, 01:17:52 AM
I did an install (it said successful) but can't find where the meta tag screen is to do my edits!!

I'm using SMF 1.1.5

Can anyone help me?
Title: Re: Easy Edit Meta Data
Post by: rfresh on June 01, 2008, 12:51:47 AM
No activity on this board??? Guess I'll uninstall this mod since I can't seem to get it to work and this board has been quiet for a couple of days now...
Title: Re: Easy Edit Meta Data
Post by: aishaweb on June 01, 2008, 05:00:51 AM
Quote from: rfresh on May 31, 2008, 01:17:52 AM
I did an install (it said successful) but can't find where the meta tag screen is to do my edits!!

I'm using SMF 1.1.5

Can anyone help me?

Goto your server settings in the admin panel, report back here as to which language you are using, tell us exactly what it says in the language box.

See screenie:
http://i29.tinypic.com/2zoaqdy.jpg
(http://i29.tinypic.com/2zoaqdy.jpg)
Title: Re: Easy Edit Meta Data
Post by: Jumpmasterrt on June 01, 2008, 10:06:49 AM
That and are you using the DEFAULT theme?
Title: Re: Easy Edit Meta Data
Post by: rfresh on June 01, 2008, 01:36:00 PM
English-utf8

Yes, I am using the default theme.
Title: Re: Easy Edit Meta Data
Post by: Jumpmasterrt on June 01, 2008, 04:22:01 PM
rfresh, do you have a screenshot of your admin toolbar where it SHOULD be?
Title: Re: Easy Edit Meta Data
Post by: rfresh on June 02, 2008, 12:57:47 AM
I can post one yes...where *should* it be? I'm not even sure where it is susposed to show up...tell me and I'll take a screen shot and post it...thanks...
Title: Re: Easy Edit Meta Data
Post by: Jumpmasterrt on June 02, 2008, 02:33:29 AM
It should show up in Admin > Configuration > Features and Options section in the tool bar with Basic Features | Layouts and Options | Karma.
Title: Re: Easy Edit Meta Data
Post by: rfresh on June 02, 2008, 10:51:41 AM
Here are the screen shots...
Title: Re: Easy Edit Meta Data
Post by: Jumpmasterrt on June 02, 2008, 04:14:36 PM
on the second screen shot, does it say [Uninstall] or [Apply Mod] to the right?
Title: Re: Easy Edit Meta Data
Post by: rfresh on June 03, 2008, 01:11:54 AM
It says:

[ Uninstall ] [ List Files ] [ Delete ]
Title: Re: Easy Edit Meta Data
Post by: Jumpmasterrt on June 03, 2008, 10:58:03 AM
Are you sure you didn't get a warning that the "modsettings.php" file test failed?

I can't think of anything as to why it's not showing up.

Can you attach your index.template and ModSettings.English files please?
Title: Re: Easy Edit Meta Data
Post by: rfresh on June 04, 2008, 01:00:50 AM
Here is the index.template file.

What folder is the Modsettings.English ?

No I didn't a warning re the modsettings.php file that I recall.
Title: Re: Easy Edit Meta Data
Post by: Jumpmasterrt on June 04, 2008, 05:59:09 AM
It's in Themes > Default > Languages.
Title: Re: Easy Edit Meta Data
Post by: rfresh on June 05, 2008, 09:25:40 AM
Here it is...
Title: Re: Easy Edit Meta Data
Post by: Jumpmasterrt on June 05, 2008, 04:27:29 PM
Wow..... nothing. No evidence the mod was enacted.

Have you tried uninstalling it and reinstalling or manually installing it?
Title: Re: Easy Edit Meta Data
Post by: rfresh on June 06, 2008, 12:54:10 AM
I uninstalled and reinstalled it but no luck - thanks for all the help but I can't spend any more time trying to get this to work. I'll just manually edit the template.index.php file and add my meta tag data that way.

Thanks again...
Title: Re: Easy Edit Meta Data
Post by: Jumpmasterrt on June 06, 2008, 02:09:15 AM
I'm sorry it won't work for you. I can't think of why it won't install. I've tried everything I can to reproduce the error but I can always get the "Meta" button to show up no matter what else I manage to "break".

It's a pretty easy manual install though if you want to try that.
Title: Re: Easy Edit Meta Data
Post by: xCensored on June 12, 2008, 03:01:53 AM
The mod settings failed? Help? Running 1.1.5
Title: Re: Easy Edit Meta Data
Post by: Jumpmasterrt on June 12, 2008, 03:29:07 PM
xCensored, it's probably due to other Mods you've installed. Try manually editing the mod_settings.php file.
Title: Re: Easy Edit Meta Data
Post by: aishaweb on June 16, 2008, 07:12:57 PM
This is a language issue, it only works in "english",  NOT "english-UTF8"
Title: Re: Easy Edit Meta Data
Post by: CARDANFX on July 25, 2008, 03:08:40 AM
Everything is working fine in my forum , but behind the scenes, when I run my meta tag analysis ( This is a service provided by a SEO company ) , my meta keywords and description are still the default : PHP, MySQL, bulletin, board, free, open, source, smf, simple, machines, forum.

Any idea on why is this happening?

Thank's
Title: Re: Easy Edit Meta Data
Post by: aishaweb on July 26, 2008, 08:46:51 AM
Quote from: CARDANFX on July 25, 2008, 03:08:40 AM
Everything is working fine in my forum , but behind the scenes, when I run my meta tag analysis ( This is a service provided by a SEO company ) , my meta keywords and description are still the default : PHP, MySQL, bulletin, board, free, open, source, smf, simple, machines, forum.

Any idea on why is this happening?

Thank's

Which theme are you using as the default theme?
If its anything other than the ones that are pre-installed then you have to manually edit the theme.
Title: Re: Easy Edit Meta Data
Post by: CARDANFX on July 26, 2008, 05:06:20 PM
Yes I'm using a different theme but I already edited and everything is just the same.

Thank you
Title: Re: Easy Edit Meta Data
Post by: aishaweb on July 27, 2008, 12:17:24 PM
Quote from: CARDANFX on July 26, 2008, 05:06:20 PM
Yes I'm using a different theme but I already edited and everything is just the same.

Thank you

Got a link?
Title: Re: Easy Edit Meta Data
Post by: bullbreedluverz on September 03, 2008, 06:31:53 AM
i tried installing this mod on default theme (ive edited all the colours) but didnt work

it said installed no errors

(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fi296.photobucket.com%2Falbums%2Fmm162%2Fnikkkistikkki%2Fmetainstall.gif&hash=e431b27de69c56bc08526e8e8b6b36b1441f65f3)

(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fi296.photobucket.com%2Falbums%2Fmm162%2Fnikkkistikkki%2Fmetainstall2.gif&hash=db557065741585aa4785ddbf628dfd4d0e9c82b5)

but didnt get the meta tags tab in adminCP so went to uninstall and it said Test Failed

(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fi296.photobucket.com%2Falbums%2Fmm162%2Fnikkkistikkki%2Fmetainstall3.gif&hash=20eec57421718bb099d974efcb9f1c2390cb2d0b)
Title: Re: Easy Edit Meta Data
Post by: aishaweb on September 03, 2008, 10:37:43 AM
THIS MOD IS USELESS WHEN USING A CUSTOM THEME!


It will only work if you manually edit all the files needed to install it.

This is more work than simply editing the meta data manually.

If you have a custom theme go into index.template.php and replace "PHP, MySQL, bulletin, board, free, open, source, smf, simple, machines, forum" with your own metadata.
Title: Re: Easy Edit Meta Data
Post by: bullbreedluverz on September 03, 2008, 10:50:54 AM
its not actually a custom theme its a deafault theme with just a little bit of recolouring of the default theme bg images to change its colour scheme but your suggestion worked so thanx
Title: Re: Easy Edit Meta Data
Post by: dotch on September 13, 2008, 02:16:54 PM
It's a nice mod but I ran into trouble.

After installing the mod (trough the zip file) it worked OK. But for some reason I uninstalled it and tried to re-install it. Now I'm in trouble. When I reinstall it, all tests are done successfully. But after clicking on: Admin, Configuration, Features and Options I receive a fatal error message!:

Fatal error: Cannot redeclare modifymetasettings() (previously declared in /home/myforum.com/public_html/smf/Sources/ModSettings.php:350) in /home/myforum.com/public_html/smf/Sources/ModSettings.php on line 403

I no longer can use Features and Options! This can be undone by uninstalling the mod.

But after successfully uninstalling the mod, the mod's "Meta tab" and screens are still there! But I can't get it to work: when I fill in the metatag field and clicking on "Save" nothing happens.

So now I need help. How can I successfully reinstall the mod and get it to work without receiving the fatal error? Or how can I uninstall it succesfully?
Title: Re: Easy Edit Meta Data
Post by: dotch on September 14, 2008, 11:04:05 AM
Pfff.. I'm OK now. I manually edited Help.english.php, ModSettings.english.php, ModSettings.php. The index.template.php files of the 3 themes where ok. The mod is gone now and since I upgraded to SMF 1.6 I won't install it again. It's the first time of my life I did something in PHP  :D

I hope there will be a version of the mod for SMF 1.6 in the future (without issues).

Cheers!
Title: Re: Easy Edit Meta Data
Post by: cieplutki on September 22, 2008, 04:32:22 AM
hi all how to add this
<meta name="revisit-after"content="1 days" />
to my index.template.php
// Show right to left and the character set for ease of translating.
echo '<!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"', $context['right_to_left'] ? ' dir="rtl"' : '', '><head>
';
echo (!empty($modSettings['meta_description'])) ? ' <meta name="description" content="'. $modSettings['meta_description'] .'" />' : '<meta name="description" content="'. $context['page_title'] .'" />', empty($context['robot_no_index']) ? '' : '
<meta name="robots" content="All|index|follow" />';
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 '
<script language="JavaScript" type="text/javascript" src="', $settings['default_theme_url'], '/script.js?fin11"></script>
<script language="JavaScript" type="text/javascript" src="', $settings['default_theme_url'], '/reflection.js?fin11"></script>
<script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
var smf_theme_url = "', $settings['theme_url'], '";
var smf_images_url = "', $settings['images_url'], '";
var smf_scripturl = "', $scripturl, '";
var smf_iso_case_folding = ', $context['server']['iso_case_folding'] ? 'true' : 'false', ';
var smf_charset = "', $context['character_set'], '";
// ]]></script>';

sitepreview();

echo '

<title>', $context['page_title'], '</title>';

// The ?fin11 part of this link is just here to make sure browsers don't cache it wrongly.


please ansever and sorry for my english
Title: Re: Easy Edit Meta Data
Post by: dotch on October 01, 2008, 08:46:25 AM
Update: I (re) installed it in SMF 1.1.6 with the package manager and it works just fine :)
Title: Re: Easy Edit Meta Data
Post by: bjraines on October 22, 2008, 08:40:00 AM
will this allow you to put custom meta descriptions for board pages?
Title: Re: Easy Edit Meta Data
Post by: dlackner on December 01, 2008, 05:58:16 PM
Is there a version of this for v1.1.7 yet as the one that I tried does not work on my forum.

Thanks in advance.
Title: Re: Easy Edit Meta Data
Post by: sakura1998 on December 04, 2008, 07:46:51 PM
Something's broken...

Hi,

I installed, but something's gone wrong.

I now get a blank page when I go to features and options (......./index.php?action=featuresettings)


I'm using the default theme (and 1.15 as I'm having issues with upgrades)


Any ideas anyone?
Title: Re: Easy Edit Meta Data
Post by: lobo777 on December 05, 2008, 05:03:22 PM
I am also interested in this mod, but is it compatible with 1.1.7?
Title: Re: Easy Edit Meta Data
Post by: JimM on December 05, 2008, 11:15:18 PM
This should install fine on 1.1.7. 

If you have previously edited your meta tags manually then this mod may not install automatically.
Title: Re: Easy Edit Meta Data
Post by: ke4obt on December 06, 2008, 04:38:56 PM
maybe I missed it, but I didn't hear the screen reader read what I'm looking for.
I'm trying to install the easy edit meta data mod, I already have the Blog community mod installed. The install fails on themes/default/index.template.php.
I take out the blog, easy edit goes in fine and vice versa.
So, obviously, they both edit the same section.
Has anyone else had this problem? What can I do to fix it so they both work at the same time??

Thanks in advance,
Flip
Title: Re: Easy Edit Meta Data
Post by: dotch on December 26, 2008, 05:33:42 AM
Quote from: ke4obt on December 06, 2008, 04:38:56 PM
maybe I missed it, but I didn't hear the screen reader read what I'm looking for.
I'm trying to install the easy edit meta data mod, I already have the Blog community mod installed. The install fails on themes/default/index.template.php.
I take out the blog, easy edit goes in fine and vice versa.
So, obviously, they both edit the same section.
Has anyone else had this problem? What can I do to fix it so they both work at the same time??

You can manual edit the index.template.php file. It's not difficult. I've used notepad for it. Always backup the files you're going to change by downloading them to your PC.

Title: Re: Easy Edit Meta Data
Post by: SoehnelS on January 12, 2009, 12:36:28 PM
Hi @all!

Usefull Mod  -if it work... ;-)

I've installed and modified the used Theme,
can safe the values as Admin but all the values
are empty... :-(

Can anybody tell me where the values be loaded from the DB?

Thanks and sorry for my bad english!

MfG
Sven
Title: Re: Easy Edit Meta Data
Post by: rbatemanmi on February 04, 2009, 12:49:01 PM
I'm in the process of helping out with a board that uses SMF.  They have this mod installed.

I discovered the edits to the different files weren't completed (the edits were in the english files but the site used utf8, and those files hadn't any updates.)

Before I activate this mod in the index.template.php file, I want to make sure ModSettings is working correctly and that I can save/update the values.

I have Meta active on the setting page and see the "default" data when I load the mod.

As a test, I altered the copyright field and hit save.  I ended up back at Features and Options.  When I selected "Meta" again, the "old" value for Copyright was displayed.

We're using SMF 1.1.7, and the ModSettings.php changes I implemented look like:

// All the admin bar, to make it right.
adminIndex('edit_mods_settings');
loadLanguage('Help');
loadLanguage('ModSettings');

// Will need the utility functions from here.
        require_once($sourcedir . '/ManageServer.php');
        $context['page_title'] = $txt['modSettings_title'];
        $context['sub_template'] = 'show_settings';

        $subActions = array(
                'basic' => 'ModifyBasicSettings',
                'meta' => 'ModifyMetaSettings',

                'layout' => 'ModifyLayoutSettings',
                'karma' => 'ModifyKarmaSettings',
        );

// Load up all the tabs...
        $context['admin_tabs'] = array(
        'title' => &$txt['modSettings_title'],
        'help' => 'modsettings',
        'description' => $txt['smf3'],
                'tabs' => array(
                        'basic' => array(
                                'title' => $txt['mods_cat_features'],
                                'href' => $scripturl . '?action=featuresettings;sa=basic;sesc=' . $context['session_id'],
                        ),
                        'meta' => array(
                                'title' => $txt['mods_cat_meta'],
                                'href' => $scripturl . '?action=featuresettings;sa=meta;sesc=' . $context['session_id'],
                        ),

                        'layout' => array(
                                'title' => $txt['mods_cat_layout'],
                                'href' => $scripturl . '?action=featuresettings;sa=layout;sesc=' . $context['session_id'],
                        ),
                                'karma' => array(
                                'title' => $txt['smf293'],
                                'href' => $scripturl . '?action=featuresettings;sa=karma;sesc=' . $context['session_id'],
                                'is_last' => true,
                        ),
                ),

// Function to load template/modify meta settings
function ModifyMetaSettings()
{
        global $context, $txt, $scripturl, $modSettings, $db_prefix, $helptxt;

        $config_vars = array(
                array('large_text', 'meta_description', '5', &$txt['meta_description'], 'meta_description'),
                array('large_text', 'meta_keywords', '5', &$txt['meta_keywords'], 'meta_keywords'),
                array('text', 'meta_author', '40', &$txt['meta_author'], 'meta_author'),
                array('text', 'meta_copyright', '40', &$txt['meta_copyright'], 'meta_copyright'),
        );

        // Saving?
        if (isset($_GET['save']))
        {

                saveDBSettings($config_vars);
                writeLog();

                redirectexit('action=featuresettings;sa=meta');
        }

        $context['post_url'] = $scripturl . '?action=featuresettings2;save;sa=meta';
        $context['settings_title'] = $txt['meta_mod'];

        prepareDBSettingContext($config_vars);

}


Everything "looks" correct, but saves don't seem to work.  I did look in the database and the variables exist, they just aren't getting updated.

Any ideas?

Bob
Title: Re: Easy Edit Meta Data
Post by: sAce on February 06, 2009, 12:28:47 PM
Quote from: rbatemanmi on February 04, 2009, 12:49:01 PM
I'm in the process of helping out with a board that uses SMF.  They have this mod installed.

I discovered the edits to the different files weren't completed (the edits were in the english files but the site used utf8, and those files hadn't any updates.)

Before I activate this mod in the index.template.php file, I want to make sure ModSettings is working correctly and that I can save/update the values.

I have Meta active on the setting page and see the "default" data when I load the mod.

As a test, I altered the copyright field and hit save.  I ended up back at Features and Options.  When I selected "Meta" again, the "old" value for Copyright was displayed.

We're using SMF 1.1.7, and the ModSettings.php changes I implemented look like:

// All the admin bar, to make it right.
adminIndex('edit_mods_settings');
loadLanguage('Help');
loadLanguage('ModSettings');

// Will need the utility functions from here.
        require_once($sourcedir . '/ManageServer.php');
        $context['page_title'] = $txt['modSettings_title'];
        $context['sub_template'] = 'show_settings';

        $subActions = array(
                'basic' => 'ModifyBasicSettings',
                'meta' => 'ModifyMetaSettings',

                'layout' => 'ModifyLayoutSettings',
                'karma' => 'ModifyKarmaSettings',
        );

// Load up all the tabs...
        $context['admin_tabs'] = array(
        'title' => &$txt['modSettings_title'],
        'help' => 'modsettings',
        'description' => $txt['smf3'],
                'tabs' => array(
                        'basic' => array(
                                'title' => $txt['mods_cat_features'],
                                'href' => $scripturl . '?action=featuresettings;sa=basic;sesc=' . $context['session_id'],
                        ),
                        'meta' => array(
                                'title' => $txt['mods_cat_meta'],
                                'href' => $scripturl . '?action=featuresettings;sa=meta;sesc=' . $context['session_id'],
                        ),

                        'layout' => array(
                                'title' => $txt['mods_cat_layout'],
                                'href' => $scripturl . '?action=featuresettings;sa=layout;sesc=' . $context['session_id'],
                        ),
                                'karma' => array(
                                'title' => $txt['smf293'],
                                'href' => $scripturl . '?action=featuresettings;sa=karma;sesc=' . $context['session_id'],
                                'is_last' => true,
                        ),
                ),

// Function to load template/modify meta settings
function ModifyMetaSettings()
{
        global $context, $txt, $scripturl, $modSettings, $db_prefix, $helptxt;

        $config_vars = array(
                array('large_text', 'meta_description', '5', &$txt['meta_description'], 'meta_description'),
                array('large_text', 'meta_keywords', '5', &$txt['meta_keywords'], 'meta_keywords'),
                array('text', 'meta_author', '40', &$txt['meta_author'], 'meta_author'),
                array('text', 'meta_copyright', '40', &$txt['meta_copyright'], 'meta_copyright'),
        );

        // Saving?
        if (isset($_GET['save']))
        {

                saveDBSettings($config_vars);
                writeLog();

                redirectexit('action=featuresettings;sa=meta');
        }

        $context['post_url'] = $scripturl . '?action=featuresettings2;save;sa=meta';
        $context['settings_title'] = $txt['meta_mod'];

        prepareDBSettingContext($config_vars);

}


Everything "looks" correct, but saves don't seem to work.  I did look in the database and the variables exist, they just aren't getting updated.

Any ideas?

Bob

i am getting this as well, all is well, just the settings dont save
plzz help
Title: Re: Easy Edit Meta Data
Post by: Eclipse16V on March 12, 2009, 06:31:11 PM
Cool stuff.
I´m using it on SMF 1.1.8 and now I will build it in a SMF 2.0RC1.
Does I work on SMF 2.0RC1?
Title: Re: Easy Edit Meta Data
Post by: Hell Raiser on April 20, 2009, 04:57:02 AM
Well this mod is not getting installed in 2.0
because all the tests are failed and 2 files are not found now what to do



Title: Re: Easy Edit Meta Data
Post by: dru1487 on April 22, 2009, 09:59:22 AM
I installed this mod on 1.1.8. It insyalled just fine, it popped up on my Features and Options tollbar but I can't see the changes on my site?

It still says - Index for my page description.

Any ideas?
Title: Re: Easy Edit Meta Data
Post by: bayness0 on May 03, 2009, 11:13:03 AM
I have just tried to install this and I get an invalid package error so the package installer aborts.
Title: Re: Easy Edit Meta Data
Post by: kaamaru on May 05, 2009, 03:22:32 PM
I can't install it says "The package you tried to upload either is not a valid package or has become corrupted." This site won't let me manually install it ether.  :'(
Title: Re: Easy Edit Meta Data
Post by: blanix on May 05, 2009, 06:44:27 PM
... re-zip the files in package and it works.
Title: Re: Easy Edit Meta Data
Post by: peps1 on June 07, 2009, 01:48:21 PM
getting the
QuoteThe package you tried to upload either is not a valid package or has become corrupted.
too
Title: Re: Easy Edit Meta Data
Post by: Joe N on June 08, 2009, 01:20:01 PM
Screenshot  >:(
Title: Re: Easy Edit Meta Data
Post by: erosolmi on June 25, 2009, 10:17:30 AM
Quote from: peps1 on June 07, 2009, 01:48:21 PM
getting the
QuoteThe package you tried to upload either is not a valid package or has become corrupted.
too

Same here under SMF 1.1.9
Title: Re: Easy Edit Meta Data
Post by: selket on July 03, 2009, 06:36:21 AM
Is it compatible with 1.1.9?
Thank you
Title: Re: Easy Edit Meta Data
Post by: Eclipse16V on July 03, 2009, 04:10:13 PM
Yes it works fine on a 1.1.9 version on one of my site.
Title: Re: Easy Edit Meta Data
Post by: crustybum on August 19, 2009, 04:47:15 AM
How about 1.10?
Title: Re: Easy Edit Meta Data
Post by: JimM on August 19, 2009, 08:45:52 PM
Yep, works fine on 1.1.10 as well. :)
Title: Re: Easy Edit Meta Data
Post by: - danny on September 01, 2009, 09:58:17 PM
The package you tried to upload either is not a valid package or has become corrupted...

...same here, i just updated to 1.1.9, but tried it on 1.1.4 & 1.1.5 previously, only to achieve the same result.

any clues?
Title: Re: Easy Edit Meta Data
Post by: HollowbeadRanch on September 13, 2009, 12:14:05 AM
Quote from: JimM on August 19, 2009, 08:45:52 PM
Yep, works fine on 1.1.10 as well. :)

I have version 1.1.10 and tried to download it and got this as well...

"An Error Has Occurred!
The package you tried to upload either is not a valid package or has become corrupted."

Any advice???  I would really like to be able to use this mod :D Thanks in advance ;)
Title: Re: Easy Edit Meta Data
Post by: sAce on September 13, 2009, 12:19:39 AM
manual install would be the solution , or you can try the version emulate mod, then install it
Title: Re: Easy Edit Meta Data
Post by: JimM on September 13, 2009, 01:25:03 PM
The mod adds some very simple edits that should not be difficult to do manually.  Also as S-Ace mentioned you might want to try the version_emulate mod (http://custom.simplemachines.org/mods/index.php?mod=2113).
Title: Re: Easy Edit Meta Data
Post by: HollowbeadRanch on September 13, 2009, 11:11:50 PM
I hate to be a pain.... but what exactly would I have to do to install it manually?  I don't know a whole lot about making changes and such, but I can try.

I downloaded version_emulate mod you suggested with no problems at all!  But after loading it I changed it to 1.1 RC, 1.1 RC2, 1.1 RC3, 1.1.1, 1.1.5, 1.1.6, AND 1.1.8 and it stilled gave me the same error message after trying each to emulate each one of those versions :(
Title: Re: Easy Edit Meta Data
Post by: HollowbeadRanch on October 01, 2009, 08:07:56 PM
anyone?? ???
Title: Re: Easy Edit Meta Data
Post by: Cal O'Shaw on October 02, 2009, 08:01:11 PM
The problem is the file.  Probably the extra period in the filename.

I just extracted all the files and built a new zip file called "EasyEditMetaData_v1-1.zip"  (note it is "1.1" on SMF).

It loaded just fine.

Could someone please either rename the file to remove the extra dot, or 1.1.10 has a problem parsing filenames with extra dots.

Cal
Title: Re: Easy Edit Meta Data
Post by: Cal O'Shaw on October 02, 2009, 08:06:40 PM
This MOD will not parse on the MOD page

I think the problem is the extra dot in the file name.  Could this be looked at?

Grazie
Title: Re: Easy Edit Meta Data
Post by: HollowbeadRanch on October 03, 2009, 01:36:01 PM
So if I extract all the files and build a new zip file with that title then it should work??? 


That would be GREAT!  (I acttually know enough to know how to extract files and create a zip file... LOL!)
Title: Re: Easy Edit Meta Data
Post by: Cal O'Shaw on October 03, 2009, 01:39:48 PM
Or you could see about just renaming the zip file to take out the extra period... see if that fixes it.
Title: Re: Easy Edit Meta Data
Post by: Cal O'Shaw on October 04, 2009, 01:06:39 AM
I sent a PM to the author informing him of the situation.  Hopefully he can resolve this (as I get an error trying to install and can't use PARSE to see what I have to edit).
Title: Re: Easy Edit Meta Data
Post by: paloro on February 06, 2010, 05:01:39 PM
Does this mod work with version 1.1.11?
Title: Re: Easy Edit Meta Data
Post by: khaberst on January 19, 2011, 10:52:13 AM
The package you tried to upload either is not a valid package or has become corrupted...

I tried to change the file name as well with no success. Has anyone found a resolution to installing this?
Title: Re: Easy Edit Meta Data
Post by: bestfriendavinash on April 30, 2012, 01:22:33 PM
For SMF 2.0.2 ?