I'm using MediaWiki 1.32 and I've been trying to get the Template:Note to work. From what I gathered, I don't have the Note template installed in my wiki/extensions folder.
My goal is to create Info/Warning/Danger type of short notes (with a small icon) similar to the ones found at the top of the following page.
If this extension is not available, are there any similar Note Extensions I could download/install. Or should I create this Note's effect using MediaWiki Table manually, as described below?
{|class="wikitable"
| [[File:Info-icon.png]]
| This Message is the least ugliest fancy table
|}
Question starts to date but anyway...
You don't need any extension to do that, just use a template, lets call it Template:Note, with this content:
<includeonly>{|class="wikitable"
| [[File:Info-icon.png]]
| {{{1}}}
|}</includeonly>
And call it as follows:
{{Note|This Message is the least ugliest fancy table}}
Related
I use Storm daily for PHP/Laravel, and hence have PHP configured. When I want to create a vanilla HTML / JS side project, Storm takes it upon itself to add the PHP libraries without asking. I don't want any PHP Libraries. When initially creating the project, I used "empty project".
Here is a screen shot to illustrate.
So, how to create an empty project without PHP libraries?
You are using PhpStorm, an IDE that supports PHP. That entry that you see there is a list of stubs for PHP (the stuff that IDE knows about core PHP and other common extensions: classes/functions/constants etc).
AFAIK it always will be there (as it's a PHP oriented IDE) and you cannot remove it. But you try this:
Settings (Preferences on macOS)
Languages & Frameworks | PHP
PHP Runtime tab
Uncheck ALL entries there.
If the above will not get rid of the whole node then you will have to ignore that entry. And I do not see any problems in having it here: it will not affect your JS/HTML in any way.
P.S. Whatever will be in a default/new project can be configured at File | New Projects Settings | Settings for New Projects...
First of all, I'm talking about PackageMaker, a GUI application; not packagemaker, a command-line program.
I'm trying to make a install package that has three components, installed in different locations:
XxxxBin.app application, default installed to /Applications;
Xxxx.bundle plugin bundle, default installed to /Library/Audio/Plug-Ins/VST/ (and renamed to Xxxx.vst, which is very easy to be achieved by using post-install script);
some resource files, default installed in /Library/Company/Xxxx_resources/.
And I want to allow users to change target directories of each compnent during installation.
I noticed there are two layers in PackageMaker: choice and package. When you drag an app/bundle/directory into PackageMaker, it will create a new choice and a new package. However, both choice and package layer contains Destination, which greatly confused me. In addition, in Components page for packages that is derived from an app or bundle, there is a check box labelled "Allow Relocation", which introduced further confusion.
I failed to find detailed information on those options. And after many attempts, I'm using the following layout and combination of options, that are very close to my target:
three choices and packages, each contain the app, the bundle, or the directory of resources.
in all choice layers, fill the Destination entry with actual default install paths, and select the "Allow alternate volume" checkbox;
in all package layers, fill the Destination entry with /, and select the "Allow custom location" checkbox;
in all Components page in package layers, deselect all Allow Relocation checkbox.
However, it still has a very weird behavior: the app is copied twice, to both its own directory, and overwriting the directory of the plugin bundle. If you "show content" on the installed bundle, it will look something like this:
/Library/Audio/Plug-Ins/VST/Xxxx.vst
|
+contents
|
+-info.plist: after looking on its content, it is actually the app's plist, not the bundle's
|
+-MacOS
| |
| +-Xxxx: the bundle's dynamic library, which is expected to be here
| |
| +-XxxxBin: the app's executable, which is NOT expected to be here
|
+-Resources
|
+-Xxxx.xml: some config info for the bundle, which is expected to be here
|
+-icon.icns: the app's icon, which is NOT expected to be here
I am quite exhausted on this stuff, but still not reaching my target that looks pretty simple: user-changeable install directory for multiple components. It's really appreciate for someone who can drag me out of this quagmire. Thanks for a lot!
Finally I found the actual cause is not in PackageMaker stuffs, but is inside the bundles being packaged. The bundle identifier of both the app and the plugin is empty. After I assign them with distinct values, everything just work fine.
I'm trying PhpStorm. I like the File Templates functionality and I'd like to use it in some more specific cases.
I'd like to extend to PHP Class template to create a new template that I'll be using for a specific type of classes. If I just duplicate the template, it doesn't really work as I'd expect. For example, while when I use PHP Class, the namespace is already compiled, this does not happen with my new template.
Is it possible to create another template so that it works as PHP Class?
Moreover... is there a way to order the templates in the editor, so I could have my new template near all the other PHP templates?
Is it possible to create another template so that it works as PHP Class?
Unfortunately not; at least not in current versions (2016.2).
When you are using New | PHP Class you see special dialog box that works with 3 templates (depends on what you will be creating: Class, Interface or Trait). This dialog uses file templates with predefined (default) names only and you can customize them as you wish .. but all other file templates for .php files will be just ordinary File Templates without those extras.
Based on your requirements you might be interested in https://youtrack.jetbrains.com/issue/WI-21711 ticket -- watch it (star/vote/comment) to get notified on any progress.
Please note that file templates could be project-specific (different template content for each project) -- this might be enough in some (rather simple) cases.
Moreover... is there a way to order the templates in the editor, so I could have my new template near all the other PHP templates?
Unfortunately not -- no sorting/subfolders is available (although you may have project-specific file templates).
Right now I may only suggest to use some common prefix in template name and build your sorting order around this idea.
Other than that -- https://youtrack.jetbrains.com/issue/IDEA-75239 + https://youtrack.jetbrains.com/issue/IDEABKL-3599 -- watch these tickets (star/vote/comment) to get notified on any progress.
I've started to use sublime text 2 and I was hoping for a fast way to create relative path references for the purpose of creating hrefs or src references?
E.g. say i had this file strucure:
myfolder
|-->css
| `-->js
| `-->something.js
`-->current.html
And i was editing a <script src="[cursor_here]"> tag, I would like to use sublime's 'fuzzy' search function to quickly and accurately create the file path 'css/js/something.js by typing something like cjs and picking with my keyboard.
is this a base sublime functionality or is there a package for such a task or would I need to create this package myself?
Check out the AutoFileName plugin from Package Control, it does exactly what you're describing. It can also do cool things like inserting dimensions for images, if you like. Make sure you read the README at the link above, and also go through the configuration options available in Preferences -> Packages -> AutoFileName -> Settings-Default (they'll need to be entered into Preferences-User if you want to change them).
In MediaWiki, you can use a variable ("Magic Word") such as
{{PAGENAME}}
or
{{REVISIONDAY}}
to get specific information related to the current page being viewed. Is there a similar variable (or perhaps a different way) to get the current user who is logged in to the wiki, i.e. something like
{{USERNAME}}
context: Trying to use the #ask query in Semantic MediaWiki to narrow the list of resulting pages to show those only the user has created or edited:
{{#ask: [[Case Reflection:+]] [[Contributing User::{{USERNAME}}]]
| format=template
| template=Case Reflection Form Summary
| link=all
| sort=Last Edited
| order=DESC
| default=You have no case reflections related to this Case Study.}}
There are a bunch of extensions for that such as GetUserName, MyVariables, UserInfo. The whole concept of showing usernames is incompatible with page caching though (you need to parse the page again every time someone looks at it) so generally not a good idea.
I was just searching for the same thing, and looking to see if I could do it without extensions. It looks like there's a default feature that allows this, as long as you want it as part of writing a static version to a page, not to say "Hello, Username!" (That last case is why they have not implemented it as a standard variable, because it causes caching problems.)
Wikimedia feature request T14733 resolves with:
{{subst:REVISIONUSER}}
{{REVISIONUSER}} will dynamically show the last editor, which is usually not what you want. But if you want, for example, to make a template that includes the user's handle as part of some inserted text, this should do the job. I think in your example above,
[[Contributing User::{{subst:REVISIONUSER}}]]
(I'm not sure if Semantic Mediawiki will make you escape out the substitutions, but if it does, further instructions are at Manual:Substitution, Multilevel substitution section.)