Twitter
#1
Is their a code so you can type like [twitter] [/twitter]

and it be like one of the buttons here -- >https://twitter.com/about/resources/buttons#follow

And what ever you put in the middle of twitter it like makes a button that leads to that page?


heres the code
<a href="https://twitter.com/DrugForums" class="twitter-follow-button" data-show-count="false">Follow @DrugForums</a>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
Reply
#2
Regular:
\[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];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>

^^ Could be Improved so it doesn't include the script every single time.
Reply
#3
Wow, thank you very much.. Big Grin But how do you make it like with the image as well? So it looks a lot nicer..
Reply
#4
Clear you cache and wait some time the image should come up sooner or later.
Reply
#5
http://gyazo.com/2de11493f8e9401e13472c08f4229d24

This is all i've seen..
Reply
#6
Akshaya is right, clearing the cache would enable the browsers to get the newer copy with the code and the image would get displayed.
Reply
#7
Yah it ended up working.. But didnt have a way to reply cause wasn't around a laptop.. but thank you very much again.. Time try to get a facebook one.. xD
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)