Gist BBC August 08, 2015, 01:42:05 am I think it would be cool to add a gist BBC here.[gist https://gist.github.com/joshuaadickerson/fea8b2dd1a5ca756f6a0[/gist] would become <script src="https://gist.github.com/joshuaadickerson/fea8b2dd1a5ca756f6a0.js"></script> and would embed a gist in the page.Add a hook on integrate_bbc_codes. Add a new file https://gist.github.com/joshuaadickerson/376d510c9d752e9b290a (a gist)FYI: I wrote that function in the GH editor and didn't test it.
Re: Gist BBC Reply #2 – August 09, 2015, 08:35:31 am There you go[gist]https://gist.github.com/joshuaadickerson/376d510c9d752e9b290a[/gist]
Re: Gist BBC Reply #3 – August 09, 2015, 08:41:29 am I would validate the url starts with "https://gist.github.com", otherwise it would be a risk.
Re: Gist BBC Reply #4 – August 09, 2015, 08:47:57 am Fair point ... removed it for now to be safe !Code: [Select] 'content' => '<script src="https://gist.github.com/$1.js"></script>',andCode: [Select] $data = parse_url($data, PHP_URL_PATH);would probably do :/
Re: Gist BBC Reply #7 – August 09, 2015, 11:33:39 am Redone with that update ...Quote from: meetdilip – August 09, 2015, 10:01:08 amWhat exactly is this ?Now that its back on, just look up in the thread for the example http://www.elkarte.net/community/index.php?topic=2820.msg19268#msg19268
Re: Gist BBC Reply #8 – August 09, 2015, 02:47:09 pm Good catch @emanuele. Thanks @Spuds. Now I think I'm much more likely to use Gist over code tags. Just a nicer way of presenting code and keeping track of the changes.
Re: Gist BBC Reply #9 – August 14, 2015, 05:35:54 pm When I do Code: [Select][gist]https://gist.github.com/joshuaadickerson/c528aae77d1cf0de029d[/gist]I getCode: [Select]<script src="https://gist.github.com//joshuaadickerson/c528aae77d1cf0de029d.js"></script>PS: how do you specify the language for code tags? Or is that not doable anymore?
Re: Gist BBC Reply #10 – August 14, 2015, 06:59:24 pm Thats a big old gist ... looks like an extra / getting added. I'll take a look tommorrow and see whats going on.I can't remember on the code language, but pretty print is built in for the highlighting these days so it may have been depreciated.
Re: Gist BBC Reply #11 – August 15, 2015, 06:06:33 am Test:[gist]https://gist.github.com/joshuaadickerson/c528aae77d1cf0de029d[/gist]
Re: Gist BBC Reply #12 – August 15, 2015, 10:12:45 am That's probably the longest message I have ever seen... #_#
Re: Gist BBC Reply #14 – August 15, 2015, 12:58:57 pm I think it would worth adding it, at least for template sake