We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

LG Better Meta v1.4.0 - Bug fixes and source code comments

Development and Programming

Leevi Graham's avatar
Leevi Graham
1,143 posts
17 years ago
Leevi Graham's avatar Leevi Graham

v1.1.0 Update: The new version adds a robots meta tag to the mix and some $SESS caching for faster queries. Don’t forget to backup your data first!

v1.1.1 Update: The update removes rows from the table which don’t contain any meta data. Should add a v. slight speed increase. Don’t forget to backup your data first!

v1.2.3 Update: Checked into subversion. Robots bug fixed

v1.2.4 Update: Added character counter for description + new readme file included in package

v1.3.0 Update: - Added ability to show/hide meta fields in the admin tab - Fixed Quick Save bug - Rewrote form output to use EE $IN class - Added new documentation

v1.4.0 Update: See this post for details

Hey guys,

After some extensive testing (thanks Victor G) I have removed the beta label from LG Better Meta.

The new version adds the url_title and weblog_id params (should be used together), Creative Commons Attribution-ShareAlike 3.0 License, default keyword insertion and some speed improvements. You can now also restrict the LG Better Meta tab from showing on particular weblogs in the extension settings.

There is documentation and download available on my Expression Engine customisation resource!

All future updates / downloads will be made available at the link above. Feel free to still ask questions in this forum

       
wiL.Laxa's avatar
wiL.Laxa
69 posts
17 years ago
wiL.Laxa's avatar wiL.Laxa

Great Job! 😊 Will be a standard on my websites!

       
Derek Jones's avatar
Derek Jones
7,561 posts
17 years ago
Derek Jones's avatar Derek Jones

Interesting, Leevi. At a glance it looks like this could all be done with regular custom fields, though you’d have to add them to each field group, so there’s an advantage to your approach to be sure. However, the plugin could really stand to use both PHP and MySQL optimization. You might have a look through the Developer Guidelines to see some ways you could make the plugin less expensive in terms of resource usage. If used on a multi-entry page as-is, it could easily get out of hand.

       
Leevi Graham's avatar
Leevi Graham
1,143 posts
17 years ago
Leevi Graham's avatar Leevi Graham

Hey Derek,

Thanks for checking out my extension/plugin. Im sure there are more than a few places for optimisation. Removing comments for one and probably some template stuff as well.

Can you explain the multi-entry page comment. This plugin should only really be used once in the head of your document.

       
Derek Jones's avatar
Derek Jones
7,561 posts
17 years ago
Derek Jones's avatar Derek Jones

Leevi, one thing I learned quickly as an ExpressionEngine developer is that users will often use modules and plugins for things you didn’t think of when developing it. 😉

I can easily see a user using this plugin inside a weblog entries tag on a multi-entry page, to list some of the meta-information. And even if they do not, it’s just a good practice where possible to use caching mechanisms to make sure that identical queries (such as the settings query) are not executed on the same page load. (See the information about using the $SESS->cache array).

       
Leevi Graham's avatar
Leevi Graham
1,143 posts
17 years ago
Leevi Graham's avatar Leevi Graham

Derek, Now you mention it I can see people using this extension for other purposes. I guess my documentation should include a best practices and clear usage section.

I’ll check out the $SESS->cache documentation for sure. Any other tips are always welcome (from all members)

       
Leevi Graham's avatar
Leevi Graham
1,143 posts
17 years ago
Leevi Graham's avatar Leevi Graham

Ok guys,

New update based on Dereks feedback. Download available at top of the thread.

V1.1.0 updates:

  1. Includes caching
  2. New robots meta tag
  3. Some PHP rewritten

TODO: 1. Optimise PHP even more (suggestions welcome)

       
Ryan M.'s avatar
Ryan M.
1,511 posts
17 years ago
Ryan M.'s avatar Ryan M.

This looks freaking amazing - and very handy for the site I’m about to build. If I have any significant feedback, I’ll let you know. Thanks much in advance for your work.

       
wiL.Laxa's avatar
wiL.Laxa
69 posts
17 years ago
wiL.Laxa's avatar wiL.Laxa

