Jump to content
TNG Community
Sign in to follow this  
Lee

Media Share Mod

Recommended Posts

Lee

TNG Wiki Page

Media Share Mod Discussion Thread =

TNG has share buttons that can be displayed above a media detail page to facilitate the sharing / promoting of your TNG to various platforms of social media.  Those share buttons current only provide that platform with static data and perhaps a fixed image.  That means, for each time someone clicks the share button while viewing a family photo, the resulting post on the social platform is not that image, nor related text; it is, static text and a fixed image.  This mod changes that; once applied, when you share from an image detail page, that image and its related text is provided to the social platform so they will be included in the shared post (currently Facebook only). 

Share this post


Link to post
Share on other sites
Lee

I have found posting new images on my TNG site helps with traffic, but sharing that post with its new image on Facebook does wonders.

This is fresh off the boat, so please excuse the sloppy wiki entry, as well as the terse details provided.  It's pretty simple.  Once this gets a little testing under its belt, we'll work out Twitter and Pinterest next.

Share this post


Link to post
Share on other sites
Lee
49 minutes ago, manofmull said:

Sounds good.

What chance of a version for TNG 11?

After we get a few test installs with the current version, we'll knock out one for the older one.

Share this post


Link to post
Share on other sites
theKiwi

UPDATE 20 minutes later...

It is somehow a conflict with the TNG-WordPress plugin - using TNG directly outside of WordPress it works. I'll see if I can figure out what is wrong

=================

I've installed it on my site after figuring out a few conflicts with other Mods, but it's not working - the image selected to share is not the one I've chosen to share - i.e. the media page I have started from. E.g. here

http://lisaandroger.com/genealogy/showmedia.php?mediaID=61&medialinkID=87

Roger

Share this post


Link to post
Share on other sites
Lee

Hey theKiwi (Roger?)

So initially I see two conflicting entries:

<!-- This site is powered by Tweet, Like, Plusone and Share Plugin - http://techxt.com/tweet-like-google-1-and-share-plugin-wordpress/ -->
<meta property="og:type" content="article" />
<meta property="og:title" content="Genealogy" />
<meta property="og:url" content="http://lisaandroger.com/genealogy/"/>
<meta property="og:site_name" content="Roger’s Ramblings" />
<meta property="og:description" content="Genealogy"/>

and just a few lines lower I see:

<title>Photos: View of Blakerston Farm on the way to the Game Keeper&#039;s Cottage.: Roger’s Online Genealogy</title>
<meta name="Description" content="Photos: View of Blakerston Farm on the way to the Game Keeper&#039;s Cottage.: Roger’s Online Genealogy" />
<meta property="og:title" content="Roger’s Online Genealogy"/>
<meta property="og:description" content="Photos: View of Blakerston Farm on the way to the Game Keeper&#039;s Cottage."/>
<meta property="og:url" content="http://lisaandroger.com/Genealogy//" />

<meta http-equiv="Content-type" content="text/html; charset=UTF-8" />

with the og:image line missing.

Now when I reviewed the image detail page

view-source:http://lisaandroger.com/genealogy/showmedia.php?mediaID=135

I see it has the og:img line embedded in it properly .. I don't know what the difference is between the two photos.

<title>Photos: Alice Wright Moffat: Roger’s Online Genealogy</title>
<meta name="Description" content="Photos: Alice Wright Moffat: Roger’s Online Genealogy" />
<meta property="og:title" content="Roger’s Online Genealogy"/>
<meta property="og:description" content="Photos: Alice Wright Moffat"/>
<meta property="og:url" content="http://lisaandroger.com/Genealogy//showmedia.php?mediaID=135" />
<meta property="og:image" content="http://lisaandroger.com/Genealogy//photos/people/AlisonWrightMoffat.jpg" />

Notice the og:url line is correctly populated, and the og:image is there but with the odd double slash between Genealogy and photos .. which is probably a bug on my part.

Share this post


Link to post
Share on other sites
theKiwi

Lee - yes it's me - Roger the Kiwi

There was a conflict with a WordPress plugin that I had been using for Sharing etc. as you note above.

I've disabled that plugin and activated a different one that so far seems to have solved the problem. The one I had been using was responsible for the first set of "og:" lines and your Mod for the second lot, but the Sharer was seeing only the first lot. So now this works

http://lisaandroger.com/Genealogy/showmedia.php?mediaID=64&amp;medialinkID=90

The double slash was coming from the Genealogy URL I have set in TNG to end with a /, and you're adding another slash? I've removed it in my settings - hopefully that didn't break anything else.

Roger

Share this post


Link to post
Share on other sites
Lee

Good to see you still poking around here Roger!

 

So that mod worked on your 11.1 version?  Also, I'll need to check on that trailing backslash in my code to keep the double slash from happening.

 

Share this post


Link to post
Share on other sites
theKiwi

No, I'm on TNG 12.0.1

Roger

Share this post


Link to post
Share on other sites
Lee

Posted an update for the 12.0.2 release on the wiki.  Thanks to Roger theKiwi for his changes!

Share this post


Link to post
Share on other sites
wuerdemann

Hello,  I am a TNG newbie and found my way here in search of a feature I saw on a sample site.  On the top right of the screen they have social links for Facebook, Twitter, Pinterest, and G+.  Is that what this mod is for?  Does it allow me to set up similar links on my site?  I found and installed the Media Share mod, but don't know how to proceed from there or if this is the right way to add that feature?

Thanks

Share this post


Link to post
Share on other sites
theKiwi
2 hours ago, wuerdemann said:

Hello,  I am a TNG newbie and found my way here in search of a feature I saw on a sample site.  On the top right of the screen they have social links for Facebook, Twitter, Pinterest, and G+.  Is that what this mod is for?  Does it allow me to set up similar links on my site?  I found and installed the Media Share mod, but don't know how to proceed from there or if this is the right way to add that feature?

