wp-plugin-creativecommons icon indicating copy to clipboard operation
wp-plugin-creativecommons copied to clipboard

Suggestions

Open a8bit opened this issue 6 years ago • 15 comments
trafficstars

There are a couple of things that need to happen before I can activate this plugin.

  • [x] Widget. There are no widget options, at a minimum there should be the ability to edit the title of the widget. Most people don't need to announce that the widget is a Licence, it's obvious by the content, it should be possible to turn off the title, usually that is done in the widget options by just removing the title.
  • [x] There needs to be a way to add my own text to the license block. The badge itself is not enough to explain to my visitors why I have chosen a specific license for a particular work. If there were a default line of text above the badge that was editable in the CC settings page and it was overrideable in the license chooser on pages/post/users that would be perfect. Don't display anything if it isn't populated. If the default text per license were a plain text description of the licence "Tell people I made this originally, Share your changes, Don't sell it" that kind of thing, it would be great.
  • [x] There needs to be a way to specify the attribution. If I set something as CC-BY I want to be able to say "Credit name, and link to " so people don't have to think about the attribution they are required to give. Website name, user name, full name, custom. and Website URL, Page/post/user URL, custom. Would be the options I'd give those fields.
  • [ ] should be able to add the licence to any taxonomy, including custom ones so it can get picked up by download plugins and other similar addons.

I don't quite see how you are going to integrate blocks with this. If the idea is to display the licence in the footer or in a widget, it would probably be better as custom meta on the page/post/taxonomy. If you want the licence to be included in the body of the page/post you don't need a widget/footer for it.

a8bit avatar Jul 23 '19 15:07 a8bit

@ChoccyHobNob Thank you for taking the time to write this up!

TimidRobot avatar Jul 23 '19 19:07 TimidRobot

I am keen to see this plugin become something useful. I have a couple of websites that offer creations using differing licences and its a pain to manage at the moment, this plugin looks like it could solve those problems so I'd like to help push it in the right direction. A good plugin will encourage more usage of the licences as well, that wouldn't be a bad thing.

a8bit avatar Jul 24 '19 22:07 a8bit

Thank you for the suggestions.

I totally agree with you on 2 and 3. and they are already under progress. The widget options are also a good idea, noted.

Could you elaborate more on the fourth point?

It is possible to integrate the features in blocks, maybe by using Rich Text blocks. We can add these features to both the blocks and the widget and let the user decide the one. The idea is to support Gutenberg.

If you want the license to be included in the body of the page/post you don't need a widget/footer for it.

This can certainly be considered, I am not a fan of how the footer looks. Right now, I am re-writing the settings, thank you for your time, I will definitely consider these suggestions.

ahmadbilaldev avatar Jul 25 '19 11:07 ahmadbilaldev

Maybe I misunderstand how the blocks will be implemented. If I have a site licence set, and then set a licence for my page, the page licence overrides the site licence. What happens if I then add a licence to the body text using a block? does it remove the sidebar widget or change it? can I have multiple items on a page with multiple licence blocks (the 'useful' use case I imagine for a block based licence) if I can, what happens to the licence displayed in the footer/widget?

a8bit avatar Jul 25 '19 15:07 a8bit

Point 4. I think I am thinking about custom post types, not taxonomies. Gallery plugins, download plugins, portfolio plugins etc can implement custom post types that go along with posts, pages, media etc. It should be possible to set the licence for these post types as well as posts and pages

a8bit avatar Jul 25 '19 15:07 a8bit

Maybe I misunderstand how the blocks will be implemented. If I have a site licence set, and then set a licence for my page, the page licence overrides the site licence. What happens if I then add a licence to the body text using a block? does it remove the sidebar widget or change it? can I have multiple items on a page with multiple licence blocks (the 'useful' use case I imagine for a block based licence) if I can, what happens to the licence displayed in the footer/widget?

You're right. The use case is multiple attributions to different content. If we include a block, the widget will not be affected. That is why we are including the warning before the license text that goes:

Except otherwise noted, the content on this site is attributed by some license.

With the next release (will be out in a couple of days) I have removed the border of the blocks and made a few changes. If you have some input about the design of the blocks that will be welcome as well.

ahmadbilaldev avatar Jul 25 '19 16:07 ahmadbilaldev

OK I'll check it out.

a8bit avatar Jul 25 '19 17:07 a8bit

New version v2019.7.2 released. See the changelog for more.

ahmadbilaldev avatar Aug 01 '19 21:08 ahmadbilaldev

#74: Options added to the widget.

ahmadbilaldev avatar Aug 06 '19 22:08 ahmadbilaldev

Updated with completed suggestions.

ahmadbilaldev avatar Aug 23 '19 22:08 ahmadbilaldev

Sorry it's taken me a few days to get back to this. Everything is much improved, there are still a few issues.

  • Blank Title This is kindof working, I get this when I put in two widgets, one without and one with a title. Screenshot 2019-08-27 at 17 56 55 The html around the title is still being generated even without the text.

I changed this code in creativecommons-widget.php

		public function widget( $args, $instance ) {
			$title = apply_filters( 'widget_title', $instance['title'] );
			echo $args['before_widget'];
			echo $args['before_title'] . $title . $args['after_title'];
			$this->print_license_widget( );
			echo $args['after_widget'];
		}

to this

		public function widget( $args, $instance ) {
			if ( ! empty($instance['title']) ) {
				$title = apply_filters( 'widget_title', $instance['title'] );
				echo $args['before_widget'];
				echo $args['before_title'] . $title . $args['after_title'];
			} else {
				echo $args['before_widget'];
				$args['after_title'];
			}
			$this->print_license_widget( );
			echo $args['after_widget'];
		}

Now I get this Screenshot 2019-08-27 at 17 56 22 Which is more what I had in mind.

  • Footer v's Widget. The css class license-wrap is used for both sidebar and footer. This is not great, could there be a license-wrap-footer and license-wrap-widget classes please.

  • Widgets displayed if Footer is selected. If I choose Widget as the licence location and add a widget to a sidebar it appears as I'd expect. If I now also select Footer for the licence location I get the licence there too (with incorrect CSS, see previous point) if I now deselect widget in the settings, I still get a box where the widget is in my sidebar. If I don't select the widget location the creativecommons-widget.php should just do nothing.

a8bit avatar Aug 27 '19 23:08 a8bit

A couple more.

Blocks don't have any formatting options other than fore/background colour. being able to change the alignment and font size would be good.

I'd like to be able to change the widget text for each page. Ideally I'd like a footer with a sitewide licence, each page to be able to have an overriding page licence and then the content have overriding block level licences.

I can't turn the CC off for other non-cc licences, I have some fonts that are SIL licensed. This gets us into the realms of being able to pick all the other open source licences, maybe not somewhere you want to go.

Overall this is looking great now! well done :)

a8bit avatar Aug 28 '19 00:08 a8bit

😭

one909 avatar Jan 11 '20 07:01 one909