lonalore / metatag Goto Github PK
View Code? Open in Web Editor NEWe107 (v2) plugin - This plugin allows you to automatically provide structured metadata, aka "meta tags", about a website.
License: GNU General Public License v3.0
e107 (v2) plugin - This plugin allows you to automatically provide structured metadata, aka "meta tags", about a website.
License: GNU General Public License v3.0
Hi, I noticed this with images (if they are missing)
you are caching
cid is f.e. site/e107_media/999/images/2019-06/preview_frontend_.png
and
entity type metatag_default
title page (meta tag valur) is "Error"
if I set redirection to the system not found page
cached URL is (at least it's only one, not one recored for each missing image)
/site/?route=system/error/404&type=routeError
Is this correct behaviour?
Thanks
I know you are working on it, but there was similar problem before, so maybe this is related to core.
Installed latest version, run update to 1.6.
#0 e_array->unserialize() called at [***\e107_handlers\e107_class.php:1791]
#1 e107::unserialize() called at [***\e107_plugins\metatag\includes\metatag.class.php:2957]
#2 metatag->getDefaultMetaTagsByType() called at [***\e107_plugins\metatag\includes\metatag.class.php:2865]
$data:
$data = array (
'title' => '',
'description' => '',
'abstract' => '',
'keywords' => '',
'news_keywords' => '',
'standout' => '',
'rating' => '',
'referrer' => '',
'generator' => '',
'rights' => '',
'image_src' => '',
'canonical' => '',
'shortlink' => '',
'publisher' => '',
'author' => '',
'original-source' => '',
'prev' => '',
'next' => '',
'geo.position' => '',
'geo.placename' => '',
'geo.region' => '',
'icbm' => '',
'refresh' => '',
'og:site_name' => '',
'og:type' => '',
'og:url' => '',
'og:title' => '',
'og:determiner' => '',
'og:description' => '',
'og:updated_time' => '',
'og:see_also' => '',
'og:image' => '',
'og:image:url' => '',
'og:image:secure_url' => '',
'og:image:type' => '',
'og:image:width' => '',
'og:image:height' => '',
'og:latitude' => '',
'og:longitude' => '',
'og:street_address' => '',
'og:locality' => '',
'og:region' => '',
'og:postal_code' => '',
'og:country_name' => '',
'og:email' => '',
'og:phone_number' => '',
'og:fax_number' => '',
'og:locale' => '',
'og:locale:alternate' => '',
'article:author' => '',
'article:publisher' => '',
'article:section' => '',
'article:tag' => '',
'article:published_time' => '',
'article:modified_time' => '',
'article:expiration_time' => '',
'profile:first_name' => '',
'profile:last_name' => '',
'profile:username' => 'admin',
'profile:gender' => '',
'og:audio' => '',
'og:audio:secure_url' => '',
'og:audio:type' => '',
'book:author' => '',
'book:isbn' => '',
'book:release_date' => '',
'book:tag' => '',
'og:video:url' => '',
'og:video:secure_url' => '',
'og:video:width' => '',
'og:video:height' => '',
'og:video:type' => '',
'video:actor' => '',
'video:actor:role' => '',
'video:director' => '',
'video:writer' => '',
'video:duration' => '',
'video:release_date' => '',
'video:tag' => '',
'video:series' => '',
'fb:admins' => '',
'fb:app_id' => '',
'twitter:card' => '',
'twitter:site:id' => '',
'twitter:creator' => '',
'twitter:creator:id' => '',
'twitter:url' => '',
'twitter:title' => '',
'twitter:description' => '',
'twitter:image' => '',
'twitter:image:width' => '',
'twitter:image:height' => '',
'twitter:image:alt' => '',
'twitter:image0' => '',
'twitter:image1' => '',
'twitter:image2' => '',
'twitter:image3' => '',
'twitter:player' => '',
'twitter:player:width' => '',
'twitter:player:height' => '',
'twitter:player:stream' => '',
'twitter:player:stream:content_type' => '',
'twitter:app:country' => '',
'twitter:app:name:iphone' => '',
'twitter:app:id:iphone' => '',
'twitter:app:url:iphone' => '',
'twitter:app:name:ipad' => '',
'twitter:app:id:ipad' => '',
'twitter:app:url:ipad' => '',
'twitter:app:name:googleplay' => '',
'twitter:app:id:googleplay' => '',
'twitter:app:url:googleplay' => '',
'twitter:label1' => '',
'twitter:data1' => '',
'twitter:label2' => '',
'twitter:data2' => '',
'dcterms.title' => '',
'dcterms.creator' => '',
'dcterms.subject' => '',
'dcterms.description' => '',
'dcterms.publisher' => '',
'dcterms.contributor' => '',
'dcterms.date' => '',
'dcterms.type' => '',
'dcterms.format' => '',
'dcterms.identifier' => '',
'dcterms.source' => '',
'dcterms.language' => '',
'dcterms.relation' => '',
'dcterms.coverage' => '',
'dcterms.rights' => '',
'itemprop:name' => '',
'itemprop:description' => '',
'itemprop:image' => '',
);
PATH: /e107_plugins/download/admin_download.php?mode=main&action=list
Just for confirmation. I can change only token
and default
keys. No Name and Tabs. Just to know what to else check.
EDIT: working for tabs
At first - thank you for this plugin.
But I missing its features on contact page. There is not either default og::image tag. Or maybe I just doing something wrong.
Hi, just from curiosity.
When you are replacing tokens (in the method preProcessMetaTags() and then replaceTokens() , you are going for each value through all tokens.
F.e. for {news:title}
you are going through all news tokens , but you can find right token without loop.
After removing parentheses $value is the direct key of the token.
$string = substr($value, 1, -1);
- result: news:title
$tokens = $config[$entity_type]['token'][$string]
I am just curious if I am right or I am missing something. With caching it's quick enough.
Just note, that this field is bbarea type so there could be not needed characters there - bbcodes and html codes.
Just report, there were changes in core I think.
Declaration of metatag_admin_ui::beforeUpdate($new_data, $old_data) should be compatible with e_admin_ui::beforeUpdate($new_data, $old_data, $id), Line 218 of G:\php72\htdocs\***\e107_plugins\metatag\admin_config.php
Disable core "Meta Tags" when Metatag plugin is installed, because it results duplicated meta tags.
Download category can be paginated.
Default for url (canonical, og:url) is e_SELF
/**
* Returns with the current URL.
*/
function metatag_global_token_site_current_page_url()
{
return defset('e_SELF', '');
}
But each page have different url
for example (you got this url when you click on pagination under list)
/download/category/6/stuff-in-development/?order=id&sort=desc&view=3&from=6
is different that
/download/category/6/stuff-in-development/
but e_SELF returns /download/category/6/stuff-in-development/
for all pages.
e_REQUEST_URL would be probably a better idea
It's because this test:
function metatag_entity_news_list_detect()
{
$page = defset('e_PAGE', '');
$query = defset('e_QUERY', '');
if($page == 'news.php' && empty($query))
{
return true;
}
return false;
}
But values for news list are (query is not empty):
e_PAGE news.php
e_QUERY default.0.0 or e_QUERY default.0.6
I didn't install this plugin, I just got site where it's installed to install theme. And I got this message:
Parse error: syntax error, unexpected '[' in xxx/e107_plugins/metatag/includes/metatag.page.php on line 184
only on pages, homepage and news works
that line looks like this:
return $date->convert_date(['page']['page_datestamp'], 'short');
Hi,
you are using: name="canonical"
correct using is with <link rel="canonical"
Here is discussion about it - about drupal module, it should be fixed there too.
https://moz.com/community/q/meta-name-canonical-content-url-usage-instead-of-link-rel
Canonical URL is a very important tag nowadays. I would like to have it in basic tags to see it at first look.
Explanation: I am trying to avoid any changes in your code, but this is important for me.
Installed today on e107 site and even though I have changed on Global and Front Page tags to be {site:name} only, it still doen't change the title bar. Still reads PageTitle - SiteName
Thanks
Hi, I am trying to find the solution on how to use your plugin without any code changes or without creating a new plugin for this.
What I am trying to do:
for
$config['download-category']
add new token if plugin is installed
'download:category:canonical' => array(
'help' => 'Canonical url',
'handler' => 'metatag_entity_download_category_token_canurl',
'file' => '{e_PLUGIN}jmdownload/includes/metatag.canonical.php',
),
and change default
'default' => array(
'og:canonical' => '{download:category:canonical}',
)
I have working solution with jmdownload plugin where I have my own browser of download categories with new event "jmdownload-category"
I could:
to require with jmcanonical plugin to install jmdownload, but I dislike this. That plugin is the only solution for missing core functionality and it's planned to remove it during the time. It's a personal solution, it's not shared.
I tried to add e_metatag and e_event and tokens to jmcanonical plugin, but it was ignored. Or I did it the wrong way.
Is possible override/change settings for e_metatag with another plugin? I think it depends on the order of loading addons. the metatag is after jmcanonical and so it's config is used.
Any ideas? Thanks
After new installation (deleting tables)
There is the database error:
SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'data' cannot be null
[PREPARE] => INSERT INTO e107jm_metatag_default (
name,
type,
parent,
data) VALUES (:name, :type, :parent, :data)
My guess is that it's because using serialize - database field can't be null in that case. Normally there would be for empty value saved with json_encode() some text, but e107 version is saving null data.
I run to this problem some days ago and discussed on gitter.
this is solution:
there is more, you can find it around that datetime in main room
Hi,
I want to use global setting for plugin I am working on (first option). I have set:
{site:current-page:title} | {site:name}
that value is from
$page_name = defset('PAGE_NAME', '');
return defset('e_PAGETITLE', $page_name);
I have set it in e_header.php of that plugin, I see filled <title> tag of page (probably core thing)
but this tag is not filled:
<meta content=" | sitename" name="title" />
Thanks
Hi there @lonalore Can you please update your metatag plugin to allow for customization of the meta tags for download categories?
I would greatly appreciate it. I would be willing to send you some money for your time.
Thanks!
Not sure how g+ for business work but normal g+ is not existing more
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.