<a href="javascript:void(0);" onclick="jfbc.social.feedPost("Title of the page","A caption for this post","A pre-filled description for the page that the user will be able to edit",window.location,'http://yoursite.com/link-to-an-image.jpg')><img src="http://yoursite.com/post-to-wall-button.jpg" /></a>
<a href="#" onclick="jfbc.opengraph.triggerAction('1','http://site.com/link-to-coupon-page')"><img src="http://site.com/button-image.jpg" /></a>
echo 'Você ainda pode gerar 4 cupons deste estabelecimento no mês corrente. Pressione o botão "Gerar Cupom" caso deseje usufruiu do seu benefício nos próximos dois dias. Lembre-se de que, após gerado, o seu cupom tem validade de 48 horas.Gerar CupomGerar CupomGerar CupomGerar Cupom';
acexgames wrote:
echo 'Você ainda pode gerar 4 cupons deste estabelecimento no mês corrente. Pressione o botão "Gerar Cupom" caso deseje usufruiu do seu benefício nos próximos dois dias. Lembre-se de que, após gerado, o seu cupom tem validade de 48 horas.Gerar CupomGerar CupomGerar CupomGerar Cupom';
This is the code which is available in the page to generate coupons (with 4 buttons)... I did change only the first button, as you can see above. Can you check if it is correct?
Regards,
Rafael
echo '<center><table><tbody><tr><td width="20%"><center><img src="images/coupon_novo.png" /></center></td><td width="20%"><center><img src="images/coupon_novo.png" /></center></td><td width="20%"><center><img src="images/coupon_novo.png" /></center></td><td width="20%"><center><img src="images/coupon_novo.png" /></center></td><td width="20%"><h5><center><p class="info">Você ainda pode gerar 4 cupons deste estabelecimento no mês corrente. Pressione o botão "Gerar Cupom" caso deseje usufruiu do seu benefício nos próximos dois dias.</p> <p class="error">Lembre-se de que, após gerado, o seu cupom tem validade de 48 horas.</p></center></h5></td></tr><tr><td width="20%"><center><a class="btn btn-info" href="#" onclick="jfbc.opengraph.triggerAction("1","gerar_cupom.php?data='.$today.'&user='.$userId.'&estab='.$itemid.'")">Gerar Cupom</a></center></td><td width="20%"><center><a class="btn btn-info" href="gerar_cupom.php?data='.$today.'&user='.$userId.'&estab='.$itemid.'">Gerar Cupom</a></center></td><td width="20%"><center><a class="btn btn-info" href="gerar_cupom.php?data='.$today.'&user='.$userId.'&estab='.$itemid.'">Gerar Cupom</a></center></td><td width="20%"><center><a class="btn btn-info" href="gerar_cupom.php?data='.$today.'&user='.$userId.'&estab='.$itemid.'">Gerar Cupom</a></center></td><td width="20%"></td></tr></tbody></table></center>';
The code above should work for that with a little modification. Basically, you'll update the onclick call to call our code and *then* redirect to the page you want. However, that page you're redirecting to will have to be a Joomla page of some sort. JFBConnect only knows about "Joomla", so if you're generating that page outside of Joomla, there will likely be issues as we won't be able to assign the object stuff to the coupon page. Our logic also checks to make sure that the action you're trying to trigger is properly associated with the object, which would fail (and stop the posting) if your page isn't in Joomla.However, the action should be triggered while clicking in a button, which is available in a Jumi module (with PHP code).
onclick="jfbc.opengraph.triggerAction("1","gerar_cupom.php?data='.$today.'&user='.$userId.'&estab='.$itemid.'")
echo '<td width="20%"><center><a class="btn btn-info" href="#" onclick="jfbc.opengraph.triggerAction("1","http://www.mydomain.com.br/gerar_cupom.php?data='.$today.'&user='.$userId.'&estab='.$itemid.'")">Gerar Cupom</a></center></td>';
Join our newsletter to get alerts for Joomla releases, tips and tricks and extension updates.