Adult Script Pro Community Forums

The forum is here for legacy reasons. No new posts will be created. User registration is disabled! If you have any questions, please email us or check https://www.adultscriptpro.com for more details!

You are not logged in.

#1 2011-09-28 13:31:38

Coscast
Member
From: Germany
Registered: 2010-10-03
Posts: 546

[HOWTO] Add google +1 to Video view

Open templates/your-template/footer.tpl.php

and add

<script type="text/javascript" src="https://apis.google.com/js/plusone.js"></script>

One line before

</body>

Save && Close that file

Looks like this:

<?php defined('_VALID') or die('Restricted Access!'); ?>
    <?php echo w('link_footer'); ?>
    <?php echo p('adv', 'footer'); ?>
    <div id="footer">
        Copyright 2010 <?php echo e($this->cfg['site_name']),' - ', p('menu_footer'); ?><br />
        Powered by <a href="http://www.adultscriptpro.com">Adult Script Pro</a>
        <?php echo p('benchmark', 'global_load'); ?>
    </div>
</div>
<?php if ($this->cfg['google_analytics'] != ''): ?>
<script type="text/javascript">
  var _gaq = _gaq || [];
  _gaq.push(['_setAccount', '<?php echo $this->cfg['google_analytics']; ?>']);
  _gaq.push(['_trackPageview']);
      
  (function() {
      var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
      ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
      var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  })();
</script>                      
<?php endif; ?>
<script type="text/javascript" src="https://apis.google.com/js/plusone.js"></script>
</body>
</html>

Then

Open templates/your-template/video_view.tpl.php

and add

<g:plusone size="small" count="false"></g:plusone>

after

<a class="addthis_button_twitter"></a>

Save && Close that file.

Looks like this:

                        <!-- AddThis Button BEGIN -->
                        <div class="addthis_toolbox addthis_default_style">
                            <a href="http://www.addthis.com/bookmark.php?v=250&amp;username=xa-4b9e0ea208b0eaed" class="addthis_button_compact"><strong>Share</strong></a>
                            <span class="addthis_separator">|</span>
                            <a class="addthis_button_facebook"></a>
                            <a class="addthis_button_myspace"></a>
                            <a class="addthis_button_google"></a>
                            <a class="addthis_button_twitter"></a>
                            <g:plusone size="small" count="false"></g:plusone>
                        </div>
                        <script type="text/javascript" src="http://s7.addthis.com/js/250/addthis_widget.js#username=xa-4b9e0ea208b0eaed"></script>
                        <!-- AddThis Button END -->

You are done smile

EOF

Last edited by Coscast (2011-09-28 13:32:37)


sgt-halfsize-banner.jpg

Offline

#2 2011-09-29 02:25:36

xsporntv
Member
Registered: 2011-04-20
Posts: 139
Website

Re: [HOWTO] Add google +1 to Video view

Just added it!  Works like a charm!

Thanks Coscast!

Last edited by xsporntv (2011-09-29 02:27:02)

Offline

#3 2011-10-02 10:53:26

Coscast
Member
From: Germany
Registered: 2010-10-03
Posts: 546

Re: [HOWTO] Add google +1 to Video view

You are welcome smile


sgt-halfsize-banner.jpg

Offline

#4 2011-12-07 23:47:12

jaydenblair@live.co.uk
Member
From: United Kingdom
Registered: 2011-10-30
Posts: 369
Website

Re: [HOWTO] Add google +1 to Video view

thank you so much smile

Offline

Board footer

Powered by FluxBB