With a little bit of help from htaccess I managed to incorporate php inside my css documents. The problem with this is that textmate sees that the document has php tags and color coordinates that language over css. Is their anyway to switch back and forth manually (without removing php and saving the file)?
You can manually change the language of a file using the drop-down menu at the bottom of a document window. This crudely annotated screenshot shows where:
What is the extension of your file? .php or .css?
What does the language-selection menu at the bottom of the window says about your file? PHP or CSS? What happens if you change one for the other?
How is your file? <?php ... all your css ... ?> or body { background-color: <?php echo $todaysBgColor; ?>; } ...?
TextMate's theming is build around the notion of scope. If your file looks like my first example, there is a big chance all the CSS parts that you put inside of a PHP block are going to be treated as PHP by TextMate because of their scope.
I don't remember the keyboard shortcut but there is a command in the theme-creation bundle that shows you the scope of the word/character under the cursor. Write it down, then go to the Preferences window and edit your theme so that a CSS scope within a PHP scope looks like normal CSS.
Related
Is it possible to change bootstrap sass colors with a click of a button? I tried googling but I didn't find anything. Thanks for any help <3
No you can't change bootstrap colors with a click of button in whole Sass file because it's not used in browser, It can't be done in CSS file globally if color is directly applied to properties.
But you can modify it if it's a CSS variable, a CSS variable looks like this
--theme-color : blue;
That might be possible if you are using preprocessors in Browser, less.js works in browser but I am not sure if you can change value of variable with a click in less.
I think you should review what you are actually creating.
My code is this:
When i toggle the editor I have:
Where have I got it wrong?
From your title, I am assuming any <link> tag is being stripped.
Link tags are only valid in the head of the page, and TinyMCE is set to use the HTML5 specification by default when it tidies code, so presumably it is removing them due to their invalidity in the body of the page.
You could probably configure the code of TinyMCE to do what you want (see: http://www.tinymce.com/wiki.php/Configuration:valid_children), but as that does not seem to be possible via Joomla's plug-in parameters, it would mean overriding a core file, which may then cause problems should you patch the site.
One alternative would be to turn off Tiny MCE, and add the code via the blank editor.
Ideally, it sounds like you should be creating a bespoke module in which the link element can go in the head of the page as it should be.
I am trying to find a way to get smarty templates, .tpl files, to work with Zend Studio 9. The smartypdt plugin fails to install on Mac OS, and all the other File Associations--I have tried PHP Editor and HTML as associated editor--fail, too. This time stating: "Unsupported content type in editor". So all I am left with is a plain text mode.
How do I get basic template highlighting? I do not necessarily want smarty support anymore, just basic HTML and JavaScript highlighting would be enough.
On the File Associations Panel, there is a link to Content Types. There, I have added *.tpl file to the HTML view node. This ensures basic html highlighting and goes a long way when compared to the plain text mode.
Is there a way to beautify JavaScript and CSS in Firebug?
I'd like to be able to view formatted JavaScript code instead of the compressed version :).
There is now a plugin that intercepts JavaScript downloads and deminifies it at that point.
Unfortunately, the way it hooks into Firefox means that it applies to all JavaScript downloads and just not specific ones and the JavaScript files have to be served with an appropriate MIME type.
https://addons.mozilla.org/en-US/firefox/addon/247565/
CSS is already beautified in Firebug, as clearly seen by comparing the CSS tab or CSS pane with the raw source.
JavaScript, alas, is not. The best you can do, for now, is to paste the code into something like http://jsbeautifier.org/ .
However, if you write a Firebug extension that does this, you will have all of our gratitude. ;-)
Firefox Developer Tools has:
"Prettify Source" button: braces {} icon on bottom left
"Auto Prettify Minified Sources" setting: turns Prettify Source on by default.
To enable it: go to the engine icon on top right of the Debugger tab, not the global settings engine.
Tested on Firefox 42.
I have a DokuWiki and I'd like to place a logo on the title bar at the top of the page? How can I do this? Note that I am not referring to the title bar at the top of the browser, but rather the title bar on the website itself.
I tried inserting the DokuWiki syntax: {{public:logo.jpg?100x100}}, but this simply rendered as plain text and not an image.
Is it possible to put an image in the page title?
Easy: Rename your logo as "logo.png" and place it into :wiki namespace. It will show automatically.
This solution works on template "dokuwiki" (default one on dokuwiki old stable version "Adora Belle" and in current one "Weatherwax"):
Deeper:
We can look at tpl_header.php file, lines 21&23:
// get logo either out of the template images folder or data/media folder
[...]
$logo = tpl_getMediaFile(array(':wiki:logo.png', 'images/logo.png'), false, $logoSize);
Ok: tpl_getMediaFile() function will look for a file logo.png in media namespace called wiki.
So I go to dokuwiki File Manager and I upload my logo.png file on wiki namespace. I refresh page and I smile.
Hope That Helps
In modern versions of DokuWiki you don't have to make your own template. Simply upload a file called logo.png to the wiki or root namespace in the DokuWiki Media Manager.
This is the line of template code that gets the logo:
https://github.com/splitbrain/dokuwiki/blob/master/lib/tpl/dokuwiki/tpl_header.php#L23
You can tell that it is first checking logo.png in the wiki namespace with :wiki:logo.png and then logo.png in the root namespace with :logo.png.
If it doesn't find either, it falls back on images/logo.png, which is the default logo.
(for latest versions of Dokuwiki)
You should create your own template, and do whatever hack you need to do.
It is located in lib/tpl/
Just copy the default directory with your own name (this will be available in the admin area later), something like "company", and edit:
<div class="pagename">
<img src="<?php echo DOKU_TPL; ?>images/logo.png" align="absmiddle"/>
[[<?php tpl_link(wl($ID,'do=backlink'),tpl_pagetitle($ID,true),'title="'.$lang['btn_backlink'].'"')?>]]
</div>
You can build the HTML as you like... but the example above works just fine (the image is located in the lib/tpl/company/images/)
You can then change the template of your Wiki by updating the configuration at:
Admin > configuration manager > template
There's no config option for this, you'd have to hack it in \dokuwiki-2009-02-14\lib\tpl\index.php I'm afraid.