https://i68.tinypic.com/35i9kz4.jpg
Have a look at the image above. The Snippet text box just disappeared suddenly. So now I can’t add or edit any snippet now.
How do I fix this?
]]>Hello,
Let me start off by saying this plugin is great! I like the custom color presets for different code types. It was exactly what I searched for.
The only small quirk occurs when using an iOS device (iPhone 6 tested). Once the post is loaded, attempting to scroll down results in an immediate jump to the first code snippet for text selection/ input. Is this a known issue or has anyone else experienced it?
This does not occur on posts that do not contain code snippets.
Problem post https://cristarta.com/jquery-masonry-breaks-pinbin-theme-fix/
-Cheers
https://www.ads-software.com/plugins/code-snippet-library/
Hi there i have been using this plugin and love it but i have noticed that my codes are getting deleted somehow. I will look at a page on my site and notice that it isnt working correctly and then look at the code and i will be completely deleted and no code in the library.
]]>Hello,
I’m using Code Snippets Library at multiple places in a page; it shows up at one or few places and doesn’t show up at other places. The underlying page template/content template is exactly the same.
Please check the URL:
https://patterns.seagate.com/choice/navigation
Please click through the first two subsections, and check the bottom part of the content with subtitle: HTML.
Please advise.
]]>I just installed this plugin as it appears to be the best one for my needs (displaying source code on a tutorial site).
I added some C source code as a “C/C++” snippet. I then copied the shortcode:
[snippet id="23"]
I then tried pasting that exact line into one of my pages, both via the “Text” and “Visual” editors, and no luck. If I paste it in the visual editor, the literal text [snippet id="23"]
appears, and if I paste it using the text editor, nothing appears.
Has anyone had any luck getting this up and running on 4.1.1, or is there some glaringly obvious step I’m overlooking here?
Thank you.
]]>I would like to add following snipped
function get-msiinfo
<#
.SYNOPSIS
funktion to get MSI details
.DESCRIPTION
get ProductCode, ProductVersion, ProductName
.PARAMETER $Path
specifies the path of MSI file
.PARAMETER $Property
Properies can be specified for ProductCode, ProductVersion, ProductName
.EXAMPLE
get-msiinfo -Path C:\temp\file.msi -Property ProductCode
get-msiinfo -Path C:\temp\file.msi -Property ProductVersion
get-msiinfo -Path C:\temp\file.msi -Property ProductName
#>
{
[CmdletBinding()]
param(
[parameter(Mandatory=$true)]
[IO.FileInfo]$Path,
[parameter(Mandatory=$true)]
[ValidateSet("ProductCode","ProductVersion","ProductName")]
[string]$Property
)
try {
$WindowsInstaller = New-Object -ComObject WindowsInstaller.Installer
$MSIDatabase = $WindowsInstaller.GetType().InvokeMember("OpenDatabase","InvokeMethod",$Null,$WindowsInstaller,@($Path.FullName,0))
$Query = "SELECT Value FROM Property WHERE Property = '$($Property)'"
$View = $MSIDatabase.GetType().InvokeMember("OpenView","InvokeMethod",$null,$MSIDatabase,($Query))
$View.GetType().InvokeMember("Execute", "InvokeMethod", $null, $View, $null)
$Record = $View.GetType().InvokeMember("Fetch","InvokeMethod",$null,$View,$null)
$Value = $Record.GetType().InvokeMember("StringData","GetProperty",$null,$Record,1)
return $Value
}
catch {
Write-Output $_.Exception.Message
}
}
The error appearing shows following:
Access denied by security policy
Your request is blocked by a security policy rule.
What causes the error.
]]>snippets are not always shown in posts. Especially in IE they’re not shown at first call of the website. It takes sometimes several refreshes until it is shown.
Result is better on chrome
appearence is independently of content of the snippet
I’ve started posting one line code snippets, and the first one gave me trouble in some browsers. In IE and some versions of Chrome the code in the snippet-area are hidden by the slidebar! Are there an easy fix to this or did I do something wrong ?
Working fine in Firefox though…
Link to my site: https://www.auxilium.no/auxilium/blogg/
Thanks!
]]>Subscribers Mail does not display the Code Snippet. It only shows the shortcode.
]]>How can I get the snippets to display responsively (e.g. wrap around a width of 100% of container div / viewport)?
Thanks,
Stefan
When I try to put in code, in c, which contains the fopen() command, I get an error at the top of the page – “An unidentified error has occurred” – when I hit the “Add New Snippet” button.
I really like this plugin – thanks!
My site is https://www.paulscodebook.net
]]>The code snippets class file is improperly loading a div tag into the <head> and it forces the entire <head> tag to load into the page <body>.
I didn’t look to much into and I don’t think this is really a good way to do it either, but the following seems to be working as far as I can tell.
I don’t know if you’re suppose to use $in_footer within the ‘in_admin_head’ action hook, but it seems to work.
I could be missing the point of what the div is actually doing but it seems like without it the only thing that seems to not work when it’s not loaded it is the code snippets icon. So an alternative would be a new seperate function that just loads the echoed div into ‘in_admin_header’ hook.
Or this could work if the div has to be the first thing loaded in the body. I haven’t tried it, but you can achieve that with jquery inside you’re function:
?>
<script type="text/javascript">
jQuery(document).ready( function($) {
$('body').prepend(' code inside body tag goes here ');
} );
</script>
<?php
We should aslo probably check that the editor is loaded first so then the file only gets enqueued on pages that it actually load tinymce instead of every single admin page.
`if ( get_user_option(‘rich_editing’) == ‘true’) {
}`
And the correct way to add an image to the editor is through javascript itself according to tinymce ed.addButton
This may or may not work with you’re plugin though because again I’m not entirely sure what the hack is actually for in the first place
By the way, on a side note if you type the word code in the search bar on that site they have your exact same icon in icon font format.
]]>Hello!
I must first say, I really like this plugin and it’s awesome! I would like to create some buttons to show and hide these code snippets because they can get lengthy. However my code does not work and I can’t seem to understand why.
<button class=”codeButtons” onclick=”show(‘code6’)”>Show Me</button> <button class=”codeButtons” onclick=”hide(‘code6’)”>Hide</button>
</p>
<div id=”code6″ style=”display:none;”>[snippet id=”52″]</div>
and the functions show and hide are:
function hide(name)
{
document.getElementById(name).style.display=”none”;
}
function show(name)
{
document.getElementById(name).style.display=”block”;
}
– When I press the show button, it reveals the div but not the code snippet. Do you have any advice as to how I can solve this issue?
]]>Hi Hugh,
Thanks so much for releasing this plugin. ??
I was wondering if you knew how to get the snippet box to auto resize it’s height to fit the content and get rid of the vertical scroll bar. I tried via CSS but it didn’t appear to have any effect.
I also modified the plugin code for class-code-snippet-library (shame on me since it will break when you update) to allow a title attribute to be used in the shortcode. If anyone else wants to do the same below are the changes I made.
On line 261 I added:
'title' => ''
On line 270 I modified:
$html = $this->display_snippet( $id , $execute );
to be
$html = $this->display_snippet( $id , $execute, $title );
On line 276 I modified:
private function display_snippet( $id = 0 , $execute = false ) {
to be
private function display_snippet( $id = 0 , $execute = false, $title ) {
On Line 299 I added (before <pre id=”code_snippet_’):
<div class="csl-tw"><span class="csl-dt">snippet?:?</span><span class="csl-ct">'.$title.'</span></div>
I then styled my “csl-tw” and ‘csl-title’ in my stylesheet. The styles I chose look like this (modify as needed):
.csl-tw {
background:#CCCCCC;
border-bottom:1px solid #B3B3B3;
padding:7px 12px 4px;
}
.csl-dt {
color:#9c9c9c;
}
Additionally, to remove the top margin (white gap) so my title box and snippet box touch, in my CSS I added:
.entry-content pre.ace_editor{
margin-top:0;
}
Then end result looks something like this:
CSL – With Title Img
Future Feature Suggestions
– Add title attribute to snippet shortcode.
– It would be really neat when we create the snippet if we could have a “description field” which could be used as the shortcode title
– Some kind of snippet categories (for organization); if this is possible maybe use the category instead of a description for the title
https://www.ads-software.com/extend/plugins/code-snippet-library/
]]>Hi,
When I define a theme for front or back office, i got a Forbidden HTTP error to the following URLs
https://d1n0x3qji82z53.cloudfront.net/src-min-noconflict/theme-xcode.jsFailed to load resource: the server responded with a status of 403 (Forbidden)
Thanks for your support
https://www.ads-software.com/extend/plugins/code-snippet-library/
]]>Hi,
I am new to this plug-in so my problem might be really easy to solve.
I have created a post where I want to show some coding but somehow the code is not displayed,
When I have a look at the source-code of the page I see the snippets are present, but the don’t get displayed.
My post: go to
https://www.ads-software.com/extend/plugins/code-snippet-library/
]]>Your plugin is very nice. Easier to use than Gist.
Few questions:
– https://ace.ajax.org/build/kitchen-sink.html shows Pascal mode
to colorize Delphi/Pascal code.
But it is not listed in Language Drop Down.
Would it be difficult to add?
– Ace ace site has an option show/hide gutter (line numbers)
Is it possible to do with your plugin?
– It would be nice to have a way easily copy snippet to Clipboard.
Gist has “show raw” Is it difficult to add Copy button or link?
Thanks
Gene Manheim
https://www.ads-software.com/extend/plugins/code-snippet-library/
]]>Love the plugin, I like that you can save all the snippets of code in a library and serve it via shortcode so that you don’t have to worry about clicking “visual” accidently and losing everything ??
I just really need the ability to display multiple snippets on the one page.
ie. I show the “before” and the “after” on the one page..
If it can’t do multiple snippets, I can’t see a use for it (for me) which sucks because I’ve tried all the others and I like this one the best for the above reasons ??
Do you know how long until the next version? Maybe I can just save up my snippets for a while and display them at a later date when the new version comes out.. unless the date is too far in the future that is … I can wait months, not years.
??
https://www.ads-software.com/extend/plugins/code-snippet-library/
]]>