├── .gitignore ├── README.md ├── fields ├── fields.php ├── index.html ├── notextd.php └── video.php ├── forms ├── com_contact.xml ├── com_content.xml ├── com_flexicontent.xml └── index.html ├── img ├── index.html ├── screen-mini.png └── socialmeta-default-image.png ├── index.html ├── js ├── index.html └── jquery.charactercounter.js ├── language ├── en-GB │ ├── en-GB.plg_system_socialmeta.ini │ ├── en-GB.plg_system_socialmeta.sys.ini │ └── index.html ├── fr-FR │ ├── fr-FR.plg_system_socialmeta.ini │ ├── fr-FR.plg_system_socialmeta.sys.ini │ └── index.html ├── index.html └── th-TH │ ├── index.html │ ├── th-TH.plg_system_socialmeta.ini │ └── th-TH.plg_system_socialmeta.sys.ini ├── socialmeta.php ├── socialmeta.xml └── updates ├── index.html └── plg_socialmeta_updates.xml /.gitignore: -------------------------------------------------------------------------------- 1 | # Ignore files from git 2 | 3 | # ._ files (Mac Os X) 4 | ._* 5 | 6 | # .DS_STORE (Mac Os X) 7 | .DS_STORE 8 | 9 | # .swp (Vim) 10 | *.swp 11 | 12 | .idea/ 13 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | # Socialmeta plugin for Joomla! 4 | 5 | Social-meta is a system plugin for Joomla! which creates Facebook [open graph](http://og.me) and Twitter [metadata](https://dev.twitter.com/cards/overview) in the head of the document. The idea is to allow the writer to configure properly the way his article will appear on the streams of the social networks. 6 | 7 | > PLEASE NOTE... 8 | ... that this document as well as the extension are in progress ;-) 9 | 10 | ## Do I need Socialmeta? 11 | 12 | Hummm... Difficult to say, but just let me ask you a simple question first... 13 | 14 | When you share a page of your Joomla! site on Facebook, what do you want to see ? 15 | ----- 16 | ![screenshot of the basic options](http://flexicontent.net/img/socialmeta/post-compare.jpg) 17 | 18 | **If you prefer the second option (right side... just to be sure), you can keep on reading :P** 19 | 20 | 21 | ## Installation 22 | 23 | Download the project zip and install it like any other extension: 24 | - Go to extensions > plugins 25 | - Find System - Socialmeta 26 | - Publish it. 27 | 28 | > IMPORTANT 29 | > **Open and save the configuration of the plugin at least once** - even if you didn't provide any data - to set up automatically some default parameters values and be sure to avoid any PHP notices. 30 | 31 | ## Configuration 32 | 33 | - Go to extensions > plugins 34 | - Find System - Socialmeta 35 | - Open it 36 | 37 | ### Basic 38 | Actually no parameter is really required but if you wish the application to be really efficient, I recommend you to fill up at least the parameters **1, 4 and 6**. 39 | 40 | ![screenshot of the basic options](http://flexicontent.net/img/socialmeta/socialmeta-plugin-basic-conf.jpg) 41 | Figure 1 42 | 43 | 1. **Default's site image** 44 | You can set a default image for any page shared on Facebook except on those set manually with the content plugin. Leave it empty if you don't want to use it. 45 | 46 | 2. **Facebook Application ID** 47 | If you have an Application ID for you site you can put it here. The plugin will generate the meta property. Leave it empty if you don't want to use it. 48 | https://developers.facebook.com/docs/apps/register 49 | Only useful for [Facebook insights](https://www.facebook.com/help/336893449723054/) 50 | 51 | 3. **Admin ID** 52 | Enter the Facebook ID of the user who will be able to access to the sharing stats of the pages. See Facebook insights for more information. 53 | http://findmyfbid.com/ 54 | Only useful for [Facebook insights](https://www.facebook.com/help/336893449723054/) 55 | 56 | 4. **Facebook profile URL** 57 | Enter the user profile URL with the https:// prefix. It will define the default author of your website's. This setting can be overridden for each author in the contact component under the Facebook tab. 58 | 59 | 5. **Facebook page URL** 60 | Enter the user profile URL with the https:// prefix. It will define the publisher of the articles. 61 | 62 | 6. **Twitter @username** 63 | Enter here the twitter @username of your whole site. Enter the Twitter account of a default author/entity to follow. This setting can be overridden for each author in the contact component under the Facebook tab 64 | 65 | 7. **Title limit** 66 | You can modify here the size of the title in the character counter. The accurate setting is 68 today, but this value may change in the future depending on Facebook recommendations. 67 | 68 | 8. **Description limit** 69 | You can modify here the size of the description in the character counter. The accurate setting is 200 today, but this value may change in the future depending on Facebook recommendations. 70 | 71 | ### Components 72 | Here come the explanations about the components tab 73 | 74 | ![screenshot of the advanced options](http://flexicontent.net/img/socialmeta/socialmeta-plugin-components-conf.jpg) 75 | Figure 1bis 76 | 77 | ### Advanced 78 | Don't be scared, there's nothing to do here except if you get some specific compatibility issues. In this particular case this settings will allow you to **disable globally** the creation of **some specific meta**. It may be the case for example if you have some kind of sharing button extension which already creates the fb:app_id meta. 79 | 80 | ![screenshot of the advanced options](http://flexicontent.net/img/socialmeta/socialmeta-plugin-advanced-conf.jpg) 81 | Figure 2 - This screen needs an update 82 | 83 | ## Usage 84 | 85 | ### Automatic mode 86 | The plugin functions automatically pretty good but if you come to this extension, it's probably because you wish to make your post more beautiful and get more impact, right? 87 | That was my purpose too. Thus the automatic mode only serves one purpose: to work the best at it can with the existing articles. 88 | If, for whatever reason, the automatic mode does not produce the result you expect, you can just edit the article and use the manual override. 89 | 90 | #### Meta tags creation: rules and default values 91 | 92 | | Property | Default value | Overridable | 93 | |-------------------------|------------------------------------------------------------------------------------|:-----------:| 94 | | og:site_name | site name from Joomla! global configuration | | 95 | | og:url | the url is generated by the component router | | 96 | | og:locale | the page language | | 97 | | og:type | article overridable by video (website wil be soon available for multi-items views) | yes | 98 | | og:title | will use the 68 first characters of the article title | yes | 99 | | og:description | will use the 200 first characters of the article text | yes | 100 | | og:image | will use the article images. full + html, intro + html, or html (plugin conf.) | yes | 101 | | og:image:width | automatic from og:image | - | 102 | | og:image:height | automatic from og:image | - | 103 | | og:image:type | automatic from og:image | - | 104 | | og:see_also | only available manually (article selector to link related items) | yes | 105 | | og:updated_time | automatic from object table **modified** in ISO8601 | | 106 | | article:author | socialmeta configuration (fig.2-4) overridable in contact view | | 107 | | article:expiration_time | automatic from object table **publish_down** in ISO8601 | | 108 | | article:modified_time | automatic from object table **modified** in ISO8601 | | 109 | | article:published_time | automatic from object table **publish_up** in ISO8601 | | 110 | | article:publisher | socialmeta configuration (fig.2-5) | | 111 | | article:section | automatic from object table **catid** | | 112 | | article:tag | automatic from object table `getItemTags(**id**)` | | 113 | | fb:app_id | socialmeta configuration (fig.2-2) | | 114 | | fb:admins | socialmeta configuration (fig.2-3) | | 115 | | twitter:card | idem og:type (article == summary_large_image) (video == player) | | 116 | | twitter:site | socialmeta configuration (fig.2-6) overridable in contact view | | 117 | 118 | 119 | ### Manual article override 120 | What makes this extension different from other implementations is precisely THIS feature. Socialmeta gives you the ability to override the automatic meta creation by your own input for each article. It gives the author/publisher a total flexibility on the way his content will be rendered on the social networks. 121 | 122 | This is how it looks in the Joomla! article view. 123 | ![screenshot of the article view](http://flexicontent.net/img/socialmeta/socialmeta-article-form.jpg) 124 | Figure 3 125 | 126 | 1. **Image** 127 | The image used when sharing the article on Facebook, Google+ and Twitter. If none is provided the automatic override order is Default image -> HTML of the article (first one) -> intro or full (depending on your configuration) 128 | 1. **Title** 129 | If empty the article title will be used instead 130 | 1. **Description** 131 | If empty the beginning of the article will be used instead (all html tags will be automatically striped) 132 | 1. **Related article** 133 | Add some related resources to try to gain related items from your site under your post in the stream. 134 | 135 | ### Sites with multiple authors 136 | > NOTE: 137 | Before taking any decision on the values you will provide for fig.1-4, fig.1-5, fig.5-1 and fig.5-2, I strongly recommend you the reading of the following articles: [New Open Graph tags for media publishers](https://developers.facebook.com/blog/post/2013/06/19/platform-updates--new-open-graph-tags-for-media-publishers-and-more/) & [Using Author Tags with Facebook Story Previews](http://www.trueanthem.com/blog/using-author-tags-with-facebook-story-previews/) 138 | These articles will help you do decide about your author/publisher strategy. 139 | 140 | If you wish each author to be linked with his publications on the facebook stream you can add his own Facebook profile URL and Twitter @username in the Contact component. 141 | To perform this just create a contact for each user for which you would like to override the general settings. 142 | ![screenshot of the contact creation](http://flexicontent.net/img/socialmeta/socialmeta-contact-form-link.jpg) 143 | Figure 4 144 | 145 | 1. Create a new contact 146 | 1. Give him a name and link it with a existing user (fig.4-1) 147 | 1. Go the social tab (fig.4-2) 148 | 149 | ![screenshot of the contact creation social tab](http://flexicontent.net/img/socialmeta/socialmeta-contact-form-social.jpg) 150 | Figure 5 151 | 152 | 1. Provide Facebook (fig.5-1) and Twitter (fig.5-2) credentials. 153 | _Note that Facebook must be an Url and Twitter a @username_ 154 | 1. Save the new contact. 155 | 156 | > NOTE 157 | > You absolutely don't need to use the contact component except once to do what I said previously. I just use its database table to store the user social profiles. The contact doesn't need to be published. You can even disable the component if you wish ;) 158 | I made this choice to avoid having to create a user plugin which may conflict with other extensions which will also override the user management. 159 | It may change in the future but that's the most reliable solution I found up to now. 160 | 161 | ## Disclaimer 162 | This plugin was created for a friend of mine running a Joomla! website. It was supposed to serve a particular purpose, because IMHO there was a lack on that particular matter. As it could be useful for anyone using Joomla!, we now **try to improve** it and to make it really **generic**. So, be confident, send me suggestions, and we will build together **THE** solution to fix that **once for all** ;) 163 | 164 | ## Known issues and ... todo ;) 165 | - ~~Create parameters to choose the automatic **image creation mode**~~ 166 | - ~~Use **meta description** from the object before using the text field (up to now it is how the description is fetched from the facebook url scrapper)~~ 167 | - Manage **JS errors** of the video properties fetching engine (see fig.3-5) 168 | - no image... 169 | - no description... 170 | - no video data... 171 | - **Creation settings** for visible elements 172 | - ~~Images: use image field or parse html~~ 173 | - og:author (contact view) add or override 174 | - Add twitter:creator or override twitter:site 175 | - Implement **category view** (soon - everything is ready, I just want to cleanup the `onBeforeCompileHead{...}` method) 176 | - Implement **menu component** (soon - everything is ready, I just want to cleanup the `onBeforeCompileHead{...}` method) 177 | - Implement **Google+** as well (soon - I didn't have to study the effects of the markup up to now as I don't often use Google+ myself.) 178 | 179 | ## Limitation 180 | Up to now Socialmeta is only compatible with Joomla articles (com_content) and FLEXIcontent items (com_flexicontent). It only implements 2 objects from the open graph protocol: article and video. 181 | If you are looking for an open graph solution for implementing the product object type to your ecommerce (that would be an extremely wise decision by the way), you should have a further look to the [JED](http://extensions.joomla.org) 182 | 183 | ## Requirements 184 | Joomla! 3+ 185 | 186 | ## Useful ressources 187 | 188 | **Official documents and recommendations** 189 | [The open graph protocol](http://ogp.me/) 190 | [Sharing Best Practices for Websites & Mobile Apps](https://developers.facebook.com/docs/sharing/best-practices) 191 | [The article object](https://developers.facebook.com/docs/reference/opengraph/object-type/article/) 192 | [Twitter cards official documentation](https://dev.twitter.com/cards/overview) 193 | 194 | **Testing tools** 195 | [Open Graph Object debugger](https://developers.facebook.com/tools/debug/og/object/) 196 | [Twitter Card Validator](https://cards-dev.twitter.com/validator) 197 | 198 | **General articles** 199 | [What You Need to Know About Open Graph Meta Tags for Total Facebook and Twitter Mastery](https://blog.kissmetrics.com/open-graph-meta-tags/) 200 | [Increase your Social Impact with OpenGraph – Related Articles](http://wersm.com/increase-your-social-impact-with-opengraph-related-articles/) 201 | [Some meta templates](https://moz.com/blog/meta-data-templates-123) 202 | [New Open Graph tags for media publishers](https://developers.facebook.com/blog/post/2013/06/19/platform-updates--new-open-graph-tags-for-media-publishers-and-more/) 203 | [Using Author Tags with Facebook Story Previews](http://www.trueanthem.com/blog/using-author-tags-with-facebook-story-previews/) 204 | [7 Common Meta Tag Mistakes That Publishers Make](http://www.trueanthem.com/blog/7-common-meta-tag-mistakes-that-publishers-make/) 205 | [Social Metadata: More Important than You Think](http://www.trueanthem.com/blog/social-metadata-more-important-than-you-think/) 206 | [Facebook is King, Other Networks Fight for Scraps](http://blog.naytev.com/facebook-is-king/) 207 | 208 | 209 | **Articles about video tags and strategy** 210 | [How to implement opengraph for video](http://www.marketing-mojo.com/blog/how-to-implement-open-graph-tags-for-videos/) 211 | [Video SEO - basics, essentials & best practises](https://www.speechpad.com/video-seo) 212 | [How Video Marketing Creates Immediate SEO Results](https://blog.shareaholic.com/video-marketing-seo-results/) 213 | [Setting Videos not Hosted on Brightcove to Play within Facebook](https://support.brightcove.com/en/video-cloud/docs/setting-videos-not-hosted-brightcove-play-within-facebook) 214 | 215 | **Less interesting but still some information to grab** 216 | [Social Meta Tags for Google, Twitter and Facebook](http://www.9lessons.info/2014/01/social-meta-tags-for-google-twitter-and.html) 217 | [Facebook Open Graph Meta Tags Tutorial](http://qnimate.com/open-graph-protocol-in-facebook/) 218 | [Social Media Tags: 11 Most Important Facebook Meta Tags](http://www.saleoid.com/blog/social-media-tags-11-most-important-facebook-meta-tags/) 219 | -------------------------------------------------------------------------------- /fields/fields.php: -------------------------------------------------------------------------------- 1 | '.JText::_('PLG_SYSTEM_SOCIALMETA_FLEXICONTENT_NOT_INSTALLED').''; 49 | 50 | $doc = JFactory::getDocument(); 51 | $db = JFactory::getDBO(); 52 | $cparams = JComponentHelper::getParams('com_flexicontent'); 53 | 54 | $node = & $this->element; 55 | $attributes = get_object_vars($node->attributes()); 56 | $attributes = $attributes['@attributes']; 57 | 58 | 59 | // ******************************************************************* 60 | // Option labels and option values (for the created SELECT form field) 61 | // ******************************************************************* 62 | 63 | $otext = ((boolean) @ $attributes['fieldnameastext']) ? "CONCAT(label, ' [', `name`, ']')" : 'label'; 64 | $ovalue = ((boolean) @ $attributes['fieldnameasvalue']) ? '`name`' : 'id'; // for old FC versions compatibility, second option must be like id 65 | 66 | 67 | // ********************************* 68 | // IS advanced filter / search FLAGs 69 | // ********************************* 70 | 71 | $and = ''; 72 | $isnotcore = (boolean) @ $attributes['isnotcore']; 73 | if ($isnotcore) { 74 | $and .= ' AND iscore = 0'; 75 | } 76 | $isadvsearch = (int) @ $attributes['isadvsearch']; 77 | if($isadvsearch) { 78 | $and .= ' AND isadvsearch='.$isadvsearch; 79 | } 80 | $isadvfilter = (int) @ $attributes['isadvfilter']; 81 | if($isadvfilter) { 82 | $and .= ' AND isadvfilter='.$isadvfilter; 83 | } 84 | 85 | 86 | // ******************************** 87 | // INCLUDE/EXCLUDE some field types 88 | // ******************************** 89 | 90 | $field_type = (string) @ $attributes['field_type']; 91 | if($field_type) { 92 | $field_type = explode(",", $field_type); 93 | foreach($field_type as $i => $ft) $field_type_quoted[$i] = $db->Quote($ft); 94 | $and .= " AND field_type IN (". implode(",", $field_type_quoted).")"; 95 | } 96 | $exclude_field_type = (string) @ $attributes['exclude_field_type']; 97 | if($exclude_field_type) { 98 | $exclude_field_type = explode(",", $exclude_field_type); 99 | foreach($exclude_field_type as $i => $ft) $exclude_field_type_quoted[$i] = $db->Quote($ft); 100 | $and .= " AND field_type NOT IN (". implode(",", $exclude_field_type_quoted).")"; 101 | } 102 | $orderable = (int) @ $attributes['orderable']; 103 | if ($orderable) { 104 | $non_orderable1 = 'account_via_submit,authoritems,toolbar,file,image,groupmarker,fcpagenav,minigallery,weblink,extendedweblink,email,fcloadmodule'; 105 | $non_orderable2 = trim($cparams->get('non_orderable_types', '')); 106 | 107 | $non_orderable = $non_orderable1.($non_orderable2 ? ','.$non_orderable2 : ''); 108 | $non_orderable = array_unique(explode(",", $non_orderable)); 109 | 110 | foreach($non_orderable as $i => $ft) $non_orderable_quoted[$i] = $db->Quote($ft); 111 | $and .= " AND field_type NOT IN (". implode(",", $non_orderable_quoted).")"; 112 | } 113 | 114 | 115 | // ************************** 116 | // Retrieve field data for DB 117 | // ************************** 118 | 119 | $query = 'SELECT '.$ovalue.' AS value, '.$otext.' AS text, id' 120 | .' FROM #__flexicontent_fields' 121 | .' WHERE published = 1' 122 | .$and 123 | .' ORDER BY label ASC, id ASC' 124 | ; 125 | 126 | $db->setQuery($query); 127 | $fields = $db->loadObjectList(); 128 | 129 | // Handle fields having the same label 130 | $_keys = array_keys($fields); 131 | $_total = count($fields); 132 | $_dupls = array(); 133 | foreach($_keys as $i => $key) 134 | { 135 | if ($i == $_total-1) continue; 136 | if ($fields[$key]->text == $fields[ $_keys[$i+1] ]->text) 137 | { 138 | $_dupls[ $key ] = $_dupls[ $_keys[$i+1] ] = 1; 139 | } 140 | } 141 | foreach($_dupls as $_dkey => $i) 142 | { 143 | $fields[$_dkey]->text .= ' :: ' .$fields[$_dkey]->id; 144 | } 145 | 146 | 147 | // *********************************** 148 | // Values, form field name and id, etc 149 | // *********************************** 150 | 151 | $values = $this->value; 152 | if ( empty($values) ) { 153 | $values = array(); 154 | } 155 | if ( !is_array($values) ) { 156 | $values = preg_split("/[\|,]/", $values); 157 | } 158 | 159 | $fieldname = $this->name; 160 | $element_id = $this->id; 161 | 162 | $name = $attributes['name']; 163 | $control_name = str_replace($name, '', $element_id); 164 | 165 | 166 | // ******************************************* 167 | // HTML Tag parameters parameters, and styling 168 | // ******************************************* 169 | 170 | $attribs = ' style="float:left;" '; 171 | if (@$attributes['multiple']=='multiple' || @$attributes['multiple']=='true' ) { 172 | $attribs .= ' multiple="multiple" '; 173 | $attribs .= (@$attributes['size']) ? ' size="'.$attributes['size'].'" ' : ' size="6" '; 174 | $fieldname .= ''; // NOTE: '[]' added automatically in J2.5+ 175 | } else { 176 | if ((boolean) @ $attributes['display_useglobal']) { 177 | array_unshift($fields, JHTML::_('select.option', '' , '- '.JText::_('FLEXI_USE_GLOBAL').' -')); 178 | array_unshift($fields, JHTML::_('select.option', '0', '- '.JText::_('FLEXI_NOT_SET').' -')); // Compatibility with older FC versions 179 | } else { 180 | $custom_prompt = @ $attributes['custom_prompt']; 181 | $custom_prompt = $custom_prompt ? $custom_prompt : 'FLEXI_PLEASE_SELECT'; 182 | array_unshift($fields, JHTML::_('select.option', '0', '- '.JText::_($custom_prompt).' -')); 183 | } 184 | } 185 | 186 | if ($class = @$attributes['class']) { 187 | $attribs .= 'class="'.$class.'"'; 188 | } 189 | if ($onchange = @$attributes['onchange']) { 190 | $onchange = str_replace('{control_name}', $control_name, $onchange); 191 | $attribs .= ' onchange="'.$onchange.'"'; 192 | } 193 | if ($inline_tip = @$attributes['inline_tip']) 194 | { 195 | $tip_img = @$attributes['tip_img']; 196 | $tip_img = $tip_img ? $tip_img : 'comment.png'; 197 | $preview_img = @$attributes['preview_img']; 198 | $preview_img = $preview_img ? $preview_img : ''; 199 | $tip_class = @$attributes['tip_class']; 200 | $tip_class .= FLEXI_J30GE ? ' hasTooltip' : ' hasTip'; 201 | $hintmage = JHTML::image ( 'administrator/components/com_flexicontent/assets/images/'.$tip_img, JText::_( 'FLEXI_NOTES' ), ' style="vertical-align:middle; max-height:24px; padding:0px; margin:0 0 0 12px;" ' ); 202 | $previewimage = $preview_img ? JHTML::image ( 'administrator/components/com_flexicontent/assets/images/'.$preview_img, JText::_( 'FLEXI_NOTES' ), ' style="vertical-align:middle; max-height:24px; padding:0px; margin:0 0 0 12px;" ' ) : ''; 203 | $tip_text = ''.$hintmage.$previewimage.''; 204 | } 205 | 206 | // *********************** 207 | // Create the field's HTML 208 | // *********************** 209 | 210 | return 211 | JHTML::_('select.genericlist', $fields, $fieldname, $attribs, 'value', 'text', $values, $element_id) 212 | .@$tip_text; 213 | } 214 | } 215 | -------------------------------------------------------------------------------- /fields/index.html: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /fields/notextd.php: -------------------------------------------------------------------------------- 1 | element['label']) && empty($this->element['description'])) 39 | { 40 | return ''; 41 | } 42 | 43 | $title = $this->element['label'] ? (string) $this->element['label'] : ($this->element['title'] ? (string) $this->element['title'] : ''); 44 | $heading = $this->element['heading'] ? (string) $this->element['heading'] : 'h4'; 45 | $description = (string) $this->element['description']; 46 | $class = !empty($this->class) ? ' class="' . $this->class . '"' : ''; 47 | $close = (string) $this->element['close']; 48 | 49 | $html = array(); 50 | 51 | if ($close) 52 | { 53 | $close = $close == 'true' ? 'alert' : $close; 54 | $html[] = ''; 55 | } 56 | 57 | $html[] = !empty($title) ? '<' . $heading . '>' . JText::_($title) . '' : ''; 58 | $html[] = !empty($description) ? JText::_($description) : ''; 59 | 60 | return '
' . implode('', $html); 61 | } 62 | 63 | /** 64 | * Method to get the field input markup. 65 | * 66 | * @return string The field input markup. 67 | * 68 | * @since 11.1 69 | */ 70 | protected function getInput() 71 | { 72 | return ''; 73 | } 74 | } 75 | -------------------------------------------------------------------------------- /fields/video.php: -------------------------------------------------------------------------------- 1 | translateHint ? JText::_($this->hint) : $this->hint; 43 | 44 | // Initialize some field attributes. 45 | $size = !empty($this->size) ? ' size="' . $this->size . '"' : ''; 46 | $maxLength = !empty($this->maxLength) ? ' maxlength="' . $this->maxLength . '"' : ''; 47 | $class = !empty($this->class) ? ' class="' . $this->class . '"' : ''; 48 | $readonly = $this->readonly ? ' readonly' : ''; 49 | $disabled = $this->disabled ? ' disabled' : ''; 50 | $required = $this->required ? ' required aria-required="true"' : ''; 51 | $hint = $hint ? ' placeholder="' . $hint . '"' : ''; 52 | $autocomplete = !$this->autocomplete ? ' autocomplete="off"' : ' autocomplete="' . $this->autocomplete . '"'; 53 | $autocomplete = $autocomplete == ' autocomplete="on"' ? '' : $autocomplete; 54 | $autofocus = $this->autofocus ? ' autofocus' : ''; 55 | $spellcheck = $this->spellcheck ? '' : ' spellcheck="false"'; 56 | 57 | // Note that the input type "url" is suitable only for external URLs, so if internal URLs are allowed 58 | // we have to use the input type "text" instead. 59 | $inputType = $this->element['relative'] ? 'type="text"' : 'type="url"'; 60 | 61 | // Initialize JavaScript field attributes. 62 | $onchange = !empty($this->onchange) ? ' onchange="' . $this->onchange . '"' : ''; 63 | 64 | // Including fallback code for HTML5 non supported browsers. 65 | JHtml::_('jquery.framework'); 66 | JHtml::_('script', 'system/html5fallback.js', false, true); 67 | 68 | $script = ' 69 | jQuery(document).ready(function($){ 70 | var url = $("#'.$this->id.'").val(); 71 | if ( url ) { 72 | getPropertyAndAppend ( url, "og:image", "thumb_image", "img"); 73 | getPropertyAndAppend ( url, "og:title", "thumb_title", "html"); 74 | getPropertyAndAppend ( url, "og:description", "thumb_description", "html"); 75 | } else { 76 | jQuery("#thumb_image").attr("src", "../plugins/system/socialmeta/img/socialmeta-default-image.png"); 77 | } 78 | $( "#'.$this->id.'_fetch" ).click(function() { 79 | var url = $("#'.$this->id.'").val(); 80 | getPropertyAndAppend ( url, "og:video:secure_url", "jform_attribs_facebookmeta_video_secure_url"); 81 | getPropertyAndAppend ( url, "og:video:type", "jform_attribs_facebookmeta_video_type"); 82 | getPropertyAndAppend ( url, "og:video:height", "jform_attribs_facebookmeta_video_height"); 83 | getPropertyAndAppend ( url, "og:video:width", "jform_attribs_facebookmeta_video_width"); 84 | getPropertyAndAppend ( url, "og:image", "thumb_image", "img"); 85 | getPropertyAndAppend ( url, "og:title", "thumb_title", "html"); 86 | getPropertyAndAppend ( url, "og:description", "thumb_description", "html"); 87 | // console.log(url); 88 | $("html, body").animate({scrollTop:$(document).height()}, "slow"); 89 | return false; 90 | }); 91 | $( "#'.$this->id.'_clear" ).click(function(){ 92 | $("#jform_attribs_facebookmeta_video_secure_url").val(""); 93 | $("#jform_attribs_facebookmeta_video_height").val(""); 94 | $("#jform_attribs_facebookmeta_video_width").val(""); 95 | $("#jform_attribs_facebookmeta_video_type").val(""); 96 | $("#'.$this->id.'").val(""); 97 | $("#thumb_image").fadeOut().attr("src", "../plugins/system/socialmeta/img/socialmeta-default-image.png").fadeIn(); 98 | $("#thumb_title").html(""); 99 | $("#thumb_description").html(""); 100 | return false; 101 | }); 102 | }); 103 | 104 | function getPropertyAndAppend ( url, property, destination, mode ) 105 | { 106 | mode = typeof mode !== "undefined" ? mode : "val"; 107 | jQuery.getJSON("//query.yahooapis.com/v1/public/yql?" + 108 | "q=SELECT%20*%20FROM%20html%20WHERE%20url=%27" + 109 | encodeURIComponent( url ) + 110 | "%27%20AND%20xpath=%27descendant-or-self::meta%27&format=json&callback=?", 111 | function (data) { 112 | // console.log(data); 113 | var res = jQuery.grep(data.query.results.meta, function (video, key) { 114 | return video.hasOwnProperty("property") && video.property === property 115 | }); 116 | 117 | if (mode == "img") { 118 | if (res.length > 0) { 119 | jQuery("#" + destination).fadeOut().attr("src", res[0].content).fadeIn(); 120 | } else { 121 | console.log(property + " not found"); 122 | } 123 | } else if (mode == "html") { 124 | if (res.length > 0) { 125 | jQuery("#" + destination).html( res[0].content ); 126 | } else { 127 | console.log(property + " not found"); 128 | } 129 | } else { 130 | if (res.length > 1) { 131 | // console.log(res[1].content); 132 | jQuery("#" + destination).val( res[1].content ); 133 | } else if (res.length > 0) { 134 | // console.log(res[0].content); 135 | jQuery("#" + destination).val( res[0].content ); 136 | } else { 137 | console.log(property + " not found"); 138 | jQuery("#" + destination).val( property + " not found" ).addClass("invalid"); 139 | jQuery("#" + destination + "-lbl").addClass("invalid"); 140 | } 141 | } 142 | }); 143 | } 144 | '; 145 | 146 | $document = JFactory::getDocument(); 147 | $document->addScriptDeclaration($script); 148 | 149 | return ' 150 |
151 | 158 | '.JText::_('PLG_SYSTEM_SOCIALMETA_FETCH_PROPERTIES').' 159 | '.JText::_('PLG_SYSTEM_SOCIALMETA_CLEAR').' 160 |
161 |
162 |
163 |
164 | 165 | '.JText::_('JLIB_FORM_MEDIA_PREVIEW_TIP_TITLE', true).' 166 | 167 |
168 |
169 |

 

170 | 171 |
172 |
173 | '; 174 | } 175 | } 176 | -------------------------------------------------------------------------------- /forms/com_contact.xml: -------------------------------------------------------------------------------- 1 | 2 |
3 | 4 |
5 | 13 | 20 | 27 |
28 |
29 |
-------------------------------------------------------------------------------- /forms/com_content.xml: -------------------------------------------------------------------------------- 1 | 2 |
3 | 4 |
5 | 13 | 21 | 28 | 37 | 44 | 51 | 58 | 63 | 109 |
110 |
111 |
-------------------------------------------------------------------------------- /forms/com_flexicontent.xml: -------------------------------------------------------------------------------- 1 | 2 |
3 | 4 |
5 | 13 | 19 | 29 | 36 | 45 | 52 | 59 | 66 | 73 | 79 | 85 | 92 | 99 | 107 | 108 | 109 | 110 |
111 |
112 |
113 | -------------------------------------------------------------------------------- /forms/index.html: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /img/index.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /img/screen-mini.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vistamedia/socialmeta/7efa8ef71001125f0fe5ccd1409019c020d103e6/img/screen-mini.png -------------------------------------------------------------------------------- /img/socialmeta-default-image.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vistamedia/socialmeta/7efa8ef71001125f0fe5ccd1409019c020d103e6/img/socialmeta-default-image.png -------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /js/index.html: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /js/jquery.charactercounter.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Character Counter v1.5.1 3 | * ====================== 4 | * 5 | * Character Counter is a simple, Twitter style character counter. 6 | * 7 | * https://github.com/dtisgodsson/jquery-character-counter 8 | * 9 | * @author Darren Taylor 10 | * @author Email: shout@darrenonthe.net 11 | * @author Twitter: darrentaytay 12 | * @author Website: http://darrenonthe.net 13 | * 14 | */ 15 | (function($) { 16 | 17 | $.fn.characterCounter = function(opts){ 18 | 19 | var defaults = { 20 | exceeded: false, 21 | counterSelector: false, 22 | limit: 150, 23 | renderTotal: false, 24 | counterWrapper: 'span', 25 | counterCssClass: 'counter', 26 | counterFormat: '%1', 27 | counterExceededCssClass: 'exceeded', 28 | increaseCounting: false, 29 | onExceed: function(count) {}, 30 | onDeceed: function(count) {}, 31 | customFields: {} 32 | }; 33 | 34 | var options = $.extend(defaults, opts); 35 | 36 | return this.each(function() { 37 | var html5len = $(this).attr('maxlength'); 38 | if (typeof html5len !== typeof undefined && html5len !== false) { 39 | $.extend(defaults, { 40 | limit: parseInt($(this).attr('maxlength')) 41 | }); 42 | } 43 | if (!options.counterSelector) { 44 | $(this).after(generateCounter()); 45 | } 46 | bindEvents(this); 47 | checkCount(this); 48 | }); 49 | 50 | function customFields(params) 51 | { 52 | var i, html=''; 53 | 54 | for (i in params) 55 | { 56 | html += ' ' + i + '="' + params[i] + '"'; 57 | } 58 | 59 | return html; 60 | } 61 | 62 | function generateCounter() 63 | { 64 | var classString = options.counterCssClass; 65 | 66 | if ( options.customFields['class'] ) 67 | { 68 | classString += " " + options.customFields['class']; 69 | delete options.customFields['class']; 70 | } 71 | 72 | return '<'+ options.counterWrapper +customFields(options.customFields)+' class="' + classString + '">'; 73 | } 74 | 75 | function renderText(count) 76 | { 77 | var rendered_count = options.counterFormat.replace(/%1/, count); 78 | 79 | if ( options.renderTotal ) 80 | { 81 | rendered_count += '/'+ options.limit; 82 | } 83 | 84 | return rendered_count; 85 | } 86 | 87 | function checkCount(element) 88 | { 89 | var characterCount = $(element).val().length; 90 | var counter = options.counterSelector ? $(options.counterSelector) : $(element).nextAll("." + options.counterCssClass).first(); 91 | var remaining = options.limit - characterCount; 92 | var condition = remaining < 0; 93 | 94 | if ( options.increaseCounting ) 95 | { 96 | remaining = characterCount; 97 | condition = remaining > options.limit; 98 | } 99 | 100 | if ( condition ) 101 | { 102 | counter.addClass(options.counterExceededCssClass); 103 | options.exceeded = true; 104 | options.onExceed(characterCount); 105 | } 106 | else 107 | { 108 | if ( options.exceeded ) { 109 | counter.removeClass(options.counterExceededCssClass); 110 | options.onDeceed(characterCount); 111 | options.exceeded = false; 112 | } 113 | } 114 | 115 | counter.html(renderText(remaining)); 116 | } 117 | 118 | function bindEvents(element) 119 | { 120 | $(element) 121 | .on("input change", function () { 122 | checkCount(element); 123 | }); 124 | } 125 | }; 126 | 127 | })(jQuery); 128 | -------------------------------------------------------------------------------- /language/en-GB/en-GB.plg_system_socialmeta.ini: -------------------------------------------------------------------------------- 1 | ; Joomla! Project 2 | ; Copyright (C) 2005 - 2016 Open Source Matters. All rights reserved. 3 | ; License GNU General Public License version 2 or later; see LICENSE.txt, see LICENSE.php 4 | ; Note : All ini files need to be saved as UTF-8 5 | 6 | PLG_SYSTEM_SOCIALMETA="System - Socialmeta" 7 | PLG_SYSTEM_SOCIALMETA_XML_DESCRIPTION="Allows you to setup properly the content shared on Facebook, Twitter and other social networks. You can choose the image, the title and description by creating the Open Graph meta properties." 8 | PLG_SYSTEM_SOCIALMETA_DEFAULT_IMAGE="Default site image" 9 | PLG_SYSTEM_SOCIALMETA_DEFAULT_IMAGE_DESC="You can set a default image for any page shared on Facebook except on those set manually with the content plugin. Leave it empty if you don't want to use it." 10 | PLG_SYSTEM_SOCIALMETA_FBAPPID="Facebook Application ID" 11 | PLG_SYSTEM_SOCIALMETA_FBAPPID_DESC="If you have an Application ID for your site you can put it here. The plugin will generate the meta property. Leave it empty if you don't want to use it." 12 | PLG_SYSTEM_SOCIALMETA_NOTE="Some useful information you should read" 13 | PLG_SYSTEM_SOCIALMETA_NOTE_DESC="First of all the Facebook's Sharing Best Practices for Websites & Mobile Apps Use the Facebook Open Graph Object Debugger to check your pages and pre-cache your images. For more information about the Open Graph Protocol please visit ogp.me" 14 | PLG_SYSTEM_SOCIALMETA_NOTE2="Compatibility settings" 15 | PLG_SYSTEM_SOCIALMETA_NOTE2_DESC="You can use these settings to disable the creation of some specific meta which could conflict with another extension you are using." 16 | PLG_SYSTEM_SOCIALMETA_TITLELIMIT="Title limit" 17 | PLG_SYSTEM_SOCIALMETA_TITLELIMIT_DESC="You can modify here the size of the title in the character counter. The accurate setting is 68 today, but this value may change in the future depending on Facebook recommendations." 18 | PLG_SYSTEM_SOCIALMETA_DESCLIMIT="Description limit" 19 | PLG_SYSTEM_SOCIALMETA_DESCLIMIT_DESC="You can modify here the size of the description in the character counter. The accurate setting is 200 today, but this value may change in the future depending on Facebook recommendations." 20 | PLG_SYSTEM_SOCIALMETA_FBUSERPROFILE="Facebook profile URL" 21 | PLG_SYSTEM_SOCIALMETA_FBUSERPROFILE_DESC="Enter the user profile URL with the https:// prefix. It will define the default author of your website. This setting can be overriden for each author in the contact component under the Facebook tab." 22 | PLG_SYSTEM_SOCIALMETA_PAGEURL="Facebook page URL" 23 | PLG_SYSTEM_SOCIALMETA_PAGEURL_DESC="Enter the page URL with the https:// prefix. It will define the publisher of the articles." 24 | PLG_SYSTEM_SOCIALMETA_ADMINS="Admin ID" 25 | PLG_SYSTEM_SOCIALMETA_ADMINS_DESC="Enter the Facebook ID of the user who will be able to access to the sharing stats of the pages. See Facebook insights for more information" 26 | PLG_SYSTEM_SOCIALMETA_TWITTERSITE="Twitter @username" 27 | PLG_SYSTEM_SOCIALMETA_TWITTERSITE_DESC="Enter here the Twitter @username of your whole site. Enter the Twitter account of a default author/entity to follow. This setting can be overriden for each author in the contact component under the Facebook tab" 28 | 29 | COM_CONTENT_METAFB_FIELDSET_LABEL="Social" 30 | COM_MENUS_METAFB_FIELDSET_LABEL="Social" 31 | COM_CATEGORIES_METAFB_FIELDSET_LABEL="Social" 32 | COM_CONTACT_METAFB_FIELDSET_LABEL="Social" 33 | PLG_SYSTEM_SOCIALMETA_IMAGENOTE="Pay attention to the image resolution!" 34 | PLG_SYSTEM_SOCIALMETA_IMAGENOTE_DESC="Use images that are at least 1200 x 630 pixels for the best display on high resolution devices. At the minimum, you should use images of 600 x 315 pixels to display link page posts with larger images. Images can be up to 8MB in size. Try to keep your images as close to 1.91:1 aspect ratio as possible to display the full image in News Feed without any cropping. See https://developers.facebook.com/docs/sharing/best-practices#images for more information." 35 | PLG_SYSTEM_SOCIALMETA_TYPE="Content's main type" 36 | PLG_SYSTEM_SOCIALMETA_TYPE_DESC="You shouldn't touch anything except if you wish your article to be treated as a video content. It may then become streamable in Facebook and Twitter streams. The other interest of setting an article as video content is to try to get a video preview in Google search result." 37 | PLG_SYSTEM_SOCIALMETA_IMAGE="Image" 38 | PLG_SYSTEM_SOCIALMETA_IMAGE_DESC="The image used when sharing the article on Facebook, Google+ and Twitter." 39 | PLG_SYSTEM_SOCIALMETA_TITLE="Title" 40 | PLG_SYSTEM_SOCIALMETA_TITLE_DESC="If empty the article title will be used instead" 41 | PLG_SYSTEM_SOCIALMETA_DESC="Description" 42 | PLG_SYSTEM_SOCIALMETA_DESC_DESC="If empty the beginning of the article will be used instead" 43 | PLG_SYSTEM_SOCIALMETA_CHARSLEFT="characters left..." 44 | PLG_SYSTEM_SOCIALMETA_SEEALSO="Related article" 45 | PLG_SYSTEM_SOCIALMETA_SEEALSO_DESC="Add some related resources to try to gain related items from your site under your post in the stream." 46 | PLG_SYSTEM_SOCIALMETA_CONTACTNOTE="Important note" 47 | PLG_SYSTEM_SOCIALMETA_CONTACTNOTE_DESC="Please enter the user's Facebook profile URL in this field if you wish to link with their post. By doing this the author can be followed on Facebook when the article is shared (article:author). The publisher's Facebook page URL (article:publisher) can be set in the system plugin configuration. For more information about the publisher and author Open Graph tags, please visit https://developers.facebook.com/blog/post/2013/06/19/platform-updates--new-open-graph-tags-for-media-publishers-and-more. Note that the contact doesn't need to be published" 48 | PLG_SYSTEM_SOCIALMETA_FBUSERPROFILE="Facebook profile URL" 49 | PLG_SYSTEM_SOCIALMETA_FBUSERPROFILE_DESC="Enter the user profile URL with the https:// prefix" 50 | PLG_SYSTEM_SOCIALMETA_VIDEOURL="Video HTTPS Url" 51 | PLG_SYSTEM_SOCIALMETA_VIDEOURL_DESC="Enter the url of the video resource associated to your content. Note that Facebook and Twitter REQUIRE HTTPS to avoid mixed content browser errors when playing the video in the stream" 52 | PLG_SYSTEM_SOCIALMETA_VIDEOTYPE="Video MIME" 53 | PLG_SYSTEM_SOCIALMETA_VIDEOTYPE_DESC="This field should be automatically populated by pressing the Fetch button. If not the accepted values are: application/x-shockwave-flash or video/mp4" 54 | PLG_SYSTEM_SOCIALMETA_VIDEOWIDTH="Video width" 55 | PLG_SYSTEM_SOCIALMETA_VIDEOWIDTH_DESC="Width of your video in pixels" 56 | PLG_SYSTEM_SOCIALMETA_VIDEOHEIGHT="Video height" 57 | PLG_SYSTEM_SOCIALMETA_VIDEOHEIGHT_DESC="Height of your video in pixels" 58 | PLG_SYSTEM_SOCIALMETA_FETCH_PROPERTIES="Fetch properties" 59 | PLG_SYSTEM_SOCIALMETA_CLEAR="Clear" 60 | PLG_SYSTEM_SOCIALMETA_TWITTERUSERNAME="Twitter @username" 61 | PLG_SYSTEM_SOCIALMETA_TWITTERUSERNAME_DESC="Enter here the Twitter @username of the author to follow." 62 | PLG_SYSTEM_SOCIALMETA_VIDEOSECUREURL="Secured stream" 63 | PLG_SYSTEM_SOCIALMETA_VIDEOSECUREURL_DESC="The url of the secured stream. It should be fetched automatically from the video url. If not, please provide it yourself." 64 | 65 | COM_PLUGINS_COMPONENTS_FIELDSET_LABEL="Components" 66 | PLG_SYSTEM_SOCIALMETA_ARTICLE_SPACER="Joomla! Articles (com_content.article)" 67 | PLG_SYSTEM_SOCIALMETA_ARTICLE_IMAGE="Image to use" 68 | PLG_SYSTEM_SOCIALMETA_ARTICLE_IMAGE_DESC="Choose which image you to use for Joomla! articles. Intro + html: intro image from images tab then parse HTML as fallback. Full + html: full article image from images tab then parse HTML as fallback. html: will parse the html of the article and use the first image found. IMPORTANT: it's not recommended to use the html mode as it will provide a random image which is a non sense... would you use a random image to make your leaflets, brochures or posters?... The only reason you could use that, is if you are sure that the relevant image will appear in first position in the html code of te article." 69 | PLG_SYSTEM_SOCIALMETA_ARTICLE_IMAGE_MANUAL="Manual only" 70 | PLG_SYSTEM_SOCIALMETA_ARTICLE_IMAGE_INTRO="Intro + html" 71 | PLG_SYSTEM_SOCIALMETA_ARTICLE_IMAGE_FULL="Full + html" 72 | PLG_SYSTEM_SOCIALMETA_ARTICLE_IMAGE_MAGIC="html" 73 | PLG_SYSTEM_SOCIALMETA_FLEXICONTENT_SPACER="FLEXIcontent Items (com_flexicontent.item)" 74 | PLG_SYSTEM_SOCIALMETA_FLEXICONTENT_IMAGE_FIELD="Custom image field name" 75 | PLG_SYSTEM_SOCIALMETA_FLEXICONTENT_IMAGE_FIELD_DESC="You can choose an image field to use as og:image. If the field is empty the above Joomla! Articles rules will be applied. NOTE: pay attention when filling up the field name. Check twice, otherwise you won't get any image (case sensitive)" 76 | JGLOBAL_FIELDSET_COMPONENTS="Components" 77 | PLG_SYSTEM_SOCIALMETA_FLEXICONTENT_NOT_INSTALLED="FLEXIcontent isn't installed" 78 | PLG_SYSTEM_SOCIALMETA_FLEXICONTENT_IMAGESIZE="Thumbnail size" 79 | PLG_SYSTEM_SOCIALMETA_FLEXICONTENT_IMAGESIZE_DESC="Choose the size of the thumbnail you wish to use" 80 | PLG_SYSTEM_SOCIALMETA_FLEXICONTENT_IMAGE_AUTO="Auto" 81 | PLG_SYSTEM_SOCIALMETA_FLEXICONTENT_IMAGE_LARGE="Large" 82 | PLG_SYSTEM_SOCIALMETA_FLEXICONTENT_IMAGE_MEDIUM="Medium" 83 | PLG_SYSTEM_SOCIALMETA_FLEXICONTENT_IMAGE_SMALL="Small" 84 | PLG_SYSTEM_SOCIALMETA_GOOGLEPLUS="Publisher name" 85 | PLG_SYSTEM_SOCIALMETA_GOOGLEPLUS_DESC="Enter a publisher name" 86 | PLG_SYSTEM_SOCIALMETA_GOOGLEPLUS_LOGO="Google Publisher logo" 87 | PLG_SYSTEM_SOCIALMETA_GOOGLEPLUS_LOGO_DESC="If you wish to appear in the Top Stories carrousel (only if you use AMP HTML) or get a Rich Card in the Google search result, you should consider providing a publisher logo. Max dimensions 600x60. For more informations: https://developers.google.com/search/docs/data-types/articles" 88 | PLG_SYSTEM_SOCIALMETA_GOOGLE_STRUCTURED_DATA="Google Structured Data" 89 | PLG_SYSTEM_SOCIALMETA_GOOGLE_STRUCTURED_DATA_ADD="Add Structured Data" 90 | PLG_SYSTEM_SOCIALMETA_GOOGLE_STRUCTURED_DATA_ADD_DESC="Add Structured Data. If there's already a markup provided by your template you may wish to disable it to avoid errors or duplicates" -------------------------------------------------------------------------------- /language/en-GB/en-GB.plg_system_socialmeta.sys.ini: -------------------------------------------------------------------------------- 1 | ; Joomla! Project 2 | ; Copyright (C) 2005 - 2016 Open Source Matters. All rights reserved. 3 | ; License GNU General Public License version 2 or later; see LICENSE.txt, see LICENSE.php 4 | ; Note : All ini files need to be saved as UTF-8 5 | 6 | PLG_SYSTEM_SOCIALMETA="System - Socialmeta" 7 | PLG_SYSTEM_SOCIALMETA_XML_DESCRIPTION="Allows you to setup properly the content shared on Facebook, Twitter and other social networks. You can choose the image, the title and description by creating the Open Graph meta properties." 8 | PLG_SYSTEM_SOCIALMETA_DEFAULT_IMAGE="Default site image" 9 | PLG_SYSTEM_SOCIALMETA_DEFAULT_IMAGE_DESC="You can set a default image for any page shared on Facebook except on those set manually with the content plugin. Leave it empty if you don't want to use it." 10 | PLG_SYSTEM_SOCIALMETA_FBAPPID="Facebook Application ID" 11 | PLG_SYSTEM_SOCIALMETA_FBAPPID_DESC="If you have an Application ID for your site you can put it here. The plugin will generate the meta property. Leave it empty if you don't want to use it." 12 | PLG_SYSTEM_SOCIALMETA_NOTE="Some useful information you should read" 13 | PLG_SYSTEM_SOCIALMETA_NOTE_DESC="First of all the Facebook's Sharing Best Practices for Websites & Mobile Apps Use the Facebook Open Graph Object Debugger to check your pages and pre-cache your images. For more information about the Open Graph Protocol please visit ogp.me" 14 | PLG_SYSTEM_SOCIALMETA_NOTE2="Compatibility settings" 15 | PLG_SYSTEM_SOCIALMETA_NOTE2_DESC="You can use these settings to disable the creation of some specific meta which could conflict with another extension you are using." 16 | PLG_SYSTEM_SOCIALMETA_TITLELIMIT="Title limit" 17 | PLG_SYSTEM_SOCIALMETA_TITLELIMIT_DESC="You can modify here the size of the title in the character counter. The accurate setting is 68 today, but this value may change in the future depending on Facebook recommendations." 18 | PLG_SYSTEM_SOCIALMETA_DESCLIMIT="Description limit" 19 | PLG_SYSTEM_SOCIALMETA_DESCLIMIT_DESC="You can modify here the size of the description in the character counter. The accurate setting is 200 today, but this value may change in the future depending on Facebook recommendations." 20 | PLG_SYSTEM_SOCIALMETA_FBUSERPROFILE="Facebook profile URL" 21 | PLG_SYSTEM_SOCIALMETA_FBUSERPROFILE_DESC="Enter the user profile URL with the https:// prefix. It will define the default author of your website. This setting can be overriden for each author in the contact component under the Facebook tab." 22 | PLG_SYSTEM_SOCIALMETA_PAGEURL="Facebook page URL" 23 | PLG_SYSTEM_SOCIALMETA_PAGEURL_DESC="Enter the page URL with the https:// prefix. It will define the publisher of the articles." 24 | PLG_SYSTEM_SOCIALMETA_ADMINS="Admin ID" 25 | PLG_SYSTEM_SOCIALMETA_ADMINS_DESC="Enter the Facebook ID of the user who will be able to access to the sharing stats of the pages. See Facebook insights for more information" 26 | PLG_SYSTEM_SOCIALMETA_TWITTERSITE="Twitter @username" 27 | PLG_SYSTEM_SOCIALMETA_TWITTERSITE_DESC="Enter here the Twitter @username of your whole site. Enter the Twitter account of a default author/entity to follow. This setting can be overriden for each author in the contact component under the Facebook tab" 28 | 29 | COM_CONTENT_METAFB_FIELDSET_LABEL="Social" 30 | COM_MENUS_METAFB_FIELDSET_LABEL="Social" 31 | COM_CATEGORIES_METAFB_FIELDSET_LABEL="Social" 32 | COM_CONTACT_METAFB_FIELDSET_LABEL="Social" 33 | PLG_SYSTEM_SOCIALMETA_IMAGENOTE="Pay attention to the image resolution!" 34 | PLG_SYSTEM_SOCIALMETA_IMAGENOTE_DESC="Use images that are at least 1200 x 630 pixels for the best display on high resolution devices. At the minimum, you should use images of 600 x 315 pixels to display link page posts with larger images. Images can be up to 8MB in size. Try to keep your images as close to 1.91:1 aspect ratio as possible to display the full image in News Feed without any cropping. See https://developers.facebook.com/docs/sharing/best-practices#images for more information." 35 | PLG_SYSTEM_SOCIALMETA_TYPE="Content's main type" 36 | PLG_SYSTEM_SOCIALMETA_TYPE_DESC="You shouldn't touch anything except if you wish your article to be treated as a video content. It may then become streamable in Facebook and Twitter streams. The other interest of setting an article as video content is to try to get a video preview in Google search result." 37 | PLG_SYSTEM_SOCIALMETA_IMAGE="Image" 38 | PLG_SYSTEM_SOCIALMETA_IMAGE_DESC="The image used when sharing the article on Facebook, Google+ and Twitter." 39 | PLG_SYSTEM_SOCIALMETA_TITLE="Title" 40 | PLG_SYSTEM_SOCIALMETA_TITLE_DESC="If empty the article title will be used instead" 41 | PLG_SYSTEM_SOCIALMETA_DESC="Description" 42 | PLG_SYSTEM_SOCIALMETA_DESC_DESC="If empty the beginning of the article will be used instead" 43 | PLG_SYSTEM_SOCIALMETA_CHARSLEFT="characters left..." 44 | PLG_SYSTEM_SOCIALMETA_SEEALSO="Related article" 45 | PLG_SYSTEM_SOCIALMETA_SEEALSO_DESC="Add some related resources to try to gain related items from your site under your post in the stream." 46 | PLG_SYSTEM_SOCIALMETA_CONTACTNOTE="Important note" 47 | PLG_SYSTEM_SOCIALMETA_CONTACTNOTE_DESC="Please enter the user's Facebook profile URL in this field if you wish to link with their post. By doing this the author can be followed on Facebook when the article is shared (article:author). The publisher's Facebook page URL (article:publisher) can be set in the system plugin configuration. For more information about the publisher and author Open Graph tags, please visit https://developers.facebook.com/blog/post/2013/06/19/platform-updates--new-open-graph-tags-for-media-publishers-and-more. Note that the contact doesn't need to be published" 48 | PLG_SYSTEM_SOCIALMETA_FBUSERPROFILE="Facebook profile URL" 49 | PLG_SYSTEM_SOCIALMETA_FBUSERPROFILE_DESC="Enter the user profile URL with the https:// prefix" 50 | PLG_SYSTEM_SOCIALMETA_VIDEOURL="Video HTTPS Url" 51 | PLG_SYSTEM_SOCIALMETA_VIDEOURL_DESC="Enter the url of the video resource associated to your content. Note that Facebook and Twitter REQUIRE HTTPS to avoid mixed content browser errors when playing the video in the stream" 52 | PLG_SYSTEM_SOCIALMETA_VIDEOTYPE="Video MIME" 53 | PLG_SYSTEM_SOCIALMETA_VIDEOTYPE_DESC="This field should be automatically populated by pressing the Fetch button. If not the accepted values are: application/x-shockwave-flash or video/mp4" 54 | PLG_SYSTEM_SOCIALMETA_VIDEOWIDTH="Video width" 55 | PLG_SYSTEM_SOCIALMETA_VIDEOWIDTH_DESC="Width of your video in pixels" 56 | PLG_SYSTEM_SOCIALMETA_VIDEOHEIGHT="Video height" 57 | PLG_SYSTEM_SOCIALMETA_VIDEOHEIGHT_DESC="Height of your video in pixels" 58 | PLG_SYSTEM_SOCIALMETA_FETCH_PROPERTIES="Fetch properties" 59 | PLG_SYSTEM_SOCIALMETA_CLEAR="Clear" 60 | PLG_SYSTEM_SOCIALMETA_TWITTERUSERNAME="Twitter @username" 61 | PLG_SYSTEM_SOCIALMETA_TWITTERUSERNAME_DESC="Enter here the Twitter @username of the author to follow." 62 | PLG_SYSTEM_SOCIALMETA_VIDEOSECUREURL="Secured stream" 63 | PLG_SYSTEM_SOCIALMETA_VIDEOSECUREURL_DESC="The url of the secured stream. It should be fetched automatically from the video url. If not, please provide it yourself." 64 | 65 | COM_PLUGINS_COMPONENTS_FIELDSET_LABEL="Components" 66 | PLG_SYSTEM_SOCIALMETA_ARTICLE_SPACER="Joomla! Articles (com_content.article)" 67 | PLG_SYSTEM_SOCIALMETA_ARTICLE_IMAGE="Image to use" 68 | PLG_SYSTEM_SOCIALMETA_ARTICLE_IMAGE_DESC="Choose which image you to use for Joomla! articles. Intro + html: intro image from images tab then parse HTML as fallback. Full + html: full article image from images tab then parse HTML as fallback. html: will parse the html of the article and use the first image found. IMPORTANT: it's not recommended to use the html mode as it will provide a random image which is a non sense... would you use a random image to make your leaflets, brochures or posters?... The only reason you could use that, is if you are sure that the relevant image will appear in first position in the html code of te article." 69 | PLG_SYSTEM_SOCIALMETA_ARTICLE_IMAGE_MANUAL="Manual only" 70 | PLG_SYSTEM_SOCIALMETA_ARTICLE_IMAGE_INTRO="Intro + html" 71 | PLG_SYSTEM_SOCIALMETA_ARTICLE_IMAGE_FULL="Full + html" 72 | PLG_SYSTEM_SOCIALMETA_ARTICLE_IMAGE_MAGIC="html" 73 | PLG_SYSTEM_SOCIALMETA_FLEXICONTENT_SPACER="FLEXIcontent Items (com_flexicontent.item)" 74 | PLG_SYSTEM_SOCIALMETA_FLEXICONTENT_IMAGE_FIELD="Custom image field name" 75 | PLG_SYSTEM_SOCIALMETA_FLEXICONTENT_IMAGE_FIELD_DESC="You can choose an image field to use as og:image. If the field is empty the above Joomla! Articles rules will be applied. NOTE: pay attention when filling up the field name. Check twice, otherwise you won't get any image (case sensitive)" 76 | JGLOBAL_FIELDSET_COMPONENTS="Components" 77 | PLG_SYSTEM_SOCIALMETA_FLEXICONTENT_NOT_INSTALLED="FLEXIcontent isn't installed" 78 | PLG_SYSTEM_SOCIALMETA_FLEXICONTENT_IMAGESIZE="Thumbnail size" 79 | PLG_SYSTEM_SOCIALMETA_FLEXICONTENT_IMAGESIZE_DESC="Choose the size of the thumbnail you wish to use" 80 | PLG_SYSTEM_SOCIALMETA_FLEXICONTENT_IMAGE_AUTO="Auto" 81 | PLG_SYSTEM_SOCIALMETA_FLEXICONTENT_IMAGE_LARGE="Large" 82 | PLG_SYSTEM_SOCIALMETA_FLEXICONTENT_IMAGE_MEDIUM="Medium" 83 | PLG_SYSTEM_SOCIALMETA_FLEXICONTENT_IMAGE_SMALL="Small" 84 | PLG_SYSTEM_SOCIALMETA_GOOGLEPLUS="Publisher name" 85 | PLG_SYSTEM_SOCIALMETA_GOOGLEPLUS_DESC="Enter a publisher name" 86 | PLG_SYSTEM_SOCIALMETA_GOOGLEPLUS_LOGO="Google Publisher logo" 87 | PLG_SYSTEM_SOCIALMETA_GOOGLEPLUS_LOGO_DESC="If you wish to appear in the Top Stories carrousel (only if you use AMP HTML) or get a Rich Card in the Google search result, you should consider providing a publisher logo. Max dimensions 600x60. For more informations: https://developers.google.com/search/docs/data-types/articles" 88 | PLG_SYSTEM_SOCIALMETA_GOOGLE_STRUCTURED_DATA="Google Structured Data" 89 | PLG_SYSTEM_SOCIALMETA_GOOGLE_STRUCTURED_DATA_ADD="Add Structured Data" 90 | PLG_SYSTEM_SOCIALMETA_GOOGLE_STRUCTURED_DATA_ADD_DESC="Add Structured Data. If there's already a markup provided by your template you may wish to disable it to avoid errors or duplicates" -------------------------------------------------------------------------------- /language/en-GB/index.html: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /language/fr-FR/fr-FR.plg_system_socialmeta.ini: -------------------------------------------------------------------------------- 1 | ; Joomla! Project 2 | ; Copyright (C) 2005 - 2016 Open Source Matters. All rights reserved. 3 | ; License GNU General Public License version 2 or later; see LICENSE.txt, see LICENSE.php 4 | ; Note : All ini files need to be saved as UTF-8 5 | 6 | PLG_SYSTEM_SOCIALMETA="Système - Socialmeta" 7 | PLG_SYSTEM_SOCIALMETA_XML_DESCRIPTION="Vous permet de configurer correctement le partage de contenu sur Facebook, Twitter et autres réseaux sociaux. Vous pouvez choisir l'image, le titre et la description en créant des métas pour Open Graph." 8 | PLG_SYSTEM_SOCIALMETA_DEFAULT_IMAGE="Image du site par défaut" 9 | PLG_SYSTEM_SOCIALMETA_DEFAULT_IMAGE_DESC="Vous pouvez définir une image par défaut à partager sur facebook pour toutes les pages sauf celles définies manuellement avec le plugin de contenu. Laissez vide si vous ne souhaitez pas l'utiliser." 10 | PLG_SYSTEM_SOCIALMETA_FBAPPID="ID de l'application Facebook" 11 | PLG_SYSTEM_SOCIALMETA_FBAPPID_DESC="Si vous avez une ID d'application pour votre site, vous pouvez l'indiquer ici. Le plugin va générer la propriété meta. Laissez vide si vous ne souhaitez pas l'utiliser." 12 | PLG_SYSTEM_SOCIALMETA_NOTE="Des informations utiles, que vous devriez lire" 13 | PLG_SYSTEM_SOCIALMETA_NOTE_DESC="Tout d'abord, les Recommandations en matière de partage pour les sites web et les applications mobiles de Facebook. Utilisez le Débogueur d'objet Open Graph Facebook pour vérifier vos pages et mettre vos images en cache. Pour plus d'informations sur le protocole Open Graph, veuillez consulter ogp.me" 14 | PLG_SYSTEM_SOCIALMETA_NOTE2="Paramètres de compatibilité" 15 | PLG_SYSTEM_SOCIALMETA_NOTE2_DESC="Vous pouvez utiliser ces paramètres pour désactiver la création de certaines metas spécifiques qui pourraient entrer en conflit avec une autre extension que vous utilisez." 16 | PLG_SYSTEM_SOCIALMETA_TITLELIMIT="Limite du titre" 17 | PLG_SYSTEM_SOCIALMETA_TITLELIMIT_DESC="Vous pouvez modifier ici la longueur du titre dans le compteur de caractères. Le réglage correct est actuellement de 68 caractères, mais cette valeur peut changer à l'avenir, selon les recommandations de Facebook." 18 | PLG_SYSTEM_SOCIALMETA_DESCLIMIT="Limite de la description" 19 | PLG_SYSTEM_SOCIALMETA_DESCLIMIT_DESC="Vous pouvez modifier ici la longueur de la description dans le compteur de caractères. Le réglage correct est actuellement de 200 caractères, mais cette valeur peut changer à l'avenir, selon les recommandations de Facebook." 20 | PLG_SYSTEM_SOCIALMETA_FBUSERPROFILE="URL du profil Facebook" 21 | PLG_SYSTEM_SOCIALMETA_FBUSERPROFILE_DESC="Indiquez l'URL du profil utilisateur avec le préfixe https://. Cela définira l'auteur par défaut de votre site. Ce paramètre peut être remplacé pour chaque auteur via le composant de contact, dans l'onglet Facebook." 22 | PLG_SYSTEM_SOCIALMETA_PAGEURL="URL de la page Facebook" 23 | PLG_SYSTEM_SOCIALMETA_PAGEURL_DESC="Indiquez l'URL du profil utilisateur avec le préfixe https://. Cela définira l'éditeur des articles." 24 | PLG_SYSTEM_SOCIALMETA_ADMINS="ID de l'Admin" 25 | PLG_SYSTEM_SOCIALMETA_ADMINS_DESC="Indiquez l'ID Facebook de l'utilisateur qui pourra accéder aux statistiques de la page. Consultez Facebook insights pour plus d'informations" 26 | PLG_SYSTEM_SOCIALMETA_TWITTERSITE="@pseudo Twitter" 27 | PLG_SYSTEM_SOCIALMETA_TWITTERSITE_DESC="Indiquez ici le @pseudo Twitter de tout votre site. Indiquez le compte Twitter à suivre de l'auteur/entité par défaut. Ce paramètre peut être remplacé pour chaque auteur via le composant de contact, dans l'onglet Facebook" 28 | 29 | COM_CONTENT_METAFB_FIELDSET_LABEL="Social" 30 | COM_MENUS_METAFB_FIELDSET_LABEL="Social" 31 | COM_CATEGORIES_METAFB_FIELDSET_LABEL="Social" 32 | COM_CONTACT_METAFB_FIELDSET_LABEL="Social" 33 | PLG_SYSTEM_SOCIALMETA_IMAGENOTE="Faites attention à la résolution des images !" 34 | PLG_SYSTEM_SOCIALMETA_IMAGENOTE_DESC="Utilisez des images d'au moins 1200 x 630 pixels pour un meilleur affichage sur les appareils de haute résolution. Au minimum, vous devriez utiliser des images de 600 x 315 pixels pour afficher de plus grandes images pour les publications de liens de page. Le poids des images doit être inférieur à 8MB. Essayez de rester proche d'un ratio de 1.91:1 pour l'affichage complet de l'image dans le fil d'actualité, sans rognage. Consultez https://developers.facebook.com/docs/sharing/best-practices#images pour plus d'informations." 35 | PLG_SYSTEM_SOCIALMETA_TYPE="Type principal de contenu" 36 | PLG_SYSTEM_SOCIALMETA_TYPE_DESC="Vous ne devriez rien modifier sauf si vous souhaitez que votre article soit traité en tant que contenu vidéo. Il peut ainsi devenir du contenu streamable dans les fils d'actualité de Facebook et Twitter. L'autre intérêt de paramétrer un article en tant que contenu vidéo est d'essayer d'obtenir une prévisualisation de la vidéo dans les résultats de recherche de Google." 37 | PLG_SYSTEM_SOCIALMETA_IMAGE="Image" 38 | PLG_SYSTEM_SOCIALMETA_IMAGE_DESC="L'image à utiliser lors du partage d'un article sur Facebook, Google+ et Twitter." 39 | PLG_SYSTEM_SOCIALMETA_TITLE="Titre" 40 | PLG_SYSTEM_SOCIALMETA_TITLE_DESC="Si vide, le titre de l'article sera alors utilisé" 41 | PLG_SYSTEM_SOCIALMETA_DESC="Description" 42 | PLG_SYSTEM_SOCIALMETA_DESC_DESC="Si vide, le début de l'article sera alors utilisé" 43 | PLG_SYSTEM_SOCIALMETA_CHARSLEFT="caractères restants..." 44 | PLG_SYSTEM_SOCIALMETA_SEEALSO="Articles associés" 45 | PLG_SYSTEM_SOCIALMETA_SEEALSO_DESC="Ajoutez des ressources associées pour tenter d'afficher des éléments associés de votre site sous votre publication dans le fil d'actualité." 46 | PLG_SYSTEM_SOCIALMETA_CONTACTNOTE="Remarque importante" 47 | PLG_SYSTEM_SOCIALMETA_CONTACTNOTE_DESC="Veuillez indiquer l'URL du profil Facebook de l'utilisateur dans ce champ si vous souhaitez le lier à la publication. Ainsi, l'auteur peut être suivi sur Facebook lorsque l'article est partagé. L'URL de la page Facebook de l'éditeur (article:publisher) peut être paramétré dans la configuration du plugin système. Pour plus d'informations sur les balises Open Graph d'éditeur et d'auteur, veuillez consulter https://developers.facebook.com/blog/post/2013/06/19/platform-updates--new-open-graph-tags-for-media-publishers-and-more. A noter que le contact n'a pas besoin d'être publié" 48 | PLG_SYSTEM_SOCIALMETA_FBUSERPROFILE="URL du profil Facebook" 49 | PLG_SYSTEM_SOCIALMETA_FBUSERPROFILE_DESC="Indiquez l'URL du profil de l'utilisateur avec le préfixe https://" 50 | PLG_SYSTEM_SOCIALMETA_VIDEOURL="URL HTTPS de la vidéo" 51 | PLG_SYSTEM_SOCIALMETA_VIDEOURL_DESC="Indiquez l'URL de la ressource vidéo à associer à votre contenu. A noter que Facebook et Twitter EXIGENT le HTTPS pour éviter des erreurs de contenu mixte de la part des navigateurs lors de la lecture de la vidéo dans le flux" 52 | PLG_SYSTEM_SOCIALMETA_VIDEOTYPE="MIME Video" 53 | PLG_SYSTEM_SOCIALMETA_VIDEOTYPE_DESC="Ce champ devrait être automatiquement renseigné en cliquant sur le bouton d'extraction. Si ce n'est pas le cas, les valeurs acceptées sont : application/x-shockwave-flash ou video/mp4" 54 | PLG_SYSTEM_SOCIALMETA_VIDEOWIDTH="Largeur de la video" 55 | PLG_SYSTEM_SOCIALMETA_VIDEOWIDTH_DESC="Largeur de votre vidéo en pixels" 56 | PLG_SYSTEM_SOCIALMETA_VIDEOHEIGHT="Hauteur de la video" 57 | PLG_SYSTEM_SOCIALMETA_VIDEOHEIGHT_DESC="Hauteur de votre vidéo en pixels" 58 | PLG_SYSTEM_SOCIALMETA_FETCH_PROPERTIES="Extraire les propriétés" 59 | PLG_SYSTEM_SOCIALMETA_CLEAR="Effacer" 60 | PLG_SYSTEM_SOCIALMETA_TWITTERUSERNAME="@pseudo Twitter" 61 | PLG_SYSTEM_SOCIALMETA_TWITTERUSERNAME_DESC="Indiquez ici le @pseudo Twitter de l'auteur à suivre." 62 | PLG_SYSTEM_SOCIALMETA_VIDEOSECUREURL="Flux securisé" 63 | PLG_SYSTEM_SOCIALMETA_VIDEOSECUREURL_DESC="L'URL HTTPS du flux. Ce champ devrait être automatiquement renseigné en cliquant sur le bouton d'extraction. Si ce n'est pas le cas, merci de founir l'adresse du flux." 64 | 65 | COM_PLUGINS_COMPONENTS_FIELDSET_LABEL="Composants" 66 | PLG_SYSTEM_SOCIALMETA_ARTICLE_SPACER="Articles Joomla! (com_content.article)" 67 | PLG_SYSTEM_SOCIALMETA_ARTICLE_IMAGE="Image à utiliser" 68 | PLG_SYSTEM_SOCIALMETA_ARTICLE_IMAGE_DESC="Choisissez quelle image vous souhaitez utiliser pour vos articles Joomla. Intro + html : image d'intro de l'onglet images, puis analyser le HTML en recours. Full + html : image de l'article de l'onglet images, puis analyser le HTML en recours. html : va analyser le html de l'article et utiliser la première image trouvée. IMPORTANT : Il n'est pas recommandé d'utiliser le mode html car il fournira une image aléatoire ce qui n'est pas souhaitable. Utiliseriez-vous une image au hasard pour vos dépliants, brochures ou affiches ? La seule raison pour laquelle vous pourriez utiliser ce mode est d'être sûr à l'avance que l'image qui apparaîtra en première position dans le code html de l'article est celle désirée." 69 | PLG_SYSTEM_SOCIALMETA_ARTICLE_IMAGE_MANUAL="Uniquement en manual" 70 | PLG_SYSTEM_SOCIALMETA_ARTICLE_IMAGE_INTRO="Intro + html" 71 | PLG_SYSTEM_SOCIALMETA_ARTICLE_IMAGE_FULL="Full + html" 72 | PLG_SYSTEM_SOCIALMETA_ARTICLE_IMAGE_MAGIC="html" 73 | PLG_SYSTEM_SOCIALMETA_FLEXICONTENT_SPACER="Éléments FLEXIcontent (com_flexicontent.item) PAS ENCORE ACTIF" 74 | PLG_SYSTEM_SOCIALMETA_FLEXICONTENT_IMAGE_FIELD="Champ d'image personnalisée" 75 | PLG_SYSTEM_SOCIALMETA_FLEXICONTENT_IMAGE_FIELD_DESC="Vous pouvez choisir un champ d'image à utiliser comme og:image. Si le champ est vide, les règles pour les articles Joomla! ci-dessus s'appliqueront." 76 | JGLOBAL_FIELDSET_COMPONENTS="Composants" 77 | PLG_SYSTEM_SOCIALMETA_FLEXICONTENT_NOT_INSTALLED="FLEXIcontent n'est pas installé" 78 | PLG_SYSTEM_SOCIALMETA_FLEXICONTENT_IMAGESIZE="Taille de la miniature" 79 | PLG_SYSTEM_SOCIALMETA_FLEXICONTENT_IMAGESIZE_DESC="Indiquez la taille de la miniature que vous souhaitez utiliser" 80 | PLG_SYSTEM_SOCIALMETA_FLEXICONTENT_IMAGE_AUTO="Auto" 81 | PLG_SYSTEM_SOCIALMETA_FLEXICONTENT_IMAGE_LARGE="Grande" 82 | PLG_SYSTEM_SOCIALMETA_FLEXICONTENT_IMAGE_MEDIUM="Moyenne" 83 | PLG_SYSTEM_SOCIALMETA_FLEXICONTENT_IMAGE_SMALL="Petite" 84 | PLG_SYSTEM_SOCIALMETA_GOOGLEPLUS="Editeur Google" 85 | PLG_SYSTEM_SOCIALMETA_GOOGLEPLUS_DESC="Indiquez le nom de l'éditeur Google" 86 | PLG_SYSTEM_SOCIALMETA_GOOGLEPLUS_LOGO="Google Publisher logo" 87 | PLG_SYSTEM_SOCIALMETA_GOOGLEPLUS_LOGO_DESC="Si vous souhaitez apparaître dans le carrousel des Top Stories (uniquement si vous utilisez AMP HTML) ou obtenir une Rich Card dans les résultats de recherche Google, vous devriez envisager de proposer Logo Publisher. Dimensions max. 600x60. Pour plus d’informations : https://developers.google.com/search/docs/data-types/articles" 88 | PLG_SYSTEM_SOCIALMETA_GOOGLE_STRUCTURED_DATA="Google Structured Data" 89 | PLG_SYSTEM_SOCIALMETA_GOOGLE_STRUCTURED_DATA_ADD="Ajouter les Structured Data" 90 | PLG_SYSTEM_SOCIALMETA_GOOGLE_STRUCTURED_DATA_ADD_DESC="Ajouter les Structured Data. Si votre template fournit déjà le marquage, vous pouvez désactiver celui de socialmeta pour éviter les conflits" -------------------------------------------------------------------------------- /language/fr-FR/fr-FR.plg_system_socialmeta.sys.ini: -------------------------------------------------------------------------------- 1 | ; Joomla! Project 2 | ; Copyright (C) 2005 - 2016 Open Source Matters. All rights reserved. 3 | ; License GNU General Public License version 2 or later; see LICENSE.txt, see LICENSE.php 4 | ; Note : All ini files need to be saved as UTF-8 5 | 6 | PLG_SYSTEM_SOCIALMETA="Système - Socialmeta" 7 | PLG_SYSTEM_SOCIALMETA_XML_DESCRIPTION="Vous permet de configurer correctement le partage de contenu sur Facebook, Twitter et autres réseaux sociaux. Vous pouvez choisir l'image, le titre et la description en créant des métas pour Open Graph." 8 | PLG_SYSTEM_SOCIALMETA_DEFAULT_IMAGE="Image du site par défaut" 9 | PLG_SYSTEM_SOCIALMETA_DEFAULT_IMAGE_DESC="Vous pouvez définir une image par défaut à partager sur facebook pour toutes les pages sauf celles définies manuellement avec le plugin de contenu. Laissez vide si vous ne souhaitez pas l'utiliser." 10 | PLG_SYSTEM_SOCIALMETA_FBAPPID="ID de l'application Facebook" 11 | PLG_SYSTEM_SOCIALMETA_FBAPPID_DESC="Si vous avez une ID d'application pour votre site, vous pouvez l'indiquer ici. Le plugin va générer la propriété meta. Laissez vide si vous ne souhaitez pas l'utiliser." 12 | PLG_SYSTEM_SOCIALMETA_NOTE="Des informations utiles, que vous devriez lire" 13 | PLG_SYSTEM_SOCIALMETA_NOTE_DESC="Tout d'abord, les Recommandations en matière de partage pour les sites web et les applications mobiles de Facebook. Utilisez le Débogueur d'objet Open Graph Facebook pour vérifier vos pages et mettre vos images en cache. Pour plus d'informations sur le protocole Open Graph, veuillez consulter ogp.me" 14 | PLG_SYSTEM_SOCIALMETA_NOTE2="Paramètres de compatibilité" 15 | PLG_SYSTEM_SOCIALMETA_NOTE2_DESC="Vous pouvez utiliser ces paramètres pour désactiver la création de certaines metas spécifiques qui pourraient entrer en conflit avec une autre extension que vous utilisez." 16 | PLG_SYSTEM_SOCIALMETA_TITLELIMIT="Limite du titre" 17 | PLG_SYSTEM_SOCIALMETA_TITLELIMIT_DESC="Vous pouvez modifier ici la longueur du titre dans le compteur de caractères. Le réglage correct est actuellement de 68 caractères, mais cette valeur peut changer à l'avenir, selon les recommandations de Facebook." 18 | PLG_SYSTEM_SOCIALMETA_DESCLIMIT="Limite de la description" 19 | PLG_SYSTEM_SOCIALMETA_DESCLIMIT_DESC="Vous pouvez modifier ici la longueur de la description dans le compteur de caractères. Le réglage correct est actuellement de 200 caractères, mais cette valeur peut changer à l'avenir, selon les recommandations de Facebook." 20 | PLG_SYSTEM_SOCIALMETA_FBUSERPROFILE="URL du profil Facebook" 21 | PLG_SYSTEM_SOCIALMETA_FBUSERPROFILE_DESC="Indiquez l'URL du profil utilisateur avec le préfixe https://. Cela définira l'auteur par défaut de votre site. Ce paramètre peut être remplacé pour chaque auteur via le composant de contact, dans l'onglet Facebook." 22 | PLG_SYSTEM_SOCIALMETA_PAGEURL="URL de la page Facebook" 23 | PLG_SYSTEM_SOCIALMETA_PAGEURL_DESC="Indiquez l'URL du profil utilisateur avec le préfixe https://. Cela définira l'éditeur des articles." 24 | PLG_SYSTEM_SOCIALMETA_ADMINS="ID de l'Admin" 25 | PLG_SYSTEM_SOCIALMETA_ADMINS_DESC="Indiquez l'ID Facebook de l'utilisateur qui pourra accéder aux statistiques de la page. Consultez Facebook insights pour plus d'informations" 26 | PLG_SYSTEM_SOCIALMETA_TWITTERSITE="@pseudo Twitter" 27 | PLG_SYSTEM_SOCIALMETA_TWITTERSITE_DESC="Indiquez ici le @pseudo Twitter de tout votre site. Indiquez le compte Twitter à suivre de l'auteur/entité par défaut. Ce paramètre peut être remplacé pour chaque auteur via le composant de contact, dans l'onglet Facebook" 28 | 29 | COM_CONTENT_METAFB_FIELDSET_LABEL="Social" 30 | COM_MENUS_METAFB_FIELDSET_LABEL="Social" 31 | COM_CATEGORIES_METAFB_FIELDSET_LABEL="Social" 32 | COM_CONTACT_METAFB_FIELDSET_LABEL="Social" 33 | PLG_SYSTEM_SOCIALMETA_IMAGENOTE="Faites attention à la résolution des images !" 34 | PLG_SYSTEM_SOCIALMETA_IMAGENOTE_DESC="Utilisez des images d'au moins 1200 x 630 pixels pour un meilleur affichage sur les appareils de haute résolution. Au minimum, vous devriez utiliser des images de 600 x 315 pixels pour afficher de plus grandes images pour les publications de liens de page. Le poids des images doit être inférieur à 8MB. Essayez de rester proche d'un ratio de 1.91:1 pour l'affichage complet de l'image dans le fil d'actualité, sans rognage. Consultez https://developers.facebook.com/docs/sharing/best-practices#images pour plus d'informations." 35 | PLG_SYSTEM_SOCIALMETA_TYPE="Type principal de contenu" 36 | PLG_SYSTEM_SOCIALMETA_TYPE_DESC="Vous ne devriez rien modifier sauf si vous souhaitez que votre article soit traité en tant que contenu vidéo. Il peut ainsi devenir du contenu streamable dans les fils d'actualité de Facebook et Twitter. L'autre intérêt de paramétrer un article en tant que contenu vidéo est d'essayer d'obtenir une prévisualisation de la vidéo dans les résultats de recherche de Google." 37 | PLG_SYSTEM_SOCIALMETA_IMAGE="Image" 38 | PLG_SYSTEM_SOCIALMETA_IMAGE_DESC="L'image à utiliser lors du partage d'un article sur Facebook, Google+ et Twitter." 39 | PLG_SYSTEM_SOCIALMETA_TITLE="Titre" 40 | PLG_SYSTEM_SOCIALMETA_TITLE_DESC="Si vide, le titre de l'article sera alors utilisé" 41 | PLG_SYSTEM_SOCIALMETA_DESC="Description" 42 | PLG_SYSTEM_SOCIALMETA_DESC_DESC="Si vide, le début de l'article sera alors utilisé" 43 | PLG_SYSTEM_SOCIALMETA_CHARSLEFT="caractères restants..." 44 | PLG_SYSTEM_SOCIALMETA_SEEALSO="Articles associés" 45 | PLG_SYSTEM_SOCIALMETA_SEEALSO_DESC="Ajoutez des ressources associées pour tenter d'afficher des éléments associés de votre site sous votre publication dans le fil d'actualité." 46 | PLG_SYSTEM_SOCIALMETA_CONTACTNOTE="Remarque importante" 47 | PLG_SYSTEM_SOCIALMETA_CONTACTNOTE_DESC="Veuillez indiquer l'URL du profil Facebook de l'utilisateur dans ce champ si vous souhaitez le lier à la publication. Ainsi, l'auteur peut être suivi sur Facebook lorsque l'article est partagé. L'URL de la page Facebook de l'éditeur (article:publisher) peut être paramétré dans la configuration du plugin système. Pour plus d'informations sur les balises Open Graph d'éditeur et d'auteur, veuillez consulter https://developers.facebook.com/blog/post/2013/06/19/platform-updates--new-open-graph-tags-for-media-publishers-and-more. A noter que le contact n'a pas besoin d'être publié" 48 | PLG_SYSTEM_SOCIALMETA_FBUSERPROFILE="URL du profil Facebook" 49 | PLG_SYSTEM_SOCIALMETA_FBUSERPROFILE_DESC="Indiquez l'URL du profil de l'utilisateur avec le préfixe https://" 50 | PLG_SYSTEM_SOCIALMETA_VIDEOURL="URL HTTPS de la vidéo" 51 | PLG_SYSTEM_SOCIALMETA_VIDEOURL_DESC="Indiquez l'URL de la ressource vidéo à associer à votre contenu. A noter que Facebook et Twitter EXIGENT le HTTPS pour éviter des erreurs de contenu mixte de la part des navigateurs lors de la lecture de la vidéo dans le flux" 52 | PLG_SYSTEM_SOCIALMETA_VIDEOTYPE="MIME Video" 53 | PLG_SYSTEM_SOCIALMETA_VIDEOTYPE_DESC="Ce champ devrait être automatiquement renseigné en cliquant sur le bouton d'extraction. Si ce n'est pas le cas, les valeurs acceptées sont : application/x-shockwave-flash ou video/mp4" 54 | PLG_SYSTEM_SOCIALMETA_VIDEOWIDTH="Largeur de la video" 55 | PLG_SYSTEM_SOCIALMETA_VIDEOWIDTH_DESC="Largeur de votre vidéo en pixels" 56 | PLG_SYSTEM_SOCIALMETA_VIDEOHEIGHT="Hauteur de la video" 57 | PLG_SYSTEM_SOCIALMETA_VIDEOHEIGHT_DESC="Hauteur de votre vidéo en pixels" 58 | PLG_SYSTEM_SOCIALMETA_FETCH_PROPERTIES="Extraire les propriétés" 59 | PLG_SYSTEM_SOCIALMETA_CLEAR="Effacer" 60 | PLG_SYSTEM_SOCIALMETA_TWITTERUSERNAME="@pseudo Twitter" 61 | PLG_SYSTEM_SOCIALMETA_TWITTERUSERNAME_DESC="Indiquez ici le @pseudo Twitter de l'auteur à suivre." 62 | PLG_SYSTEM_SOCIALMETA_VIDEOSECUREURL="Flux securisé" 63 | PLG_SYSTEM_SOCIALMETA_VIDEOSECUREURL_DESC="L'URL HTTPS du flux. Ce champ devrait être automatiquement renseigné en cliquant sur le bouton d'extraction. Si ce n'est pas le cas, merci de founir l'adresse du flux." 64 | 65 | COM_PLUGINS_COMPONENTS_FIELDSET_LABEL="Composants" 66 | PLG_SYSTEM_SOCIALMETA_ARTICLE_SPACER="Articles Joomla! (com_content.article)" 67 | PLG_SYSTEM_SOCIALMETA_ARTICLE_IMAGE="Image à utiliser" 68 | PLG_SYSTEM_SOCIALMETA_ARTICLE_IMAGE_DESC="Choisissez quelle image vous souhaitez utiliser pour vos articles Joomla. Intro + html : image d'intro de l'onglet images, puis analyser le HTML en recours. Full + html : image de l'article de l'onglet images, puis analyser le HTML en recours. html : va analyser le html de l'article et utiliser la première image trouvée. IMPORTANT : Il n'est pas recommandé d'utiliser le mode html car il fournira une image aléatoire ce qui n'est pas souhaitable. Utiliseriez-vous une image au hasard pour vos dépliants, brochures ou affiches ? La seule raison pour laquelle vous pourriez utiliser ce mode est d'être sûr à l'avance que l'image qui apparaîtra en première position dans le code html de l'article est celle désirée." 69 | PLG_SYSTEM_SOCIALMETA_ARTICLE_IMAGE_MANUAL="Uniquement en manual" 70 | PLG_SYSTEM_SOCIALMETA_ARTICLE_IMAGE_INTRO="Intro + html" 71 | PLG_SYSTEM_SOCIALMETA_ARTICLE_IMAGE_FULL="Full + html" 72 | PLG_SYSTEM_SOCIALMETA_ARTICLE_IMAGE_MAGIC="html" 73 | PLG_SYSTEM_SOCIALMETA_FLEXICONTENT_SPACER="Éléments FLEXIcontent (com_flexicontent.item) PAS ENCORE ACTIF" 74 | PLG_SYSTEM_SOCIALMETA_FLEXICONTENT_IMAGE_FIELD="Champ d'image personnalisée" 75 | PLG_SYSTEM_SOCIALMETA_FLEXICONTENT_IMAGE_FIELD_DESC="Vous pouvez choisir un champ d'image à utiliser comme og:image. Si le champ est vide, les règles pour les articles Joomla! ci-dessus s'appliqueront." 76 | JGLOBAL_FIELDSET_COMPONENTS="Composants" 77 | PLG_SYSTEM_SOCIALMETA_FLEXICONTENT_NOT_INSTALLED="FLEXIcontent n'est pas installé" 78 | PLG_SYSTEM_SOCIALMETA_FLEXICONTENT_IMAGESIZE="Taille de la miniature" 79 | PLG_SYSTEM_SOCIALMETA_FLEXICONTENT_IMAGESIZE_DESC="Indiquez la taille de la miniature que vous souhaitez utiliser" 80 | PLG_SYSTEM_SOCIALMETA_FLEXICONTENT_IMAGE_AUTO="Auto" 81 | PLG_SYSTEM_SOCIALMETA_FLEXICONTENT_IMAGE_LARGE="Grande" 82 | PLG_SYSTEM_SOCIALMETA_FLEXICONTENT_IMAGE_MEDIUM="Moyenne" 83 | PLG_SYSTEM_SOCIALMETA_FLEXICONTENT_IMAGE_SMALL="Petite" 84 | PLG_SYSTEM_SOCIALMETA_GOOGLEPLUS="Editeur Google" 85 | PLG_SYSTEM_SOCIALMETA_GOOGLEPLUS_DESC="Indiquez le nom de l'éditeur Google" 86 | PLG_SYSTEM_SOCIALMETA_GOOGLEPLUS_LOGO="Google Publisher logo" 87 | PLG_SYSTEM_SOCIALMETA_GOOGLEPLUS_LOGO_DESC="Si vous souhaitez apparaître dans le carrousel des Top Stories (uniquement si vous utilisez AMP HTML) ou obtenir une Rich Card dans les résultats de recherche Google, vous devriez envisager de proposer Logo Publisher. Dimensions max. 600x60. Pour plus d’informations : https://developers.google.com/search/docs/data-types/articles" 88 | PLG_SYSTEM_SOCIALMETA_GOOGLE_STRUCTURED_DATA="Google Structured Data" 89 | PLG_SYSTEM_SOCIALMETA_GOOGLE_STRUCTURED_DATA_ADD="Ajouter les Structured Data" 90 | PLG_SYSTEM_SOCIALMETA_GOOGLE_STRUCTURED_DATA_ADD_DESC="Ajouter les Structured Data. Si votre template fournit déjà le marquage, vous pouvez désactiver celui de socialmeta pour éviter les conflits" -------------------------------------------------------------------------------- /language/fr-FR/index.html: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /language/index.html: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /language/th-TH/index.html: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /language/th-TH/th-TH.plg_system_socialmeta.ini: -------------------------------------------------------------------------------- 1 | ; @date 2016-05-13 2 | ; @author Pisan Chueachatchai 3 | ; @copyright (C) 2005 - 2016 Open Source Matters. All rights reserved. 4 | ; @copyright (C) 2005 - 2016 Open Source Matters. All rights reserved. 5 | ; @license GNU General Public License version 2 or later; see LICENSE.txt, see LICENSE.php 6 | ; @note Client Administrator 7 | ; @note All ini files need to be saved as UTF-8 8 | 9 | 10 | PLG_SYSTEM_SOCIALMETA="ระบบ - โซเชียลเมต้า" 11 | PLG_SYSTEM_SOCIALMETA_XML_DESCRIPTION="ช่วยให้คุณตั้งค่าเนื้อหาที่จะถูกแชร์ไปยังโซเชียลมีเดียอย่างเฟสบุ๊คหรือทวิตเตอร์ โดยสามารถเลือกรูป ชื่อและรายละเอียดใส่ได้เอง" 12 | PLG_SYSTEM_SOCIALMETA_DEFAULT_IMAGE="รูป" 13 | PLG_SYSTEM_SOCIALMETA_DEFAULT_IMAGE_DESC="รูปที่จะถูกนำไปใช้งานตอนแชร์" 14 | PLG_SYSTEM_SOCIALMETA_FBAPPID="เฟสบุ๊ค Application ID" 15 | PLG_SYSTEM_SOCIALMETA_FBAPPID_DESC="ถ้าคุณมี เฟสบุ๊ค Application ID สามารถใส่ได้เลย หากไม่มีก็ว่างไว้" 16 | PLG_SYSTEM_SOCIALMETA_NOTE="ควรอ่านข้อมูลเป็นประโยชน์" 17 | PLG_SYSTEM_SOCIALMETA_NOTE_DESC="ข้อควรปฏิบัติที่ดีที่สุดสำหรับเว็บไซต์และแอพพลิเคมือถือ และใช้ เฟสบุ๊คดีบัค เพื่อตรวจสอบว่าข้อมูลที่ถูกแชร์ไปนั้นถูกต้อง ส่วนรายระเอียดเกี่ยวกับ pen Graph Protocol ไปที่ogp.me" 18 | PLG_SYSTEM_SOCIALMETA_NOTE2="ตั้งค่าความเข้ากันได้" 19 | PLG_SYSTEM_SOCIALMETA_NOTE2_DESC="คุณสามารถตั้งค่าเปิดปิด บางเมต้าได้ เพื่อไม่ให้ซ้ำซ้อนกับบางส่วนเสริม" 20 | PLG_SYSTEM_SOCIALMETA_TITLELIMIT="ความยาวชื่อ" 21 | PLG_SYSTEM_SOCIALMETA_TITLELIMIT_DESC="คุณสามารถกำหนดความยาวของชื่อเรื่องได้ " 22 | PLG_SYSTEM_SOCIALMETA_DESCLIMIT="ความยาวคำอธิบาย" 23 | PLG_SYSTEM_SOCIALMETA_DESCLIMIT_DESC="คุณสามารถกำหนดความยาวของคำอธิบายได้ " 24 | PLG_SYSTEM_SOCIALMETA_FBUSERPROFILE="URL โปรไฟล์เฟสบุ๊ค " 25 | PLG_SYSTEM_SOCIALMETA_FBUSERPROFILE_DESC="ใส่ URL โปรไฟล์เฟสบุ๊ค โดยใส่ https:// ด้วย" 26 | PLG_SYSTEM_SOCIALMETA_PAGEURL="URL เพจเฟสบุ๊ค " 27 | PLG_SYSTEM_SOCIALMETA_PAGEURL_DESC="ใส่URL เพจเฟสบุ๊ค โดยใส่ https:// ด้วย" 28 | PLG_SYSTEM_SOCIALMETA_ADMINS="ID ผู้ดูแล" 29 | PLG_SYSTEM_SOCIALMETA_ADMINS_DESC="ใส่ ID ของคนที่สามารถเข้าดูข้อมูลสถิติ" 30 | PLG_SYSTEM_SOCIALMETA_TWITTERSITE="ทวิตเตอร์ @username" 31 | PLG_SYSTEM_SOCIALMETA_TWITTERSITE_DESC="ใส่ ทวิตเตอร์ @username " 32 | 33 | COM_CONTENT_METAFB_FIELDSET_LABEL="โซเชียล" 34 | COM_MENUS_METAFB_FIELDSET_LABEL="โซเชียล" 35 | COM_CATEGORIES_METAFB_FIELDSET_LABEL="โซเชียล" 36 | COM_CONTACT_METAFB_FIELDSET_LABEL="โซเชียล" 37 | PLG_SYSTEM_SOCIALMETA_IMAGENOTE="แนะนำความละเอียดของภาพ!" 38 | PLG_SYSTEM_SOCIALMETA_IMAGENOTE_DESC="ใช้รูปขนาด1200 x 630 pixels ดีที่สึดและขนาดเล็กที่สุดที่ควรใช้คือ 600 x 315 pixels เพื่อแสดงผลสวยงามในตอนโพส รายละเอียดอื่นๆศึกษาได้จากhttps://developers.facebook.com/docs/sharing/best-practices#images " 39 | PLG_SYSTEM_SOCIALMETA_TYPE="เนื้อหานี่เป็น" 40 | PLG_SYSTEM_SOCIALMETA_TYPE_DESC="เลือกเนื้อหาที่เหมาะสมว่าเป็น วีดีโอหรือ เนื้อหา เพราะหารแสดงผลจะต่างกัน" 41 | PLG_SYSTEM_SOCIALMETA_IMAGE="รูป" 42 | PLG_SYSTEM_SOCIALMETA_IMAGE_DESC="รูปใช้แสดงใน เฟสบุค Google+ and Twitter." 43 | PLG_SYSTEM_SOCIALMETA_TITLE="ชื่อ" 44 | PLG_SYSTEM_SOCIALMETA_TITLE_DESC="ถ้าว่างไว้จะไปใช้ชื่อเดียวกับชื่อบทความ" 45 | PLG_SYSTEM_SOCIALMETA_DESC="รายละเอียด" 46 | PLG_SYSTEM_SOCIALMETA_DESC_DESC="ถ้าว่างไว้จะไปใช้ชื่อเดียวกับเนื้อหา" 47 | PLG_SYSTEM_SOCIALMETA_CHARSLEFT="ตัวอักษรที่เหลือ ..." 48 | PLG_SYSTEM_SOCIALMETA_SEEALSO="เนื้อหาที่เกี่ยวข้อง" 49 | PLG_SYSTEM_SOCIALMETA_SEEALSO_DESC="เลือกเนื้อหาที่เกี่ยวข้อง" 50 | PLG_SYSTEM_SOCIALMETA_CONTACTNOTE="หมายเหตุสำคัญ" 51 | PLG_SYSTEM_SOCIALMETA_CONTACTNOTE_DESC="ใส่ Url Facebook หรือเพจของคุณ ศึกาษเพิ่มเติมhttps://developers.facebook.com/blog/post/2013/06/19/platform-updates--new-open-graph-tags-for-media-publishers-and-more. Note that the contact doesn't need to be published" 52 | PLG_SYSTEM_SOCIALMETA_VIDEOURL="วีดีโอ Url" 53 | PLG_SYSTEM_SOCIALMETA_VIDEOURL_DESC="ใส่ วีดีโอ Url ลงไป" 54 | PLG_SYSTEM_SOCIALMETA_VIDEOTYPE="วีดีโอ MIME" 55 | PLG_SYSTEM_SOCIALMETA_VIDEOTYPE_DESC="ฟิวนี้จะแสดงอัตโนมัติ: application/x-shockwave-flash or video/mp4" 56 | PLG_SYSTEM_SOCIALMETA_VIDEOWIDTH="ความกว้างวีดีโอ" 57 | PLG_SYSTEM_SOCIALMETA_VIDEOWIDTH_DESC="ความกว้างของวีดีโอ" 58 | PLG_SYSTEM_SOCIALMETA_VIDEOHEIGHT="ความสูงวีดีโอ" 59 | PLG_SYSTEM_SOCIALMETA_VIDEOHEIGHT_DESC="ความสูงของวีดีโอ" 60 | PLG_SYSTEM_SOCIALMETA_FETCH_PROPERTIES="ดึงข้อมูลคุณสมบัติ" 61 | PLG_SYSTEM_SOCIALMETA_CLEAR="ล้าง" 62 | PLG_SYSTEM_SOCIALMETA_TWITTERUSERNAME="ทวิตเตอร์ @username" 63 | PLG_SYSTEM_SOCIALMETA_TWITTERUSERNAME_DESC="ใส่ ทวิตเตอร์ @username " 64 | PLG_SYSTEM_SOCIALMETA_VIDEOSECUREURL="Secured stream URL" 65 | PLG_SYSTEM_SOCIALMETA_VIDEOSECUREURL_DESC="ฟิวนี้จะแสดงอัตโนมัติ" 66 | 67 | COM_PLUGINS_COMPONENTS_FIELDSET_LABEL="คอมโพเน้น" 68 | PLG_SYSTEM_SOCIALMETA_ARTICLE_SPACER="ระบบจัดการเนื้อหาในจูมล่า (com_content.article)" 69 | PLG_SYSTEM_SOCIALMETA_ARTICLE_IMAGE="รูปที่จะใช้" 70 | PLG_SYSTEM_SOCIALMETA_ARTICLE_IMAGE_DESC="เลือกรุปแบบที่จะให้ระบบดึงรูปเนื้อหาไปใช้งาน" 71 | PLG_SYSTEM_SOCIALMETA_ARTICLE_IMAGE_MANUAL="ใส่เอง" 72 | PLG_SYSTEM_SOCIALMETA_ARTICLE_IMAGE_INTRO="จากเนื้อหาเริ่ม + html" 73 | PLG_SYSTEM_SOCIALMETA_ARTICLE_IMAGE_FULL="จากเนื้อหาหลัก + html" 74 | PLG_SYSTEM_SOCIALMETA_ARTICLE_IMAGE_MAGIC="html อย่างเดียว" 75 | PLG_SYSTEM_SOCIALMETA_FLEXICONTENT_SPACER="จาก FLEXIcontent (com_flexicontent.item) ไม่ทำงาน" 76 | PLG_SYSTEM_SOCIALMETA_FLEXICONTENT_IMAGE_FIELD="จากฟิลรูป" 77 | PLG_SYSTEM_SOCIALMETA_FLEXICONTENT_IMAGE_FIELD_DESC="คุณสามารถเลือกได้ตามข้อมูลภาพที่จะใช้เป็น og:image" 78 | JGLOBAL_FIELDSET_COMPONENTS="ส่วนประกอบ" 79 | PLG_SYSTEM_SOCIALMETA_FLEXICONTENT_NOT_INSTALLED="FLEXIcontent ถูกติดตั้ง" 80 | PLG_SYSTEM_SOCIALMETA_FLEXICONTENT_IMAGESIZE="ขนาดรูปย่อ" 81 | PLG_SYSTEM_SOCIALMETA_FLEXICONTENT_IMAGESIZE_DESC="เลือกขนาดรูปย่อที่จะใช้" 82 | PLG_SYSTEM_SOCIALMETA_FLEXICONTENT_IMAGE_AUTO="อัตโนมัติ" 83 | PLG_SYSTEM_SOCIALMETA_FLEXICONTENT_IMAGE_LARGE="ใหญ่" 84 | PLG_SYSTEM_SOCIALMETA_FLEXICONTENT_IMAGE_MEDIUM="กลาง" 85 | PLG_SYSTEM_SOCIALMETA_FLEXICONTENT_IMAGE_SMALL="เล็ก" 86 | PLG_SYSTEM_SOCIALMETA_GOOGLEPLUS="โปรไฟล์ Google+ " 87 | PLG_SYSTEM_SOCIALMETA_GOOGLEPLUS_DESC="ใส่ url โปรไฟล์ Google+ " 88 | PLG_SYSTEM_SOCIALMETA_GOOGLEPLUS_LOGO="โลโก้ ใช้กับ Google+ " 89 | 90 | [New Strings] 91 | 92 | PLG_SYSTEM_SOCIALMETA_GOOGLEPLUS_LOGO_DESC="หากคุณต้องหารให้แสดงในเนื้อหาเวียยน (ใช้เฉพาะ AMP HTML) หรือใน Rich Card ในผลการค้นหาของ กูเกิลคุณสามารถใส่โลโก้ของคุณลงไปได้. ขนาดสูงสุด 600x60. รายละเอียดอื่นๆ: https://developers.google.com/search/docs/data-types/articles" 93 | -------------------------------------------------------------------------------- /language/th-TH/th-TH.plg_system_socialmeta.sys.ini: -------------------------------------------------------------------------------- 1 | ; @date 2016-05-13 2 | ; @author Pisan Chueachatchai 3 | ; @copyright (C) 2005 - 2016 Open Source Matters. All rights reserved. 4 | ; @copyright (C) 2005 - 2016 Open Source Matters. All rights reserved. 5 | ; @license GNU General Public License version 2 or later; see LICENSE.txt, see LICENSE.php 6 | ; @note Client Administrator 7 | ; @note All ini files need to be saved as UTF-8 8 | 9 | 10 | PLG_SYSTEM_SOCIALMETA="ระบบ - โซเชียลเมต้า" 11 | PLG_SYSTEM_SOCIALMETA_XML_DESCRIPTION="ช่วยให้คุณตั้งค่าเนื้อหาที่จะถูกแชร์ไปยังโซเชียลมีเดียอย่างเฟสบุ๊คหรือทวิตเตอร์ โดยสามารถเลือกรูป ชื่อและรายละเอียดใส่ได้เอง" 12 | PLG_SYSTEM_SOCIALMETA_DEFAULT_IMAGE="รูป" 13 | PLG_SYSTEM_SOCIALMETA_DEFAULT_IMAGE_DESC="รูปที่จะถูกนำไปใช้งานตอนแชร์" 14 | PLG_SYSTEM_SOCIALMETA_FBAPPID="เฟสบุ๊ค Application ID" 15 | PLG_SYSTEM_SOCIALMETA_FBAPPID_DESC="ถ้าคุณมี เฟสบุ๊ค Application ID สามารถใส่ได้เลย หากไม่มีก็ว่างไว้" 16 | PLG_SYSTEM_SOCIALMETA_NOTE="ควรอ่านข้อมูลเป็นประโยชน์" 17 | PLG_SYSTEM_SOCIALMETA_NOTE_DESC="ข้อควรปฏิบัติที่ดีที่สุดสำหรับเว็บไซต์และแอพพลิเคมือถือ และใช้ เฟสบุ๊คดีบัค เพื่อตรวจสอบว่าข้อมูลที่ถูกแชร์ไปนั้นถูกต้อง ส่วนรายระเอียดเกี่ยวกับ pen Graph Protocol ไปที่ogp.me" 18 | PLG_SYSTEM_SOCIALMETA_NOTE2="ตั้งค่าความเข้ากันได้" 19 | PLG_SYSTEM_SOCIALMETA_NOTE2_DESC="คุณสามารถตั้งค่าเปิดปิด บางเมต้าได้ เพื่อไม่ให้ซ้ำซ้อนกับบางส่วนเสริม" 20 | PLG_SYSTEM_SOCIALMETA_TITLELIMIT="ความยาวชื่อ" 21 | PLG_SYSTEM_SOCIALMETA_TITLELIMIT_DESC="คุณสามารถกำหนดความยาวของชื่อเรื่องได้ " 22 | PLG_SYSTEM_SOCIALMETA_DESCLIMIT="ความยาวคำอธิบาย" 23 | PLG_SYSTEM_SOCIALMETA_DESCLIMIT_DESC="คุณสามารถกำหนดความยาวของคำอธิบายได้ " 24 | PLG_SYSTEM_SOCIALMETA_FBUSERPROFILE="URL โปรไฟล์เฟสบุ๊ค " 25 | PLG_SYSTEM_SOCIALMETA_FBUSERPROFILE_DESC="ใส่ URL โปรไฟล์เฟสบุ๊ค โดยใส่ https:// ด้วย" 26 | PLG_SYSTEM_SOCIALMETA_PAGEURL="URL เพจเฟสบุ๊ค " 27 | PLG_SYSTEM_SOCIALMETA_PAGEURL_DESC="ใส่URL เพจเฟสบุ๊ค โดยใส่ https:// ด้วย" 28 | PLG_SYSTEM_SOCIALMETA_ADMINS="ID ผู้ดูแล" 29 | PLG_SYSTEM_SOCIALMETA_ADMINS_DESC="ใส่ ID ของคนที่สามารถเข้าดูข้อมูลสถิติ" 30 | PLG_SYSTEM_SOCIALMETA_TWITTERSITE="ทวิตเตอร์ @username" 31 | PLG_SYSTEM_SOCIALMETA_TWITTERSITE_DESC="ใส่ ทวิตเตอร์ @username " 32 | 33 | COM_CONTENT_METAFB_FIELDSET_LABEL="โซเชียล" 34 | COM_MENUS_METAFB_FIELDSET_LABEL="โซเชียล" 35 | COM_CATEGORIES_METAFB_FIELDSET_LABEL="โซเชียล" 36 | COM_CONTACT_METAFB_FIELDSET_LABEL="โซเชียล" 37 | PLG_SYSTEM_SOCIALMETA_IMAGENOTE="แนะนำความละเอียดของภาพ!" 38 | PLG_SYSTEM_SOCIALMETA_IMAGENOTE_DESC="ใช้รูปขนาด1200 x 630 pixels ดีที่สึดและขนาดเล็กที่สุดที่ควรใช้คือ 600 x 315 pixels เพื่อแสดงผลสวยงามในตอนโพส รายละเอียดอื่นๆศึกษาได้จากhttps://developers.facebook.com/docs/sharing/best-practices#images " 39 | PLG_SYSTEM_SOCIALMETA_TYPE="เนื้อหานี่เป็น" 40 | PLG_SYSTEM_SOCIALMETA_TYPE_DESC="เลือกเนื้อหาที่เหมาะสมว่าเป็น วีดีโอหรือ เนื้อหา เพราะหารแสดงผลจะต่างกัน" 41 | PLG_SYSTEM_SOCIALMETA_IMAGE="รูป" 42 | PLG_SYSTEM_SOCIALMETA_IMAGE_DESC="รูปใช้แสดงใน เฟสบุค Google+ and Twitter." 43 | PLG_SYSTEM_SOCIALMETA_TITLE="ชื่อ" 44 | PLG_SYSTEM_SOCIALMETA_TITLE_DESC="ถ้าว่างไว้จะไปใช้ชื่อเดียวกับชื่อบทความ" 45 | PLG_SYSTEM_SOCIALMETA_DESC="รายละเอียด" 46 | PLG_SYSTEM_SOCIALMETA_DESC_DESC="ถ้าว่างไว้จะไปใช้ชื่อเดียวกับเนื้อหา" 47 | PLG_SYSTEM_SOCIALMETA_CHARSLEFT="ตัวอักษรที่เหลือ ..." 48 | PLG_SYSTEM_SOCIALMETA_SEEALSO="เนื้อหาที่เกี่ยวข้อง" 49 | PLG_SYSTEM_SOCIALMETA_SEEALSO_DESC="เลือกเนื้อหาที่เกี่ยวข้อง" 50 | PLG_SYSTEM_SOCIALMETA_CONTACTNOTE="หมายเหตุสำคัญ" 51 | PLG_SYSTEM_SOCIALMETA_CONTACTNOTE_DESC="ใส่ Url Facebook หรือเพจของคุณ ศึกาษเพิ่มเติมhttps://developers.facebook.com/blog/post/2013/06/19/platform-updates--new-open-graph-tags-for-media-publishers-and-more. Note that the contact doesn't need to be published" 52 | PLG_SYSTEM_SOCIALMETA_VIDEOURL="วีดีโอ Url" 53 | PLG_SYSTEM_SOCIALMETA_VIDEOURL_DESC="ใส่ วีดีโอ Url ลงไป" 54 | PLG_SYSTEM_SOCIALMETA_VIDEOTYPE="วีดีโอ MIME" 55 | PLG_SYSTEM_SOCIALMETA_VIDEOTYPE_DESC="ฟิวนี้จะแสดงอัตโนมัติ: application/x-shockwave-flash or video/mp4" 56 | PLG_SYSTEM_SOCIALMETA_VIDEOWIDTH="ความกว้างวีดีโอ" 57 | PLG_SYSTEM_SOCIALMETA_VIDEOWIDTH_DESC="ความกว้างของวีดีโอ" 58 | PLG_SYSTEM_SOCIALMETA_VIDEOHEIGHT="ความสูงวีดีโอ" 59 | PLG_SYSTEM_SOCIALMETA_VIDEOHEIGHT_DESC="ความสูงของวีดีโอ" 60 | PLG_SYSTEM_SOCIALMETA_FETCH_PROPERTIES="ดึงข้อมูลคุณสมบัติ" 61 | PLG_SYSTEM_SOCIALMETA_CLEAR="ล้าง" 62 | PLG_SYSTEM_SOCIALMETA_TWITTERUSERNAME="ทวิตเตอร์ @username" 63 | PLG_SYSTEM_SOCIALMETA_TWITTERUSERNAME_DESC="ใส่ ทวิตเตอร์ @username " 64 | PLG_SYSTEM_SOCIALMETA_VIDEOSECUREURL="Secured stream URL" 65 | PLG_SYSTEM_SOCIALMETA_VIDEOSECUREURL_DESC="ฟิวนี้จะแสดงอัตโนมัติ" 66 | 67 | COM_PLUGINS_COMPONENTS_FIELDSET_LABEL="คอมโพเน้น" 68 | PLG_SYSTEM_SOCIALMETA_ARTICLE_SPACER="ระบบจัดการเนื้อหาในจูมล่า (com_content.article)" 69 | PLG_SYSTEM_SOCIALMETA_ARTICLE_IMAGE="รูปที่จะใช้" 70 | PLG_SYSTEM_SOCIALMETA_ARTICLE_IMAGE_DESC="เลือกรุปแบบที่จะให้ระบบดึงรูปเนื้อหาไปใช้งาน" 71 | PLG_SYSTEM_SOCIALMETA_ARTICLE_IMAGE_MANUAL="ใส่เอง" 72 | PLG_SYSTEM_SOCIALMETA_ARTICLE_IMAGE_INTRO="จากเนื้อหาเริ่ม + html" 73 | PLG_SYSTEM_SOCIALMETA_ARTICLE_IMAGE_FULL="จากเนื้อหาหลัก + html" 74 | PLG_SYSTEM_SOCIALMETA_ARTICLE_IMAGE_MAGIC="html อย่างเดียว" 75 | PLG_SYSTEM_SOCIALMETA_FLEXICONTENT_SPACER="จาก FLEXIcontent (com_flexicontent.item) ไม่ทำงาน" 76 | PLG_SYSTEM_SOCIALMETA_FLEXICONTENT_IMAGE_FIELD="จากฟิลรูป" 77 | PLG_SYSTEM_SOCIALMETA_FLEXICONTENT_IMAGE_FIELD_DESC="คุณสามารถเลือกได้ตามข้อมูลภาพที่จะใช้เป็น og:image" 78 | JGLOBAL_FIELDSET_COMPONENTS="ส่วนประกอบ" 79 | PLG_SYSTEM_SOCIALMETA_FLEXICONTENT_NOT_INSTALLED="FLEXIcontent ถูกติดตั้ง" 80 | PLG_SYSTEM_SOCIALMETA_FLEXICONTENT_IMAGESIZE="ขนาดรูปย่อ" 81 | PLG_SYSTEM_SOCIALMETA_FLEXICONTENT_IMAGESIZE_DESC="เลือกขนาดรูปย่อที่จะใช้" 82 | PLG_SYSTEM_SOCIALMETA_FLEXICONTENT_IMAGE_AUTO="อัตโนมัติ" 83 | PLG_SYSTEM_SOCIALMETA_FLEXICONTENT_IMAGE_LARGE="ใหญ่" 84 | PLG_SYSTEM_SOCIALMETA_FLEXICONTENT_IMAGE_MEDIUM="กลาง" 85 | PLG_SYSTEM_SOCIALMETA_FLEXICONTENT_IMAGE_SMALL="เล็ก" 86 | PLG_SYSTEM_SOCIALMETA_GOOGLEPLUS="โปรไฟล์ Google+ " 87 | PLG_SYSTEM_SOCIALMETA_GOOGLEPLUS_DESC="ใส่ url โปรไฟล์ Google+ " 88 | PLG_SYSTEM_SOCIALMETA_GOOGLEPLUS_LOGO="โลโก้ ใช้กับ Google+ " 89 | 90 | [New Strings] 91 | 92 | PLG_SYSTEM_SOCIALMETA_GOOGLEPLUS_LOGO_DESC="หากคุณต้องหารให้แสดงในเนื้อหาเวียยน (ใช้เฉพาะ AMP HTML) หรือใน Rich Card ในผลการค้นหาของ กูเกิลคุณสามารถใส่โลโก้ของคุณลงไปได้. ขนาดสูงสุด 600x60. รายละเอียดอื่นๆ: https://developers.google.com/search/docs/data-types/articles" 93 | -------------------------------------------------------------------------------- /socialmeta.php: -------------------------------------------------------------------------------- 1 | defaultimage = $this->params->get('facebookmeta_defaultimage', ''); 63 | $this->fbappid = $this->params->get('facebookmeta_appid', ''); 64 | $this->facebookmeta_auth = $this->params->get('facebookmeta_default_userid', ''); 65 | $this->facebookmeta_pub = $this->params->get('facebookmeta_pageid', ''); 66 | $this->facebookmeta_twittersite = $this->params->get('facebookmeta_twittersite', ''); 67 | $this->facebookmeta_googleplus = $this->params->get('facebookmeta_googleplus', ''); 68 | $this->facebookmeta_googlepluslogo = $this->params->get('facebookmeta_googlepluslogo', ''); 69 | $this->facebookmeta_admin = $this->params->get('facebookmeta_appadmin', ''); 70 | $this->facebookmeta_titlelimit = $this->params->get('facebookmeta_titlelimit', 68); 71 | $this->facebookmeta_desclimit = $this->params->get('facebookmeta_desclimit', 200); 72 | $this->facebookmeta_article_image = $this->params->get('facebookmeta_article_image', 2); 73 | $this->flexicontent_image_field = $this->params->get('facebookmeta_flexicontent_image_field', ''); 74 | $this->flexicontent_imagesize_field = $this->params->get('facebookmeta_flexicontent_imagesize_field', 'medium'); 75 | 76 | // Get the application if not done by JPlugin. This may happen during upgrades from Joomla 2.5. 77 | $this->app = $this->app ?? JFactory::getApplication(); 78 | 79 | // Is superadmin Flag 80 | $this->isSuperAdmin = JFactory::getUser()->authorise('core.admin', 'root.1'); 81 | // Is debug Flag 82 | $this->debug = JDEBUG || $this->isSuperAdmin; 83 | } 84 | 85 | /** 86 | * Add the facebook/linkedin fix. 87 | * It disable the gzip compression for both user agents 88 | * 89 | * Found in SocialMetaTags plugin https://github.com/hans2103/pkg_SocialMetaTags 90 | * Borrowed from https://github.com/dgt41/facebookfix 91 | * 92 | * @return void 93 | * 94 | * @since 1.1 95 | */ 96 | function onAfterRoute() 97 | { 98 | if ($this->app->isClient('administrator')) 99 | { 100 | return; 101 | } 102 | 103 | $unsupported = false; 104 | 105 | if (isset($_SERVER['HTTP_USER_AGENT'])) 106 | { 107 | /* Facebook User Agent 108 | * facebookexternalhit/1.1 (+http://www.facebook.com/externalhit_uatext.php) 109 | * LinkedIn User Agent 110 | * LinkedInBot/1.0 (compatible; Mozilla/5.0; Jakarta Commons-HttpClient/3.1 +http://www.linkedin.com) 111 | */ 112 | $pattern = strtolower('/facebookexternalhit|LinkedInBot/x'); 113 | 114 | if (preg_match($pattern, strtolower($_SERVER['HTTP_USER_AGENT']))) 115 | { 116 | $unsupported = true; 117 | } 118 | } 119 | 120 | if (($this->app->get('gzip') == 1) && $unsupported) 121 | { 122 | $this->app->set('gzip', 0); 123 | } 124 | } 125 | 126 | /** 127 | * Add the metatags. 128 | * 129 | * @return void|bool 130 | * 131 | * @throws Exception 132 | * @since 1.0 133 | */ 134 | public function onBeforeCompileHead() 135 | { 136 | // Common API instances 137 | $document = JFactory::getDocument(); 138 | $config = JFactory::getConfig(); 139 | $jinput = JFactory::getApplication()->input; 140 | $lang = JFactory::getLanguage(); 141 | 142 | // Common view DATA (component and view names) 143 | $option = $jinput->get('option', '', 'CMD'); 144 | $view = $jinput->get('view', '', 'CMD'); 145 | 146 | // For views that have custom VIEW and custom ID ... 147 | $view_actual = $jinput->get('view_actual', '', 'CMD'); 148 | $id_actual = (int) $jinput->get('id_actual', '', 'CMD'); 149 | $view = $view_actual ?: $view; 150 | 151 | /** 152 | * Add some JS to the forms and Exclude meta creation in the Admin 153 | */ 154 | if ($this->app->isClient('administrator')) 155 | { 156 | // A small test to integrate a character counter for the title 157 | $script = "jQuery(document).ready(function($){ 158 | $('#jform_attribs_facebookmeta_title, #jform_params_facebookmeta_title').characterCounter({ 159 | limit: " . $this->facebookmeta_titlelimit . ", 160 | counterFormat: '%1 " . Text::_('PLG_SYSTEM_SOCIALMETA_CHARSLEFT') . "' 161 | }); 162 | $('#jform_attribs_facebookmeta_desc, #jform_params_facebookmeta_desc').characterCounter({ 163 | limit: " . $this->facebookmeta_desclimit . ", 164 | counterFormat: '%1 " . Text::_('PLG_SYSTEM_SOCIALMETA_CHARSLEFT') . "' 165 | }); 166 | }); 167 | "; 168 | $document->addScript(JURI::root(true) . '/plugins/system/socialmeta/js/jquery.charactercounter.js'); 169 | $document->addScriptDeclaration($script); 170 | 171 | // css to style the counter 172 | $css = " 173 | span.exceeded { color: #E00B0B; } 174 | .counter { padding-left: 15px; font-size: 11px; } 175 | .media-body { padding-left: 15px; } 176 | #videoscreen { background-image: url(../plugins/system/socialmeta/img/screen-mini.png); width:300px; height:246px; float: left; } 177 | #videoscreen img { padding: 11px 0 0 11px !important; width: 278px !important; height: 157px !important; } 178 | "; 179 | $document->addStyleDeclaration($css); 180 | 181 | return true; 182 | } 183 | 184 | 185 | /** 186 | * Don't process meta on non-HTML formats, e.g. RSS feeds 187 | */ 188 | if ($jinput->get('format', 'html', 'CMD') !== 'html') 189 | { 190 | return true; 191 | } 192 | 193 | 194 | /** 195 | * Check current component - view pair is supported 196 | */ 197 | $viewConfig = $this->_loadXmlConfig($option, $view); 198 | if (!$viewConfig) 199 | { 200 | return true; 201 | } 202 | 203 | 204 | /** 205 | * Create google microdata 206 | */ 207 | $googledata = new StdClass(); 208 | $googledata->{'@context'} = 'http://schema.org/'; 209 | $googledata->{'@type'} = (string) $viewConfig->microdata->attributes()['type']; // TODO modify this to use microdata per flexicontent type 210 | 211 | // Add Google structured data for publishers 212 | if (!empty($this->facebookmeta_googleplus)) 213 | { 214 | $googledata->publisher = new StdClass(); 215 | $googledata->publisher->{'@type'} = 'Organization'; 216 | $googledata->publisher->name = $this->facebookmeta_googleplus; 217 | } 218 | if (!empty($this->facebookmeta_googlepluslogo) && $size = @ getimagesize(JPath::clean(JPATH_SITE . '/' . $this->facebookmeta_googlepluslogo))) 219 | { 220 | $googledata->publisher->logo = new StdClass(); 221 | $googledata->publisher->logo->{'@type'} = 'ImageObject'; 222 | $googledata->publisher->logo->url = JURI::base() . $this->facebookmeta_googlepluslogo; 223 | $googledata->publisher->logo->width = $size[0]; 224 | $googledata->publisher->logo->height = $size[1]; 225 | $googledata->publisher->logo->fileFormat = $size['mime']; 226 | } 227 | 228 | 229 | /** 230 | * Find the language code of your page 231 | */ 232 | $locale = JPluginHelper::isEnabled('system', 'languagecode') 233 | ? $this->getNewLanguageCode($lang->getTag()) 234 | : $lang->getTag(); 235 | $locale = str_replace('-', '_', $locale); 236 | 237 | 238 | /** 239 | * We initialize the meta image property with the default image if set - (plugin configuration) 240 | */ 241 | if ($this->defaultimage && $size = @ getimagesize(JPath::clean(JPATH_SITE . '/' . $this->defaultimage))) 242 | { 243 | $metaimage = ''; 244 | $metaimagetw = ''; 245 | $metaimagewidth = ''; 246 | $metaimageheight = ''; 247 | $metaimagemime = ''; 248 | $googledata->image = new StdClass(); 249 | $googledata->image->{'@type'} = 'ImageObject'; 250 | $googledata->image->url = JURI::base() . $this->defaultimage; 251 | $googledata->image->width = $size[0]; 252 | $googledata->image->height = $size[1]; 253 | $googledata->image->fileFormat = $size['mime']; 254 | } 255 | 256 | /** 257 | * We initialize other meta data if set - (plugin configuration) 258 | */ 259 | $metaurl = ''; 260 | $googledata->mainEntityOfPage = JURI::current(); 261 | $metatype = ''; 262 | //$metatypetw = ''; // THIS IS NOT WORKING, use line below 263 | $metatypetw = ''; 264 | $metasitename = ''; 265 | $metalocale = ''; 266 | $googledata->inLanguage = $lang->getTag(); 267 | $metafbappid = $this->fbappid ? '' : ''; 268 | $metafbadmins = $this->facebookmeta_admin ? '' : ''; 269 | 270 | 271 | /** 272 | * Default handler, handles com_content.article, com_flexicontent.item and standard pattern views ... 273 | */ 274 | $is_com_content = ($option == 'com_content' && $view == 'article') || ($option == 'com_flexicontent' && $view == 'item'); 275 | $use_default_handler = $is_com_content || true; // ... TODO examine more 276 | 277 | if ($use_default_handler) 278 | { 279 | // Component - View context and ID of record 280 | $context = $option . '.' . $view; 281 | $id = (int) $jinput->get('id', '', 'CMD'); 282 | // For views that have custom ID ... 283 | $id = $id_actual ?: $id; 284 | 285 | // Tags context, J-Table name, J-Table prefix 286 | $tags_context = $is_com_content ? 'com_content.content' : $context; 287 | $jtable = (string) $viewConfig->dbdata->attributes()['jtable']; 288 | $prefix = (string) $viewConfig->dbdata->attributes()['prefix']; 289 | 290 | // Load item and category data from correct j-table 291 | Table::addIncludePath(JPATH_ADMINISTRATOR . '/component/' . $option . '/tables'); 292 | 293 | $article = $this->getObjectContent($id, $jtable, $prefix); 294 | if (!$article) return; 295 | //echo '
'; print_r($article); exit;
 296 | 
 297 | 			// Get category but do not abort if none
 298 | 			$category   = !empty($article->catid) ? $this->getObjectContent($article->catid, 'category') : false;
 299 | 			//if (!$category) return;
 300 | 
 301 | 			// Non com-content components use description field
 302 | 			$title_dbcol       = (string) $viewConfig->title->attributes()['dbcolumn'];
 303 | 			$introtext_dbcol   = (string) $viewConfig->introtext->attributes()['dbcolumn'];
 304 | 			$fulltext_dbcol    = (string) $viewConfig->fulltext->attributes()['dbcolumn'];
 305 | 
 306 | 			$image_conf        = $viewConfig->image;
 307 | 			$image_dbcol       = !empty($image_conf) ? (string) $image_conf->attributes()['dbcolumn'] : false;
 308 | 			$image_srcprop     = !empty($image_conf) ? (string) $image_conf->attributes()['sourceproperty'] : false;
 309 | 			$image_isjson      = !empty($image_conf) ? (int) $image_conf->attributes()['isjson'] : 0;
 310 | 			$image_ismultiple  = !empty($image_conf) ? (int) $image_conf->attributes()['ismultiple'] : 0;
 311 | 
 312 | 			$article_title     = $article->{$title_dbcol};
 313 | 			$article_introtext = $article->{$introtext_dbcol};
 314 | 			$article_fulltext  = $article->{$fulltext_dbcol};
 315 | 			$article_image     = $image_dbcol ? $article->{$image_dbcol} : false;
 316 | 
 317 | 			// Get item's category and (for com-content only) decode json of (intro/full)-text images
 318 | 			$images   = $is_com_content ? json_decode($article->images) : (object)['image_fulltext'=>'', 'image_intro'=>''];
 319 | 
 320 | 			// Logic and pattern partially borrowed from SocialMetaTags plugin https://github.com/hans2103/pkg_SocialMetaTags
 321 | 			$facebookmeta_image = '';
 322 | 			if ($this->facebookmeta_article_image != 0)
 323 | 			{
 324 | 				/**
 325 | 				 * Get img tag from article description text(s)
 326 | 				 * Priority (high to low): [0] via configuration, [1] (intro/full)-text images (com-content only), [2] introtext, [3] fulltext
 327 | 				 */
 328 | 				// [0]
 329 | 				if ($article_image)
 330 | 				{
 331 | 					$facebookmeta_image = $image_isjson ? json_decode($article_image, true) : $article_image;
 332 | 					$facebookmeta_image = $facebookmeta_image && $image_ismultiple ? reset($facebookmeta_image) : $facebookmeta_image;
 333 | 					$facebookmeta_image = $facebookmeta_image && $image_srcprop ? $facebookmeta_image[$image_srcprop] : $facebookmeta_image;
 334 | 				}
 335 | 
 336 | 				// [1]
 337 | 				if (!$facebookmeta_image)
 338 | 				{
 339 | 					$facebookmeta_image = $this->facebookmeta_article_image == 2 && !empty($images->image_fulltext) ? $images->image_fulltext : $facebookmeta_image;
 340 | 					$facebookmeta_image = $this->facebookmeta_article_image == 1 && !empty($images->image_intro) ? $images->image_intro : $facebookmeta_image;
 341 | 				}
 342 | 
 343 | 				// [2]
 344 | 				if (!$facebookmeta_image && strpos($article_introtext, 'id))
 361 | 			{
 362 | 				$article->tags = new JHelperTags;
 363 | 				$article->tags->getItemTags($tags_context, $article->id);
 364 | 			}
 365 | 
 366 | 			// Get current record data
 367 | 			// NOTE: Current item attributes will be empty if the edit form has not been saved after the plugin was installed and enabled
 368 | 			$form_fields_group = $viewConfig->form->attributes()['fields_group'] ?? false;
 369 | 			try {
 370 | 				$attribs = $form_fields_group ? json_decode($article->{$form_fields_group}) : false;
 371 | 			} catch (\Throwable $e){
 372 | 				$attribs = new stdClass();
 373 | 			}
 374 | 
 375 | 			// we set the article type as default type if no data is provided
 376 | 			$facebookmeta_ogtype           = @$attribs->facebookmeta_og_type ? $attribs->facebookmeta_og_type : "article";
 377 | 			$facebookmeta_image            = !empty($attribs->facebookmeta_image) ? $attribs->facebookmeta_image : $facebookmeta_image;
 378 | 			$facebookmeta_title            = @$attribs->facebookmeta_title;
 379 | 			$facebookmeta_desc             = @$attribs->facebookmeta_desc;
 380 | 			$facebookmeta_author           = $this->getUserFacebookProfile($article->created_by);
 381 | 			$facebookmeta_authortw         = $this->getUserTwitterProfile($article->created_by);
 382 | 			$facebookmeta_seealso1         = @$attribs->facebookmeta_seealso1;
 383 | 			$facebookmeta_seealso2         = @$attribs->facebookmeta_seealso2;
 384 | 			$facebookmeta_seealso3         = @$attribs->facebookmeta_seealso3;
 385 | 			$facebookmeta_video            = @$attribs->facebookmeta_video;
 386 | 			$facebookmeta_video_secure_url = @$attribs->facebookmeta_video_secure_url;
 387 | 			$facebookmeta_video_type       = @$attribs->facebookmeta_video_type;
 388 | 			$facebookmeta_video_width      = @$attribs->facebookmeta_video_width;
 389 | 			$facebookmeta_video_height     = @$attribs->facebookmeta_video_height;
 390 | 
 391 | 
 392 | 			// Check image is absolute url
 393 | 			$facebookmeta_image_is_abs   = (boolean) parse_url($facebookmeta_image, PHP_URL_SCHEME); // preg_match("#^http|^https#i", $facebookmeta_image);
 394 | 			// Check image is local site
 395 | 			$facebookmeta_image_is_local = !$facebookmeta_image_is_abs || strpos($facebookmeta_image, JURI::base()) === 0;
 396 | 
 397 | 			// Get full image url and full image file path, if external URL then we use the URL itself as file path getimagesize() supports this
 398 | 			if ($facebookmeta_image && $facebookmeta_image_is_local)
 399 | 			{
 400 | 				$facebookmeta_image_url  = $facebookmeta_image_is_abs ? $facebookmeta_image : JURI::base() . $facebookmeta_image;
 401 | 				$facebookmeta_image_file = $facebookmeta_image_is_abs
 402 | 					? str_replace(JURI::base(), JPATH_SITE . '/', $facebookmeta_image)
 403 | 					: JPATH_SITE . '/' . $facebookmeta_image;
 404 | 			}
 405 | 			else
 406 | 			{
 407 | 				$facebookmeta_image_file = $facebookmeta_image;
 408 | 				$facebookmeta_image_url  = $facebookmeta_image;
 409 | 			}
 410 | 
 411 | 			// !! Do not try to get size of external image URLs to avoid random long delays
 412 | 			$size = $facebookmeta_image_file && $facebookmeta_image_is_local ? @ getimagesize(JPath::clean($facebookmeta_image_file)) :false;
 413 | 
 414 | 			// We have to set the article sharing image https://developers.facebook.com/docs/sharing/best-practices#images
 415 | 			if ($facebookmeta_image_url)
 416 | 			{
 417 | 				$metaimage       = '';
 418 | 				$metaimagetw     = '';
 419 | 				$metaimagewidth  = $size ? '' : '';
 420 | 				$metaimageheight = $size ? '' : '';
 421 | 				$metaimagemime   = $size ? '' : '';
 422 | 
 423 | 				$googledata->image             = new StdClass();
 424 | 				$googledata->image->{'@type'}  = 'ImageObject';
 425 | 				$googledata->image->url        = $facebookmeta_image_url;
 426 | 				if ($size)
 427 | 				{
 428 | 					$googledata->image->width = $size[0];
 429 | 					$googledata->image->height = $size[1];
 430 | 					$googledata->image->fileFormat = $size['mime'];
 431 | 				}
 432 | 			}
 433 | 
 434 | 			$metaupdated  = $article->modified
 435 | 				? '' : '';
 436 | 			$metaauth     = $this->facebookmeta_auth
 437 | 				? ''
 438 | 					//. "\n" . '	'
 439 | 				: '';
 440 | 
 441 | 			$googledata->author            = new StdClass();
 442 | 			$googledata->author->{'@type'} = 'Person';
 443 | 			$googledata->author->name      = !empty($article->created_by_alias) ? $article->created_by_alias : $this->getUserName($article->created_by);
 444 | 
 445 | 			$metaauthtw    = $this->facebookmeta_twittersite
 446 | 				? '' : '';
 447 | 			$metapublisher = $this->facebookmeta_pub
 448 | 				? '' : '';
 449 | 
 450 | 			$metasection                = $category ? '' : '';
 451 | 			$googledata->articleSection = $category ? $category->title : '';
 452 | 			$metapub                    = array();
 453 | 			$metapub['modified']        = '';
 454 | 			$googledata->dateModified   = $this->to8601($article->modified);
 455 | 			$article->publish_up        = !empty($article->publish_up) && $article->publish_up != '0000-00-00 00:00:00'
 456 | 				? $article->publish_up
 457 | 				: (!empty($article->created) ? $article->created : '');
 458 | 
 459 | 			$metapub['publish_up']      = ''
 460 | 				//. "\n" . '	'
 461 | 				;
 462 | 			$googledata->datePublished  = $this->to8601($article->publish_up);
 463 | 			if (!empty($article->publish_down) && $article->publish_down != '0000-00-00 00:00:00')
 464 | 			{
 465 | 				$metapub['publish_down'] = '';
 466 | 			}
 467 | 			if (!empty($article->tags->itemTags))
 468 | 			{
 469 | 				$metatags    = array();
 470 | 				$articletags = array();
 471 | 				foreach ($article->tags->itemTags as $tag)
 472 | 				{
 473 | 					$metatags[]    = '';
 474 | 					$articletags[] = $tag->title;
 475 | 				}
 476 | 				$googledata->keywords = implode(',', $articletags);
 477 | 			}
 478 | 			if ($facebookmeta_seealso1)
 479 | 			{
 480 | 				$metaseealso1 = '';
 481 | 			}
 482 | 			if ($facebookmeta_seealso2)
 483 | 			{
 484 | 				$metaseealso2 = '';
 485 | 			}
 486 | 			if ($facebookmeta_seealso3)
 487 | 			{
 488 | 				$metaseealso3 = '';
 489 | 			}
 490 | 
 491 | 			// We create the video object if video link has been provided
 492 | 			if ($facebookmeta_video)
 493 | 			{
 494 | 				$url_scheme        = parse_url($facebookmeta_video, PHP_URL_SCHEME); // hhtp || https
 495 | 				$metavideo         = $facebookmeta_video ? '' : "";
 496 | 				$metavideotw       = $facebookmeta_video ? '' : "";
 497 | 				$metavideotype     = ($facebookmeta_video_type == ("application/x-shockwave-flash" || "video/mp4")) ? '' : "";
 498 | 				$metavideoheight   = ((int) $facebookmeta_video_height != 0) ? '' : "";
 499 | 				$metavideoheighttw = ((int) $facebookmeta_video_height != 0) ? '' : "";
 500 | 				$metavideowidth    = ((int) $facebookmeta_video_width != 0) ? '' : "";
 501 | 				$metavideowidthtw  = ((int) $facebookmeta_video_width != 0) ? '' : "";
 502 | 				if ($metavideotype && $metavideoheight && $metavideowidth)
 503 | 				{
 504 | 
 505 | 					if ($url_scheme == "https")
 506 | 					{ // && type == should be treated as a video object
 507 | 						$metavideosecureourl = '';
 508 | 						if ($facebookmeta_ogtype == "video")
 509 | 						{
 510 | 							// && type == should be treated as a video object
 511 | 							$metatype   = '';
 512 | 							$metatypetw = '';
 513 | 						}
 514 | 
 515 | 					}
 516 | 					else
 517 | 					{
 518 | 						$metavideosecureourl = "";
 519 | 					}
 520 | 				}
 521 | 			}
 522 | 
 523 | 			// We use the title of the article if none is provided
 524 | 			if ($facebookmeta_title)
 525 | 			{
 526 | 				$metatitle            = '';
 527 | 				$metattitletw         = '';
 528 | 				$googledata->headline = $this->striptagsandcut($facebookmeta_title);
 529 | 				$googledata->name     = $this->striptagsandcut($facebookmeta_title);
 530 | 			}
 531 | 			else
 532 | 			{
 533 | 				$metatitle            = '';
 534 | 				$metattitletw         = '';
 535 | 				$googledata->headline = $this->striptagsandcut($this->striptagsandcut($article_title, $this->facebookmeta_titlelimit));
 536 | 				$googledata->name     = $this->striptagsandcut($this->striptagsandcut($article_title, $this->facebookmeta_titlelimit));
 537 | 			}
 538 | 			// We use the introtext or description field if none is provided
 539 | 			if ($facebookmeta_desc)
 540 | 			{
 541 | 				$metadesc                = '';
 542 | 				$metadesctw              = '';
 543 | 				$googledata->description = $this->striptagsandcut($facebookmeta_desc);
 544 | 			}
 545 | 			elseif (!empty($article->metadesc))
 546 | 			{
 547 | 				$metadesc                = '';
 548 | 				$metadesctw              = '';
 549 | 				$googledata->description = $this->striptagsandcut($article->metadesc);
 550 | 			}
 551 | 			else
 552 | 			{
 553 | 				$metadesc                = '';
 554 | 				$metadesctw              = '';
 555 | 				$googledata->description = $this->striptagsandcut($article_introtext, $this->facebookmeta_desclimit);
 556 | 			}
 557 | 
 558 | 			// com_flexicontent specific routine to overrride image
 559 | 			if (($option == 'com_flexicontent' && $view == 'item'))
 560 | 			{
 561 | 
 562 | 				if ($this->flexicontent_image_field)
 563 | 				{
 564 | 
 565 | 					$image_field = $this->getFCfieldname($this->flexicontent_image_field);
 566 | 
 567 | 					require_once(JPATH_SITE . DS . 'components' . DS . 'com_flexicontent' . DS . 'classes' . DS . 'flexicontent.fields.php');
 568 | 
 569 | 					$thumb_size = $this->flexicontent_imagesize_field;
 570 | 
 571 | 					$thumbs_arr =
 572 | 						FlexicontentFields::renderFields(
 573 | 							$item_per_field = true,
 574 | 							$itemids = array($article->id),
 575 | 							$field_names = array($image_field),
 576 | 							$view = 'item',
 577 | 							$field_methods = array('display_' . $thumb_size . '_src'),
 578 | 							$cfparams = array()
 579 | 						);
 580 | 
 581 | 					$thumb = $thumbs_arr[$article->id][$image_field]['display_' . $thumb_size . '_src'];
 582 | 
 583 | 					if (!empty($thumb) && $size = @ getimagesize(JPath::clean(JPATH_SITE . '/' . substr($thumb, strlen(JURI::base(true)) + 1))))
 584 | 					{
 585 | 						// Override the og:image properties
 586 | 						$metaimage                     = '';
 587 | 						$metaimagetw                   = '';
 588 | 						$metaimagewidth                = '';
 589 | 						$metaimageheight               = '';
 590 | 						$metaimagemime                 = '';
 591 | 						$googledata->image             = new StdClass();
 592 | 						$googledata->image->{'@type'}  = 'ImageObject';
 593 | 						$googledata->image->url        = JURI::base() . substr($thumb, strlen(JURI::base(true)) + 1);
 594 | 						$googledata->image->width      = $size[0];
 595 | 						$googledata->image->height     = $size[1];
 596 | 						$googledata->image->fileFormat = $size['mime'];
 597 | 					}
 598 | 				}
 599 | 			}
 600 | 		}
 601 | 
 602 | 
 603 | 		$document->addCustomTag('');
 604 | 
 605 | 		if ($this->params->get('structureddata', 1))
 606 | 		{
 607 | 			$document->addCustomTag('');
 608 | 			$document->addCustomTag('');
 609 | 		}
 610 | 
 611 | 		// og:site_name
 612 | 		if ($this->params->get('og_site_name', 1))
 613 | 		{
 614 | 			$document->addCustomTag('');
 615 | 			$document->addCustomTag($metasitename);
 616 | 		}
 617 | 		// og:type
 618 | 		if ($this->params->get('og_type', 1))
 619 | 		{
 620 | 			$document->addCustomTag($metatype);
 621 | 		}
 622 | 		// og:url
 623 | 		if ($this->params->get('og_url', 1))
 624 | 		{
 625 | 			$document->addCustomTag($metaurl);
 626 | 		}
 627 | 		// og:locale
 628 | 		if ($this->params->get('og_locale', 1))
 629 | 		{
 630 | 			$document->addCustomTag($metalocale);
 631 | 		}
 632 | 		// og:title
 633 | 		if ($this->params->get('og_title', 1))
 634 | 		{
 635 | 			$document->addCustomTag($metatitle);
 636 | 		}
 637 | 		// og:description
 638 | 		if ($this->params->get('og_description', 1))
 639 | 		{
 640 | 			$document->addCustomTag($metadesc);
 641 | 		}
 642 | 		// og:updated_time
 643 | 		if ($this->params->get('og_updated_time', 1))
 644 | 		{
 645 | 			$document->addCustomTag($metaupdated);
 646 | 		}
 647 | 		// og:image
 648 | 		if ($this->params->get('og_image', 1) && @$metaimage)
 649 | 		{
 650 | 			$document->addCustomTag($metaimage);
 651 |             if (!empty($metaimagetw)) $document->addCustomTag($metaimagetw);
 652 | 			// og:image:width
 653 | 			$document->addCustomTag($metaimagewidth);
 654 | 			// og:image:height
 655 | 			$document->addCustomTag($metaimageheight);
 656 | 			// og:image:type
 657 | 			$document->addCustomTag($metaimagemime);
 658 | 		}
 659 | 		// og:video (has sub-properties)
 660 | 		if ($this->params->get('og_video', 1))
 661 | 		{
 662 | 			if (@$metavideo)
 663 | 			{
 664 | 				$document->addCustomTag($metavideo);
 665 | 			}
 666 | 			if (@$metavideosecureourl)
 667 | 			{
 668 | 				$document->addCustomTag($metavideosecureourl);
 669 | 			}
 670 | 			if (@$metavideotype)
 671 | 			{
 672 | 				$document->addCustomTag($metavideotype);
 673 | 			}
 674 | 			if (@$metavideowidth)
 675 | 			{
 676 | 				$document->addCustomTag($metavideowidth);
 677 | 			}
 678 | 			if (@$metavideoheight)
 679 | 			{
 680 | 				$document->addCustomTag($metavideoheight);
 681 | 			}
 682 | 		}
 683 | 		// og:see_also (array)
 684 | 		if ($this->params->get('og_see_also', 1))
 685 | 		{
 686 | 			if (@$metaseealso1)
 687 | 			{
 688 | 				$document->addCustomTag($metaseealso1);
 689 | 			}
 690 | 			if (@$metaseealso2)
 691 | 			{
 692 | 				$document->addCustomTag($metaseealso2);
 693 | 			}
 694 | 			if (@$metaseealso3)
 695 | 			{
 696 | 				$document->addCustomTag($metaseealso3);
 697 | 			}
 698 | 		}
 699 | 
 700 | 		if ($facebookmeta_ogtype == "article")
 701 | 		{
 702 | 			$document->addCustomTag('');
 703 | 			// article:author
 704 | 			if ($this->params->get('article_author', 1))
 705 | 			{
 706 | 				$document->addCustomTag(@$metaauth);
 707 | 			}
 708 | 			// article:publisher
 709 | 			if ($this->params->get('article_publisher', 1))
 710 | 			{
 711 | 				$document->addCustomTag(@$metapublisher);
 712 | 			}
 713 | 
 714 | 			// article:modified_time || article:published_time || article:expiration_time
 715 | 			if ($this->params->get('article_published_time', 1))
 716 | 			{
 717 | 				foreach ($metapub as $m)
 718 | 				{
 719 | 					$document->addCustomTag($m);
 720 | 				}
 721 | 			}
 722 | 			// article:section
 723 | 			if ($this->params->get('article_section', 1))
 724 | 			{
 725 | 				$document->addCustomTag($metasection);
 726 | 			}
 727 | 			// article:tag (array)
 728 | 			if ($this->params->get('article_tag', 1))
 729 | 			{
 730 | 				if (@$metatags)
 731 | 				{
 732 | 					foreach ($metatags as $metatag)
 733 | 					{
 734 | 						$document->addCustomTag($metatag);
 735 | 					}
 736 | 				}
 737 | 			}
 738 | 		}
 739 | 
 740 | 		// fb:app_id
 741 | 		if ($this->params->get('fb_app_id', 1))
 742 | 		{
 743 | 			$document->addCustomTag('');
 744 | 			$document->addCustomTag($metafbappid);
 745 | 		}
 746 | 		// fb:admins
 747 | 		if ($this->params->get('fb_admins', 1))
 748 | 		{
 749 | 			$document->addCustomTag($metafbadmins);
 750 | 		}
 751 | 
 752 | 		// twitter:card
 753 | 		if ($this->params->get('twitter_card', 1))
 754 | 		{
 755 | 			$document->addCustomTag('');
 756 | 			$document->addCustomTag($metatypetw);
 757 | 			$document->addCustomTag($metattitletw);
 758 | 			$document->addCustomTag($metadesctw);
 759 | 			if (!empty($metaimagetw)) $document->addCustomTag($metaimagetw);
 760 | 		}
 761 | 		// twitter:site
 762 | 		if ($this->params->get('twitter_site', 1))
 763 | 		{
 764 | 			$document->addCustomTag($metaauthtw);
 765 | 		}
 766 | 		// twitter:video
 767 | 		if ($facebookmeta_ogtype == "video")
 768 | 		{
 769 | 			if ($this->params->get('twitter_video', 1))
 770 | 			{
 771 | 				if ($metavideo)
 772 | 				{
 773 | 					$document->addCustomTag($metavideotw);
 774 | 				}
 775 | 				if ($metavideowidth)
 776 | 				{
 777 | 					$document->addCustomTag($metavideowidthtw);
 778 | 				}
 779 | 				if ($metavideoheight)
 780 | 				{
 781 | 					$document->addCustomTag($metavideoheighttw);
 782 | 				}
 783 | 			}
 784 | 		}
 785 | 
 786 | 		$document->addCustomTag('');
 787 | 	}
 788 | 
 789 | 	/**
 790 | 	 * Get the modified language code (URL segment) if the languagecode plugin is enabled
 791 | 	 *
 792 | 	 * @param    string  $tag  the language tag
 793 | 	 *
 794 | 	 * @return   string        the modified language tag (used as URL segment)
 795 | 	 *
 796 | 	 * @since 1.1
 797 | 	 */
 798 | 	private function getNewLanguageCode($tag = 'en-GB')
 799 | 	{
 800 | 		$db = JFactory::getDBO();
 801 | 
 802 | 		// Load language parameters
 803 | 		$params = $db->setQuery($db->getQuery(true)
 804 | 			->select('params')
 805 | 			->from($db->quoteName('#__extensions'))
 806 | 			->where($db->quoteName('name') . " = " . $db->quote('plg_system_languagecode'))
 807 | 		)->loadResult();
 808 | 
 809 | 		// Parse the parameters
 810 | 		$lcparams = new JRegistry($params);
 811 | 
 812 | 		// Return the modified language tag (used as URL segment) (if it exists, otherwise return the given tag)
 813 | 		return $lcparams->get(strtolower($tag)) ?: $tag;
 814 | 	}
 815 | 
 816 | 	/**
 817 | 	 * Method to retrieve the main data object of a component.
 818 | 	 *
 819 | 	 * @param   int     $id
 820 | 	 * @param   string  $table
 821 | 	 * @param   string  $prefix
 822 | 	 *
 823 | 	 * @return  object.
 824 | 	 *
 825 | 	 * @since   1.0
 826 | 	 */
 827 | 	private function getObjectContent($id, $table = 'content', $prefix = 'JTable')
 828 | 	{
 829 | 		// Load record data
 830 | 		$dataobject = Table::getInstance($table, $prefix);
 831 | 		$dataobject ? $dataobject->load($id) : false;
 832 | 
 833 | 		if ($this->debug && !$dataobject)
 834 | 		{
 835 | 			JFactory::getApplication()->enqueueMessage('socialmeta plg: Could not load JTable: ' . $prefix.$table, 'notice');
 836 | 		}
 837 | 
 838 | 		return $dataobject;
 839 | 	}
 840 | 
 841 | 	/**
 842 | 	 * Returns the Facebook profile stored in the contact
 843 | 	 *
 844 | 	 * @TODO  : getExternalProperties(userid,property)
 845 | 	 *
 846 | 	 * @param   int  $userid
 847 | 	 *
 848 | 	 * @return    string        Facebook profile URL of the user
 849 | 	 * @since 1.0
 850 | 	 */
 851 | 	private function getUserFacebookProfile($userid)
 852 | 	{
 853 | 		$db = JFactory::getDbo();
 854 | 
 855 | 		// Load user parameters of given user id
 856 | 		$userparams = $db->setQuery($db->getQuery(true)
 857 | 			->select('params')
 858 | 			->from($db->quoteName('#__contact_details'))
 859 | 			->where($db->quoteName('user_id') . " = " . $db->quote($userid))
 860 | 		)->loadResult();
 861 | 
 862 | 		// Decode them
 863 | 		$userparams = $userparams ? json_decode($userparams) : false;
 864 | 
 865 | 		// Return the Facebook profile URL (if it exists, otherwise empty)
 866 | 		return $userparams
 867 | 			? (!empty($userparams->facebookmeta_fbuserprofile) ? $userparams->facebookmeta_fbuserprofile : '')
 868 | 			: '';
 869 | 	}
 870 | 
 871 | 	/**
 872 | 	 * Returns the Twitter profile stored in the contact
 873 | 	 *
 874 | 	 * @TODO  : getExternalProperties(userid,property)
 875 | 	 *
 876 | 	 * @param   int  $userid
 877 | 	 *
 878 | 	 * @return    string        Twitter profile URL of the user
 879 | 	 * @since 1.0
 880 | 	 */
 881 | 	private function getUserTwitterProfile($userid)
 882 | 	{
 883 | 		$db = JFactory::getDbo();
 884 | 
 885 | 		// Load user parameters of given user id
 886 | 		$userparams = $db->setQuery($db->getQuery(true)
 887 | 			->select('params')
 888 | 			->from($db->quoteName('#__contact_details'))
 889 | 			->where($db->quoteName('user_id') . " = " . $db->quote($userid))
 890 | 		)->loadResult();
 891 | 
 892 | 		// Decode them
 893 | 		$userparams = $userparams ? json_decode($userparams) : false;
 894 | 
 895 | 		// Return the Twitter profile URL (if it exists, otherwise empty)
 896 | 		return $userparams
 897 | 			? (!empty($userparams->facebookmeta_twitteruser) ? $userparams->facebookmeta_twitteruser : '')
 898 | 			: '';
 899 | 	}
 900 | 
 901 | 	/**
 902 | 	 * Returns a formated ISO8601 date
 903 | 	 *
 904 | 	 * @param   string  $datetime
 905 | 	 *
 906 | 	 * @return    string
 907 | 	 * @since 1.0
 908 | 	 */
 909 | 	private function to8601($datetime)
 910 | 	{
 911 | 		$date = new DateTime($datetime);
 912 | 
 913 | 		return $date->format(DateTime::ISO8601);
 914 | 	}
 915 | 
 916 | 	/**
 917 | 	 * Returns the name of a user
 918 | 	 *
 919 | 	 * @TODO  : getExternalProperties(userid,property)
 920 | 	 *
 921 | 	 * @param   int  $userid
 922 | 	 *
 923 | 	 * @return    string        Facebook profile URL of the user
 924 | 	 * @since 1.0
 925 | 	 */
 926 | 	private function getUserName($userid)
 927 | 	{
 928 | 		$db = JFactory::getDbo();
 929 | 		return $db->setQuery($db->getQuery(true)
 930 | 			->select('name')
 931 | 			->from($db->quoteName('#__users'))
 932 | 			->where($db->quoteName('id') . " = " . $db->quote($userid))
 933 | 		)->loadResult();
 934 | 	}
 935 | 
 936 | 	/**
 937 | 	 * Strip html tags and cut after x characters
 938 | 	 * Borrowed from FLEXIcontent www.flexicontent.org
 939 | 	 *
 940 | 	 * @param   string  $text
 941 | 	 * @param   int     $nb
 942 | 	 *
 943 | 	 * @return    string
 944 | 	 * @since 1.0
 945 | 	 */
 946 | 	private function striptagsandcut($text, $chars = null, &$uncut_length = 0)
 947 | 	{
 948 | 		// Convert html entities to characters so that they will not be removed ... by strip_tags
 949 | 		$text = html_entity_decode($text, ENT_NOQUOTES, 'UTF-8');
 950 | 
 951 | 		// Strip SCRIPT tags AND their containing code
 952 | 		$text = preg_replace('#]*>(.*?)<\/script>#is', '', $text);
 953 | 
 954 | 		// Add whitespaces at start/end of tags so that words will not be joined,
 955 | 		//$text = preg_replace('/(<\/[^>]+>((?!\P{L})|(?=[0-9])))|(<[^>\/][^>]*>)/u', ' $1', $text);
 956 | 		$text = preg_replace('/(<\/[^>]+>(?![\:|\.|,|:|"|\']))|(<[^>\/][^>]*>)/u', ' $1', $text);
 957 | 
 958 | 		// Strip html tags
 959 | 		$cleantext = strip_tags($text);
 960 | 
 961 | 		// clean additionnal plugin tags
 962 | 		$patterns   = array();
 963 | 		$patterns[] = '#\[(.*?)\]#';
 964 | 		$patterns[] = '#{(.*?)}#';
 965 | 		$patterns[] = '#&(.*?);#';
 966 | 
 967 | 		foreach ($patterns as $pattern)
 968 | 		{
 969 | 			$cleantext = preg_replace($pattern, '', $cleantext);
 970 | 		}
 971 | 
 972 | 		// Replace multiple spaces, tabs, newlines, etc with a SINGLE whitespace so that text length will be calculated correctly
 973 | 		$cleantext = preg_replace('/[\p{Z}\s]{2,}/u', ' ', $cleantext);  // Unicode safe whitespace replacing
 974 | 
 975 | 		// Calculate length according to UTF-8 encoding
 976 | 		$uncut_length = \Joomla\String\StringHelper::strlen($cleantext);
 977 | 
 978 | 		// Cut off the text if required but reencode html entities before doing so
 979 | 		if ($chars)
 980 | 		{
 981 | 			if ($uncut_length > $chars)
 982 | 			{
 983 | 				$cleantext = \Joomla\String\StringHelper::substr($cleantext, 0, $chars) . '...';
 984 | 			}
 985 | 		}
 986 | 
 987 | 		// Reencode HTML special characters, (but do not encode UTF8 characters)
 988 | 		$cleantext = htmlspecialchars($cleantext, ENT_QUOTES, 'UTF-8');
 989 | 
 990 | 		return $cleantext;
 991 | 	}
 992 | 
 993 | 	/**
 994 | 	 * Check if the image field is an image and is published
 995 | 	 *
 996 | 	 * @param   string  $fieldname
 997 | 	 *
 998 | 	 * @return    void        true on success
 999 | 	 *
1000 | 	 * @since 1.0
1001 | 	 */
1002 | 	private function getFCfieldname($id)
1003 | 	{
1004 | 		$db = JFactory::getDBO();
1005 | 
1006 | 		return $db->setQuery($db->getQuery(true)
1007 | 			->select('name')
1008 | 			->from($db->quoteName('#__flexicontent_fields'))
1009 | 			->where($db->quoteName('id') . " = " . $db->quote($id))
1010 | 		)->loadResult();
1011 | 	}
1012 | 
1013 | 	/**
1014 | 	 * Add the social-meta form
1015 | 	 *
1016 | 	 * @param $form  object|false  The JForm object
1017 | 	 *
1018 | 	 * @return bool|void
1019 | 	 *
1020 | 	 * @throws Exception
1021 | 	 * @since version
1022 | 	 */
1023 | 	function onContentPrepareForm($form)
1024 | 	{
1025 | 		// Common
1026 | 		$jinput  = JFactory::getApplication()->input;
1027 | 		$option  = $jinput->get('option', '', 'CMD');
1028 | 		$view    = $jinput->get('view', '', 'CMD');
1029 | 		$context = $form->getName();
1030 | 
1031 | 		// Sanity check form has been loaded
1032 | 		if (!($form instanceof JForm))
1033 | 		{
1034 | 			$this->_subject->setError('JERROR_NOT_A_FORM');
1035 | 			return false;
1036 | 		}
1037 | 
1038 | 		// Allow social meta editing only in backend
1039 | 		if (!$this->app->isClient('administrator'))
1040 | 		{
1041 | 			return;
1042 | 		}
1043 | 
1044 | 		// Check current component - view pair is supported
1045 | 		$viewConfig = $this->_loadXmlConfig($option, $view, $context);
1046 | 		if (!$viewConfig)
1047 | 		{
1048 | 			return true;
1049 | 		}
1050 | 
1051 | 		// Load the XML form file of current component - view
1052 | 		// Default xpath is /form/.../field
1053 | 		$form_fields_group  = $viewConfig->form->attributes()['fields_group'] ?? false;
1054 | 		$xml_elements_xpath = '/form/fields' . ($form_fields_group ? "[@name='{$form_fields_group}']" : '');
1055 | 
1056 | 		// Load the XML form file of current component - view, limit to specific XML elements xpath
1057 | 		JForm::addFormPath(__DIR__ . '/forms');
1058 | 		$form->loadFile($option, false, $xml_elements_xpath);
1059 | 
1060 | 		return true;
1061 | 	}
1062 | 
1063 | 	/**
1064 | 	 * Returns the optimal size thumbnail or raise an error if the field is not an image
1065 | 	 * NOTE: experimental, not used yet
1066 | 	 *
1067 | 	 * @param   string  $fieldname
1068 | 	 *
1069 | 	 * @return    void        true on success
1070 | 	 *
1071 | 	 * @since 1.0
1072 | 	 */
1073 | 	private function decideFCimageFieldThumb($fieldname)
1074 | 	{
1075 | 		$db   = JFactory::getDBO();
1076 | 		$data = $db->setQuery(
1077 | 			'SELECT attribs #__flexicontent_fields WHERE `name`=' . $db->Quote($fieldname)
1078 | 		)->loadAssocList();
1079 | 
1080 | 		if (!$data)
1081 | 		{
1082 | 			if ($this->debug)
1083 | 			{
1084 | 				JFactory::getApplication()->enqueueMessage('FLEXIcontent image field name : ' . $fieldname . ' was not found', 'notice');
1085 | 			}
1086 | 
1087 | 			return false;
1088 | 		}
1089 | 
1090 | 		$fparams = new JRegistry($data->attribs);
1091 | 
1092 | 		$w_l = $fparams->get('w_l');
1093 | 		$h_l = $fparams->get('h_l');
1094 | 
1095 | 		$sizes      = array('s', 'm', 'l');
1096 | 		$size_found = false;
1097 | 
1098 | 		foreach ($sizes as $size)
1099 | 		{
1100 | 			$width  = $fparams->get('w_' . $size);
1101 | 			$height = $fparams->get('h_' . $size);
1102 | 			if ($width < 400 || $width > 1000) continue;
1103 | 			if ($height < 300 || $height > 800) continue;
1104 | 			$size_found = $size;
1105 | 			break;
1106 | 		}
1107 | 
1108 | 		return $size_found;
1109 | 	}
1110 | 
1111 | 	/**
1112 | 	 * Check if the image field is an image and is published
1113 | 	 *
1114 | 	 * @param   string  $fieldname
1115 | 	 *
1116 | 	 * @return    void        true on success
1117 | 	 *
1118 | 	 * @since 1.0
1119 | 	 */
1120 | 	private function isValidImageField($fieldname)
1121 | 	{
1122 | 		$db   = JFactory::getDBO();
1123 | 		$data = $db->setQuery($db->getQuery(true)
1124 | 			->select('*')
1125 | 			->from($db->quoteName('#__flexicontent_fields'))
1126 | 			->where($db->quoteName('name') . " = " . $db->quote($fieldname))
1127 | 		)->loadObject();
1128 | 
1129 | 		if (!$data) // does the field exist
1130 | 		{
1131 | 			if ($this->debug) JFactory::getApplication()->enqueueMessage('FLEXIcontent field : ' . $fieldname . ' was not found', 'notice');
1132 | 			return false;
1133 | 		}
1134 | 		elseif ($data->field_type !== 'image') // is the field an image field
1135 | 		{
1136 | 			if ($this->debug) JFactory::getApplication()->enqueueMessage('FLEXIcontent field : ' . $fieldname . ' is not an image', 'notice');
1137 | 			return false;
1138 | 		}
1139 | 		elseif ($data->published != 1) // is the field published
1140 | 		{
1141 | 			if ($this->debug) JFactory::getApplication()->enqueueMessage('FLEXIcontent image field name : ' . $fieldname . ' is unpublised', 'notice');
1142 | 			return false;
1143 | 		}
1144 | 
1145 | 		return true;
1146 | 	}
1147 | 
1148 | 
1149 | 	/**
1150 | 	 * Load and check that the XML form file for the given component-view pair
1151 | 	 *
1152 | 	 * @param   $option     string  The component name
1153 | 	 * @param   $view       string  The view name
1154 | 	 * @param   $context    string  The form context
1155 | 	 * @return  false|SimpleXMLElement
1156 | 	 *
1157 | 	 * @since version
1158 | 	 */
1159 | 	private function _loadXmlConfig($option, $view, $context = null)
1160 | 	{
1161 | 		if ($context)
1162 | 		{
1163 | 			list($option, $view) = explode('.', $context);
1164 | 		}
1165 | 
1166 | 		/**
1167 | 		 * Check current component is supported
1168 | 		 */
1169 | 		$component_form_path = JPath::clean(JPATH_ROOT.'/plugins/system/socialmeta/forms/' . $option .'.xml');
1170 | 		if (!file_exists($component_form_path))
1171 | 		{
1172 | 			return false;
1173 | 		}
1174 | 
1175 | 
1176 | 		/**
1177 | 		 * Attempt to parse the XML file
1178 | 		 */
1179 | 		try {
1180 | 			$xml = simplexml_load_file($component_form_path);
1181 | 		} catch (\Throwable $e) {
1182 | 			$xml = false;
1183 | 		}
1184 | 
1185 | 		if (!$xml)
1186 | 		{
1187 | 			if ($this->debug) $this->app->enqueueMessage('Error parsing component XML file: "' . $component_form_path . '". Social data could not be loaded', 'warning');
1188 | 			return false;
1189 | 		}
1190 | 
1191 | 		// context
1192 | 		/*if ($context)
1193 | 		{
1194 | 			foreach($xml->config->views as $config_view)
1195 | 			{
1196 | 				$config_view_form_context = $config_view->form->attributes()['context'] ?? false;
1197 | 				if ($config_view_form_context && $config_view_form_context === $context) return $config_view;
1198 | 			}
1199 | 			return false;
1200 | 		}*/
1201 | 
1202 | 		/**
1203 | 		 * We check if the view is allowed
1204 | 		 */
1205 | 		//print_r($option . ' - ' . $view); print_r($context); exit;
1206 | 		$viewConfig = $xml->config->views->{$view} ?? false;
1207 | 		return $viewConfig;
1208 | 	}
1209 | }
1210 | 


--------------------------------------------------------------------------------
/socialmeta.xml:
--------------------------------------------------------------------------------
  1 | 
  2 | 
  3 | 	plg_system_socialmeta
  4 | 	Emmanuel Danan
  5 | 	April 2016
  6 | 	Copyright (C) 2005 - 2015 Open Source Matters. All rights reserved.
  7 | 	GNU General Public License version 2 or later; see LICENSE.txt
  8 | 	emmanuel.danan@gmail.com
  9 | 	www.flexicontent.org
 10 | 	1.1
 11 | 	PLG_SYSTEM_SOCIALMETA_XML_DESCRIPTION
 12 | 	
 13 | 		socialmeta.php
 14 | 		index.html
 15 | 		js
 16 | 		img
 17 | 		fields
 18 | 		forms
 19 | 		language
 20 | 		updates
 21 | 	
 22 | 	
 23 | 		language/en-GB/en-GB.plg_system_socialmeta.ini
 24 | 		language/en-GB/en-GB.plg_system_socialmeta.sys.ini
 25 | 		language/fr-FR/fr-FR.plg_system_socialmeta.ini
 26 | 		language/fr-FR/fr-FR.plg_system_socialmeta.sys.ini
 27 | 		language/th-TH/th-TH.plg_system_socialmeta.ini
 28 | 		language/th-TH/th-TH.plg_system_socialmeta.sys.ini
 29 | 	
 30 | 	
 31 | 		
 32 | 			
33 | 40 | 47 | 54 | 61 | 67 | 73 | 80 | 88 | 95 | 102 | 109 |
110 |
111 | 117 | 125 | 126 | 127 | 128 | 129 | 130 | 136 | 145 | 153 | 154 | 155 | 156 | 157 | 158 |
159 |
160 | 167 | 173 | 181 | 182 | 183 | 184 | 192 | 193 | 194 | 195 | 203 | 204 | 205 | 206 | 214 | 215 | 216 | 217 | 225 | 226 | 227 | 228 | 236 | 237 | 238 | 239 | 247 | 248 | 249 | 250 | 258 | 259 | 260 | 261 | 269 | 270 | 271 | 272 | 280 | 281 | 282 | 283 | 289 | 297 | 298 | 299 | 300 | 308 | 309 | 310 | 311 | 319 | 320 | 321 | 322 | 330 | 331 | 332 | 333 | 341 | 342 | 343 | 344 | 352 | 353 | 354 | 355 | 361 | 369 | 370 | 371 | 372 | 380 | 381 | 382 | 383 | 389 | 397 | 398 | 399 | 400 | 408 | 409 | 410 | 411 | 419 | 420 | 421 | 422 | 428 | 436 | 437 | 438 | 439 |
440 |
441 |
442 | 443 | 444 | https://raw.githubusercontent.com/vistamedia/socialmeta/master/updates/plg_socialmeta_updates.xml 445 | 446 |
447 | -------------------------------------------------------------------------------- /updates/index.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /updates/plg_socialmeta_updates.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Socialmeta plugin 5 | Socialmeta plugin for Joomla! 3+ version 1.0 (stable channel) 6 | socialmeta 7 | plugin 8 | system 9 | 1.1 10 | https://github.com/vistamedia/socialmeta/ 11 | 12 | https://github.com/vistamedia/socialmeta/archive/1.1.0.zip 13 | 14 | 15 | stable 16 | 17 | Emmanuel Danan 18 | https://github.com/vistamedia/socialmeta/ 19 |
Metadata
20 | 21 | 0 22 |
23 |
24 | --------------------------------------------------------------------------------