G+, Twitter, and Facebook Share

Discuss anything here, but obey the rules!

Moderators: Tech Team, Support Staff

User avatar
chien
Joined: January 7th, 2011, 5:51 pm

November 12th, 2013, 7:04 pm

I've made a simple Share BBCODE I would like to share.

G+, Twitter, and Facebook Share
-------------
Note: You Have To Make A Custom BBCODE
BBCode usage:

Code: Select all

[share][/share]
HTML replacement

Code: Select all


Share: <a href="javascript:(function(){var%20w=600;var%20h=550;var%20x=Number((window.screen.width-w)/2);var%20y=Number((window.screen.height-h)/2);window.open('https://plus.google.com/share?url='+encodeURIComponent(location.href)+'&title='+encodeURIComponent(document.title),'','width='+w+',height='+h+',left='+x+',top='+y+',scrollbars=auto');})();"><img src="http://i1207.photobucket.com/albums/bb469/rachel-michele/Google-Plus-Icon.png" width="32" height="32" alt="Share To Google" title="Share To Google" /></a> <a href="javascript:(function(){window.twttr=window.twttr||{};var D=550,A=450,C=screen.height,B=screen.width,H=Math.round((B/2)-(D/2)),G=0,F=document,E;if(C>A){G=Math.round((C/2)-(A/2))}window.twttr.shareWin=window.open('http://twitter.com/share','','left='+H+',top='+G+',width='+D+',height='+A+',personalbar=0,toolbar=0,scrollbars=1,resizable=1');E=F.createElement('script');E.src='http://platform.twitter.com/bookmarklets/share.js?v=1';F.getElementsByTagName('head')[0].appendChild(E)}());">
<img height="32" width="32" src="http://i1219.photobucket.com/albums/dd440/MommyMoment/icon-twitter.png" alt="Share To Twitter" title="Share To Twitter" /></a><!--Provided By Chien crystaldesigns.tk--> <a href="javascript:var%20d=document,f='http://www.facebook.com/share',l=d.location,e=encodeURIComponent,p='.php?src=bm&v=4&i=1384278275&u='+e(l.href)+'&t='+e(d.title);1;try{if%20(!/^(.*\.)?facebook\.[^.]*$/.test(l.host))throw(0);share_internal_bookmarklet(p)}catch(z)%20{a=function()%20{if%20(!window.open(f+'r'+p,'sharer','toolbar=0,status=0,resizable=1,width=626,height=436'))l.href=f+p};if%20(/Firefox/.test(navigator.userAgent))setTimeout(a,0);else{a()}}void(0);"><img height="32" width="32" src="http://i1090.photobucket.com/albums/i380/ascendnet/facebook-logo.png" border="0" title="Share To Facebook" alt="Share To Facebook"/></a>
----------
Settings
Leave The box "unchecked"
-------------
How To Use:
In A Post:
1. Make A topic
3. In the posting field (Textarea) type the following

Code: Select all

[share][/share]
and your done, hit post and you will have a "Share" In Your Post.
[Note] I recommend Locking the topic so People won't post in it and make it a "sticky topic"

In The Portal
Use the Edit IPORTAL link
2. Make a custom box
3. Place the "[share][/share]" tag in it
4. Save and your done.
Image
My Latest Project - Free Website Directory
My forumI
Reply

User avatar
godric
Joined: April 16th, 2012, 6:54 pm

January 9th, 2014, 1:10 am

Very nice code. Thanks!
Reply

Promic
Joined: May 5th, 2014, 3:25 pm

May 12th, 2014, 1:15 pm

Thanks for sharing this great code.
Reply

rbjustme5
Joined: January 23rd, 2014, 6:17 pm

July 4th, 2015, 12:19 am

:oops: sorry wrong thread.
Original and Australian.
Building a happy community.
Doing it our way!

Matureozchat
Blog
Google Plus
Twitter
Reply