Announcement

Collapse
No announcement yet.

Facebook logo for sharing

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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.

  • #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 3rd Jul '16, 8:21pm.

    Comment


    • Glenn Vergara
      Glenn Vergara 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.

  • #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


    • #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 Glenn Vergara; Thu 7th Jul '16, 7:47pm.

      GIPHY for vB5 AutoLinker Auto-Create Flag Report Topic Social Icons in Postbit Clear Cache Cron DragDrop Upload Topic AJAX AutoUpdate Custom Avatars Selector Stop Links in Posts...and more!

      Comment


      • #5
        PM me if you are interested.

        GIPHY for vB5 AutoLinker Auto-Create Flag Report Topic Social Icons in Postbit Clear Cache Cron DragDrop Upload Topic AJAX AutoUpdate Custom Avatars Selector Stop Links in Posts...and more!

        Comment

        Related Topics

        Collapse

        Working...
        X