Jump to content
Nico Knoll

MarkupSEO - The all-in-one SEO solution for ProcessWire.

Recommended Posts

@teppo: To be honest: I didn't think about that... Maybe I'm switching to create real fields so multilanguage will be easier, too. Have to think about it later today :)

  • Like 3

Share this post


Link to post
Share on other sites

Maybe it can steal an idea from Ryans table field - have its own table.

Or, it could also have its own PW page structure, effectively a "related" page to the current page, that is stored under admin somewhere in the same way repeaters are.

Though I think a single table might be more efficient, query wise.

However, just to change my mind again, the other day I put on my own site drop downs for Open Graph page type (article and so on) and the same for twitter. I did those with a page field so I have started with the most common five or six, but can add more on the fly as normal with a page-field. Useful functionality for this kind of thing.

So, maybe a mix! :)

  • Like 1

Share this post


Link to post
Share on other sites

Though I think a single table might be more efficient, query wise.

I'm implementing a custom field type based on Ryan's Event field type that uses a custom table for storage.

I have compared performance to other methods like using a pages field. And the custom table field is much much faster, both when saving and querying values. So I'd recommend going with the custom table field following Ryan's Event field type module.

  • Like 1

Share this post


Link to post
Share on other sites

Hi Nico, nice module, i was going to build it myself, but you were quicker :)

But why does it have a own title field? As every page already has a title why double it?

Share this post


Link to post
Share on other sites

@jmartsch The title field is actually good as you can use it as a browser title field which can differ from the page title or an ulr pathsegment etc.

 

  • Like 5

Share this post


Link to post
Share on other sites

As @lisandi said. 

An example:

Your page's title is "About".

You use "<h2>$page->title</h2>" in your template but you want to have a different description on Google results like "Learn more about the team." 

Just use the title field to archive that.

Share this post


Link to post
Share on other sites

   What an awesome module, the features in it are perfect. One thing I am noticing though is that the module seems to be a bit finnicky with images that are limited to 1 not on the current page, as the image preview function appears to call first() on the image field regardless to it's existance on the page.

Error: Call to a member function first() on a non-object (line 326 of home/swflemin/public_html/dg/site/modules/MarkupSEO/MarkupSEO.module) 

if($this->imageSmart && $pageDataDefault['image'] == '' && @$this->page->get(implode('|', $this->imageSmart))->first()->url != '') $mixedData['image'] = $this->page->get(implode('|', $this->imageSmart))->first()->url;

Looks to be the culpret. Could I get a hand modding this here?

Share this post


Link to post
Share on other sites

Great Piece.

I've done something like that with textfields and FieldsetTab. But a Out of the Box Solution is quite nice.

A client had requested once, a SEO traffic light, which checks different basic things like the Title, Image Description, Keyword Density, List of the actual keywords in the existing text etc.

In my opinion you can achieve this as well with a small SEO cheatsheet and a bit brainpower. But on the other hand, it might be helpful for user, with less Web/Seo Knowledge.

Would something like that be possible? Or is something like that already in your mind?

  • Like 1

Share this post


Link to post
Share on other sites

I'm very excited about this module. Thanks galore Nico.  I need all the help I can get w/ SEO. This is a boon.
 
From my reading, I agree with a prior comment that the automatic rendering should not be at the bottom of <head>, so I set the method to "manual", and tried to use
 

<?php echo wire('page')->seo->render; ?>

 long-hand toward the top of head.  It smoked!
 
In your ready() function,

$this->method == 'auto'  

should not be a condition for initializing the front-end hooks.

Thanks. 

Share this post


Link to post
Share on other sites

Thanks for feedback! How would you initialize the hooks?


@ole: If I find the time I will update my to-do list and add some more features. I think I need to restructure it first to make it more flexible again.

  • Like 1

Share this post


Link to post
Share on other sites

In my copy, this is what it looks like now. I don't know whether I'm missing something. I haven't created a module w/ hooks like this yet.

