GithubHelp home page GithubHelp logo

jonathanheilmann / ext-jh_opengraphprotocol Goto Github PK

View Code? Open in Web Editor NEW
5.0 5.0 15.0 429 KB

Open Graph protocol - Adds the Open Graph protocol properties in meta-tags to the html-header and supports multilanguage-websites.

License: GNU General Public License v2.0

PHP 87.93% HTML 12.07%

ext-jh_opengraphprotocol's People

Contributors

jonathanheilmann avatar kersten avatar olegsv avatar tobenschmidt avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

ext-jh_opengraphprotocol's Issues

Enhance documentation

Mindestens zwei Umstände haben mich gehindert, dass ich das Template finde:

  1. Typo3 hat TypoScript-Templates und die HTML-Templates, das im
    TS-Template eingebunden wird
  2. Die Anleitung ist mit Rücksicht auf 1) nicht ganz eindeutig*. ich
    rege an, dass du hier
    http://docs.typo3.org/typo3cms/extensions/jh_opengraphprotocol/ExtOpenGraphProtocol/UsersManual/In> stallationAndGettingStarted/Index.html
    ergänzt:
    include im menu "Template > (Vollständigen Template-Datensatz
    bearbeiten) > Include > " static template > For TYPO3 CMS installations
    version <= 4.7 use template “Open Graph protocol v0.3.0”

Compatible with 7.6.0?

It seems to me that only the backend works with 7.6.0, but none of the information is written into the HTML.

Forge-Bug #66814: Wrong locale Output

$GLOBALS['TSFE']->tmpl->setup['config.']['locale_all']
Diese TSFE Funktion gibt zum Beispiel en-GB aus für die Weitergabe zu og:locale, aber laut Facebook Debugger muss es für og:locale en_GB sein.

Bitte implementiere eine einfache replace-Function von - zu _.
Ich habe dies bereits direkt in der Ext bei mir getan.

Non realURL urls rendered/generated

If the first and cached page-request is done without a realURL url, the query is cached and used for any further request.
It's preferred to generate a realURL url instead

Zip still contains bug #48

Hello,

while I was downloading and installing the plugin from TER manually, I stumbled over the bug #48. In the zip-file from TER and on the release-page in jh_opengraphprotocol_1.2.5.zip the bug still exists.

jh_opengraphprotocol bei URL's mit Minus-Zeichen

Unter http://sprechrun.de/web21/index.php?id=3588 und http://nmop.sprechrun.de/index.php?id=3588 werden die OG Meta-Tags generiert, unter http://neue-medienordnung-plus.sprechrun.de/index.php?id=3588 jedoch nicht.

Kannst du ausschließen, dass die Ursache für das oben beschriebene Verhalten ist, dass die Erweiterung jh_opengraphprotocol nicht in der Lage ist die URL mit Minus-Zeichen in der Subdomain der URL neue-medienordnung-plus.sprechrun.de zu verarbeiten? Hast du evtl. ein Beispiel einer URL mit Minus-Zeichen in der Subdomain, in der mit der Erweiterung jh_opengraphprotocol die OG Meta-Tags generiert sind?

Beispiel: In der Webseite http://nmop.sprechrun.de werden auch keine OG Meta-Tags generiert. Dafür in der Webseite http://nmop.sprechrun.de/index.php?id=3588 .

Error 500 on update

Hello!

We've updated from 1.2 to 1.3 and our site crashed with an error 500. After debugging the file jh_opengraphprotocol/Classes/Service/OgRendererService.php, I've changed several lines to make it work again (all meta tags are correctly inserted now)

My system crached on lines 81, 82 because the class names were not encased in ':
line 81: if (class_exists(\Heilmann\JhOpengraphTtnews\Hooks\DisplaySingle::class)) (not working)
line 81: if (class_exists('\Heilmann\JhOpengraphTtnews\Hooks\DisplaySingle::class')) (working)
line 82: $hookObject = GeneralUtility::makeInstance(\Heilmann\JhOpengraphTtnews\Hooks\DisplaySingle::class); (not working)
line 82: $hookObject = GeneralUtility::makeInstance('\Heilmann\JhOpengraphTtnews\Hooks\DisplaySingle::class'); (working)

My system crached also on line 102:
line 102: $fileRepository = GeneralUtility::makeInstance(FileRepository::class); (not working)
line 102 from version 1.2.1: $fileRepository = GeneralUtility::makeInstance('TYPO3\CMS\Core\Resource\FileRepository'); (working)

Finaly my system was not able to use the new version of the get url so I changed that section with the one from the 1.2.6 version:
version 1.3 (not working):
// Get url
/** @var \TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer $cObj */
$cObj = $objectManager->get('\TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::class');
$additionalParams = GeneralUtility::_GET();
if (GeneralUtility::_GP('L'))
$additionalParams['L'] = (int)GeneralUtility::_GP('L');
unset($additionalParams['id']);
$lConf = [
'additionalParams' => '&' . GeneralUtility::implodeArrayForUrl('', $additionalParams),
'parameter' => $GLOBALS['TSFE']->id
];
$og['url'] = htmlentities($cObj->typoLink_URL($lConf));
version 1.3 (working):
// Get url
$og['url'] = htmlentities(GeneralUtility::getIndpEnv('TYPO3_REQUEST_URL'));

