Default Image for Social Media Posts

Post

Posted
Rating:
#5909 (In Topic #1409)
Avatar
Standard member
Florida_Owl is in the usergroup ‘Honoured member’
We are operating on an older version of ocPortal. When using a direct URL to post on social media sites like Twitter and Facebook, there is a default image that populates within the social media's post summary view as noted below by the red arrow:



This image is what the socoal media site pulls in from ocPortal when there is no "image" posted into a topic directly for reference, so it is a default image setting that is located somewhere in the admin zone settings.

Does anyone know where this setting is located so that the image can be changed to that of a custom image??

Thanks for any help!  :thumbs:

Online now: No Back to the top

Post

Posted
Rating:
#5911
Avatar
Site director
Chris Graham is in the usergroup ‘Administrators’
Right, I'm not actually happy with how we do this in either v9 or v10. It's been tricky trying to engineer sensible detection of default Facebook (OpenGraph) images, without bloating up the software with a lot of extra images designed only for Facebook that probably aren't appropriate for any particular user's website anyway. Each content type, topics being just one, will revert to one of our standard icons (which are small) if no content-specific image can be found. I'm going to try and make a better compromise in v11.

The best thing for now is probably just to edit the code manually:
  1. upload a better image file to themes/default/images_custom/forums_facebook.png (a .png is best)
  2. open sources/ocf_topicview.php and replace bigicons/forums with forums_facebook, and save


Become a fan of Composr on Facebook or add me as a friend. Add me on on Twitter. Follow me on Minds (where I am most active). Support me on Patreon

Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about Composr whenever you see the opportunity or support me on Patreon.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying Composr on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Online now: No Back to the top

Post

Posted
Rating:
#5912
Avatar
Standard member
Florida_Owl is in the usergroup ‘Honoured member’
Hey Chris!

That file does not pull up:

Not Found
The requested URL /themes/default/images_custom/forums_facebook.png was not found on this server.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

And I actually looked at every image in the admin zone prior to writing and could not find the one being displayed to overwrite it…

Any other ways/area it may be encoded??

Online now: No Back to the top

Post

Posted
Rating:
#5913
Avatar
Standard member
Florida_Owl is in the usergroup ‘Honoured member’
Ps is this OK for sizing??

Online now: No Back to the top

Post

Posted
Rating:
#5914
Avatar
Site director
Chris Graham is in the usergroup ‘Administrators’
Size looks fine.
Please confirm the path you uploaded the file to.


Become a fan of Composr on Facebook or add me as a friend. Add me on on Twitter. Follow me on Minds (where I am most active). Support me on Patreon

Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about Composr whenever you see the opportunity or support me on Patreon.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying Composr on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Online now: No Back to the top

Post

Posted
Rating:
#5915
Avatar
Standard member
Florida_Owl is in the usergroup ‘Honoured member’
I could not locate the source you provided to overwrite…

Just was getting one ready once I can!

Did you see my previous post??
Online now: No Back to the top

Post

Posted
Rating:
#5916
Avatar
Site director
Chris Graham is in the usergroup ‘Administrators’
Ah. forums_facebook.png does not exist, this will be a new file.


Become a fan of Composr on Facebook or add me as a friend. Add me on on Twitter. Follow me on Minds (where I am most active). Support me on Patreon

Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about Composr whenever you see the opportunity or support me on Patreon.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying Composr on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Online now: No Back to the top

Post

Posted
Rating:
#5918
Avatar
Standard member
Florida_Owl is in the usergroup ‘Honoured member’
So that is not the file being pulled in…do you have any idea what the name of that file is??

My concern is even if uploading  anew file that the other one will still be pulled in…

This file is VERY similar, but smaller:

Image

(Click to enlarge)

Online now: No Back to the top

Post

Posted
Rating:
#5919
Avatar
Site director
Chris Graham is in the usergroup ‘Administrators’
That is why step 2 is to change the code to reference the new image file.

If you were to instead just change the current image file then it would break things, as that icon is used for many different things in the system.


Become a fan of Composr on Facebook or add me as a friend. Add me on on Twitter. Follow me on Minds (where I am most active). Support me on Patreon

Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about Composr whenever you see the opportunity or support me on Patreon.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying Composr on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Online now: No Back to the top

Post

Posted
Rating:
#5920
Avatar
Standard member
Florida_Owl is in the usergroup ‘Honoured member’
Ok, I see, go it…will have Francois update it!

