Added social media links to peer reviewed article #244

Merged
giplt merged 2 commits from medialinks into master 2019-12-25 11:35:23 +00:00
giplt commented 2019-04-25 10:21:02 +00:00 (Migrated from github.com)

Possible fix for #240 ?
Needs CSS implementation. @tammoterhark: images are now hardcoded to be looked for in the data/images/ folder. Probably you want this to be arranged for in a theme folder.

Possible fix for #240 ? Needs CSS implementation. @tammoterhark: images are now hardcoded to be looked for in the data/images/ folder. Probably you want this to be arranged for in a theme folder.
giplt commented 2019-04-25 10:30:32 +00:00 (Migrated from github.com)

image

![image](https://user-images.githubusercontent.com/536281/56729561-e007cf00-6755-11e9-84f5-427457f58c55.png)
giplt commented 2019-04-25 10:38:18 +00:00 (Migrated from github.com)

This feature should probably be implemented as an abstract function (something like 'addMediaLinks') that would be available to all page types. For now I propose to send that to the technical debt department and start testing this feature in peer reviewed article.

This feature should probably be implemented as an abstract function (something like 'addMediaLinks') that would be available to all page types. For now I propose to send that to the technical debt department and start testing this feature in peer reviewed article.
tammoterhark commented 2019-04-25 11:47:35 +00:00 (Migrated from github.com)

Please make this also switchable from the admin settings: for The Stadsbron this is now needed, but not for other Hypha instances.

Please make this also switchable from the admin settings: for The Stadsbron this is now needed, but not for other Hypha instances.
tammoterhark commented 2019-04-25 11:57:28 +00:00 (Migrated from github.com)

No, not a fix for #240, since that is about posting to the own social media by editors of De Stadsbron.

The solution that you implemented is for readers of the Stadsbron.

No, not a fix for #240, since that is about posting to the own social media by editors of De Stadsbron. The solution that you implemented is for readers of the Stadsbron.
giplt commented 2019-04-25 13:05:33 +00:00 (Migrated from github.com)

What do you mean by switchable from admin?

What do you mean by switchable from admin?
tammoterhark commented 2019-04-25 18:44:48 +00:00 (Migrated from github.com)

I mean that in the admin interface (not now, but needed when other parties will want to use this page type) this feature needs to have the possibility to be switched off. Maybe later: switch off/on per page type?

I mean that in the admin interface (not now, but needed when other parties will want to use this page type) this feature needs to have the possibility to be switched off. Maybe later: switch off/on per page type?
matthijskooijman (Migrated from github.com) requested changes 2019-10-31 21:19:40 +00:00
matthijskooijman (Migrated from github.com) left a comment

I've added some comments about encoding. Additionally, the resulting href values should also be htmlspecialchar'd. The result of urlencode should already be safe enough, but there are also some & in the href values that provide technically incorrect HTML.

Maybe some of the new form interpolate stuff and DomDocument object-building might be easier to fix this.

I've added some comments about encoding. Additionally, the resulting href values should also be htmlspecialchar'd. The result of urlencode should already be safe enough, but there are also some `&` in the href values that provide technically incorrect HTML. Maybe some of the new form interpolate stuff and DomDocument object-building might be easier to fix this.
matthijskooijman (Migrated from github.com) commented 2019-10-31 21:11:21 +00:00

I think the subject and body should be urlencoded here.

I think the subject and body should be urlencoded here.
matthijskooijman (Migrated from github.com) commented 2019-10-31 21:13:41 +00:00

I think the url= value should be urlencoded.

I think the url= value should be urlencoded.
matthijskooijman (Migrated from github.com) commented 2019-10-31 21:14:56 +00:00

I think the the u= value should be urlencoded here.

I think the the u= value should be urlencoded here.
matthijskooijman commented 2019-10-31 21:22:01 +00:00 (Migrated from github.com)

Please make this also switchable from the admin settings:

I think this is a good idea, but I'm not entirely sure how fine-grained this should be. Should you then offer options to enable facebook/twitter/email separately? Should we have options for other datatypes too? Maybe just add this unconditionally for now, and then once we decide how to integrate this in other datatypes too, then decide how we make this optional as well.

> Please make this also switchable from the admin settings: I think this is a good idea, but I'm not entirely sure how fine-grained this should be. Should you then offer options to enable facebook/twitter/email separately? Should we have options for other datatypes too? Maybe just add this unconditionally for now, and then once we decide how to integrate this in other datatypes too, then decide how we make this optional as well.
matthijskooijman commented 2019-10-31 21:22:44 +00:00 (Migrated from github.com)

Also, this probably interactions with #258, so I think we should merge that and afterwards I can have a look at updating and finishing up this PR.

Also, this probably interactions with #258, so I think we should merge that and afterwards I can have a look at updating and finishing up this PR.
matthijskooijman commented 2019-11-25 14:36:35 +00:00 (Migrated from github.com)

I've updated this PR to:

  • Fix the encoding issues
  • Move the images into the theme
  • Made the share texts a bit more consistent
  • Removed the "share" text before the icons. Just the icons seems fine, and if we want to add something, we can do that in CSS as well.

image

There's two more things to be done:

  • Add any CSS needed to style this (both in the default theme and for De Stadsbron). Any changes required to the HTML?
  • Confirm that the sharing texts for e-mail and twitter are now ok, or need to be changed.

For the last point:
image

image

image

image

I've put the code of this PR on test.destadsbron.nl, so it can be tested and styled there.

@tammoterhark, can you pick up the above points?

I've updated this PR to: - Fix the encoding issues - Move the images into the theme - Made the share texts a bit more consistent - Removed the "share" text before the icons. Just the icons seems fine, and if we want to add something, we can do that in CSS as well. ![image](https://user-images.githubusercontent.com/194491/69549275-41687880-0f99-11ea-9b93-6c8dfbfcef95.png) There's two more things to be done: - Add any CSS needed to style this (both in the default theme and for De Stadsbron). Any changes required to the HTML? - Confirm that the sharing texts for e-mail and twitter are now ok, or need to be changed. For the last point: ![image](https://user-images.githubusercontent.com/194491/69549079-e171d200-0f98-11ea-94d7-132580b0a111.png) ![image](https://user-images.githubusercontent.com/194491/69549097-eafb3a00-0f98-11ea-9468-aa7dc72541a7.png) ![image](https://user-images.githubusercontent.com/194491/69549170-0f571680-0f99-11ea-9a8e-62b3b4c4d7f7.png) ![image](https://user-images.githubusercontent.com/194491/69549185-19791500-0f99-11ea-9d3c-7ac28c993dbb.png) I've put the code of this PR on test.destadsbron.nl, so it can be tested and styled there. @tammoterhark, can you pick up the above points?
tammoterhark commented 2019-12-24 21:48:12 +00:00 (Migrated from github.com)

I Have added the icons via CSS, so they can be changed by the designer more easily.

But I also found that the Facebook link gave an error message: Parameter 'href' should represent a valid URL

I Have added the icons via CSS, so they can be changed by the designer more easily. But I also found that the Facebook link gave an error message: Parameter 'href' should represent a valid URL
matthijskooijman commented 2019-12-24 23:39:21 +00:00 (Migrated from github.com)

But I also found that the Facebook link gave an error message: Parameter 'href' should represent a valid URL

I believe that is because you are testing using a localhost url, which Facebook does not consider valid (it would not make sense to share in any case).

> But I also found that the Facebook link gave an error message: Parameter 'href' should represent a valid URL I believe that is because you are testing using a localhost url, which Facebook does not consider valid (it would not make sense to share in any case).
matthijskooijman commented 2019-12-25 11:35:06 +00:00 (Migrated from github.com)

But I also found that the Facebook link gave an error message: Parameter 'href' should represent a valid URL

I tested on test.destadsbron.nl, works as expected there.

CSS looks good. I've rebased on top of master and will merge in a minute.

> But I also found that the Facebook link gave an error message: Parameter 'href' should represent a valid URL I tested on test.destadsbron.nl, works as expected there. CSS looks good. I've rebased on top of master and will merge in a minute.
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
harmen/hypha!244
No description provided.