iDonny's blog

FTP is very risky; use SSH for versatile remote connections

It is amazing that FTP is still widely used and even promoted (by inaction and implication) by most commercial web hosts. Using FTP to send files to your web server, and even having the FTP service running on your web server is equivalent to making banking transactions without SSL enabled - the door is almost wide open and you could be setting yourself up for disaster.

SSH

SSH has been around for a long time and there are now many commercial and freeware tools that enable you to get at least the same functionality as you have always had from your FTP server but without the risk. Notably, you need to generate and use a private/public key pair to make your SSH connection water-tight. Using any SSH capable application such as PUTTY to connect to your remote server, or locally in your Linux machine, you can generate a key pair base don a paraphrase using the following command.

$ ssh-keygen -t rsa

Taking SSH to the next level

There is a small commercial application called SFTPdrive {http://en.wikipedia.org/wiki/SftpDrive} that enables windows and Mac users to configure remote machine-resources to be accessible like network drives mapped to be accessible locally. You do not have to pay for this feature if you have the skill and patience of configuring a tunneling setup with Putty (SSH tunneling), and map drives through the tunnel

JStools CSS preventing IE browsers from loading default style.css in Drupal

It appears that loading the JStools tabs CSS @import derictive before the default line for CSS styles in a Drupal theme prevents the default styles from being applies in IE browsers (yes, including IE7 and IE8).

<style type="text/css" media="all">@import "/modules/jstools/tabs/tabs.css"</style>

I was able to zero-in on this particular line (above) by commenting out the &amp;lt;?php print $styles; ?&amp;gt; directive in the Drupal theme and instead hard-coded the tyle @import lines (you can get these by copying the source of your pages before you comment out $styles in our theme).

Armed with the @import directives in the source, I applied them all and then removed one by one and in blocks until I was able to isolate the line causing the problem.

Solution
Writing the default style file (style.css) before the tabs.css call will solve the problem. The simples way to implement this is to hard-code a link to styles.css before the

<?php print $styles; ?> call in the drupal theme. The only down-side to ths approach is the fact that you will end up with two calls t the style.css file, but that does not have visible effects visually, or in markup validity.

Drupal Views Boomarks vs 'Promoted to frontpage'

To add granularity to the items in a given view that should be shown on a given list, you can either use:

  1.  Taxonomy terms - has the disadvantage of being listed in the term listing for that node unless you do extra work to exclude the vocabulary
  2. Re-purpose the 'promote to frontpage', or 'Sticky' settings already provide in Drupal - can have side-effects by affecting the promote and sticky features; since this is a 'misuse' of features
  3. Views Bookmarks - This module provides the features of the above alternatives without the disadvantages of either option. The module enables the creation of multiple and virtually endless switches that can be restricted by roles allowed to use them, the scope of effect (users can create bookmarks that only affect what they see), and the node-type (CCK) that a tag/switch can affect. Most  importantly, this module closely works with VIEWS, and so the switches can be used to add more granularity to VIEWS queries without unnecessarily clouding Taxonomy or mis-using existing settings (Sticky, Promote)

Adjusting element transparency in IE and Firefox

Standards compliant browsers (FF, Safari etc) and IE browsers require different CSS selector definitions to implement transparency. Here is what is necessary to set the following element to 50% transparency.

div#header
    {
        opacity: 0.5;
        filter: alpha(opacity = 50);
    }

Valid XHTML 1.0 Strict
This site is accepts Oped ID authentication for login
This Website is Built Using Semantic Markup and Cascading Style Sheets (CSS)
Some usage rights are reserved, please contact us for approval before using it