Facebook logo for sharing

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • HowToEvery
    Senior Member
    • Jun 2016
    • 100
    • 5.2.x

    Facebook logo for sharing

    When I share my forum link in the messages, it generates the title, description and a random icon from the forum - Is there a way to choose what icon will it be? I want it to be just the forum's logo.
    Founder of the Israeli Youtubers forum at TheHub and tech youtuber at HowToEvery.
  • fenderbob
    Senior Member
    • Apr 2015
    • 116
    • 5.1.x

    #2
    We're currently waiting for vBulletin to take this matter up as an improvement request.

    However, I know how EXTREMELY important it is to get this up and running. If you want your site to survive, you need to take advantage of social media. That's why I decided I couldn't wait anymore and why I decided to take matters into my own hands. I have it working 100% on my site, but be forewarned, this is a little advanced. I highly suggest you back everything up (in case you mess something up and need to restore) before doing this. However, here is the walkthough to get it working:


    Manually Add Open Graph Metadata og:image to <head>
    1. Temporarily enable Debug Mode (edit both (2) config.php files, one in forum, the other in forum>core>includes)
    2. Products & Hooks > Add/Import Product
    3. Added a new product "OG Image"
      1. Title: Manual OG Image Meta Data
      2. Verison: 1.0.0
      3. Description: Manually add Open Graph meta data to head
    4. Created a new hook template "og_img" and linked it to OG Image
      1. Product: Manual OG Image Meta Data
      2. Active: Yes
      3. Hook Location: header_head
      4. Title: OG Image
      5. Ex order: 10
      6. Template Name: og_img
      7. Hook Argument: page=page
    5. Added a new template in Style Manager > MASTER STYLE (only available in debug mode) (edit templates to edit this code) and linked it to "OG Image" Product. This is where the <meta og:image> html code goes.



    Save and should work...

    Just make sure in step 5, the Open Graph facebook image has been uploaded to the directory you specify in this html code.

    I'll try to help you if you get stuck...but again, this is pretty advanced and I know next to nothing about php so maybe it would be better if someone from vBulletin could check this over and make sure my method is correct.
    Last edited by fenderbob; Sun 3 Jul '16, 7:21pm.

    Comment


    • glennrocksvb
      glennrocksvb commented
      Editing a comment
      Doesn't need to be on debug mode. Adding new template for the hook should be created under the styles/themes you are using. Adding hooks can also be done using product XML but that's more advanced.
  • fenderbob
    Senior Member
    • Apr 2015
    • 116
    • 5.1.x

    #3
    Here are my notes on how to enable debug mode. You can enable it globally, but personally I think it's smarter to only enable it for your IP address. Go to google and type in "what's my ip address?" Make a note of it.

    Now, both config.php files need to be replaced.

    Make backups of the server copies first!

    ONLY EDIT WITH NOTEPAD++ (download this program if you don't have it...you probably don't unless you're a programmer)

    Inside each config.php file, enter IP address so only that IP address sees debug mode. 'debug' and 'misc' coorespond to 2 different config.php files. Replace "xxx.xxx.xx..." with your proper IP address.

    When you have the config.php files open, just do a find for the term "debug" and match each of the following codes respectively.

    CONFIG.PHP FILE 1

    Code:
    if ($_SERVER['REMOTE_ADDR'] == "xxx.xxx.xx.xxx") {
         $config['debug'] = true;
    }
    CONFIG.PHP FILE 2

    Code:
    if ($_SERVER['REMOTE_ADDR'] == "xxx.xxx.xx.xxx") {
          $config['Misc']['debug'] = true;
    }
    Don't forget to backup the originals! You need to disable debug mode when you're all finished and that means reverting back to the original code!!!

    Comment

    • glennrocksvb
      Former vBulletin Developer
      • Mar 2011
      • 4020
      • 5.7.X

      #4
      I have a mod that will add Facebook Open Graph tags and Twitter Card tags. It dynamically pulls the first attached image in the first post in a thread. If no attached image, it will use the default image you configured.

      This will enhance the Facebook and Twitter shares for your site.
      Last edited by glennrocksvb; Thu 7 Jul '16, 6:47pm.

      Flag Icon Postbit Insert GIPHY Impersonate User BETTER INITIALS AVATAR Better Name Card Quote Selected Text Bookmark Posts Post Footer Translate Stop Links in Posts +MORE!

      Comment

      • glennrocksvb
        Former vBulletin Developer
        • Mar 2011
        • 4020
        • 5.7.X

        #5
        PM me if you are interested.

        Flag Icon Postbit Insert GIPHY Impersonate User BETTER INITIALS AVATAR Better Name Card Quote Selected Text Bookmark Posts Post Footer Translate Stop Links in Posts +MORE!

        Comment

        Related Topics

        Collapse

        Working...