Tuszu VIP
Total posts: 128
05 Апр 2014 20:59

Hi! Is there any posibility to share content from record base on Cobalt? I want to share only a specific record, subpage, not the website.

Последние изменения: 12 Июнь 2021


Sergey
Total posts: 13,748
07 Апр 2014 07:21

Share to where? Facebook? I think simple share it module will make it.


pepperstreet VIP
Total posts: 3,837
07 Апр 2014 16:59

FYI - there are also 2 commercial extensions that can auto-post Cobalt records to social networks.


Tuszu VIP
Total posts: 128
09 Апр 2014 23:58

Sergey Share to where? Facebook? I think simple share it module will make it.

What module do you mean?

If I have 10 records in one page (blog display), I want to display 10 share button. Each of the buttons below the record. And when user click the share button below the first record, he share only URL from first record, not the home page.

How to do it? Is Your extension obSocialSubmit can do it exactly as I describe?


pepperstreet VIP
Total posts: 3,837
10 Апр 2014 02:24

Tuszu obSocialSubmit can do it exactly as I describe?

The mentioned extensions are for automatic posting. Not for sharing by site visiters. Sorry, I did not want to confuse you.

If you want to add sharing buttons, you might have a look at the JED category -> Social Share -> Multi-Share. Maybe use JED advanced search in that category and limit to "plugin" "free".


Tuszu VIP
Total posts: 128
13 Апр 2014 08:47

Ok. Sergey, can you say Your opinion about my problem?


pepperstreet VIP
Total posts: 3,837
14 Апр 2014 01:07

pepperstreet If you want to add sharing buttons, you might have a look at the JED category -> Social Share -> Multi-Share. Maybe use JED advanced search in that category and limit to "plugin" "free".

Most (free) plugin solutions seem to work on full article view or consider the current page URL. So, you might look at commercial solutions as well, or at least something that has a programatic approach (API, javascript, Content plugin with URL parameters)... i guess, that is the only way to make it work on a list view with multiple items, where you want to catch each single article's title and URL. In other words: Share a specific link. e.g.:


Sergey
Total posts: 13,748
14 Апр 2014 14:11

You can insert custom addthis code to template.


Tuszu VIP
Total posts: 128
01 Май 2014 23:01

@Sergey, Addthis let me only share the current page, not specific record. I want to make the system "Share" like on the http://elohell.net/ If You click "Share" on Home Page, You share the current record.


Sergey
Total posts: 13,748
02 Май 2014 03:39

But when people see this share in the FB for example, they click the link and go to the page with article not to article. So fo social share it does not matters, you actualy share the link where your article is located.


andiamine VIP
Total posts: 295
02 Май 2014 14:44

Hi my friend you can add addthis code, but you will have a problem with fb like button, don't share exact record content, so here solution

1 - First:

add addthis code to your record template.

2 - add FB Open Graph code : (here exemple)

// Function Load Open graph feature in doc head
function openg($url,$title,$desc,$img_url,$type){
$desc = strip_tags($desc);
$config = JFactory::getConfig();
$url ='http://'.$_SERVER['HTTP_HOST'].$url;
$img_furl ='http://'.$_SERVER['HTTP_HOST'].$img_url;
$og = '<meta property="og:type" content="'.$type.'" />'.
'<meta property="og:url" content="'.$url.'" />'.
'<meta property="og:site_name" content="'.$config->get('sitename').'"/>'.
'<meta property="og:title" content="'.$title.'" />'.
'<meta property="og:description" content="'.$desc.'"/>'.
'<meta property="og:image" content="'.$img_furl.'" />';
$document = JFactory::getDocument();
$document->addCustomTag($og);
}

and then call your function and don't forget to pass params, here exemple:

// extract picture field link only
preg_match('/<img .*src=["|\']([^"|\']+)/i',$item->fields_by_key[$params->get('tmpl_params.picture_field')]->result,$img_url);
// call openg function
openg(JRoute::_($item->url),$item->title,$item->fields_by_key[$params->get('tmpl_params.post_field')]->result,$img_url[1],'blog');

3 - install this plugin and enable it :) and enjoy !

plg_jfb-opentag_v1.0

this solution already added in all my packs published in mintjoomla depot, hope this help.

ps: this solution tested only in cobatl8 and joomla3, i don't know if works fine in joomla! 2.5 and cobalt 7 Regards, ANDI


pepperstreet VIP
Total posts: 3,837
02 Май 2014 17:32

andiamine

Hey Andi, what a fast reaction to my email ;) Thanks for chipping in here.


andiamine VIP
Total posts: 295
02 Май 2014 18:33

pepperstreet

andiamine

Hey Andi, what a fast reaction to my email ;) Thanks for chipping in here.

Yep i love Cobalt cck and i want help cobalt users :D


Tuszu VIP
Total posts: 128
08 Май 2014 17:40

Hi! OK, very thanks for Your help, but I still need little help.

1) First of all which addthis plugin are you mean? In your website there is "Inline sharing buttons", "Follow inline horizontal buttons" and other plugins. Which was the best?

2) Where can I add your function from 2 point?

3) And your method let me share picture, specific page (like on elohell.net) or what?

Thanks in advance!


Tuszu VIP
Total posts: 128
09 Май 2014 21:37

Hi! I very need answer to my question. Please help me with this.

Thanks in advance!


Giorgi625 VIP
Total posts: 655
03 Дек 2020 13:21

Tuszu Hi! Is there any posibility to share content from record base on Cobalt? I want to share only a specific record, subpage, not the website.

Hello I am using https://sharethis.com or https://www.addthis.com

You can simply insert their embed code into record template's end after all content is shown and it will add share buttons which you can customize on their site.

Работает на Cobalt