Kunena 6.3.7 Released

The Kunena team has announce the arrival of Kunena 6.3.7 [K 6.3.7] in stable which is now available for download as a native Joomla extension for J! 4.4.x/5.0.x/5.1.x/5.2.x. This version addresses most of the issues that were discovered in K 6.2 / K 6.3 and issues discovered during the last development stages of K 6.3
Note: Please go to the Kunena Dashboard after an upgrade so that the Kunena database tables are also updated.

Please note: The Kunena project team takes NO responsibility for maintaining nor supporting anything in this category.

Solved SOLVED: Open Graph for image with og:image and image_src

  • Trony
  • Trony's Avatar Topic Author
  • Offline
  • Junior Member
  • Music and Electronic Devices Designer.
More
10 years 2 days ago - 9 years 11 months ago #1 by Trony
Hello, i'm trying to add meta tags as title topic.

In /libraries/kunena/bbcode/bbcode.php at line 1712 i added
Code:
$document = JFactory::getDocument(); $document->addCustomTag( '<link rel="image_src" href="'.$fileurl.'" />'); $document->addCustomTag ('<meta property="og:image" content="'.$fileurl.'" />');

and it's work very well.

The problem is that when i switch from backend Render HTML & BBCode in RSS feeds to Yes, the Rss Feed give me an Error 500.

How can i solve this problem ?!?
Tnx so much for your Tips. :)

Music and Electronic Devices Designer. Drum and Bass Addict. Creative Mind as Lifestyle. Cat in past Life. Soccer, Ice Hockey and Snowboard Lover.

Last edit: 9 years 11 months ago by Trony.

Please Log in or Create an account to join the conversation.

More
10 years 1 day ago #2 by 810
enable kunena debug, and then go back then copy the error here
The following user(s) said Thank You: Trony

Please Log in or Create an account to join the conversation.

  • Trony
  • Trony's Avatar Topic Author
  • Offline
  • Junior Member
  • Music and Electronic Devices Designer.
More
10 years 1 day ago #3 by Trony
Hi, thanks for reply but with Kunena Debug i can't see the error.
There's the screen with report the wrong line and stop. :pinch:

Music and Electronic Devices Designer. Drum and Bass Addict. Creative Mind as Lifestyle. Cat in past Life. Soccer, Ice Hockey and Snowboard Lover.

Please Log in or Create an account to join the conversation.

More
10 years 1 day ago #4 by 810
login as admin. then paste here the error

Please Log in or Create an account to join the conversation.

  • Trony
  • Trony's Avatar Topic Author
  • Offline
  • Junior Member
  • Music and Electronic Devices Designer.
More
10 years 23 hours ago #5 by Trony
Hi. This is the only information from my Kunena Debug. :pinch:


Music and Electronic Devices Designer. Drum and Bass Addict. Creative Mind as Lifestyle. Cat in past Life. Soccer, Ice Hockey and Snowboard Lover.

Attachments:

Please Log in or Create an account to join the conversation.

  • Trony
  • Trony's Avatar Topic Author
  • Offline
  • Junior Member
  • Music and Electronic Devices Designer.
More
10 years 23 hours ago - 9 years 11 months ago #6 by Trony
Great !!! Now work !!! I changed my code in:
Code:
$document = JFactory::getDocument(); $doctype = $document->getType(); // Only render for HTML output if ($doctype == 'html') { $document->addCustomTag( '<link rel="image_src" href="'.$fileurl.'" />'); $document->addCustomTag ('<meta property="og:image" content="'.$fileurl.'" />'); }

I hope is a good solution for insert in Kunena Topic the og:image and image_src
Anyway, tnx so much for your support. :)

Music and Electronic Devices Designer. Drum and Bass Addict. Creative Mind as Lifestyle. Cat in past Life. Soccer, Ice Hockey and Snowboard Lover.

Last edit: 9 years 11 months ago by Trony.
The following user(s) said Thank You: kenzo

Please Log in or Create an account to join the conversation.

More
9 years 3 weeks ago #7 by kenzo
Hi! Thanks for share with us. Your solution still works? I'm looking for an "Open Graph plugin".
Thanks!

Please Log in or Create an account to join the conversation.

  • Trony
  • Trony's Avatar Topic Author
  • Offline
  • Junior Member
  • Music and Electronic Devices Designer.
More
8 years 11 months ago - 8 years 11 months ago #8 by Trony

kenzo wrote: Hi! Thanks for share with us. Your solution still works? I'm looking for an "Open Graph plugin".
Thanks!


Hello.
Yes it's still work but i changed for Kunena 4.0.7
New file is default.php in:

components -> com_kunena -> template -> system -> layouts -> image
Code:
defined ( '_JEXEC' ) or die (); $document =& JFactory::getDocument();

and at the end of
Code:
</div>
of div class
Code:
<div class="kmsgimage">

Code:
<? $document->addCustomTag( '<link rel="image_src" href="'.$url.'" />'); $document->addCustomTag ('<meta property="og:image" content="'.$url.'" />'); $document->addCustomTag ('<meta name="twitter:image:src" content="'.$url.'" />'); ?> </div>

Music and Electronic Devices Designer. Drum and Bass Addict. Creative Mind as Lifestyle. Cat in past Life. Soccer, Ice Hockey and Snowboard Lover.

Last edit: 8 years 11 months ago by Trony.

Please Log in or Create an account to join the conversation.

More
8 years 1 month ago #9 by Ierofant
Hello!
Please tell me how to make a version 5.0.2

Please Log in or Create an account to join the conversation.

  • Trony
  • Trony's Avatar Topic Author
  • Offline
  • Junior Member
  • Music and Electronic Devices Designer.
More
8 years 1 month ago #10 by Trony

Ierofant wrote: Hello!
Please tell me how to make a version 5.0.2


For 5.0.2 and 5.0.3 you must edit these files in Crypsis Template:

template ► crypsis ► layouts ► attachment ► item ► image.php
Code:
defined('_JEXEC') or die(); $document =& JFactory::getDocument();

at end
Code:
<? $doctype = $document->getType(); // Only render for HTML output if ($doctype == 'html') { $document->addCustomTag('<link rel="image_src" href="'. JURI::base() .$attachment->getUrl().'">'); $document->addCustomTag ('<meta property="og:image" content="'. JURI::base() .$attachment->getUrl().'" />'); $document->addCustomTag ('<meta name="twitter:image:src" content="'. JURI::base() .$attachment->getUrl().'" />'); } ?>


template ► crypsis ► layouts ► bbcode ► image ► default.php
Code:
defined('_JEXEC') or die(); $document =& JFactory::getDocument();

at end
Code:
<? $doctype = $document->getType(); // Only render for HTML output if ($doctype == 'html') { $document->addCustomTag( '<link rel="image_src" href="'.$url.'">'); $document->addCustomTag ('<meta property="og:image" content="'.$url.'" />'); $document->addCustomTag ('<meta name="twitter:image:src" content="'.$url.'" />'); } ?> </div>


Naturally.... BEFORE BACKUP ORIGINALS FILES !!!

Music and Electronic Devices Designer. Drum and Bass Addict. Creative Mind as Lifestyle. Cat in past Life. Soccer, Ice Hockey and Snowboard Lover.

The following user(s) said Thank You: Ierofant

Please Log in or Create an account to join the conversation.

Time to create page: 0.374 seconds