1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

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