Skip to main content
Topic: Gist BBC (Read 1398 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Gist BBC

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.
I am currently doing freelance work. If you need coding help, forum help, or server maintenance, shoot me a PM and let me know.

Re: Gist BBC

Reply #1
Cool idea :D
Squish squish. squish, squish, squish.
Find a bug,
Make a wish.

Re: Gist BBC

Reply #2
There you go
[gist]https://gist.github.com/joshuaadickerson/376d510c9d752e9b290a[/gist]
Squish squish. squish, squish, squish.
Find a bug,
Make a wish.

Re: Gist BBC

Reply #3
I would validate the url starts with "https://gist.github.com", otherwise it would be a risk. ;)
Bugs creator.
Features destroyer.
Template killer.

Re: Gist BBC

Reply #4
Fair point ... removed it for now to be safe !

Code: [Select]
		'content' => '<script src="https://gist.github.com/$1.js"></script>',
and
Code: [Select]
			$data = parse_url($data, PHP_URL_PATH);
would probably do :/

Squish squish. squish, squish, squish.
Find a bug,
Make a wish.


Re: Gist BBC

Reply #6
Guess so @Spuds !
Bugs creator.
Features destroyer.
Template killer.


Re: Gist BBC

Reply #8
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.
I am currently doing freelance work. If you need coding help, forum help, or server maintenance, shoot me a PM and let me know.

Re: Gist BBC

Reply #9
When I do
Code: [Select]
[gist]https://gist.github.com/joshuaadickerson/c528aae77d1cf0de029d[/gist]
I get
Code: [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?
I am currently doing freelance work. If you need coding help, forum help, or server maintenance, shoot me a PM and let me know.

Re: Gist BBC

Reply #10
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.
Squish squish. squish, squish, squish.
Find a bug,
Make a wish.

Re: Gist BBC

Reply #11
Test:

[gist]https://gist.github.com/joshuaadickerson/c528aae77d1cf0de029d[/gist]
Squish squish. squish, squish, squish.
Find a bug,
Make a wish.

Re: Gist BBC

Reply #12
That's probably the longest message I have ever seen... #_#
~ SimplePortal Support Team ~

Re: Gist BBC

Reply #13
Yeah, I wonder if gist has a limit
I am currently doing freelance work. If you need coding help, forum help, or server maintenance, shoot me a PM and let me know.

Re: Gist BBC

Reply #14
I think it would worth adding it, at least for template sake ;D
~ SimplePortal Support Team ~