Brackets on GitHub issues - issue-tracking

Does anyone know how to include brackets in a comment on GitHub issues?
I'm trying to add something like this, but nothing shows up:
<dependentAssembly>
<assemblyIdentity name="dotless.Core" publicKeyToken="96b446c9e63eae34" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-1.2.2.0" newVersion="1.2.2.0" />
</dependentAssembly>
I've already tried to surround everything with <pre></pre>, "`", and others, but nothing seems to work. It just won't show up!

Did you try to HTML encode these?
< to - <
> to - >
& to - &

Related

win10 high contrast theme file open dialog context menu is empty

Since Windows 10, the (Vista+) file dialog generated by
hr = CoCreateInstance(CLSID_FileOpenDialog, NULL, CLSCTX_INPROC_SERVER, IID_PPV_ARGS(&pfd));
does not show the dialog context menu when in a high contrast theme. It worked as expected in Win81, and Win7, but not Win10 (none of Win10: since the original, up to most-recent 1607).
Foobar2000, an app, just recently fixed the problem (as of v1.3.12, at least). Here are two pics showing the problem in two versions, the bad on is v1.2.3, but I am sure as recently as the 1.3.beta it was bad.
Below these are winspy info on the only real difference I can spot, in Properties. The Win10 system File Explorer has the same '0000A916 (Atom)' property that is in the current FB2k (but not present in previous FB2ks).
How can I get the Win10-like File Open dialog? Notice the Vista-like graphics are not in the new version (e.g., see the back and forward arrow buttons).
This third link did not make it with 0 rep pts.
I thought the problem was theme related. I compared the manifests between the two fb2ks. And there it was. The supportedOS element is needed. The only one I care about is the one for Win10. I've included the .manifest I use.
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<dependency>
<dependentAssembly>
<assemblyIdentity type="win32" name="Microsoft.Windows.Common-Controls" version="6.0.0.0" processorArchitecture="*" publicKeyToken="6595b64144ccf1df" language="*"></assemblyIdentity>
</dependentAssembly>
</dependency>
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
<security>
<requestedPrivileges>
<requestedExecutionLevel level="asInvoker" uiAccess="false"></requestedExecutionLevel>
</requestedPrivileges>
</security>
</trustInfo>
<application xmlns="urn:schemas-microsoft-com:asm.v3">
<windowsSettings>
<dpiAware xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">true</dpiAware>
</windowsSettings>
</application>
<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
<application>
<supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}"></supportedOS>
</application>
</compatibility>
</assembly>

TinyMCE4 custom self closing tag

I have some custom XML tags which I want to use in my TinyMCE 4 editor.
One of it, is self closing.
For example this 'html' is valid:
<include type="module" name="MyModule">
<param name="myParam" value="myValue" />
</include>
According to allow these custom tags, i've added the following things to my init:
extended_valid_elements: "include[type|name],param[type|name|value]",
valid_children: "+p[include], +include[param]",
After inserting the code snippet, TinyMCE converts it into:
<include type="module" name="MyModule">
<param name="myParam" value="myValue">
</include>
Now the param tag isn't closed anymore.
After searching, I found the variable self_closing_elements. Adding my custom tags to it, unfortunately didn't work. I also 'played' with short_ended_elements and whitespace_elements, without any success.
So, how can I allow these custom tags to be self closing in TinyMCE 4 (I can find allow about version 3, not about v4...).
Was a bug in the version I used. After updating to the latest TinyMCE4 version, it worked like a charm

How to override popup.pt in Plone?

I was able to modify the original popup.pt and see changes in my instance, but when I try to override it by copying and renaming to archetypes.referencebrowserwidget.browser.popup.pt in my theme/(add-in) overrides folder I am unable to see my changes.
I overrode the path_bar class viewlet, following this tutorial. I attempted to follow the same logic for overriding popup.pt, but I was unable to get Plone to see the file in my configure.zcml.
configure.zcml:
<configure
xmlns="http://namespaces.zope.org/zope"
xmlns:i18n="http://namespaces.zope.org/i18n"
xmlns:genericsetup="http://namespaces.zope.org/genericsetup"
xmlns:browser="http://namespaces.zope.org/browser"
xmlns:plone="http://namespaces.plone.org/plone"
i18n_domain="mytheme.theme">
<includeDependencies package="." />
<plone:static
directory="resources"
type="theme"
/>
<genericsetup:registerProfile
name="default"
title="mytheme.theme"
directory="profiles/default"
description="Installs the mytheme.theme package"
provides="Products.GenericSetup.interfaces.EXTENSION"
/>
<browser:viewlet
name="plone.path_bar"
manager="plone.app.layout.viewlets.interfaces.IAboveContent"
class=".customizations.PathBarViewlet"
permission="zope2.View"
layer=".interfaces.IMyTheme"
/>
<browser:page
name="login_main_template"
for="*"
permission="zope.Public"
template="login_main_template.pt"
/>
</configure>
While searching for a solution I found this Stackoverflow question - How to customize the popup.pt template from archetypes.referencebrowserwidget?. I added/:
<include package="z3c.jbot" file="meta.zcml" />
<browser:jbot directory="jbot_templates" layer=".browser.interfaces.IThemeSpecific" />
to my configure.zcml and removed the browser:viewlet from my previous attempt but I was still unable to get Plone to see my overview.
Which method do I need to use to override, the class viewlet, the z3c.jbot, or just the standard copy/rename method? I have read thru the Plone documentation multiple times, but still unable to resolve my issue. If I need to post any additional files please let me know.
Thanks in advance.
The z3c.jbot approach usually just works fine.
You have to be sure, that the file you place into to your jbot_templates folder has the right name.
The path to the popup.pt is archetypes/referencebrowserwidget/browser/popup.pt,
So in your case the filename must be archetypes.referencebrowserwidget.browser.popup.pt
Please make sure that your browserlayer .interfaces.IMyTheme is active on your site -> browserlayer.xml