Thanks

The Share Media Mod makes it a bit easier to share to Facebook by putting the code that Facebook is looking for into the page's header.

The actual share icons are a part of TNG, and can be enabled in TNG Admin ------> Setup ------> General Settings ------> Site Design and Definition.

Then it appears under the drop down menus on the right.

Screen Shot 2018-11-20 at 8.19.18 PM.png

Then there's a Mod that tells TNG to open this menu when the page loads

https://tng.lythgoes.net/wiki/index.php?title=Display_Social_buttons_by_default

Screen Shot 2018-11-20 at 8.28.27 PM.png

Roger

Share this post


Link to post
Share on other sites
wuerdemann

Hello,  I had already checked those options...

Show Share Link:
Show Print Link:

The share and print link appear on other pages, not the home page.  But I wanted something like in the sample I linked to...the actual links to the various social media sites.

Thanks

 

Share this post


Link to post
Share on other sites
theKiwi

The second half of my response links to a Mod you can download that makes the Share icons all appear when the page loads.

What template are you using? You may need to edit the index.php file to get this to show up on your TNG home page.

Roger

 

Share this post


Link to post
Share on other sites
wuerdemann

Sorry for not reading the last part of your response....kinda looked like a signature.

OK...installed the mod and now the share icons appear on various pages, but still not the home page.

Template 12

Is the assumption the code to display the share/print links or icons might be missing from the page?

I haven't edited any of the site pages yet, directly.  Do I manually located and edit the index page or is it done through TNG?

Thanks and pardon my ignorance.

Share this post


Link to post
Share on other sites
wuerdemann

In the meantime, I have gotten myself deeper in doo doo.

Prior to setting up the TNG site, I was using different G software and I had a blog and a photo gallery.  

Darrin mentioned the custom hook menu to add more items to the menu bar.  I got it to partially work.  If you click on the pulldown, the blog item appears, the icon and the name, but when you click on it, it takes you to the directory, but doesn't open WP...  I have it coded /blog/index.php but it doesn't open the php file and brings up /blog as a blank page?

I am also curious what I goofed up so it doesn't title the pull down, like the other ones that say info, etc.

Sorry for dragging this new issue into here while still working on the previous issue.  I guess I could have opened a new topic for that issue...sorry.

Share this post


Link to post
Share on other sites
theKiwi
10 hours ago, wuerdemann said:

Sorry for not reading the last part of your response....kinda looked like a signature.

OK...installed the mod and now the share icons appear on various pages, but still not the home page.

Template 12

Is the assumption the code to display the share/print links or icons might be missing from the page?

I haven't edited any of the site pages yet, directly.  Do I manually located and edit the index page or is it done through TNG?

Thanks and pardon my ignorance.

You need to modify the index.php file that is in the template12 folder on your site to create the space on the page, and then pull the share icons into that page. 

Roger

Share this post


Link to post
Share on other sites
theKiwi
9 hours ago, wuerdemann said:

Sorry for dragging this new issue into here while still working on the previous issue.  I guess I could have opened a new topic for that issue...sorry.

I tried to split this whole conversation off from the Share Media Mod topic, but only succeeded in changing the name of this whole topic - rather than splitting the topic at and below your first post it split out just your first posting - oh well...

But yes, it's generally better to start a new topic for anything that is even slightly different, than it is to tag onto something that ends up being quite unrelated.

Roger

Share this post


Link to post
Share on other sites
theKiwi
9 hours ago, wuerdemann said:

Darrin mentioned the custom hook menu to add more items to the menu bar.  I got it to partially work.  If you click on the pulldown, the blog item appears, the icon and the name, but when you click on it, it takes you to the directory, but doesn't open WP...  I have it coded /blog/index.php but it doesn't open the php file and brings up /blog as a blank page?

 I am also curious what I goofed up so it doesn't title the pull down, like the other ones that say info, etc.

 

There are instructions on the TNG Wiki on how to implement things with the custom menu hook 

https://tng.lythgoes.net/wiki/index.php?title=Custom_Menu_Hook

Roger

Share this post


Link to post
Share on other sites
wuerdemann
4 hours ago, theKiwi said:

You need to modify the index.php file that is in the template12 folder on your site to create the space on the page, and then pull the share icons into that page. 

Roger

What little coding I know is HTML and when I look at PHP, I get overwhelmed.  I don't know how to create the space or how to "pull" icons into that page.  I am guessing the share icon code could be found on another page and copied to a space made on the index page, but I just don't know how.  I have half a clue, but without the other half, I am lost,  Like having a treasure map that has been ripped into two.  I have the starting half of the map, but not the ending half with the "X" for where the treasure is located.

Share this post


Link to post
Share on other sites
wuerdemann
4 hours ago, theKiwi said:

There are instructions on the TNG Wiki on how to implement things with the custom menu hook 

https://tng.lythgoes.net/wiki/index.php?title=Custom_Menu_Hook

Roger

Those are the instructions I used which only got me as close as I did.  

Just had an ah ha moment....my site was running PHP 5.6 which kept TNG from running so I was told to update the PHP, which I did to 7.2, and now the blog won't work with 7.2, it needs 5.6.  Wordpress wants everyone to move to PHP7, but I am guessing it is my WP template that is refusing to work with PHP7...

Darrin said TNG should have ran under 5.6, as it did, but something about the server upgrade I did broke it...

Thanks!

 

Share this post


Link to post
Share on other sites
wuerdemann

Sorry about the diatribe....I just changed the PHP back to 5.6 and now both the blog and TNG are working.  Don't know why TNG failed before and is now working?

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×