Closed hertsch closed 10 years ago
We have BlackNews.
I don't like Core extensions for special modules. Next one needs it for module X, then module Y...
Better way would be to offer an API or something, similar to Droplets(Extension) and Search, where modules can register their specialized methods if needed.
So BlackNews should be supported.
I agree with you that an API will be the better way - we should discuss and find a solution, TOPICS needs the Open Graph support!
Maybe a new helper or something. Let's discuss this via Skype.
ok.
Option:
A module may have a script named getfirstimage.php
(or something), similar to search.php
, having a function <Modulename>_getFirstImageFromContent()
. The script is included automatically if available, the method is called automatically then. Result is an URI.
In my opionion this option is not thought out. The CMS should support Open Graph for the active social sharing and therefore the CMS by itself need a function getFirstImageFromContent()
which should be able to extract the first image from the content or to deliver a default image (i.e. the website logo) - something like the Open Graph Pattern in the TemplateTools.
The module should support the Open Graph Interface of the CMS and perhaps have a script like opengraph.php
which can deliver the image, title, description and canonical link.
Anyway, there have to be methods to get the image from the content, which depends on the module. (DB table / row etc.)
That's what I had mean - but don't think only at the image ... 8-)
... PageImage
Just the first step. ;)
Idea: To give the option to add the function to any module (old WB modules etc.), there could be an Admin Tool similar to Droplets that lets the admin add the code and/or import it from a repository provided by us. The Admin Tool would write the script and store the code into the DB, too.
In addition, we create a Open Graph interface (helper) that uses this scripts/code, but of course, other modules can use it, too.
Question: How to call the Open Graph interface? (PAGE_URL[?&]opengraph=1 or something?
The Open Graph Interface must be called before setting the page title, description and keywords because OG may change them. I think the best place is the template header and the OG Interface must check for modules which are active at the page and call them before they are delivering content. Modules like Bakery will also need all POST and GET parameters.
I'm handling OG (and headers) in two different ways:
I needed some time to get this working smooth and SEO like ... perhaps I should write this Interface for BC?
I would be happy if you did. :) I can implement the getfirst...
-Script-Part and the Admin Tool and prepare the extensions repository.
Destination core version 1.1.
ok !
We will focus this in BC v1.2, where we are going to add more page options and allow enhanced template options. There already is an admin tool that allows to add getfirst* functions to old modules, but there's no need to install it at the moment, as the additional script will not be used.
I close this issue now, as we have the OpenGraph support on our roadmap.
At the moment
getFirstImageFromContent()
check onlyWYSIWYG
and does not support NEWS and TOPICS.Because TOPICS are compatible to BC it should be supported.
What is about a NEWS addon for BC, I think it is needed ... there will come a solution based on extendedWYSIWYG and/or kitFramework but not within the next time.