IE 9 BoxModel padding/spacing issue when changing localhost to computername

when I run my site on for example: /localhost/Test then the box-model and table borders/padding/spacing etc... looks normal.
Example IE9 Box Model OK localHost: http://www.flickr.com/photos/cenesam/6243269622/in/photostream
When I run the same test site on: /my computer name/Test then IE9 goes wacky and the box-model increases padding / spacing etc...
Example IE9 BoxModel NOK Computername:
Url: http://www.flickr.com/photos/cenesam/6242752657/in/photostream
Does anyone recognize this behaviour and knows how to deal with this?
I've included 2 sample pictures to show the visual problem. One is with localhost one is with computer name.
Any ideas are much appreciated.
Thanks,
Joost
Finaly found the answer somewhere on the web.
Spudley (thank you!) pointed me to the right direction. This meta tag was definitly the answer!!
But what is important that IE NEEDS this tag to be the FIRST one in the Head section. My site uses a theming engine which parses the styles in the head tag and therefore it was not working.
Now I'm overriding this in web.config (webserver section) by:
<httpProtocol>
<customHeaders>
<remove name="X-UA-Compatible" />
<add name="X-UA-Compatible" value="IE=Edge" />
</customHeaders>
</httpProtocol>
And now it finaly works again.
Thank you all for thinking with me!
Check the developer tools window (press F12) to see what rendering mode is being used.
IE has config settings which can cause it to fall back into compatibility mode in certain circumstances. One of those circumstances is when it's run on a "local intranet site" (which includes localhost).
Go to the IE Tools menu, and pick the "Compatibility View Settings" to change the config on this.
To force the site to load in the correct mode regardless of this setting, you can include the following meta tag in your HTML <head>:
<meta http-equiv="X-UA-Compatible" content="IE=Edge" />
Hope that helps.
Have you included an html doctype in the page? Ie9 modifies its behavior depending on the value of the doctype and/or meta tags.
http://www.google.com/search?hl=en&q=ie9+doctype+site%3Amicrosoft.com
Check for the "compatibility view" icon in the URL bar (the "broken page") and look if clicking (i.e. "activating" it) changes something.
Display the menu bar (right-click -> menubar) go to extras -> compatibility view preferences (like this, i got the german version here) and remove the "intranet" checkbox.

Images not displaying from theme layout (Orchard CMS)

I'm trying to create theme for Orchard CMS. The template I have wasn't made for it so I have some troubles displaying images from Layout.cshtml.
This is the current folder structure on my web server (theme folder structure only):
Theme/Content/Images/Image.jpg
Theme/Views/Layout.cshtml
Theme/Styles/Site.css
The following line doesn't display image (located in Layout.cshtml):
<img src="../Content/Images/bgBig.jpg" alt="Big background image" />
However, this line does display the image (located in Site.css):
background-image:url('../Content/Images/bgLines.png');
I believe the problem is that Layout.cshtml doesn't display the image from Theme/Views/Layout.cshtml, but from the other location. If someone knows what would be that location or how to override it I would be thankful.
I might be a little late, but this may be of help to others.
To get the current theme and then build an dynamic path (as opposed to an absolute path) use this:
WorkContext.CurrentTheme: Gets the current working theme ExtensionDescriptor.
Then give it to the Html.ThemePath URL builder:
Ex.
Html.ThemePath(WorkContext.CurrentTheme, "/Content/Images/SomeImage.png")
Have fun!
Best regards,
Tiago.
When adding images in Layout.cshtml you should use the full path to your theme (eg. /Themes/My.Theme/Content/Images/MyImage.jpg). Remember that the paths you provide in [img] tag are relative to the URL in browser, not the path on the server. In MVC those are almost never equal.
Layout.cshtml view file gets loaded as a part of every single request, so relative paths placed inside will almost always break.
Imagine you have two Orchard pages: site.com/mypage and site.com/something/mypage. Layout.cshtml gets rendered in both of them. Relative URLs working for the first will surely break when you access second one.
CSS stylesheets are loaded directly by specifying absolute path to the physical files in /Themes/YourTheme/Styles folder (default), so in this case relative URLs will work.
HTH
Thx Tiago for your solution. I think this is in fact the correct solution, as opposed to linking the full path which I think would require the Orchard site to be on the root of the domain.
The full image reference of the original question would look like this:
<img src="#Url.Content(Html.ThemePath(WorkContext.CurrentTheme, "/Content/Images/bgBig.jpg"))" alt="Big background image" />
I'm surprised that nobody's mentioned that you need the following web.config in the folder in which your images/scripts/styles reside (see the orchard docs)
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.web>
<httpHandlers>
<!-- iis6 - for any request in this location,
return via managed static file handler -->
<add path="*" verb="*" type="System.Web.StaticFileHandler" />
</httpHandlers>
</system.web>
<system.webServer>
<handlers accessPolicy="Script,Read">
<!-- iis7 - for any request to a file exists on disk,
return it via native http module.
accessPolicy 'Script' is to allow for a managed 404 page. -->
<add name="StaticFile" path="*" verb="*" modules="StaticFileModule"
preCondition="integratedMode" resourceType="File"
requireAccess="Read" />
</handlers>
</system.webServer>
</configuration>
Additionally, as others have pointed out, this is the most reliable way of locating an image:
<img src="#Url.Content(Html.ThemePath(WorkContext.CurrentTheme, "/Content/Header.png"))" />
if you examine the source, it should show you where it's trying to find that image and failing. It's most likely the relative path it's having issue with, try an absolute path in the css to see if that's the issue. without the actual site, I can't know for sure.

Resources