Hi all.
Im trying to add open graph protocol meta og:image to brilliant gallery images. I have a problem with cache and I'm thinking I did it wrong, so I expose it to community in order to give an idea and take some help. At this moment, sometimes you could see the "meta-tags" in header, but sometimes not.

I'm add in a couple lines in gallery_showtime.inc. Maybe it´s not the correct place to insert this code (line 592):

$result .= drupal_add_html_head(array(
          '#tag' => 'meta',
          '#attributes' => array(
            'property' => 'og:image',
            'content' => $imgsrc,
          ),
        ), 'node_' . $retval[$poct - 1] . '_og_image');

Any ideas? Can somebody help me and give an option to brilliant gallery users?

Thanks in advance

Comments

drpchris’s picture

Looks like you've got the call to drupal_add_html_head() correct, but the function doesn't return HTML, so you don't want to concat it into the $result string. Maybe just try without the $result .= in front of it. Not sure where else you could put (other than in the render_brilliant_gallery() function) if you want to put the image details in the header.

ddaniel.gomez’s picture

Thank you, drpchris. I´ll test your suggestion. I'm a little bit lost in this task. Hope finally find the solution.
Regards,

ddaniel.gomez’s picture

Hi again.
Well, I can't found solution yet. I tested the drpchris' suggestion, but it doesn't work for me.
Hope somebody gives any idea to solve it!

Thanks,