URL Shortening and Content Descriptions for Open Graph Scraping

Ken Rich
Ken Rich
@ken-rich
9 years ago
926 posts
To illustrate the problem in a real situation, the President of WAAOM is now on my network uploading Galleries of orphans for sharing on social media sites like Facebook, Twitter, and LinkedIn.

Because there is no integrated link shortener (or a custom link generator), and also because there is no way to add a description - this is the result.

Her intuitive use of the supplied tools, causes her to enter huge gallery titles to describe her albums. Some are so long, the resultant URL generated is "cut-off" and displays "Page Not Found" - when clicked from the activity feed, or sites like Twitter.

A real life example is below. How do we remedy this dire situation? I can individually educate her to use shorter titles, but what of others who intuitively do the same and then wonder why they are getting page not found errors? A "platform wide" fix seems best to me.


http://indiegospel.net/we-all-are-one-ministry-inc-waaom/gallery/hope-for-gods-children-of-africa-and-immanuel-home-of-love-orphanage-uganda-africa-kids-having-fun/all
AWK26.jpg
AWK26.jpg  •  10KB




--

Ken Rich
indiegospel.net

updated by @ken-rich: 03/13/15 06:41:52AM
paul
@paul
9 years ago
4,326 posts
Maybe if a description field was added to galleries users would intuitively use that?


--
Paul Asher - JR Developer and System Import Specialist
Ken Rich
Ken Rich
@ken-rich
9 years ago
926 posts
Hi Paul,

I think that would be a good first step, and probably take care of most of this issue.

I can't remember if JR4 did, but Ning also allowed for custom links. So if your title created a "monstrosity", you could give it a new URL (eg. - yourdomain.com/XXXXXXXXXX).

Of course, a check was built in to ensure the URL wasn't already in use.


--

Ken Rich
indiegospel.net
brian
@brian
9 years ago
10,148 posts
You can add "gallery_description" using the Form Designer, and the Share This module should pick it up. Probably not something we'll add at the module level.

A URL shortener could also be created, it's just not something we have at this time. We have quite a number of tickets open on things we're working on at this time, so it's not something we can get to quickly, but I've got it on a TODO here.

Thanks!


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net
Ken Rich
Ken Rich
@ken-rich
9 years ago
926 posts
Hi Brian,

Before I tackle that, let's make sure I know what I'm doing first. I can add a description to the form designer, that part is easy.

The part I'm not too sure about, is what to do next. Do I add something to a template, and which template is it? Can you give me some directions along those lines?

Is this kind of like what I went through before with the audio player templates?

1) Create a form field.
2) Find appropriate template.
3) Run debug make sure new field is available.
4) Enter or alter code snippet.


--

Ken Rich
indiegospel.net
brian
@brian
9 years ago
10,148 posts
This is easier - just add the "gallery_description" custom form field and the ShareThis module will pick it up (as long as there is content in it).


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net
Ken Rich
Ken Rich
@ken-rich
9 years ago
926 posts
Hi Brian,

Yes, but will that description show in the template? If it doesn't, I can guarantee what will happen.

1) I will have people asking me where their description went.
2) They will feel as if visitors are ill informed, since they see a short title but no description.

So, I understand a description in the form field will probably solve the open graph scraper issue, but unless the description shows on the template, it's only a partial solution.

Now as I understand it, to make it visible I will need:

1) The template
2) A code snippet.

So if one of you "brainiacs" would be so kind as to point me in the right direction on those, I think I could possibly "muddle through it". It would be greatly appreciated - thanks in advance.


--

Ken Rich
indiegospel.net
paul
@paul
9 years ago
4,326 posts
Hold on, if you update a gallery image you get a 'gallery_caption' field so a description can be added there which will show on the profiles' image detail view.
So all you need to do is add field 'gallery_caption' to the create form and the description can be added at create time.

NOTE that if a gallery of more than one image is created, that same description will be applied to every image in the gallery.


--
Paul Asher - JR Developer and System Import Specialist
Ken Rich
Ken Rich
@ken-rich
9 years ago
926 posts
paul:
Hold on, if you update a gallery image you get a 'gallery_caption' field so a description can be added there which will show on the profiles' image detail view.
So all you need to do is add field 'gallery_caption' to the create form and the description can be added at create time.

NOTE that if a gallery of more than one image is created, that same description will be applied to every image in the gallery.

Hi Paul,

I think I'm following you there. Will try to implement and report back.

Thanks...


--

Ken Rich
indiegospel.net
Ken Rich
Ken Rich
@ken-rich
9 years ago
926 posts
Hi Paul,

It works to put the same description on all images. However, there is no separate display for it's description alone.

Also, if you change the image captions and then modify the gallery description, it rewrites the image captions en masse, wiping out that work.


--

Ken Rich
indiegospel.net
Ken Rich
Ken Rich
@ken-rich
9 years ago
926 posts
paul:
Hold on, if you update a gallery image you get a 'gallery_caption' field so a description can be added there which will show on the profiles' image detail view.
So all you need to do is add field 'gallery_caption' to the create form and the description can be added at create time.

NOTE that if a gallery of more than one image is created, that same description will be applied to every image in the gallery.

Hi Paul,

I am leaving what you suggested in place for the time being, as it's much better than than the current default.

However, I found it necessary to write cautions in the help tips and subtitles, so users will know about these two issues:

1) If they modify the title, the URL will change causing "dead links".

2) If they modify the description, it will rewrite all the descriptions.

The second would be disastrous, if they made many individual picture descriptions through the detail fields, but overwrote them by changing the gallery description.

Perhaps in a future release, Jamroom could address this better with a custom link maker and some advanced modifications to the Gallery forms.

Meanwhile - this is certainly a step in the right direction - thanks.


--

Ken Rich
indiegospel.net

updated by @ken-rich: 02/08/15 07:34:46AM