Coder Social home page Coder Social logo

wp-pirate-parties's Introduction

wp-pirate-parties

A wordpress plugin that displays pirate parties as a widget, datasource is the PPI-rest-api.

Flag Icons: lipis/flag-icon-css

Usage Widget and Shortcode

  • Activate plugin.
  • Add Widget to Sidebar.
  • user [pirate-party id="ppat"] shorcode in post.
  • Full shortcode options: [pirate-party id="ppat" show-logo="1" show-native-name="1" show-membershipsshow-website="1" show-facebook="0" show-twitter="1" show-googleplus="0" show-youtube="0"].
  • show-all="1" overwrites all show options and sets them to 1.

Development with Vagrant

  • Install VirtualBox and Vagrant.
  • Run vagrant up.
  • Open http://localhost:8080/ in your browser.

Production Deploy

  • Install Wordpress on a webserver.
  • Move files to *wordpress-install-dir*/wp-content/plugins/wp-pirate-parties
  • (You can remove the Vagrantfile).
  • Activate the plugin.
  • Add the Widget to the Sidebar.

Generate l10n .pot and .mo files

Run xgettext --from-code=utf-8 -k_e -k_x -k__ -o languages/wp-pirate-parties.pot $(find . -name "*.php").

To create .mo files run msgfmt -o wp-pirate-parties-de_DE.mo wp-pirate-parties-de_DE.po

wp-pirate-parties's People

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

wp-pirate-parties's Issues

inspiration

Here's some old code used to build an embeddable list http://pirateparties.collentine.com/

Was thinking something similar for the wordpress plugin. An ability to choose what properties you were interested in and creating an embeddable widget from that. Using the API it should stay current when changes happen in backend.

Widget auto-hiding of Pirate Parties lacking a particular resource

Currently the widget only displays those Pirate Parties that have the particular link you choose to display. e.g. Everyone has a website but not all Parties make use of Google+

Would it be possible to display all countries for all categories and just mark those that are missing a resource in some manner (or maybe just without a link) ? Alternatively have some notification on bottom stating it only shows those countries with that resource.

Slighty problematic that the number of Pirate Parties seemingly change depending on what you show.

Shortcode improvements

Love the ability to include the shortcode in a post!

For the default shortcode for a country I'd rather see memberships set to false and Facebook set to true (preferably displaying facebook.com/user rather than 'Facebook'). Most times when you use a shortcode you'd like to solely focus on that party and less relevant what memberships it has. Believe membership tag comes more in handy when displaying a list of parties and can then be set manually to show.

e.g. [pirate-party id="ppse"]

[logo] Pirate Party Sweden
Piratpartiet
www.piratpartiet.se
facebook.com/piratpartiet
@piratpartiet

Is there an ability to make an easy shortcode to display all the data on a party rather than having to set all options to 1? e.g. [pirate-party id="ppse" all="1"]

Widget idea: Party of the Week

An idea for an additional widget would be to have a widget that either randomizes or switches in a set order to display a new pirate party each week with links to social media etc.
Not sure if this is possible to implement a code for rotating content weekly...

e.g. (with some nicer layout and icons)

Pirate Party of the Week: Portugal
www.websiteishere.com
Facebook.com/user
@portugal PP

Widget display enhancements

Some suggestions that doesn't change function but visual parts.

  • Instead of a bulleted list use the country flags in front of each party (flags can be found in PAPI and should be able to link them to each country easily. Maybe we should do this in the json if needed or you can request Rok to add that feature to the API.
  • when displaying website show "country - www.websiteurl.com" rather than Pirate Party Country
  • when displaying twitter show "country - @username"
  • Sorting of countries seem random?! Make it alphabetical instead?

Widget feature request: A 'display all' option

Not sure if it would be hard to implement or slow down website but otherwise a 'display all' option for widget might be useful. Showing the links for each party with help of only icons:

website + facebook + twitter + google+ + youtube

Each link could be displayed with help of small icon using the country flag for the website and the social media icons for other links. Similar to how the sidebar on http://pp-ua.org/ looks

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.