MyBB Community Forums

Full Version: Replicate widgets?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
You can create yourself like for twitter mycode

goto your admincp>configuration>MyCode>Add new MyCode and fill like this


title= Twiiter
description= Twitter code
Regular expression= \[twitter\](.*?)\[/twitter\]
replacement= <a href="https://twitter.com/$1" class="twitter-follow-button" data-show-count="false">Follow @$1</a>

<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script>


I am not sure if it works or not.

Working on my forum you can use my code

Facebook like code and other mycodes are quiet hard as they also need to edit templates if you want to integrate them all then tell me i ll tell you how to do that
Hmmm I want the YouTube one
Okay here is the youtube widget (myCode)

add as
title= Youtube subscribe
Description youtube subscriber mycode
Regular expression= \[yt\](.*?)\[/yt\]
replacement=  <script src="https://apis.google.com/js/platform.js"></script>

<div class="g-ytsubscribe" data-channel="$1" data-layout="full" data-count="default"></div>
Just insert your channel name or id between [yt] [/yt] and you done it ll also show your channel image if you want to show only subscribe button other then your channel image just change data-layout="full" to data-layout="default".

Note: I not tested yt mycode yet so do it at your own.