• Home
  • Categories
  • Recent
  • Popular
  • Top
  • Tags
  • Users
  • Groups
  • Documentation
    • Home
    • Read API
    • Write API
    • Plugin Development
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
v3.5.2 Latest
Buy Hosting

Can I disable share function?

Scheduled Pinned Locked Moved General Discussion
6 Posts 3 Posters 1.9k Views
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • Paul.Li 李隱唐P Offline
    Paul.Li 李隱唐P Offline
    Paul.Li 李隱唐
    wrote on last edited by
    #1

    Share content in the forum to social network websites like Facebook, Twitter is good idea, but is it possible to disable the Share function, or just disable in specific Categories?

    1 Reply Last reply
    0
  • barisB Offline
    barisB Offline
    <baris> NodeBB
    wrote on last edited by
    #2

    Admin > General Settings
    upload-a754f20c-250b-4e60-864d-71a87778b080

    1 Reply Last reply
    0
  • Paul.Li 李隱唐P Offline
    Paul.Li 李隱唐P Offline
    Paul.Li 李隱唐
    wrote on last edited by
    #3

    thanks
    can I set share function on/off different categories?

    ex: "Announcements" close share "General Discussion" open share....

    A 1 Reply Last reply
    0
  • A Offline
    A Offline
    a_5mith
    replied to Paul.Li 李隱唐 on last edited by a_5mith
    #4

    @Paul.Li-李隱唐 Not by default, but it would be possible using CSS just to hide the ones you don't want. It will also require a small template change,

    This is for the topic page, look here after share-dropdown, add a space, then category-{category.cid}

    This will give you a class to grab hold of when doing the CSS change.

    You'll then see after share-dropdown will be (in the case of this topic) a class called category-2 (because the category we're in has a cid of 2), you can then do soemthing like this in your CSS...

    .category-2 ul.dropdown-menu li a.facebook-share, a.twitter-share, a.google-share, .dropdown-header {
    display: none !important;
    }
    

    Which will give you

    Untitled.png

    You'd then do exactly the same thing for the category pages, except your CSS would be slightly different.

    .category-2.inline-block button.btn.btn-default.dropdown-toggle {
    display: none !important;
    }
    

    And the category-{category.cid} would go here

    the -2 will change depending on what category you are in, so you would need to copy the above CSS for each category, adjusting the CID in the first class as required. I did look to see if their was a CSS selector that would allow you to specify .category-[1,3,4,6,8] but I don't believe their is. @trevor might know.

    Hope this helps. 👍

    Also note, just because it's hidden, doesn't mean it wouldn't be possible for someone to hard code the share URL. However at that point it would be far easier for someone to just copy the URL and paste it into Facebook themself.

    There's probably other ways of doing this, as this way is a bit hacky.

    Paul.Li 李隱唐P 1 Reply Last reply
    0
  • barisB Offline
    barisB Offline
    <baris> NodeBB
    wrote on last edited by
    #5

    We should probably add the category name or id as a class to category.tpl so it is easier to do category specific css changes like this.

    1 Reply Last reply
    1
  • Paul.Li 李隱唐P Offline
    Paul.Li 李隱唐P Offline
    Paul.Li 李隱唐
    replied to a_5mith on last edited by
    #6

    @a_5mith

    thanks, I will trying it

    1 Reply Last reply
    0

Copyright © 2023 NodeBB | Contributors
  • Login

  • Don't have an account? Register

  • Login or register to search.
Powered by NodeBB Contributors
  • First post
    Last post
0
  • Home
  • Categories
  • Recent
  • Popular
  • Top
  • Tags
  • Users
  • Groups
  • Documentation
    • Home
    • Read API
    • Write API
    • Plugin Development