around line 123 in opengraph_meta.common.inc should do the trick. Somewhat obviously, you will also need to have a CCK text field called description, too :) For more elegance, you could cascade this more, eg, check if there is a CCK field called description, use that, if not, check the body, if not, use the title, but for a dull ax approach, the above should work :)
Jim
(also, it is all on one line, no breaks between the ]['s)
I think that ideally, for each content type you'd be able to select the CCK field which should be used to generate the description. Will try and take a look at this when I get time.
Ok guys, I've added something in the latest 6.x-1.x dev release. If you have CCK and the Text module enabled (this is what allows you to add CCK text fields) then you should see a section on the settings page titled "How to generate og:description for each content type". Note that only content types which have additional CCK text fields will be shown in there. If a node doesn't have a value set for the CCK field chosen for its content type then the logic falls back to using the value in the node body, and if that's not set, the node title. So this change is backwards compatible with existing functionality.
Quick questions. All is good in the head as the og-title is showing correctly however on Facebook the description is still the title. I implemented this last night and have cleared my Drupal caches and also added some new Facebook likes today. Did I miss anything?
Comments
Comment #1
Annie Rothenberg commented+1 for this!
Comment #2
jimajamma commentedChanging
to
around line 123 in opengraph_meta.common.inc should do the trick. Somewhat obviously, you will also need to have a CCK text field called description, too :) For more elegance, you could cascade this more, eg, check if there is a CCK field called description, use that, if not, check the body, if not, use the title, but for a dull ax approach, the above should work :)
Jim
(also, it is all on one line, no breaks between the ]['s)
Comment #3
hiddentao commentedI think that ideally, for each content type you'd be able to select the CCK field which should be used to generate the description. Will try and take a look at this when I get time.
Comment #4
lord_of_freaks commented+1
Comment #5
hiddentao commentedComment #6
hiddentao commented+1 from #1134642: OG Description not working without Node Body
Comment #7
glynster commentedPerfect this is exactly what we need.
For now this hack will do the trick :)
Comment #8
glynster commentedHow far off would this feature be? In the coming days, weeks or month?
Comment #9
hiddentao commentedOk guys, I've added something in the latest 6.x-1.x dev release. If you have CCK and the Text module enabled (this is what allows you to add CCK text fields) then you should see a section on the settings page titled "How to generate og:description for each content type". Note that only content types which have additional CCK text fields will be shown in there. If a node doesn't have a value set for the CCK field chosen for its content type then the logic falls back to using the value in the node body, and if that's not set, the node title. So this change is backwards compatible with existing functionality.
Please have a play and let me know if it works.
Comment #10
glynster commentedPerfect. Just what we all needed I believe. This is a great help. Thank you for the speed and support.
Comment #11
glynster commentedQuick questions. All is good in the head as the og-title is showing correctly however on Facebook the description is still the title. I implemented this last night and have cleared my Drupal caches and also added some new Facebook likes today. Did I miss anything?
Comment #12
glynster commentedOK no completely wrong please ignore me my tests were incorrect.
Comment #13
glynster commentedComment #14
cateye commentedI really need this feature for D7.