public function ready() {
		// backend hooks
		$editedPage = wire('pages')->get($this->config->input->get->id);
		if(@$this->page->process == 'ProcessPageEdit' && !in_array((string)$editedPage->template, $this->excludedTemplates)) {
			$this->addHookAfter("ProcessPageEdit::buildFormContent", $this, 'addSEOTab');
			$this->addHookBefore("ProcessPageEdit::execute", $this, 'saveSEOTab');
		}
		
		// frontend hooks
		
		// if($this->method == 'auto' && $this->page->template != 'admin') {
		if($this->page->template != 'admin') {
			$this->addHookProperty("Page::seo", $this, 'hookFrontendPage');
			$this->addHookProperty("Config::seo", $this, 'hookFrontendConfig');
		}
	}

Actually, why are you even explicitly skipping the 'admin' template if you have a mechanism for excluding templates in place and the 'admin' one is added by default?

Then, maybe, this is it:  It works, not stress-tested...

// frontend hooks

if (!in_array((string)$this->page->template, $this->excludedTemplates))  {
    $this->addHookProperty("Page::seo", $this, 'hookFrontendPage');
    $this->addHookProperty("Config::seo", $this, 'hookFrontendConfig');
}
?

Share this post


Link to post
Share on other sites

Well I'm stumped, I can't seem to figure out how to get this to work with my site's images as many are set to one, and many pages don't contain the images that are referred to in the module. Looks like I'll be waiting for the next release :).

Share this post


Link to post
Share on other sites

Hi Nico,

great idea, this spares quite some time to set this up individually.

One question about "Keywords". Do you mean the Keywords Meta Tags?

Google says they don't use it any more: 

http://www.mattcutts.com/blog/keywords-meta-tag-in-web-search/

Some of our clients had a wrong idea of SEO when spending a lot of time end efforts with littering the SEO keywords meta tag with all sorts of words, instead of using their energy on other SEO more relevant topics, like a carefully chosen title and a good summary. So we stopped offering that field. :-)

This is (in German) what Meta Tags Google uses:

http://support.google.com/webmasters/bin/answer.py?hl=de&answer=79812

EDIT:

A given "Focus Keyword" for a page might be a good source for your planned suggestion tool, the WP Plugin SEO YOAST seems to use it that way.

Edited by ceberlin

Share this post


Link to post
Share on other sites

Well yeah it creates the keywords field. I've never been that deep in SEO so I thought this field would still be relevant. :)

Thanks for the tip with the Focus Keyword !

Share this post


Link to post
Share on other sites

If you try to get clever and stuff your site with a lot of keywords this can even lead to search enigines penalizing your site score. In general i think it's best to focus on good titles, descriptions and content and don't use keywords.

Share this post


Link to post
Share on other sites

Keywords still play a role but they need to be related to what you write in the text on the frontpage itself. This is quite important as otherwise you getpenelaized. But it means also that search engines still use the field and there are more search engines than only Google!

Share this post


Link to post
Share on other sites

I personally won't waste to much time in keywords but from a business point of view "keywords" is itself such a manifested keyword for selling a website as a SEO website! And alone because of that I would leave the field just where it is inside the SEO Tool and the website. Let the customers fill it up like doctors give them some placebos and they will buy your sites ;-) and ideas!

Share this post


Link to post
Share on other sites

As far as I am aware, Google definitely don't use Meta Keywords, Bing definitely doesn't and it looks like Yahoo don't either.

Keywords are also a lovely way of telling your clients' competitors what words are important to your client. 

I use them all the time - reading them from the competitor's website. :)

  • Like 3

Share this post


Link to post
Share on other sites

Google hasn't used Keywords as a ranking metric since 2009-ish. Here's the offical post from Google.

I think the keywords field should stay. Clients are hard-wired into believing that Keywords matter because they did for so long.

Not having a Keywords field could negatively impact first impressions from some clients.

