WebsiteBaker Logo
  • *
  • Templates
  • Help
  • Add-ons
  • Download
  • Home
*
Welcome, Guest. Please login or register.

Login with username, password and session length
 

News


WebsiteBaker 2.13.6 is now available!


Will it continue with WB? It goes on! | Geht es mit WB weiter? Es geht weiter!
https://forum.websitebaker.org/index.php/topic,32340.msg226702.html#msg226702


The forum email address board@websitebaker.org is working again
https://forum.websitebaker.org/index.php/topic,32358.0.html


R.I.P Dietmar (luisehahne) and thank you for all your valuable work for WB
https://forum.websitebaker.org/index.php/topic,32355.0.html


* Support WebsiteBaker

Your donations will help to:

  • Pay for our dedicated server
  • Pay for domain registration
  • and much more!

You can donate by clicking on the button below.


  • Home
  • Help
  • Search
  • Login
  • Register

  • WebsiteBaker Community Forum »
  • WebsiteBaker Support (2.8.x) »
  • Droplets & Snippets »
  • New droplet: Metatag Last Modified
  • Print
Pages: [1]   Go Down

Author Topic: New droplet: Metatag Last Modified  (Read 6573 times)

Argos

  • Guest
New droplet: Metatag Last Modified
« on: November 17, 2011, 10:48:41 PM »
Here's a droplet for use in the metatag LastModifid.

Name: Meta-SiteModified
Description: Create metatag information on when your site was last updated.
Call: [[Meta-SiteModified]]
Code:
Code: [Select]
global $database, $wb;
if (PAGE_ID>0) {
    $query=$database->query("SELECT max(modified_when) FROM ".TABLE_PREFIX."pages");
    $mod_details=$query->fetchRow();
    return date(DATE_RFC822, (int) $mod_details[0])." GMT";    
}

Use:
Code: [Select]

<meta http-equiv="last-modified" content="[[meta-sitemodified]]" />

Logged

Offline dbs

  • Betatester
  • **
  • Posts: 8914
  • Gender: Male
  • tioz4ever
    • WebsiteBaker - jQuery-Plugins - Module - Droplets - Tests
Re: New droplet: Metatag Last Modified
« Reply #1 on: November 18, 2011, 07:47:47 AM »
Could be a part of SimplePageHead.
Logged
https://onkel-franky.de

Offline Bug

  • Posts: 237
Re: New droplet: Metatag Last Modified
« Reply #2 on: November 18, 2011, 08:20:08 AM »
And simplepagehead should be part of the core!
Logged

NorHei

  • Guest
Re: New droplet: Metatag Last Modified
« Reply #3 on: November 18, 2011, 10:24:25 AM »
From a SEO point of view maybe i don't want to have the real last modified presented there ;-)
Another question is what happenes whith pages that automatically generates content? Do they ever get updated ?

For example a Startpage that has a news(topics)block presenting the last 5 post right below the normal content. So you have a WYSIWYG block whith an anytopics droplet adding a news section at the end. Anytopics changes the page content every time you post some additional news on you news/topics page but last modified isn't changed at all.

This Droplet is a really nice idea, but far from being something that is feature complete.
Its a special solution for a certain problem and thats what droplets are for.
Good work! 

Personaly i would prefer not having an incomplete metatag presented on PageId 0.

Code: [Select]
global $database, $wb;
if (PAGE_ID>0) {
    $query=$database->query("SELECT max(modified_when) FROM ".TABLE_PREFIX."pages");
    $mod_details=$query->fetchRow();
    return '<meta http-equiv="last-modified" content="'.date(DATE_RFC822, (int) $mod_details[0])." GMT". '" />';   
}


Logged

Argos

  • Guest
Re: New droplet: Metatag Last Modified
« Reply #4 on: November 18, 2011, 11:00:49 AM »
Thanks for your comments and modification NorHei. I didn't really think much about it to be honest, and I'm also not a coder. I just changed the regular SiteModifed droplet to use as a meta tag. Maybe it's quite useless, I don't know. If there a better alternative, or some improvement, I'm happy to hear about it  :-D

I chose for not including the metatag command itself for consistency with other WB metatags like keywords and description. That's why I suggested to use it as:
Code: [Select]

<meta http-equiv="last-modified" content="[[meta-sitemodified]]" />


But of course you can also use it like NorHei suggested.
« Last Edit: November 18, 2011, 11:09:44 AM by Argos »
Logged

  • Print
Pages: [1]   Go Up
  • WebsiteBaker Community Forum »
  • WebsiteBaker Support (2.8.x) »
  • Droplets & Snippets »
  • New droplet: Metatag Last Modified
 

  • SMF 2.0.19 | SMF © 2017, Simple Machines
  • XHTML
  • RSS
  • WAP2