Our site is using TYPO3 6.2.31 and the PHP version is 5.4.16.

Am I the only one with those problems? Is my setup the cause?

Thank you for your help!

Éric Thibault

Image width and height is 0

In some cases (don't know why) the image width and height via FileReference-record is 0.

As 0 is a bad value to be submitted to facebook etc, try to fetch the width and height manually and store it in sys_file_metadata if it's greater than 0.

TYPO3 8 and mergeIfNotBlank Problem

Since TYPO3 8.6 the TCA l10n_mode is removed:
https://docs.typo3.org/typo3cms/extensions/core/Changelog/8.6/Breaking-79243-RemoveL10n_modeMergeIfNotBlank.html

Now, if you look into configuration, all l10n_mode values are removed by TYPO3. The IF in OgRednererService will not work any more:

if (isset($GLOBALS['TCA']['pages_language_overlay']['columns']['tx_jhopengraphprotocol_ogfalimages']['l10n_mode']) && $GLOBALS['TCA']['pages_language_overlay']['columns']['tx_jhopengraphprotocol_ogfalimages']['l10n_mode'] === 'mergeIfNotBlank')

You can check the settings of the EXTCONF instead (basic.languageOverlay.tx_jhopengraphprotocol_ogfalimages.mergeIfNotBlank).

max character limit of the OG:description tag

The max character limit of the OG:description tag is set to 100 at the moment.
So there are no clear rules to this, 100 seems a bit short to me. Could you enhance the value? I read 160-300 are recommended.

Add prefix og: http://ogp.me/ns#

Hi Jonathan

The Open Graph Protocol (http://ogp.me/) requires the prefix for "og" to be set (Although most clients do not care).
It would be great if you could add this to the extension in order to respect the standard and ensure that all clients following the standard do work.

I am not sure however what's the best way to do so. For our site I just added the attribute to htmlTag_setParams.

config.htmlTag_setParams = prefix="og: http://ogp.me/ns#"

But I would not add this to the extensions TypoScript, since it overwrites existing attributes. We could however add this to the documentation.

The second possibility would be to add the prefix to all attributes, that would not require the administrators to add anything to their TypoScript setup.

<meta property="http://ogp.me/ns#type" content="website" />

What do you think?

Add composer.json

I know a different issue but, would you mind to add a composer.json that people are able to install it in a composer mode typo3 without using ter composer repository?

Locale not conform

If config.locale_all finishes with a charset like UTF8, the locale is not conform to opg roles.
=> Trimexplode at dot and use first part of array.

Not localized og tag on FE

Hi I'm using the ext on multilingual website and when is the og:title field filled, the value is propagated to other languages and I'm unable to change it.

Example:
Main language is DE. og:title = Custom OG title.
Second language is EN, og:title is left blank so it should display EN page title (is it correct assumption?), but the DE og:title is shown. So I'm trying to override it with EN og:title but with no luck => again the DE og:title is shown.

I'm sorry if I overlooked something.

og:image:secure_url

Hi,
it seems that Facebook has a problem if og:images have a https:// url. In my case the whole page is everytime redirecting to http, so I can't set a http URL. I read about the og:image:secure_url Tag, maybe you could add it? Would be very nice!
Best regards,
Michaela

absolute URL for "og:url"

used versions:
jh_opengraphprotocol => version 1.3.0
realurl => version 2.3.0

Current source code output on our page (only relative path):
<meta property="og:url" content="/test-url/" />

Should not be an absolute path?
<meta property="og:url" content="https://www.test-domain.test/test-url/" />

Use "forceAbsoluteUrl" for generating links with "typoLink_URL" or do you use a different reaurl configuration?

Error after installation

TYPO3 7.6.10

I have this error just after installation

Argument 1 passed to TYPO3\CMS\Core\Utility\GeneralUtility::removeDotsFromTS() must be of the type array, boolean given, called in typo3conf/ext/jh_opengraphprotocol/ext_tables.php on line 6

This code fix the problem :

// Get extension configuration
if (isset($GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf'][$_EXTKEY])){
   $extConf = \TYPO3\CMS\Core\Utility\GeneralUtility::removeDotsFromTS(unserialize($GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf'][$_EXTKEY])); 
}

Forge-Suggestion #66708: Add newline after each tag

In OgRendererService.php : renderHeaderLines() the opengraph tags are concatenated with "$res .= '';" Wouldn't be nicer if the tags would be merged in an array and imploded with a newline for output?

eg.:

  • $res[] = '';
  • return implode(chr(10),$res);

Error after including static template “Open Graph protocol”

I get the following error after including static template “Open Graph protocol” :

Core: Error handler (BE): PHP Warning: vsprintf(): Too few arguments in /var/www/typopro/typo3_src-6.2.25/typo3/sysext/belog/Classes/ViewHelpers/FormatDetailsViewHelper.php line 44

In the frontend, I get a HTTP 500 Internal Server Error.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.