Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> How To Add Facebook Like In Joomla Content, Add Facebook Comments In Joomla Template
Web Design Seo
post Jul 1 2011, 12:12 PM
Post #1


Web Design Seo
****

Group: Root Admin
Posts: 4,156
Joined: 29-April 09
From: Sofia
Member No.: 1



How to add "Facebook like" and "Facebook Send" in Joomla content and in some page in Joomla? How To Add Facebook Comments In Joomla Articles?

In all Joomla! Extensions Directory is no one good plugin to add facebook comments and facebook like. So, best way is to add comments from facebook manual, in php code of your joomla template - in article layout.

To add "Facebook like" in joomla articles, add this code in php code of your template:

Код
<?php $uriii = & JURI::getInstance(); ?>
<div id="fb-root"></div><script src="http://connect.facebook.net/en_US/all.js#appId=111923202235044&amp;xfbml=1"></script><fb:like href="<?php echo $uriii->_uri;?>" send="true" width="450" show_faces="false" font="tahoma"></fb:like>



This part will get current url - for Joomla 1.5:
Код
<?php $uriii = & JURI::getInstance(); ?>
<?php echo $uriii->_uri;?>


For Joomla 2.5 and Joomla 3:
Код
<?php $uriii = & JURI::current(); ?>
<?php echo $uriii; ?>



Parameters in facebook script:

- send: true or false
- width in pixels
- show_faces: true or false
- font: your font

To add "Facebook comments" in joomla articles, add this code in code of your template:

For Joomla 2.5 and Joomla 3:
Код
<?php $uriii = & JURI::current(); ?>
<script src="http://connect.facebook.net/en_US/all.js#xfbml=1"></script>
<div class="fb-comments" data-href="<?php echo $uriii; ?>" data-numposts="5" data-colorscheme="light"></div>


For Joomla 1.5:
Код
<?php $uriii = & JURI::getInstance(); ?>
<script src="http://connect.facebook.net/en_US/all.js#xfbml=1"></script>
<div class="fb-comments" data-href="<?php echo $uriii->_uri;?>" data-numposts="5" data-colorscheme="light"></div>


You can remove also:
Код
data-href="..."


In never versions of facebook scripts, script automatically detect url.

You can stylish div - for responsive comments design, add this to your css:
Код
.fb-comments, .fb-comments iframe[style], .fb-comments span { width: 100% !important; }



How to moderate facebook cooments?
Add this to head part of page (again in template):
Код
<meta property="fb:admins" content="your user id"/>

In this way this user id can moderate and delete bad comments.

Optional: If you want, you can create facebook application and add this part of code again in head:
Код
<meta property="fb:app_id" content="your app id">


In this way uou will get facebook like, comments and send for current url of current page in joomla. Work with sef or not-sef urls.
Enjoy smile.gif


--------------------
Правила на форума | Forum Rules | How to receive support. 3D Web Design: Уеб дизайн, Seo оптимизация, Web Site Extensions, Oscommerce Addons, Wordpress plugins and Joomla Extensions. Изработка на уеб сайтове и оптимизация на сайт за търсачки и Seo услуги.
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

Collapse

> Similar Topics

  Topic Replies Topic Starter Views Last Action
No New Posts How To Block Bad Bots On My Website .htaccess Code
code for .htaccess
2 Web Design Seo 7,669 17th October 2018 - 06:55 AM
Last post by: Web Design Seo
No new Pinned: Topic has attachmentsJoomla Vulnerable Extensions List
list with new Joomla exploits
20 Web Design Seo 22,837 26th September 2018 - 05:07 AM
Last post by: Web Design Seo
No new Pinned: Topic has attachmentsJoomla Scraper, Grabber For Joomla
Joomla Scraper Can Grab Any Content From Any Website
81 Web Design Seo 86,159 14th September 2018 - 08:35 AM
Last post by: Web Design Seo
No New Posts Pinned: How To Check Aged Domain Names Quality
old domain for sale - check quality first!
3 Web Design Seo 18,135 10th September 2018 - 06:22 AM
Last post by: Web Design Seo
No new Pinned: Joomla Pagination Seo Plugin
SEO plugin for Joomla Pagination that work in all Joomla
61 Web Design Seo 61,834 13th March 2018 - 10:05 AM
Last post by: mxcpz
No New Posts Pinned: Joomla Scraper Going Open Source
No licenses, use scraper on unlimited number of web sites
0 Web Design Seo 5,695 8th March 2017 - 07:40 AM
Last post by: Web Design Seo
No New Posts How To Boost Onpage Seo Of My Website
fast and power way to find the right keywords and to rank it quickly
0 Web Design Seo 9,552 16th January 2017 - 01:47 PM
Last post by: Web Design Seo
No New Posts Pinned: Joomla Ден 2016
Joomla Day 2016
1 Web Design Seo 18,338 31st October 2016 - 10:11 AM
Last post by: Web Design Seo
No New Posts Facebook логин
0 Valqk 8,233 14th September 2016 - 09:45 AM
Last post by: Valqk
No New Posts Joomla Post By Email To K2 Extra Fields
1 uglykidjoe 13,141 11th February 2016 - 07:45 AM
Last post by: Web Design Seo


 



RSS Lo-Fi Version Time is now: 22nd August 2019 - 03:08 AM
Clicky Web Analytics