Comments (4)
There is no variable, unfortunately. You'd have to change code for that (meta.php).
I currently have no plans to support open graph, twitter cards, etc., they have a lot more options, it might be better to handle those in a separate addon.
from mybb-google-seo.
Thank you for the reply, I appreciate that.
Dammit, was hoping I can somehow hook into this:
function google_seo_meta_description($description)
{
global $settings, $plugins, $google_seo_meta;
if($settings['google_seo_meta_length'] > 0)
{
$description = strip_tags($description);
$description = str_replace(" ", " ", $description);
$description = preg_replace("/\\[[^\\]]+\\]/u", "", $description);
$description = preg_replace("/\\s+/u", " ", $description);
$description = trim($description);
$description = my_substr($description, 0, $settings['google_seo_meta_length'], true);
$description = trim($description);
if($description)
{
$plugins->add_hook('pre_output_page', 'google_seo_meta_output');
$google_seo_meta = "<meta name=\"description\" content=\"{$description}\" />\n{$google_seo_meta}";
}
}
}
What I currently did is add all the social meta tags on the site in the headerinclude I am able to dynamically populate the title for each meta tag, it's just the description that is missing a hook.
from mybb-google-seo.
You can change that code:
$google_seo_meta = "<meta name=\"description\" content=\"{$description}\" />\n
to add another meta description tag using the same $description.
from mybb-google-seo.
Smart!
Did not think of that... Might build all the Open Graph Tags into that variable...
from mybb-google-seo.
Related Issues (20)
- Move post option not working with Google SEO URLs enabled HOT 7
- Not compatible with PHP 7 HOT 1
- Redirection of links due to forum migration? HOT 5
- Not compatible with PHP 7.*? HOT 11
- Changing meta description for threads? HOT 4
- URL Scheme keeps switching
- Poor PostgreSQL Compatibility HOT 4
- How to make it add rel canonical tag to index.php?
- 404 widget removal or replacement
- Redirection problem HOT 1
- 404 Chinese Website HOT 1
- google bot noindex problem HOT 9
- multipage() workaround improvements
- Error 404 is not working on Windows Server 2019 HOT 3
- No sitemap
- Sitemap could not be read
- Allow for default meta description for the frontpage?
- Warnings in ACP->Config->Plugins (Warning [2] Illegal string offset) HOT 1
- Custom 404 page feature?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mybb-google-seo.