Invision Community 4: SEO, prepare for v5 and dormant account notifications Matt November 11, 2024Nov 11
Posted September 29, 201311 yr is it possible to deactivate/take away the 'share on Facebook' and 'share on Twitter' possibilities, when accessing on smartphone/tablet ?
September 29, 201311 yr The only way I know of is to manually remove them from the mobile theme. Go to Admin CP >>>> Look & Feel >>>> Mobile Go to the Topic View template and find and delete: <if test="canShare:|:!$forum['disable_sharelinks'] AND $this->settings['sl_enable']"> <div id='shareStrip'> <a class='button secondary' id='share_facebook_trigger' href='#'>{$this->lang->words['share']} <img src="{$this->settings['public_dir']}style_extra/sharelinks/facebook.png" /></a> <a class='button secondary' id='share_twitter_trigger' href='#'>{$this->lang->words['share']} <img src="{$this->settings['public_dir']}style_extra/sharelinks/twitter.png" /></a> </div> </if> Then find and delete: if test="!$forum['disable_sharelinks'] AND $this->settings['sl_enable']"> /* Facebook */ if ( $('share_facebook_trigger') ) { $('share_facebook_trigger').on('click', _fireFacebook ); } /* Twitter */ if ( $('share_twitter_trigger') ) { $('share_twitter_trigger').on('click', _fireTwitter ); } </if> That should remove the buttons from mobile entirely.
September 29, 201311 yr Author The only way I know of is to manually remove them from the mobile theme. Go to Admin CP >>>> Look & Feel >>>> Mobile Go to the Topic View template and find and delete: <if test="canShare:|:!$forum['disable_sharelinks'] AND $this->settings['sl_enable']"> <div id='shareStrip'> <a class='button secondary' id='share_facebook_trigger' href='#'>{$this->lang->words['share']} <img src="{$this->settings['public_dir']}style_extra/sharelinks/facebook.png" /></a> <a class='button secondary' id='share_twitter_trigger' href='#'>{$this->lang->words['share']} <img src="{$this->settings['public_dir']}style_extra/sharelinks/twitter.png" /></a> </div> </if> Then find and delete: if test="!$forum['disable_sharelinks'] AND $this->settings['sl_enable']"> /* Facebook */ if ( $('share_facebook_trigger') ) { $('share_facebook_trigger').on('click', _fireFacebook ); } /* Twitter */ if ( $('share_twitter_trigger') ) { $('share_twitter_trigger').on('click', _fireTwitter ); } </if> That should remove the buttons from mobile entirely. Ok, thank you - I'll try that :smile:
October 1, 201311 yr Author Hello again, I am really not that good as this... I cannot find the 'topic view template' after entering the mobile app under 'look and feel' - could you guide me a bit more :)
October 1, 201311 yr Hello again, I am really not that good as this... I cannot find the 'topic view template' after entering the mobile app under 'look and feel' - could you guide me a bit more :smile: I took some screenshots for you and posted them in the spoiler below. I would have made an actual video but I don't have camtasia on this computer as I'm at work. Hopefully these will do for now. In the last picture, just use ctrl + F to bring up the "find" tool in your browser. and then just type in 'share_facebook' and delete all entries with that piece of coding in it. Do the same for 'share_twitter.' There should only be two of each in the template. Be sure to delete everything included in those code snippets I posted in my last post. If you don't delete all of those then you will get some errors on your board. If you still need help, let me know. '> '> '> '> '> '>
October 2, 201311 yr Author Thank you very much - the buttons are gone :thumbsup: and everything else still works ;)
October 2, 201311 yr Thank you very much - the buttons are gone :thumbsup: and everything else still works ;) Glad I could be of service. :)
Archived
This topic is now archived and is closed to further replies.