Like Button and Google + button in smarty code?

Discussion in 'Programming' started by Nicholas Pope, Mar 13, 2013.

  1. #1
    Is this possible I need to put these buttons in a smarty file to get them to appear in the right place. please help, cheers.
     
    Nicholas Pope, Mar 13, 2013 IP
  2. atik

    atik Member

    Messages:
    79
    Likes Received:
    1
    Best Answers:
    1
    Trophy Points:
    26
    #2
    Did you tried putting the like button code yet? Find out the appropriate .tpl file and insert your code, it should work.
     
    atik, Mar 16, 2013 IP
  3. lkraj

    lkraj Greenhorn

    Messages:
    72
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    18
    #3
    Yes, you can add like and g+ buttons in smarty template. Just make sure that you enclose the script files with {literal}{/literal} tags. Example below.
    {literal}<script type="text/javascript">
    (function() {
    var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
    po.src = 'https://apis.google.com/js/plusone.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
    })();</script>{/literal}
     
    lkraj, Mar 26, 2013 IP