As someone else mentioned, other Search Engines might have their own policies re. keywords. I'm not an SEO professional.

For anyone wondering where the focus should be, the two most important ranking factors used by Google are:

  1. Quality incoming links from relevant sites. Quality is the key here and 3rd party sites themselves must have a good reputation.
  2. Relevant, quality content that is updated and shareable. 

I think in total  there are thought to be around 200 "signals" which Google ultimatelty uses to determine ranking.

Any SEO pros on here to confirm?

Share this post


Link to post
Share on other sites

Matt Cutts about WordPress and SEO - worth watching!



Listen carefully as you will here "keywords" ....
- don't mix that tool up with seoiq.de (Trittbrett Fahrer)

keywords in meta data are not the same like "on-page keywords"!!! The later is still quite important, even with Google.

200 Faktors
http://www.entrepreneur.com/article/226884

Daily Google is changing their algorithms so change your way of doing SEO at the same rate and you will be on the top of the pop perhaps!
Goos SEO means at first place high quality content - and this content in on the visible site of all web pages and pages need to perform very good - speed!
Test your sites in http://gtmetrix.com

 
  • Like 1

Share this post


Link to post
Share on other sites

As far as I am aware, Google definitely don't use Meta Keywords, Bing definitely doesn't and it looks like Yahoo don't either.

Out of interest, do you have any details on the Bing and Yahoo parts? Google is obvious, but as far as I can tell, Bing and Yahoo still use keywords, though they're not exactly important ranking factors (quite the opposite, really -- they seem to have much less weight than regular body copy).