Thanks!  :thumbs:
Online now: No Back to the top

Post

Posted
Rating:
#5921
Avatar
Standard member
Florida_Owl is in the usergroup ‘Honoured member’
Just to make sure, we are using this on twitter as well…even though the file has facebookin the name, it will work on twitter as well?
Online now: No Back to the top

Post

Posted
Rating:
#5922
Avatar
Site director
Chris Graham is in the usergroup ‘Administrators’
Yes. It's used for OpenGraph, which both Facebook and Twitter use.


Become a fan of Composr on Facebook or add me as a friend. Add me on on Twitter. Follow me on Minds (where I am most active). Support me on Patreon

Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about Composr whenever you see the opportunity or support me on Patreon.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying Composr on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Online now: No Back to the top

Post

Posted
Rating:
#5923
Avatar
Standard member
Florida_Owl is in the usergroup ‘Honoured member’
Ok, great, thanks again!
Online now: No Back to the top

Post

Posted
Rating:
#5924
Avatar
Standard member
Florida_Owl is in the usergroup ‘Honoured member’
Hey Chris - Good News is that it worked to pull the generic image in!

Bad News is that it is pulling that image in when there is already an image within the post  :o

So, is there a way to have it ONLY pull that image when there is no image??

Here's the topic post with the image included:

Athlete Veyon Washington Commits to FAU Football's Class of 2020 - FAU Owl's Nest

And here's what was presented by Twitter:



We'll back the change out for now so that the desired image posts  :thumbs:

Thanks!

Rick
Online now: No Back to the top

Post

Posted
Rating:
#5928
Avatar
Site director
Chris Graham is in the usergroup ‘Administrators’
I have tweaked your code so it will find the first image in the topic, did that I think a couple of days ago but I was too busy failing to multitasking to reply until now.

What was happening before is Facebook was deciding on its own to ignore the OpenGraph image as it was too small, and picking an image itself. Once you gave a bigger image, that took precedence. Now Composr will pic the first image in the topic, and if there is none, the new default image.


Become a fan of Composr on Facebook or add me as a friend. Add me on on Twitter. Follow me on Minds (where I am most active). Support me on Patreon

Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about Composr whenever you see the opportunity or support me on Patreon.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying Composr on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Online now: No Back to the top

Post

Posted
Rating:
#5934
Avatar
Standard member
Florida_Owl is in the usergroup ‘Honoured member’
Hi Chris,

Thanks for taking a look!

Please see below…Just tested, and while the posted image is back, the other one is now not showing up on posts with no image…perhaps Francois deleted it in the roll back, so will check with him and circle back after another test  :thumbs:

Online now: No Back to the top

Post

Posted
Rating:
#5935
Avatar
Standard member
Florida_Owl is in the usergroup ‘Honoured member’
Confirmed...custom image is still there, he did not pull it...which begs the question why is the other stock quotes image now showing up again ???
Online now: No Back to the top

Post

Posted
Rating:
#5936
Avatar
Site director
Chris Graham is in the usergroup ‘Administrators’
Facebook has a cache. If something was posted there once, it will not get the OpenGraph image again.


Become a fan of Composr on Facebook or add me as a friend. Add me on on Twitter. Follow me on Minds (where I am most active). Support me on Patreon

Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about Composr whenever you see the opportunity or support me on Patreon.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying Composr on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Online now: No Back to the top

Post

Posted
Rating:
#5937
Avatar
Standard member
Florida_Owl is in the usergroup ‘Honoured member’
Hi Chris,

These are new posts, and are being posted on Twitter - no Facebook.

The images I am showing you are copies of the tweets posted…
Online now: No Back to the top

Post

Posted
Rating:
#5952
Avatar
Site director
Chris Graham is in the usergroup ‘Administrators’
The .php file change had been reverted by someone. I've redone it, but this time I saved as a proper override in sources_custom/ocf_topicview.php so it is clear it has been altered.


Become a fan of Composr on Facebook or add me as a friend. Add me on on Twitter. Follow me on Minds (where I am most active). Support me on Patreon

Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about Composr whenever you see the opportunity or support me on Patreon.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying Composr on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Online now: No Back to the top
1 guest and 0 members have just viewed this.

Statistics

Users online:

Paul D, ManojSree, MVLipwig, Salman, deepu_ms, John Connor

Forum statistics:
  • 1,101 topics, 5,301 posts, 6,188 members
  • Our newest member is noorturi
Birthdays:
Back to Top