This and some of the rest of the thread is getting into issues with the facebook end of the thing. And I have to say that I know diddly squat about facebook....
But maybe someone else has better knowledge than I
This and some of the rest of the thread is getting into issues with the facebook end of the thing. And I have to say that I know diddly squat about facebook....
But maybe someone else has better knowledge than I
Nick
iszent.com
You have to edit the sizing of the Like box so that you don't see a big white space...
As for sending an image and title to Facebook, yes it can be done, but requires the addition of Meta Tags. This requires some core file editing!Code:<iframe src="http://www.facebook.com/widgets/like.php?href=<?php echo zen_href_link(zen_get_info_page((int)$_GET['products_id']),'cPath= '.(int)$_GET['cPath'].' &products_id=' . (int)$_GET['products_id']); ?>" scrolling="no" frameborder="0" style="border:none; width:450px; height:80px"></iframe>
As an FYI, you can customize the look of the button (somewhat) - here's a link to the Facebook page.
http://developers.facebook.com/docs/...e/plugins/like
Awesome mod thanks for sharing this.
hey-you I would be interested in know what core files are to be changed to include images and titles on facebook if you would be so kind to point me in the direction :-)
Melanie
beehavendesignz DOT com
Replacing all the & amp; with % 26 seems to work.
Using the urlencode() function.
Here it is (this is found from a website... uses urlencode function):
Code:<iframe src="http://www.facebook.com/plugins/like.php?href=<?php echo urlencode(zen_href_link(zen_get_info_page((int)$_GET['products_id']),'cPath='.(int)$_GET['cPath'].'&products_id=' . (int)$_GET['products_id'])); ?>&layout=standard&show_faces=true&width=450&action=like&colorscheme=light" scrolling="no" frameborder="0" allowTransparency="true" style="border:none; overflow:hidden; width:450px; height:px"></iframe>
Change the height to something you prefer
PS:
Or you can use strreplace function to just replace "& amp;" with "% 26"
I changed my coding on the header page so that now the Like button works without giving me that error message. Go to this page, download the file, and then copy the facebook section to your header page, and it should work:
http://www.zenflavor.com/add-faceboo...uct-pages.html
Here's what I did...I'm not sure if it's the best way, but it works!
Do this at your own risk!!! Back-up all files first!
in "includes\templates\YOUR_TEMPLATE\common\html_header.php"
I placed this below the meta tag for "generator":
Note that the above only works on product pages not document pages.Code:<?php if(strstr($_GET['main_page'], 'product_')) { ?> <meta property="og:title" content="<?php echo META_TAG_FBTITLE; ?>"/> <meta property="og:site_name" content="<?php echo TITLE; ?>"/> <meta property="og:image" content="<?php echo META_TAG_FBIMG; ?>"/> <meta property="og:type" content="product"/> <meta property="og:phone_number" content="ENTER PHONE NUMBER"/> <meta property="og:region" content="ENTER STATE CODE"/> <meta property="og:country-name" content="ENTER Country"/> <meta property="fb:admins" content="ENTER FB USERID"/> <?php } ?>
There's also many more meta tags that FB recognizes it. Take a look at their developer resources for me info...
http://developers.facebook.com/docs/opengraph
in "includes\modules\meta_tags.php"
Add the change in red to the query on (or around) line 200:
I've inserted the following code at line 284 (for me), between the following lines in blue:Code:$sql= "select pd.products_name, p.products_model, p.products_price_sorter, p.products_tax_class_id, p.products_image, p.metatags_title_status, p.metatags_products_name_status, p.metatags_model_status, p.products_id, p.metatags_price_status, p.metatags_title_tagline_status, pd.products_description, p.product_is_free, p.product_is_call, mtpd.metatags_title, mtpd.metatags_keywords, mtpd.metatags_description
And than follow the other instructions in this thread for editing tpl_product_info_displayCode:} // CUSTOM META TAGS if($product_info_metatags->fields['products_image']!='') { $FBimgURL = (($request_type == 'SSL') ? HTTPS_SERVER . DIR_WS_HTTPS_CATALOG : HTTP_SERVER . DIR_WS_CATALOG ) . DIR_WS_IMAGES . $product_info_metatags->fields['products_image']; define('META_TAG_FBIMG', $FBimgURL); } else { define('META_TAG_FBIMG', ''); } define('META_TAG_FBTITLE', str_replace('"','',zen_clean_html($product_info_metatags->fields['products_name']))); } // EOF break;
I hope this helps.
I've tried changing my tpl_product_info_display.php file, as instructed, but nothing changed on my page. Why not?
Bookmarks