Also, for anyone targeting the Russian or Chinese markets, it should be noted that Yandex specifically suggests using meta keywords (they're not revealing how important these are as ranking factors though) and according to some sources Baidu considers meta keywords "very important" (though keyword stuffing is a major negative signal there too).

  • Like 3

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • By Robin S
      After forgetting the class name of the wonderful AdminPageFieldEditLinks module for what feels like the 100th time I decided I needed to give my failing memory a helping hand...
      Autocomplete Module Class Name
      Provides class name autocomplete suggestions for the "Add Module From Directory" field at Modules > New.
      Requires ProcessWire >= v3.0.16.
      Screencast

      Installation
      Install the Autocomplete Module Class Name module.
      Configuration
      Choose the type of autocomplete options list: "Module class names from directory" or "Custom list of module class names". The latter could be useful if you regularly install some modules and would prefer a shorter list of autocomplete suggestions. The list of class names in the modules directory is generated when the Autocomplete Module Class Name module is installed. It doesn't update automatically (because the retrieval of the class names is quite slow), but you can use the button underneath when you want to retrieve an updated list of class names from the directory. The "fuzzy search" option uses custom filter and item functions for Awesomplete so that the characters you type just have to exist in the module class name and occur after preceding matches but do not need to be contiguous. Uncheck this option if you prefer the standard Awesomplete matching. Custom settings for Awesomplete can be entered in the "Awesomplete options" field if needed. See the Awesomplete documentation for more information.  
      https://github.com/Toutouwai/AutocompleteModuleClassName
      https://modules.processwire.com/modules/autocomplete-module-class-name/
    • By teppo
      MarkupMenu is a markup module for generating menu trees. When provided a root page as a starting point, it generates a navigation tree (by default as a HTML "<ul>" element wrapped by a "<nav>" element) from that point onwards. If you've also provided it with current (active) page, the menu will be rendered accordingly, with current item highlighted and items rendered up to that item and its children (unless you disable the "collapsed" option, in which case the full page tree will be rendered instead).
      Modules directory: https://modules.processwire.com/modules/markup-menu/ GitHub repository: https://github.com/teppokoivula/MarkupMenu Usage
      As a markup module, MarkupMenu is intended for front-end use, but you can of course use it in a module as well. Typically you'll only need the render() method, which takes an array of options as its only argument:
      echo $modules->get('MarkupMenu')->render([ 'root_page' => $pages->get(1), 'current_page' => $page, ]); Note: if you omit root_page, site root page is used by default. If you omit current_page, the menu will be rendered, but current (active) page won't be highlighted etc.
      A slightly more complex example, based on what I'm using on one of my own sites to render a (single-level) top menu:
      echo $modules->get('MarkupMenu')->render([ 'current_page' => $page, 'templates' => [ 'nav' => '<nav class="{classes} menu--{menu_class_modifier}" aria-label="{aria_label}">%s</nav>', 'item_current' => '<a class="menu__item menu__item--current" href="{item.url}" tabindex="0" aria-label="Current page: {item.title}">{item.title}</a>', ], 'placeholders' => [ 'menu_class_modifier' => 'top', 'aria_label' => 'Main navigation', ], 'include' => [ 'root_page' => true, ], 'exclude' => [ 'level_greater_than' => 1, ], ]); Note: some things you see above may not be entirely sensible, such as the use of {menu_class_modifier} and {aria_label} placeholders. On the actual site the "nav" template is defined in site config, so I can define just these parts on a case-by-case basis while actual nav markup is maintained in one place.
      Please check out the README file for available render options. I'd very much prefer not to keep this list up to date in multiple places. Basically there are settings for defining "templates" for different parts of the menu (list, item, etc.), include array for defining rules for including in the menu and exclude array for the opposite effect, classes and placeholders arrays for overriding default classes and injecting custom placeholders, etc. 🙂
      MarkupMenu vs. MarkupSimpleNavigation
      TL;DR: this is another take on the same concept. There are many similarities, but also some differences – especially when it comes to the supported options and syntax. If you're currently using MarkupSimpleNavigation then there's probably no reason to switch over.
      I'd be surprised if anyone didn't draw lines between this module and Soma's awesome MarkupSimpleNavigation. Simply put, I've been using MSN (...) for a number of years, and it's been great – but there have been some smallish issues with it, particularly with the markup generation part, and it's also doing some things in a way that just doesn't work for me – the xtemplates thing being one of these. In many ways it's less about features, and more about style.
      In MarkupMenu I've tried to correct these little hiccups, modernise the default markup, and allow for more flexibility with placeholder variables and additional / different options. MarkupMenu was built for ProcessWire 3.0.112+ and PHP 7.1+, it's installable with Composer, and I have a few additional ideas (such as conditional placeholders) on my todo list.
      One smallish and rather specific difference is that MarkupMenu supports overriding default options via $config->MarkupMenu. I find myself redefining the default markup for every site, which until now meant that each site has a wrapper function for MarkupSimpleNavigation (to avoid code / config repetition), and this way I've been able to omit that 🙂
      Requirements
      ProcessWire >= 3.0.112 PHP >= 7.1.0 If you're working on an earlier version of ProcessWire or PHP, use MarkupSimpleNavigation instead.
    • By Robin S
      Repeater Images
      Adds options to modify Repeater fields to make them convenient for "page-per-image" usage. Using a page-per-image approach allows for additional fields to be associated with each image, to record things such as photographer, date, license, links, etc.
      When Repeater Images is enabled for a Repeater field the module changes the appearance of the Repeater inputfield to be similar (but not identical) to an Images field. The collapsed view shows a thumbnail for each Repeater item, and items can be expanded for field editing.
      Screencast

      Installation
      Install the Repeater Images module.
      Setup
      Create an image field to use in the Repeater field. Recommended settings for the image field are "Maximum files allowed" set to 1 and "Formatted value" set to "Single item (null if empty)". Create a Repeater field. Add the image field to the Repeater. If you want additional fields in the Repeater create and add these also. Repeater Images configuration
      Tick the "Activate Repeater Images for this Repeater field" checkbox. In the "Image field within Repeater" dropdown select the single image field. You must save the Repeater field settings to see any newly added Image fields in the dropdown. Adjust the image thumbnail height if you want (unlike the core Images field there is no slider to change thumbnail height within Page Edit). Note: the depth option for Repeater fields is not compatible with the Repeater Images module.
      Image uploads feature
      There is a checkbox to activate image uploads. This feature allows users to quickly and easily add images to the Repeater Images field by uploading them to an adjacent "upload" field.
      To use this feature you must add the image field selected in the Repeater Images config to the template of the page containing the Repeater Images field - immediately above or below the Repeater Images field would be a good position.
      It's recommended to set the label for this field in template context to "Upload images" or similar, and set the visibility of the field to "Closed" so that it takes up less room when it's not being used. Note that when you drag images to a closed Images field it will automatically open. You don't need to worry about the "Maximum files allowed" setting because the Repeater Images module overrides this for the upload field.
      New Repeater items will be created from the images uploaded to the upload field when the page is saved. The user can add descriptions and tags to the images while they are still in the upload field and these will be retained in the Repeater items. Images are automatically deleted from the upload field when the page is saved.
      Tips
      The "Use accordion mode?" option in the Repeater field settings is useful for keeping the inputfield compact, with only one image item open for editing at a time. The "Repeater item labels" setting determines what is shown in the thumbnail overlay on hover. Example for an image field named "image": {image.basename} ({image.width}x{image.height})  
      https://github.com/Toutouwai/RepeaterImages
      https://modules.processwire.com/modules/repeater-images/
    • By EyeDentify
      Hello There Guys.

      I am in the process of getting into making my first modules for PW and i had a question for you PHP and PW gurus in here.

      I was wondering how i could use an external library, lets say TwitterOAuth in my PW module.
      Link to library
      https://twitteroauth.com/

      Would the code below be correct or how would i go about this:
      <?PHP namespace ProcessWire; /* load the TwitterOAuth library from my Module folder */ require "twitteroauth/autoload.php"; use Abraham\TwitterOAuth\TwitterOAuth; class EyeTwitter extends WireData,TwitterOAuth implements Module { /* vars */ protected $twConnection; /* extend parent TwitterOAuth contructor $connection = new TwitterOAuth(CONSUMER_KEY, CONSUMER_SECRET, $access_token, $access_token_secret); */ public function myTwitterConnection ($consumer_key, $consumer_secret, $access_token, $access_token_secret) { /* save the connection for use later */ $this->twConnection = TwitterOAuth::__construct($consumer_key, $consumer_secret, $access_token, $access_token_secret); } } ?> Am i on the right trail here or i am barking up the wrong tree?
      I don´t need a complete solution, i just wonder if i am including the external library the right way.
      If not, then give me a few hint´s and i will figure it out.

      Thanks a bunch.

      /EyeDentify
    • By dimitrios
      Hello,
      this module can publish content of a Processwire page on a Facebook page, triggered by saving the Processwire page.
      To set it up, configure the module with a Facebook app ID, secret and a Page ID. Following is additional configuration on Facebook for developers:
      Minimum Required Facebook App configuration:
      on Settings -> Basics, provide the App Domains, provide the Site URL, on Settings -> Advanced, set the API version (has been tested up to v3.3), add Product: Facebook Login, on Facebook Login -> Settings, set Client OAuth Login: Yes, set Web OAuth Login: Yes, set Enforce HTTPS: Yes, add "http://www.example.com/processwire/page/" to field Valid OAuth Redirect URIs. This module is configurable as follows:
      Templates: posts can take place only for pages with the defined templates. On/Off switch: specify a checkbox field that will not allow the post if checked. Specify a message and/or an image for the post.
      Usage
      edit the desired PW page and save; it will post right after the initial Facebook log in and permission granting. After that, an access token is kept.
       
      Download
      PW module directory: http://modules.processwire.com/modules/auto-fb-post/ Github: https://github.com/kastrind/AutoFbPost   Note: Facebook SDK for PHP is utilized.


×
×
  • Create New...