Hi,
Love this plugin, but I’m having trouble getting it to consistently show the gist styling. Most of the time, when I embed a new gist, everything looks right. But then after a day or so, it loses all the style and becomes just code.
Any thoughts on how I could correct this?
Thanks,
Jonathan
I’m seeing the following in my error_log every few days:
PHP Fatal error: Cannot use object of type WP_Error as array in plugins/embed-github-gist/embed-github-gist.php on line 86
I took a look through the code and that line is: $json = json_decode($result['body'], true);
. Looks like if the $result
var is an array, it should do this line, and if not it should do something else.
Cheers,
Joshua
It seems github has this. In the example of the plugin the username wasn’t part of the link.
https://gist.github.com/lordspace/8253092
I looked into your SVN trunk and saw your FAQ (https://plugins.svn.www.ads-software.com/embed-github-gist/trunk/readme.txt) there mention adding EMBED_GISTHUB_USERNAME and EMBED_GISTHUB_PASSWORD to my wp-config.php. I’ve done that and still see a countdown from 60 rate limit. What else do I need to change?
Also, why is this information not showing on https://www.ads-software.com/extend/plugins/embed-github-gist/faq/ ?
]]>If I embed a gist using the github gist embed code, the indentation is shown as expected. Using this plugin, it embeds gists lose their indentation.
https://www.ads-software.com/extend/plugins/embed-github-gist/
]]>After updating to 0.13 on WP 3.4.2 my embedded gists look like this: https://d.pr/i/zTM1
Seems like some styles are missing.
https://www.ads-software.com/extend/plugins/embed-github-gist/
]]>The gist looks incredibly spaced out vertically with the new default WordPress theme. You can see an example on my blog for now – https://enkrates.com/2011/09/05/lightening-my-school-load/
https://www.ads-software.com/extend/plugins/embed-github-gist/
]]>I wanted to add a gist height for really long gists that would result in a scrollbar for the embed. Here’s the patch to achieve this for the current trunk using a height parameter to the shortcode: https://gist.github.com/3200265.
I haven’t tested it without json_decode, and it may not be fully compatible with strict HTML, but it does the job. It’d be cool if you added this functionality (perhaps rewritten) to core.
https://www.ads-software.com/extend/plugins/embed-github-gist/
]]>Hey.. thanks for the great plugin. I’ve been playing around with it today, but my gist’s are imported with formatting (and HTML markup) that just doesn’t seem quite right.
For example the following 6 line gist:
var template = [
'ul.listClass#listId', [
'li[text=Hello]',
'li[text=World]'
]
];
Is marked up like so:
<div class='line' id='LC1'><span class="kd">var</span> <span class="nx">template</span> <span class="o">=</span> <span class="p">[</span></div>
<div class='line' id='LC2'> <span class="s1">'ul.listClass#listId'</span><span class="p">,</span> <span class="p">[</span></div>
<div class='line' id='LC3'> <span class="s1">'li[text=Hello]'</span><span class="p">,</span></div>
<div class='line' id='LC4'> <span class="s1">'li[text=World]'</span></div>
<div class='line' id='LC5'> <span class="p">]</span></div>
<div class='line' id='LC6'><span class="p">];</span></div>
just seems like a lot of element’s for not much code.. however, the real problem is that it’s rendered with double lines.. like so:
https://i.imgur.com/EpgfI.png
is it supposed to look like that?
Thanks,
https://www.ads-software.com/extend/plugins/embed-github-gist/
]]>First of all, I want to say THANKS for this plugin, its great ??
I had two potential new features in mind. One would be to use the Gist API to actually help compose a Gist without leaving WordPress. I see that another plugin has accomplished this (https://www.ads-software.com/extend/plugins/simple-gist-embed/) and since the source is open this might be worth looking at for a head start. I think it could be done better in terms of UI. The second request would be a way to remove the Gist branding below the code as an optional attribute in the shortcode (via css or javascript at actual render time). This makes sense when you have a bunch of one line code snippets and you want to keep consistency with some larger bodies of code. I have come across this when writing tutorials on my blog.
If I get a chance, I’d like to contribute code. Let me know if you have a public repository anywhere that I can push to if you are interested.
https://www.ads-software.com/extend/plugins/embed-github-gist/
]]>First, I want to thank the author of this plug-in for creating Embed GitHub Gist.
—
I encountered the following error when trying to use this however:
Fatal error: Cannot use object of type WP_Error as array in C:\mywebsite\wp-content\plugins\embed-github-gist\embed-github-gist.php on line 82
I did some digging and found that the follow error was being generated by the WP_Http request:
SSL certificate problem, verify that the CA cert is OK. Details: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed
I don’t 100% understand why the SSL verification is failing. I also don’t understand why GitHub is using SSL for these requests. I’m openly sharing these code samples on my blog, so I have nothing to hide.
Consequently, my solution was to simply disable the SSL verification. Below is the code snippet I used for this:
$args = array('sslverify' => false);
$result = $http->request('https://gist.github.com/' . $id . '.json' . $file, $args);
if ( is_wp_error($result) )
echo $result->get_error_message();
$json = json_decode($result['body']);
My PHP skills are a bit rusty, so this took me awhile to figure out. Hopefully this post will help someone else.
Best wishes, and thanks again for this wonderful plug-in.
Gabe
================
https://www.ads-software.com/extend/plugins/embed-github-gist/
]]>I have multiple files in one gist — is it possible to embed just one file, i.e. as if I was using <script src=”https://gist.github.com/546764.js?file=gistfile1.php”></script> ?
Thanks.
https://www.ads-software.com/extend/plugins/embed-github-gist/
]]>Hello,
to make your plugin working properly in embed gists, I had to update all url from HTTP to HTTPS.
Otherwise it’s subject to a 301 redirect ??