Go Back   vb.org Archive > vBulletin 4 Discussion > vB4 Programming Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 05-20-2016, 02:23 PM
GHRake GHRake is offline
 
Join Date: Sep 2015
Location: USA
Posts: 46
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Social Media Plugin Code Review

Hello friends, I've been learning PHP and creating my first plugin the past few days. I'm using Nexia's OpenGraph Protocol Inserts as a basis for my project, so many thanks and credits for this great modification. I've shot him an email asking permission to perhaps update/release this project and am waiting to hear back.

The plugin accomplishes this so far:
  • Adds Open Graph and Twitter Card meta tags to pages for better sharing
  • Includes code linking Facebook Domain and app insights to your page
  • vbAdvanced Support (the main reason I started modifying this)
  • Picks an image from the content with priority being video, then hot linked image, then attached image.
  • Grabs thumbnail from youtube video and drives traffic from your social share to your page instead of youtube
  • Defaults to a vboptions defined image if no image is found, no more social shares without images or badly resized images
  • Tells twitter the aspect ratio of the image for better resizing

This is what is adds to the HTML:
Code:
<meta property="og:description" content="Long tutorial here, gonna upload it in 4 seperate parts!  It is 1.5 hours long and will explain everything you need to know to get started using IDA Pro!
Requirements: Intermediate Knowledge of C++ and x86 Assembly"/>
<meta property="og:site_name" content="GuidedHacking How to Hack Games"/>
<meta property="og:title" content="How to Reverse Engineer with IDA Pro Disassembler"/>
<meta property="og:type" content="article"/>
<meta property="fb:app_id" content="1755543248015018"/>
<meta property="fb:admins" content="100009786466728"/>
<meta property="og:url" content="http://guidedhacking.com/showthread.php?7914-How-to-Reverse-Engineer-with-IDA-Pro-Disassembler"/>
<meta property="og:image" content="http://img.youtube.com/vi/fgMl0Uqiey8/maxresdefault.jpg"/>
<meta name="twitter:card" content="summary_large_image"/>
<meta name="twitter:site" content="@guidedhacking"/>
<meta name="twitter:image:width" content="1280"/>
<meta name="twitter:image:height" content="720"/>
Now the share looks like this:

Instead of:


Combining this with some simple social share buttons makes my social marketing campaign 2easy

I was hoping to get some feedback on my code from the pros. Currently on vb4.2.3 and vbAdvanced 4.3.0
Please don't install if you don't know what you're doing, I've tested it thoroughly but am not an expert
Attached Files
File Type: xml product-GH-SocialMediaMeta050.xml (7.3 KB, 12 views)
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 11:37 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.08646 seconds
  • Memory Usage 2,222KB
  • Queries Executed 12 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)bbcode_code
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)post_thanks_box
  • (1)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit_info
  • (1)postbit
  • (1)postbit_attachment
  • (1)postbit_onlinestatus
  • (1)postbit_wrapper
  • (1)showthread_list
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_threadedmode.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids_threaded
  • showthread_threaded_construct_link
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • fetch_musername
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_attachment
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete