OXID Community Forum

> International Forums > Templates and Design > Move a facebook share button.
Login
FAQ Members List Calendar Search Today's Posts Mark Forums Read

Thread: Move a facebook share button.


Reply
 
Thread Tools Display Modes
#Top   #1  
Old 07-22-2011, 11:35 AM
Stellanhaglund Stellanhaglund is offline
Member
Join Date: Jul 2011
Posts: 30
Stellanhaglund is on a distinguished road
Default Move a facebook share button.

Right now there is a share button for my product designer in the designer.tpl
I would like that button on the frontpage in my sidebar.tpl how do I get it there.

Here´s the code from the designer.tpl

[{capture append="oxidBlock_content"}]

[{capture assign="pageScript"}]
function snw_showTaxInfo(){

}

function sendDesignerImageToFacebook(){
document.getElementById("snw_designer").snw_create Snapshot("onDesignerImageStored");
}

function onDesignerImageStored(result,error){
if(result){
var picture = result.url;
var infos = document.getElementById("snw_designer").snw_getInf os();
var title = infos.product.name;
var fb = "http://www.facebook.com/sharer.php?u=";
var picurl = "[{$oView->getPreviewPictureUrl()}]" + picture;
var dlink = "[{$oViewConf->getSelfLink()}]cl=designer&fnc=showFacebookFrame&title="+title+"& img="+picurl;

window.open(fb+escape(dlink),"Facebook", "width=550,height=320,left=100,top=100");
}
}
[{/capture}]
[{oxscript add=$pageScript}]

[{$designer}]

[{include file="page/shirtnetwork/designer_description.tpl"}]

[{/capture}]

[{capture append="oxidBlock_sidebar"}]
[{oxifcontent ident="designerhelp" object="oCont"}]
<div id="designerHelpBox" class="box">
<h3>[{$oCont->oxcontents__oxtitle->value}]</h3>
<div class="content">[{$oCont->oxcontents__oxcontent->value}]</div>
</div>
[{/oxifcontent}]
[{oxifcontent ident="facebooklikedesigner" object="oCont"}]
<div id="designerFbBox" class="box">
<h3>[{$oCont->oxcontents__oxtitle->value}]</h3>
<div class="content">
[{$oCont->oxcontents__oxcontent->value}]
<img onclick="sendDesignerImageToFacebook()" src="[{$oViewConf->getImageUrl()}]facebook_icon.gif" alt="[{$oCont->oxcontents__oxtitle->value}]" style="cursorointer;cursor:hand;" />
</div>
</div>
[{/oxifcontent}]
[{/capture}]
[{include file="layout/page.tpl" sidebar="Left"}]
Reply With Quote
#Top   #2  
Old 07-22-2011, 02:16 PM
rafaeldabrowski's Avatar
rafaeldabrowski rafaeldabrowski is offline
Senior Member
Join Date: Sep 2010
Posts: 360
rafaeldabrowski is on a distinguished road
Default AW: Move a facebook share button.

changing
Code:
[{capture append="oxidBlock_content"}]

[{capture assign="pageScript"}]
to
Code:
[{capture append="oxidBlock_sidebar"}]

[{capture assign="pageScript"}]
should work.

regards

rafael
__________________
HEINER DIRECT GmbH & Co. KG
www.heiner-direct.com
Reply With Quote
#Top   #3  
Old 07-22-2011, 02:29 PM
Stellanhaglund Stellanhaglund is offline
Member
Join Date: Jul 2011
Posts: 30
Stellanhaglund is on a distinguished road
Default Re: Move a facebook share button.

Nothing changed by doing that.

Shouldnt I copy some code to the start.tpl?

I had to make cms content with ident facebookelikedesigner.

Thanks,
Reply With Quote
#Top   #4  
Old 07-22-2011, 02:33 PM
Stellanhaglund Stellanhaglund is offline
Member
Join Date: Jul 2011
Posts: 30
Stellanhaglund is on a distinguished road
Default Re: Move a facebook share button.

And now that the fancybox is added I want the facebook share window to show up in a fancybox window instead of the pop up.
Reply With Quote
#Top   #5  
Old 07-22-2011, 03:37 PM
rafaeldabrowski's Avatar
rafaeldabrowski rafaeldabrowski is offline
Senior Member
Join Date: Sep 2010
Posts: 360
rafaeldabrowski is on a distinguished road
Default AW: Move a facebook share button.

http://sitedemo.dittskal.se/designer/ on this site i see the facebook button in the sitebar.

regards

rafael
__________________
HEINER DIRECT GmbH & Co. KG
www.heiner-direct.com
Reply With Quote
#Top   #6  
Old 07-22-2011, 03:41 PM
rafaeldabrowski's Avatar
rafaeldabrowski rafaeldabrowski is offline
Senior Member
Join Date: Sep 2010
Posts: 360
rafaeldabrowski is on a distinguished road
Default AW: Move a facebook share button.

Ahh now i see.
yes if you want it on the Home Page than you have to include the Code in the start.tpl

Regards

Rafael

PS.: this works quite equal to the youtube approach
__________________
HEINER DIRECT GmbH & Co. KG
www.heiner-direct.com
Reply With Quote
#Top   #7  
Old 07-22-2011, 04:12 PM
Stellanhaglund Stellanhaglund is offline
Member
Join Date: Jul 2011
Posts: 30
Stellanhaglund is on a distinguished road
Default Re: Move a facebook share button.

Yes, and now I changed the code back as it where before. and it´s still there.

It´s been there all along.

What I want is to have it show on the http://sitdemo.dittskal.se directly.

Thanks,
Reply With Quote
#Top   #8  
Old 07-22-2011, 06:34 PM
Stellanhaglund Stellanhaglund is offline
Member
Join Date: Jul 2011
Posts: 30
Stellanhaglund is on a distinguished road
Default Re: Move a facebook share button.

What parts of the code do I have to include?

Thanks,
Reply With Quote
Reply

Bookmarks

Tags
button, facebook, share

« Previous Thread | Next Thread »
Thread Tools
Display Modes

Nicht Sichtbar
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Facebook Like Button imd eCommerce-Recht 29 08-20-2013 10:48 PM
Facebook Like + Share Button / Artikelbild verwenden coarsy Templates und Design 17 08-13-2011 10:28 PM
Facebook Like Button mit Kommentar MaGro Bug-Verdacht 3 07-06-2011 10:34 AM
Facebook Like-Button ans316 Installation und Konfiguration 14 04-20-2011 06:56 AM
facebook share pictures stasysd Newbies 9 10-29-2010 04:10 PM

All times are GMT +1. The time now is 03:17 AM.