Giter Club home page Giter Club logo

Comments (7)

apkoponen avatar apkoponen commented on July 29, 2024

Sounds awesome! I think the biggest part of the plugin would be the admin UI. Otherwise it is fairly simple. Should we use the same generator JS as on the site to generate button code or do it with PHP in order to better support for e.g. localization? This is always extra work and I don't know what would be ideal for @mxstbr.

We should support three ways for showing the buttons:

  • A PHP function for templates, sharingbuttons_io($options).
  • A shortcode, [sharingbuttons_io option1="foo" option2="bar" ... ]
  • Admin page, where the buttons can be enabled to be shown above/below the content and for selected post types.

from sharingbuttons.io.

mxstbr avatar mxstbr commented on July 29, 2024

Should we use the same generator JS as on the site to generate button code or do it with PHP in order to better support for e.g. localization?

Could we make the generator JS (and thus the site) better? It seems kind of weird to support two codebases doing almost the same thing 😉

Otherwise this sounds absolutely amazing, can't wait for this to happen!

from sharingbuttons.io.

brianschildt avatar brianschildt commented on July 29, 2024

I know it is a bit different, but is has the same purpose - No tracking social buttons - https://github.com/privacore/sharebuttons-wp

from sharingbuttons.io.

apkoponen avatar apkoponen commented on July 29, 2024

@mxstbr Okay. How would you think that we could dynamically fill in the URL and the title of the page/post that were on when using JS generator code?

from sharingbuttons.io.

mxstbr avatar mxstbr commented on July 29, 2024

@apkoponen I've honestly never built a WordPress plugin before so I really have no idea 😊 however you want to do this is honestly fine with me!

from sharingbuttons.io.

apkoponen avatar apkoponen commented on July 29, 2024

I was just checking, if you had better ideas than me, because I had a more in depth to the sharingbuttons.io site and realized my initial implementation idea would not work. I initially thought we could just use the JS script to generate the HTML and CSS output, store it to the DB and just input it to the pages. Implementing this would be super easy. However, it would only work if we want to use the same URL and text on every page on the website (which does not seem too useful?).

If we want to support proper localization of the text in the buttons + dynamic URL and text based on the site we're on we can't really utilize much of the application logic from sharingbuttons.io site. We could use the script on the admin site to show the preview of what the buttons would look like and use the HTML and CSS you've done, but otherwise we'd need to implement the display logic (and options storage) in PHP from scratch. This would be not be a lot of work, as the whole app is not too complicated, but I'm not sure if it's worthwhile, as there are 1000+ "share" plugins for WordPress (https://wordpress.org/plugins/search.php?q=share) and very similar plugins already exists (e.g. https://wordpress.org/plugins/dvk-social-sharing/ that I've used previously).

We could, of course, load the JS on every page and give it parameters through PHP using a script tag that outputs global variables, but that pretty much nullifies the whole "no extra JS thing". :)

from sharingbuttons.io.

jcage88 avatar jcage88 commented on July 29, 2024

I'd like to get such a plugin for my website too. Does it matter how the website is created? Will it be ok if I use some templates for it from http://www.templatemonster.com/wordpress-themes.php for example? Thanks for your help in advance!

from sharingbuttons.io.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.