Yep that’s a real good plugin, Nicely laid out as well. 😊 I never knew there were other Meta fields other than the “Description”, “Keywords” and “Author”. LOL

Thanks a bunch. 😊

       
Ryan M.'s avatar
Ryan M.
1,511 posts
17 years ago
Ryan M.'s avatar Ryan M.

A couple questions for you.

  1. Is this robots output common, as I can’t find documentation for using numbers anywhere:
<meta name="robots" content="1,1,1" />

I’d prefer that to say:

<meta name="robots" content="index,follow,archive" />

This is when simply putting the basic tag on the template. However, if I use the more complex tag (the example with {embed:}) then they show up as words. One other thing about that tag: I’ve never seen “archive” before. How common is that? I’m very used to seeing “noindex,nofollow” or some other two-word combo. Can archive be optional? Thanks for setting me straight on any of this.

  1. Is there a way to disable (hide) some of the fields on the publish page? I don’t think I’m too interested in using the entire row: “Meta Author, Meta Publisher, Meta Rights”.

The rest of the fields on the publish menu are great (although I’m wondering how best to make use of the meta title field, as I’d like to only use that if there is something in it, not including the default title, but I’ll worry about that later…) The addition of the “[+] Add site keywords” link was a real nice move!

One other thing: Would it be possible to set this up so that you could only return one value, rather than the entire default block? For example, if mytitle tag is in a different include than the rest of my meta. In that case, I’ll want to kick out all the meta using {exp:lg_better_meta} (and removing {title} from that output - but I’ll want to output only the meta title elsewhere. Perhaps something along the lines of

{exp:lg_better_meta:single url_title="{segment_3}"}{title}{/exp:lg_better_meta:single}

. Thinking out loud here. Thanks!

       
Leevi Graham's avatar
Leevi Graham
1,143 posts
17 years ago
Leevi Graham's avatar Leevi Graham

There is an update available that should fix the first issue.

Regarding hiding fields I have not implemented this feature yet. Its on the list.

       
Ryan M.'s avatar
Ryan M.
1,511 posts
17 years ago
Ryan M.'s avatar Ryan M.

The update didn’t exactly fix that issue for me, at least 😊

(Remember to take those .svn directories out of there when you archive 😜 )

Is it possible that this extension is messing with (erasing) the Site Title and/or URL Title of entries? I made a test weblog to use this Extension, made two entries with sample info, and if I go back into them via the Edit tab - the title and url_title fields are empty, but the correct info is still showing on the templates. Not sure what to think of that!

       
Ryan M.'s avatar
Ryan M.
1,511 posts
17 years ago
Ryan M.'s avatar Ryan M.

I think I’m going to try and tweak this out as I need it for this particular build I’m on (a lot like you tweaked out Add Sitename!), making certain things optional, adding ability to return a single value rather then the block, disabling/hiding certain fields, etc. At least for testing, I’m assuming it’s probably OK to comment out the “DROP TABLE” code when I disable this, so I don’t have to re-enter information if I fire it up again. 😉

My only real concern with this extension is how my normal “title” field and “url title” field were getting erased on any entries I was editing in a weblog where this extension was being applied. I’ll see if there is anything I can figure out about that.

       
Leevi Graham's avatar
Leevi Graham
1,143 posts
17 years ago
Leevi Graham's avatar Leevi Graham

Hey ryan,

The extension doesn’t manipulate any of the publish form fields directly. It does set a $title variable in the scope for the function and that may be called later using global but I doubt it. I will check the ee classes later to find out if they do.

The drop table line can easily be commented out. I was thinking of making this an extension option or something like that.

If you find any bugs or wish to contribute any improvements send em through and I will take a look.

       
Leevi Graham's avatar
Leevi Graham
1,143 posts
17 years ago
Leevi Graham's avatar Leevi Graham

Hey Ryan,

I just installed the extension into a new project (EE 1.6) and everything seems to be working fine. Can you post some screen grabs regarding the title and url title disappearing?

       
1 2 3 Last

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.