How to reference images in a Diazo template? - themes

I'm writing a theme using Diazo using the theme editor of plone.app.theming in Plone 4.3.6. I added a image image.png in the theme folder so it is accessible at http://localhost:8080/mysite/++theme++mytheme-theme/image.png when I'm developing the theme in my computer. I want to refer this image in the template HTML file with <img src="path/image.png">. However it is not clear what to put instead of path. I notice that path cannot be an absolute path because it depends of the site domain. Also, it cannot be a relative path because it depends on the path of each page in the site. May be it would be useful to have an specific keyword to reference the theme folder. For example, <img src="$themeFolder/image.png">. Exists such keyword?

If the HTML file is in your Diazo theme, you can use a relative path from the file, like "images/image.png". Diazo will correctly interpret it.
You can also use "++theme++mytheme-theme/image.png", as Acquisition would locate the image.

Related

Resource links within a web view?

Is it possible to include resource links (i.e., res://...) within a web view? My attempts so far suggest not. I can include standard tags and reference local files, but those are not scaled for the various display densities.
res:// is the format that only the NativeScript's file system would understand, more like a custom shorthand.
If you have the image inside Android's drawable folder, you may try this
file:///android_res/drawable/YOUR_FILE_NAME
For iOS, you will have to load it with absolute path.

Uploading Aheadworks blog extension to my custom Magento theme

I'm fairly new to Magento and am having trouble uploading the Aheadworks blog extension to the correct directories. I am using a custom theme for my site, let's call it "themex". The directions state "Navigate inside step_1 directory. If you use a different from default theme - be sure to rename step_1/app/design/frontend/default/default and step_1/skin/frontend/default/default folders to your store's values."
I've located the 'step_1' directory but I'm not quite understanding the latter part of the directions. Am I renaming the 'step_1' directory to "themex" and uploading it to the root directory? Please be as descriptive as possible in your response.
Their instructions are badly phrased, but I'm pretty sure it means that you need to upload the files to app/design/frontend/default/themex
Magento theme files appear in the app/design/frontend/ folder.
The "base" folder here contains the core layout files, and the "default" folder contains the file overrides for other themes. As such, your theme's layout files will appear under app/design/frontend/default/themex (possibly app/design/frontend/themex/default depending on how the theme works)
Magento will first look for design files here first, and then look under app/design/frontend/base if the override does not exist.
Make sure you back-up any files, and if their files over-write any of your theme files then run a comparison on them to make sure they are not over-writing any of your theme's functionality.

How to change logo in Joomla template, Entropy?

First time using Joomla and having a big issue. I was able to locate the css files that contains the background image url for the logo but i can't find the path that the css is referring to:
(../images/logo/style3/logo.png)
I am using the Entropy them by RocketThemes.
Your logo path is : /templates/rt_entropy_j15/images/logo/style3/logo.png
The urls that you found are are relative. The url of your image is therefore relative to the location of the css file you found. The ../ means go up one level - so instead of /templates/rt_entropy_j15/css/ (the location of the css file you are examining), one level up is /templates/rt_entropy_j15/ then go into the /images/ sub-folder (within /templates/rt_entropy_j15/ ) then navigate the /logo/style3/ folder tree and find your logo.png in place.
Firebug or similar debugging tools are always the best way to work through these kinds of problems.

How can I display my logo on my DokuWiki's title?

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.

Can I use CSS in directory listing of Firefox?

For example if I put "C:\docs" in address bar of Firefox, it shows all files in the directory. Is it possible to customize this page with CSS?
Apache 2.2 allows us to do it using IndexStyleSheet directive, so I wondered if Firefox can do it.
Firefox has a file userContent.css for each profile (found in the profile's settings folder). That file defines the standard CSS, why may then be overwritten by a website. So they also apply to directory listings.
You should have a look at the actual HTML code Firefox is creating for the directory listing to see how to do the CSS definitions right. You will find extensive documentation about userContent.css on the web.
http://www.mozilla.org/unix/customizing.html#userContent
I think the easiest way is to create an own skin which custom css. You have to modify dirListing.css in this case. (chrome://global/skin/dirListing/dirListing.css)
I know the walnut theme (https://addons.mozilla.org/en-US/firefox/addon/122) includes a modified file listing.

Resources