BlackCatDevelopment / BlackCatCMS

BlackCat CMS is a PHP5, HTML5 content management system
https://blackcat-cms.org
Other
11 stars 9 forks source link

Missing Support for NEWS and TOPICS in Droplet.php #201

Closed hertsch closed 10 years ago

hertsch commented 10 years ago

At the moment getFirstImageFromContent() check only WYSIWYG 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.

webbird commented 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.

hertsch commented 10 years ago

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!

webbird commented 10 years ago

Maybe a new helper or something. Let's discuss this via Skype.

hertsch commented 10 years ago

ok.

webbird commented 10 years ago

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.

hertsch commented 10 years ago

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.

webbird commented 10 years ago

Anyway, there have to be methods to get the image from the content, which depends on the module. (DB table / row etc.)

hertsch commented 10 years ago

That's what I had mean - but don't think only at the image ... 8-) ... PageImage

webbird commented 10 years ago

Just the first step. ;)

webbird commented 10 years ago

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?

hertsch commented 10 years ago

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?

webbird commented 10 years ago

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.

hertsch commented 10 years ago

ok !

webbird commented 10 years ago

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.